source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Whats the effect on Voltage and Amps when 244 9v batteries are connected in a series? There are many opinions about a stunt a guy did on youtube, where he connected 244 9v batteries together in series. Can someone clarify the magnitude of Current being limited by the chemical reaction within the batteries The affect of above on Voltage (is it the same thing) Are there any current or voltage maximums in this configuration? How many more batteries are needed? What are they and how would I figure that out? From what I read, he was doing something very reckless, and could could severe injury or death. <Q> Assuming the batteries are identical, the current won't be more than one battery could supply into a short circuit (probably several amperes for a fresh 9V alkaline <S> battery- <S> I've measured 5A briefly from a Costco 9V battery) <S> no matter the number of batteries. <S> The voltage increases with each added cell, but so does the internal resistance, and by the same factor. <S> That said, there's potential for explosion if the internal resistance of one started to increase greatly (which it might from such abuse). <S> Also, a couple amperes at 2.2kV is a lot of power, liberating a lot of heat even if the batteries stay balanced and they're closely packed <S> so there's nowhere for the heat to go. <S> It is also easily a lethal shock hazard. <S> And putting that kind of voltage with that much available current into a Radio Shack handheld meter is reckless. <S> NiCd 9V batteries can supply 90A briefly which could well lead to a fairly substantial explosion- <S> 90A at 2.2kV is going to create a stubbornly persistent arc, so it might not be just a single battery going up. <S> I remember reading some speculation (in an old issue of Analog, if I recall correctly) about an office-desk-size arrangement of AA batteries producing something like 1MV. <S> The author speculated that it would be next to impossible to extinguish the arc once initiated. <S> The only limit on this insanity would be the geometry of the arrangement- <S> if the voltage per cm gets high enough between any two points to break the air down you're going to have instant issues. <S> But you could make a linear arrangement of 150,000 batteries and get 1.35MV (peak available output power about 3MW) if you could round up that many batteries- 4500 <S> HP- almost 7 metric tons of batteries and still not quite what you can get from an internal combustion engine in a drag racer. <A> Current being limited by the chemical reaction within the batteries: When batteries are put together in series, the maximum current is the maximum current of the weakest battery in the series. <S> The current is not added when cells are put together in series. <S> I believe that the maximum current that any type of battery can provide is related to its internal resistance, assuming that there are no added electronics limiting the currents that a battery can supply. <S> The affect of the above on voltage: when cells or batteries are added together in series, the voltage of each battery is added to the next. <S> So if in the video all of the batteries were at exactly 9 volts, then the voltage of his creation would be 244 * 9 = 2196 volts. <S> Are there any voltage or current maximums in this configuration? <S> I don't quite understand what you are asking at this point. <S> The voltage is as stated above, and the maximum current is the maximum current that a single 9 volt can provide, minus the added internal resistance of the 244 in series. <A> I've seen someone do something similar to this in person and go around setting fire to pencils, spot-welding paperclips together, and leaving arc burns on metal furniture. <S> You say "Are there any current or voltage maximums in this configuration? <S> How many more batteries are needed?" <S> As others have said, you can just keep adding batteries to get higher and higher voltage. <S> The limit on current while all the batteries still have some charge is the total internal resistance, so you won't be able to draw more current than you would from a shorted individual battery. <S> Once a battery in the stack is fully discharged, you're limited to conducting through its electrolyte, which will probably be a fairly good resistor. <S> Either that limits the overall current flow or it will heat up dramatically.
The limit on voltage is battery terminal voltage times number of batteries.
A question about Transistor in forward-active biasing? I have question about transistor biasing. Between picture 1 and 2, what's difference, why we add the resistor RE in pic 2 ? what's it effect to circuit ?Similarity for pics 3 and 4, instead of connecting RB to Vcc, why do they connect RB to the collector of BJT ?And which is the better way to bias a BJT among 4 pics ? thanks very much :) <Q> As Olin said, circuit shown in #1 and #3 are completely open loop. <S> So the bias stability of the circuit is less and it can even lead to thermal runaway . <S> The bias stability can be improved by including a negative feedback mechanism in these circuits. <S> Circuits <S> #2 and #4 does that. <S> Negative feedback in circuit #2 : Assume that the collector current increases. <S> This leads to increase in voltage across \$R_E\$. <S> So the voltage at emitter increases. <S> Since \$V_{BE}\$ remains almost constant, the voltage at base also increases. <S> This leads to decrease in base current as an effect the collector current also reduces. <S> So there exists a negative feedback to stabilize the operating point. <S> $$I_C\uparrow <S> I_ER_E\uparrow V_E\uparrow <S> V_B\uparrow I_B\downarrow I_C\downarrow $$ Negative feedback in circuit #4 <S> : Assume that the collector current increases. <S> This leads to increase in voltage across \$R_C\$. <S> So the voltage at collector decreases. <S> This leads to decrease in base current as an effect the collector current also reduces. <S> So here also there is a negative feedback to stabilize the operating point. <S> $$I_C\uparrow <S> (I_C+I_B)R_C\uparrow V_C\downarrow I_B\downarrow <S> I_C\downarrow <S> $$ PS: <S> The negative feedback affects the ac signal also which will reduce the gain of the amplifier. <S> To avoid that a bypass capacitor is usually connected in parallel to \$R_E\$ in circuit #2. <A> The big difference between #1 and #2 is that #1 is completely open loop. <S> Transistor gain varies widely, so it's nearly impossible to come up with values for RB1 and RB2 so that Vce is near the middle of its range. <S> The downside is that the overall circuit gain will be lower. <S> #3 and #4 are again the same issue. <S> #3 is open loop, so the operating point is directly a function of the transistor gain. <S> The biasing method of #4 has feedback that stabalizes the operating point to make it less a function of gain. <S> Consider #4 with the collector voltage being nicely in the middle of its range (roughly Vcc/2), but now a different transistor is used that has twice the gain. <S> At the same base current, the collector current would be twice as much, which means twice as much voltage across Rc, bringing the collector operating point very low. <S> However, as the collector goes lower, there is less voltage across Rb, which causes less base current, which causes less collector current, which raises the collector voltage. <S> Talking about "best" is pointless and bad engineering without a spec about what the circuit is supposed to do. <S> Basically "best" is meaningless handwaving without a way to measure bestness. <A> Re in pic 2 provides a negative feedback against temperature induced current drift. <S> The more current the junction starts to conduct the higher the drop and therefore less bias on the emitter junction. <S> Circuit 4 is also a feedback, don't have pencil at hand <S> but it probably makes the amplification a factor of the resistor ratio rather than the beta which ends up appearing in a ratio to itself (and since beta can vary wildly, it's a good thing)
The emitter resistor in #2 provides some feedback so that the operating point is less a function of the transistor gain.
Oscilloscope Output with its positive terminal touching human's body and negative terminal left open it once happened that when I touched the positive terminal of the Oscilloscope input probes letting its negative terminal open, I observed sinusoidal voltage signals with 0.5V peak to peak and of frequency nearly 50Hz. I don't understand the exact cause for these signals. When I touched the other, negative terminal output signal reached zero with a very little noise...(with the positive terminal connected to the body..) Is it because the power lines near the place I observed these are 50Hz and those induced a potential difference across me with respect to the supply ground which is also the ground of Oscilloscope... or something else.. When I touched a wire or a resistor with positive terminal of Oscilloscope.. there was no change in the Output.. Its because the equivalent model of our body includes capacitance and inductance with resistance.. If so then actually how we are being induced with such voltage signal..? Actually the discontinuity in signal is because of the difference between the frequency of actual signal and sampling frequency of my camera. <Q> As far as I know, this effect has nothing to do with antennas and electromagnetic waves, unless you consider capacitive coupling as an antenna effect (which is unusual). <S> Here is the complete explanation: <S> The closest you are, the more capacitance. <S> Let us assume, for example, you are at about 1m of the main wire. <S> This may produce about 10pF of capacitance. <S> So, the main is connected in series with a capacitance of 10pF, 9MOhm resistance of the tip of your probe, and 1MOhm resistance of the oscilloscope, to the earth <S> (I've assumed you set the probe at 1:10). <S> Now, 10pF gives an impedance of 320 MOhm at 50Hz (approx.). <S> Together with the resistances of the probe+oscilloscope, this gives a 10 MOhm : <S> 330 MOhm = 1:33 voltage divider. <S> So, the voltage indicated by the oscilloscope is 220V / 33 = 6V approx. <S> (if your main is 220V as in the European standard). <S> This answers the question of the OP. <S> I add the following remark. <S> If you touch the ground wire of the probe with one finger, and the tip of the probe with another finger, you'll still see a 50 Hz signal in the oscilloscope, but less stronger. <S> The explanation is simple too: <S> The finger touching the ground wire offers a resistance of about 1 MOhm. <S> So, now, the main is connected to the ground via a capacitance of 10pF = 320 MOhm impedance and a resistance of 1MOhm in series, hence we have a 1:321 voltage divider, which is about 10 times lesser than the previous voltage divider. <S> So, the voltage seen by the oscilloscope will be of 0.5V approximately. <S> On the other hand, if you touch the ground wire with your tongue, then the resistance between your body and the earth becomes negligible and you observe no more signal if you touch the tip of the probe with your finger. <S> Of course, these computations were performed under the assumption that the capacitance between the main and your body is 10pF, but this may vary greatly according to the proximity of your body to the main or to a large conductive plate. <S> This gives some insight though. <A> Your body is a great big antenna. <S> Your body is surrounded by a 50Hz (or 60Hz in some countries) <S> hum from the mains power that is all around you. <S> Put the two together <S> and you get the effect that you are seeing. <A> The 50Hz is a dead giveaway. <S> Your body, which is somewhat conductive (due to being 80% water) is picking up electromagnetic waves emitted by your mains wiring, and a small current is induced in your body. <S> When you touch the oscilloscope probe it picks up this current which will match the frequency (albeit not as clean a signal) of your mains (60Hz in the Americas, 50Hz in Europe and Asia).
If you are sufficiently close to an electric wire connected to the main, there exists a small capacitance between the wire and your body.
Use of free() in PIC Microcontroller Programming In my Microcontroller PIC18f4550 code, I am using a function which returns an array, I know, C doesn't allow to return an array so I am just returning the address using pointers. Now after the address is returned and performing some action on them, I am freeing the address value I stored in the pointer variable so that the function can be called again and new array address can be passed. My code(Just to explain):- int *a,ans[5];while(1){a=returnarray();for(j=1;j<5;j++) { ans[j]=*(a+j); }free(a);} My problem:- I am using MPLABX with XC8 compiler and I am getting error shown on the free() statement, so is there a substitute for this function that I can use here or is there any other way I can perform this task. Thank you. <Q> free() is always used in combination with malloc(). <S> They both concern dynamic memory on the heap. <S> If you look at section 5.5.7 of the XC8 C Compiler User's Guide : <S> Dynamic memory allocation, (heap-based allocation using malloc , etc.) is not supported on any 8-bit device. <S> This is due to the limited amount of data memory, and that this memory is banked. <S> The wasteful nature of dynamic memory allocation does not suit itself to the 8-bit PIC device architectures. <S> If you set the right, high, level of optimization (presuming you have the standard / pro version of the compiler), the compiler might see when the memory isn't needed anymore and rewrite it if necessary. <S> This is only possible if your code is not too complicated. <S> With a low level of optimization, the compiler won't recognise this and the variable will behave as normally, its memory will be freed when the function in which it's a local variable returns (as with all variables on the stack). <S> If this is in the main() function or we're talking about a global variable, that means never. <A> None of that applies to XC8 as far as I'm aware. <S> In any case, with the code you posted, you didn't allocate any dynamic memory, so there is no need to free it. <S> Update your question to show the implementation of returnarray and <S> I will amend my answer if necessary. <A> If you need to implement a malloc-style allocation on the PIC or other small microcontroller, there are a few ways to go about it. <S> The simplest is to define: #define POOL_SIZE 100 // <S> Or however big it can be without running out of spaceuint8_t mem_pool[POOL_SIZE];#define pool_end ( <S> mem_pool+POOL_SIZE)uint8_t *next_alloc;void *malloc(uint8_t size){ if <S> (pool_end - next_alloc <= size) { <S> uint8_t <S> *ret = next_alloc; next_alloc += size; return ret; } else <S> return 0;}void release(uint8_t *dat){ next_alloc = dat <S> ;} Releasing any object would release that object and everything that was released after it . <S> In cases where this matches desired semantics, the above code would be much cheaper than supporting allocating and releasing memory in arbitrary sequence. <S> If one can divide allocations into two groups, and say that it's acceptable to have the release of an object also release all other objects in the same group , that simply requires making pool_end be a uint8_t <S> * variable, and then adding: void *umalloc(uint8_t size){ if (pool_end - next_alloc <= size) { pool_end -= size; return pool_end <S> ; } else return 0;}void urelease(uint8_t *dat, uint8_t size){ <S> pool_end = dat+size;} Note that the urelease function, unlike release , needs to be told the size of the block that was allocated, but the total overhead for these approaches will be 2 bytes if using only malloc/release and 4 bytes if using umalloc/urelease , with no additional per-block overhead . <S> If one needs to allocate and release blocks in arbitrary sequence, it's possible for a PIC to support that, but doing so will add complexity and may result in memory fragmentation. <S> If e.g. one has a pool of 512 bytes and allocates 16 items whose sizes are alternately 27+1 bytes and 3+1 bytes (27 or 3 bytes of data, plus a one byte header) and one then releases all of the 27+1-byte items, one would have 448 bytes left, but have no space that could hold 28 bytes of data. <S> If one can work with the limitations of the double-ended pool shown above, such a design will have minimal overhead and require minimal code to use, but will allow memory to be divided among different purposes at run-time. <A> I have not seen free() function in micro-controller. <S> I think that if you wrap your code in a function then the memory will be released as soon as the function will return (scope of variables comes into action).
You only need to free() memory that has been dynamically allocated (e.g. with malloc ).
Design options for a simple AVR (Arduino) based RF communication system I am trying to build an AVR based, RF service calling system. It works like this: someone at the transmitter presses a button and the guy at the receiver get notified with the ID of the transmitter (imagine using this in a cafe to call the waitress, so there will be multiple transmitters with separate ID’s and 1 to 2 separate but identical receivers). Transmitter will have 2 buttons: one to call waitress, and another to get the bill. So essentially this will be one-way communication, and I guess it will be via serial to transmit different information – i.e. ID, call type (?). A range of 100m is more than practical. I have been searching around on the subject for a while, and I am still not too sure which direction to take, as far as which RF band to use, and whether or not there requires a microcontroller on the transmitter side, which I want to avoid if possible for simplicity and battery saving (on the receiver side I will be using an AVR - with Arduino code-, because I need to drive some 7-segment LED’s to show the ID). My main concerns are reliability and cost. I hope to be able to run the transmitter out of batteries (e.g. 3V coin batteries or AAA batteries) for about a year. Receivers will be connected to wall though. I would be obliged if someone could offer some advice on the followings: As far as the RF band, my search for components at some local shops shows me that I can buy (build) the following transmitter/receiver modules: 2.4GHz (NRF24L01), 433MHz and 315MHz. I wanted to use the NRF24L01 with an AVR (can program for the AVR to sleep when not active to save battery, and communicate with the AVR at the receiver side via serial) for the simplicity and the wealth of info on the net, but the issue is that the cost is 4 fold compared to the other two. The other 2 modules are Chinese with limited documentation, and I am not too sure yet how to build the transmitter around them (with or without uC), but they are very cheap. In terms of reliability and noise/interference, which band is advisable? In the best scenario in my imagination, if it is easy to use a 433MHz or 315MHz module (for the price), preferably without a microcontroller, that will be great. Is this easy to achieve? I have seen some cheap garage door remotes based on these bands, with a few buttons on them and a coin battery that run for a year. They are very similar to my transmitter. I just don’t have some working schematic so I don’t know how they work, how they are supposed to be “programmed” to have different ID’s and to communicate with the AVR at the receiver side. I hope to receive advice on which direction to take. Thanks in advance.Dave <Q> I did a job at 434MHz that used tiny 0.25mW transmitters and a tiny PIC. <S> Battery life was good - over a year because the transmitter consumed virtually nothing for about 1 minute <S> then woke up, transmitted its small payload and went back to sleep (about 50 ms up-time). <S> There were about a hundred transmitters all monitoring the temperature of individual freezers - basically they were "alarms" to warn of impending defrost should one of the freezers become faulty. <S> One central receiver. <S> Conceptually I don't see a difference - you have a bunch of transmitters all of which can randomly talk to a central receiver. <S> Transmitter current consumption when transmitting was about 30mA (from memory - it was in the early 90s so my memory is not that great on this). <S> I got the transmitter modules from a UK company called Radiometrix - they were FM 434MHz devices. <S> Because of the potential for transmit collisions I would also recommend a display that all customers can see that tells them their request is being processed. <A> I think that your best bet is to start off with the technology used for remote automobile door locks and car starters. <S> These are generally in the 433 & 315 MHz range. <S> There are specific limits as to how often any one device is permitted to transmit. <S> You really have to check your country's specific permitted use. <S> There are many advantages to using this technology as the starting point. <S> 1) Range is anywhere from great to excellent. <S> I see systems marketed today that claim more than 1 km distance from transmitter to receiver. <S> 2) Electronics is designed to operate from tiny 12 Vdc battery. <S> This high battery voltage is what makes the long distance operation possible. <S> 3) <S> This technology is extremely inexpensive. <S> Asian-made transmitters and receivers are very inexpensive. <S> 4) <S> It is extremely easy to marry your microcontroller to both the transmitters and receivers. <S> My company did something similar several decades ago but reversed - it was a nursery-call system for churches. <S> We used an off-the-shelf car alarm system from Radio Shack that sent a digital message to a remote pager. <S> We simply modified the encoding portion of the alarm system transmitter so that we could address any single pager out of a pool of perhaps 200 pagers. <S> Because we didn't have to modify the RF portion of the alarm system transmitter, the certification remained intact. <S> This was a very low-cost way for our company to build these systems. <S> Radio Shack was extremely helpful when we designed this system - they made it possible for us to purchase hundreds of receive pagers from the company that built the alarm system for Radio Shack. <S> Each pager had an internal DIP switch to set the receive code. <S> For What It's Worth, this old alarm system used a crystal-locked frequency in the 27 MHz CB radio band. <S> Range was several km. <A> This application might be a really nice fit for Blue Tooth Low Energy. <S> BLE was designed from the start for extremely low power remotes like yours. <S> But you might want to consider using an already designed and built BLE module . <S> These things are easy to use, very cheap (less than $10), run for years on a battery, and are ubiquitous. <S> It is also possible that with your application you could just connect the buttons & battery directly to the module and use the pre-programmed software. <S> You could have a prototype working in less than an hour. <S> There are plenty of well designed and easy to use BLE shields for Arduino, but advantage of using BLE is that you can also use any modern cellphone or tablet to receive and display the transmissions from the remotes. <S> You can get BLE capable phones with color touch screens for not much more than an Arduino+BLE shield. <S> This might lead to a better user interface and much less development time. <S> The only potential issue I can see is range. <S> 100m is a little far for BLE using those little modules. <S> If you really need that range, there are solutions. <S> You try upgrading the antennas on the remotes and on the receivers. <S> You could also add hubs around the space that receive the BLE messages and retransmit them on, say, a Wifi network. <S> These could be as simple as a RaspberryPi with a cheap BLE dongle . <S> If you do go with BLE, take a look at the broadcast advertising service. <S> It simple (remotes just blindly send data at periodic intervals) and can send small amounts of data (like the state of a couple of buttons) extremely efficiently.
You could use an AVR connected to one of the many BLE chips (lots from TI ). You can also purchase transmitters with built-in microcontroller.
Via to Pad Clearance Is it possible to put a via right next to the component pad it is connected to? In other words, if a via and a component pad are on the same net, can they touch as in the image below (red=top layer, yellow= mid layer, gray=via's pad, brown=hole, pink=component outline,distance shown=edge of hole to edge of pad)? <Q> This is another, yes it can be done, but think about it carefully thing. <S> Usually if you put a via in or close to a pad, it is going to an internal plane. <S> Not having a trace between the via and pad will provide the lowest impedance path to the plane. <S> It also helps to put several small vias in parallel. <S> There's a problem with doing this though. <S> Having a hole in the pad is going to wick solder off the pad, into the plated via. <S> The smaller the vias the better, but you need to evaluate whether that is a problem in your application. <S> From the image you posted, I don't think I would put a via that close to that pad. <S> It's going to a trace on another layer. <S> There's no reason to try to minimize the via impedance there. <S> If space is the constraint, try making the via smaller, and the pad if you can afford it. <A> Remember that the registration of the drill holes to the copper features will not be perfect. <S> Typically the drill hole center might wander by 4-10 mils from the location you drew it at. <S> Usually we choose the size of the copper ring around the pad so that with maximum offset of the drill center, no more than maybe 25% of the perimeter of the drilled hole will be outside the pad. <S> If your hole registration and via pad are designed this way, in your diagram that means the drilled hole could end up with about half its area within the square pad. <S> If you are designing for mass production, I would not recommend this design. <S> I'd rather either move the via far enough away from the pad to ensure there's a soldermask dam between the pad and the via, or pay for via-in-pad-plated-over (VIPPO). <A> I strongly recommend against doing this. <S> It will make soldering more difficult and could even lead to poor connections. <S> It would cause unevenness and the component may not sit properly. <S> Some board houses may not even allow this at all. <S> I urge you to try to avoid it.
If you put a via so that it touches a pad, it will cut off some of that pad.
Back Emf of dc motor I couldn't find the explanation for this query of mine.Why back emf in dc motor is nearly equal to the applied voltage on no-load?I tried to search on the internet but all in vain. <Q> Because electric motors are pretty efficient. <S> When a motor spins, it acts like a generator. <S> When it spins due to a applied voltage, the spinning generates a voltage internally that is opposite of what you applied. <S> What keeps the motor spinning is the difference of the applied voltage minus this internal EMF. <S> This is why the no-load motor speed self-regulates as a function of voltage. <S> At first the motor is not spinning, so all the applied voltage goes to making it spin. <S> As the motor speeds up, the back EMF becomes stronger, so there is less and less voltage left to spin the motor. <S> Eventually, the motor goes so fast that the back EMF cancels enough of the applied voltage to only keep it spinning at that speed. <S> Since the motor is theoretically doing no work, it should take no voltage to keep going. <S> Real motors have real friction and other losses, so it will always take some finite fraction of the applied voltage to keep it spinning even with no load. <A> You can think of the motor as behaving like a resistor connected to a generator (the latter corresponding to the back EMF). <S> It produces a torque that is proportional to the current through the resistor. <S> The higher the difference between the back EMF and the input voltage, the higher the current. <S> The higher the current, the higher the torque. <S> If the motor is stalled, the entire input voltage appears across the resistor and a lot of torque is produced. <S> Since it only takes a bit of torque to overcome losses such as bearing friction and windage and magnetic losses when there is no load, the motor spins up until the back EMF is almost equal to the input voltage and the torque has dropped until the motor is no longer accelerating significantly. <S> The current resulting from the remaining difference (multiplied by the input voltage) gives you the power consumption with no load. <S> Efficiency is zero, of course, with no load since it is producing zero output power at the shaft. <S> The losses in the copper windings are the current squared times the resistance (which is the winding resistance) aka \$I^2R\$ losses. <S> If the windings had zero resistance the back EMF would always be equal to the input voltage, (even under load) since any difference would allow infinite current to flow, generating infinite torque. <A> All the replies in this post are correct however no one seems to want to realise or admit that when a DC electric motor runs at high speed it wastes most of the applied voltage to the curse of back EMF. <S> It is only the magnetising current flowing thru the coils that is doing the work of producing mechanical output power, the very same current is also producing heat in the coils equal to (I2R), the power that is actually doing work is only the voltage drop in the coils multiplied by the current, the back EMF destroys all the other input power. <S> We normally say the copper losses cause waste heat production, but I say it is all the "loss" that is simultaneously doing the work. <S> Anyone can prove i am correct by doing a locked rotor test on a motor, put a calibrated test current thru the motor and test the voltage drop of the stator and field coils and do you own calculations. <S> Standard electric motor are horrendously inefficient! <S> Electric vehicle manufacturers would do much better to focus on the problems with Electric motors. <S> Every motor should be able to exceed 100%, the laws of thermodynamics are seriously flawed. <S> Randal L.
The more efficient the motor, the closer that back EMF is to the applied voltage.
Anything Wrong with my Light box Design? I am creating a custom box that will contain 3 * 400 watt metal halide bulbs (1200 watt total). The box will remain closed for 60 minutes, open for the next 60 minutes, then closed, then open and so on.. for a period of 10 hours. The box will open/close from the the front panel (the "door") using Arduino and Servo motors. Since the bulbs will be generating a lot of heat I will attach a Duct Fan at 240 CFM on top of the box (is the top the best place to put it?). Something like this: http://www.amazon.com/dp/B005KMTYFK/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=V2E1GXE4DR4J&coliid=I3B1JSME5M15UN The box itself will be made out of wood so I will coat it with a heat resistant spray from the inside so it doesn't catch on fire. Something like this: http://www.amazon.com/dp/B000CPJLV2/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=V2E1GXE4DR4J&coliid=I122VPINWI1GBY&psc=1 When the box is open I will need the box to emit as much light as possible. Therefore, I will coat the inside with a reflective substance (something like this: http://www.amazon.com/Rust-Oleum-1915830-Metallic-Silver-11-Ounce/dp/B000PQGE2M/ref=pd_sim_hi_3?ie=UTF8&refRID=0DKBGQGVVCT0YSWCW1WB ) so all light rays are dispersed from the box.. What do you think? Thanks <Q> Actually, putting the fan under the box rather than on top is best, so that the fan never gets heated by the hot air it is exhausting. <S> At any rate, you want free air flow through both top and bottom. <S> Note that this directly competes with your desire to reflect as much light as possible. <S> Whether 240 CFM is adequate I don't know, but I'd suspect you'll be OK. <S> No guarantees, though. <S> 2 <S> - Depending on a spray-on paint to fireproof the box is a really bad idea. <S> 3 - Putting a probably-flammable layer of reflecting paint on top of the first layer is an invitation for the reflecting layer to catch fire. <S> Your problem is that there is no obvious way to determine the reflectivity of the reflective paint in the infrared, and that is where most of the energy is emitted by the bulbs. <S> Metallic silver by itself has excellent reflectivity into the IR, but that does not necessarily imply that your paint does as well. <S> 4 <S> - If you really think you'll be present for 10 hours continuously, well, all I can say is that I admire your bladder control. <S> Not to mention your willingness to go hungry. <S> 5 <S> - As I recall, you're trying to illuminate a 3 x 5 foot area. <S> If you want a fairly uniform illumination level over the entire area, you will need to make a tradeoff on box size. <S> The closer you put your light source to your test area, the bigger the box (or at least the transmitting aperture) has to be. <S> With a larger separation you can use a smaller box, but then you lose intensity. <S> Also (and this is important), the bigger the box <S> the harder it is to control exactly where the air goes, and <S> the harder it is to guarantee that there are no dead zones/hot spots. <S> 6 - In line with 1 and 5 <S> , just exactly how big a box were you figuring to make? <A> I'd be concerned about the wooden box cathing fire (irrespective of the coating you put on the wood) <S> so maybe I'd add a protection circuit based around a thermistor that tripped a relay thus cutting energy to the lights <S> should things get too hot. <S> Basically, safety is my main concern. <A> If all of the heat of the lamps was being transferred directly to the air, moving 240 CFM through the box would result in approximately a 9°C temperature rise. <S> The problem is that the air itself will absorb very little of the lamp power directly; instead, most of it will be absorbed first by the box, and then subsequently transferred to the air.
The temperature rise of the box will be dependent on the thermal resistance between it and the air, which will be fairly high unless you take special measures (think heat-sink fins) to control it. 1 - Location of the fan is irrelevant, since the airflow is driven, rather than occurring due to convection.
PSU Current on negative line (source: tomshardware.com ) While i am quite familiar with most of the specifications on a power supply unit like this one, I fail to understand what is going on with the negative voltages. I have a few theories, though. The negative voltages are just the grounds which correspond to the matching positive voltages. These are actually at negative potential relative to ground However, neither of these explanations really explains why you would have these outputs sourcing half an amp of current. If they were the grounds, then they would have to sink just as much current as the positive side was putting out. In addition, there isn't a negative output to match with every positive output. However, if they really were at a negative relative potential to ground, I would not expect them to be sourcing current, because that current would have to flow against a voltage differential. So, what is going on with these negative voltages? <Q> It would probably make more sense if the label were adjusted sligthly: Those -5V and -12V outputs really are negative voltages (not the ground returns for +5V and +12V) and they do sink current. <A> I don't know anything about this specific power supply. <S> However, my guess is that: There is one ground for everything -5V <S> literally means a line that has a voltage of -5V relative to ground <S> (-5V, 0.8A) really means that the -5V can sink 0.8A of current. <S> For another example, take a look at the LM79xx datasheet . <S> These are linear voltage regulators that output a negative voltage. <S> However, on the front page of the datasheet, it says: <S> The LM79XX series of 3-terminal regulators is available with fixed output voltages of -5V, -8V, -12V, and -15V [...] and is capable of supplying 1.5A of output current. <S> However, these would typically sink up to 1.5A of current. <S> I imagine that supplying current either means sinking or sourcing, depending on the voltage level - you could say that it's the magnitude of the current. <A> The biggest one that comes to mind is RS-232 signaling, which used +12/-12 volts. <S> Almost nothing (if anything at all) in a modern computer uses negative voltage. <S> Because of this, the voltage regulators for the negative voltages are much smaller than the regulators for the more commonly used positive voltage rails.
Older computers needed negative voltage for certain functions.
Correct way to define board outline? I'm a student and am almost ready to have a PCB I designed fabricated, but I'm confused about how the board outline should be defined. Here's what I currently have: I also have a 20mil keepout line centered on the board edge, but hid the layer to make the board outline visible. I'm planning on ordering the board from a company called Gold Phoenix PCB . I've emailed them several times about this, but haven't been able to get a clear answer. They said: You only need to design the board in the way you want, size tolerance +/-10mil Not helpful! Then after sending the above image: Make things simple, you need keep everything 10mil from the edge of the board. Ok, 10mil from the edge of the board, but what do they consider to be the edge? Is it the center of the 10mil track I placed on mechanical 1, or is it the edge of the track? The example I gave them when asking how the outline should be defined is: Let's say your router bit diameter is 90mils and it follows the center of the line defining the board outline -- that means it would be cutting 40mils too deep into the board, which would not only mess up the connector alignment but also create a risk of shorts since I only have a copper pullback of 20mils. I've already emailed them four times about this and don't want to get on their bad side, so can anyone explain the correct way to define the board outline to meet my requirements? <Q> The middle of the pink line is the board edge you are defining. <S> The width of that line is a CAD/visual construct and means nothing to the fabrication process. <S> The keep-out applies only to electrical (i.e., metal) portions of the design. <S> You can typically take silk all the way to the edge of the board. <S> Based on the polygon you have just above the "RAW" PTH, you likely are as close as you can get to the edge of the board with this connector (looks like a pin header). <S> If you want to have the yellow (black plastic of pin header) directly to the edge of the board, you will have to decrease your keep-out. <S> The keep-out is for your own protection so that when they cut the PCBs from the panel, and apply mechanical stresses to the edges of the board, they aren't inadvertently breaking any of the metallization causing random opens/shorts. <A> You can define the board shape either way you want. <S> If you tell the shop that you are providing a board outline, they will make the outer edge of the board follow the center of the line in your gerbers. <S> If you tell the shop that you are providing a route tool path, they will make the routing tool follow the center line, and the edge of the board will be offset from that by the radius of the cutting tool. <S> If you want to have inner corners, or only partially depanelize the boards or something, then you might want to provide a route tool path. <S> In Altium, look for the "Generate Route Tool Path" command to generate the path easily. <S> In Altium, for a board outline, typically you just use the Keepout layer to define it. <S> Of course if you want you can redefine one of the mechanical layers to be the board outline and use that instead. <S> If you generate ODB++ output instead of gerbers, there will be board outline information in the ODB++ based on the actual defined board outline in Altium, not any paths on any particular layers. <S> Since different layout tools name their gerber files differently, I suspect that most shops just look through the gerbers for a layer that looks like it has a board outline and use that <S> (but it's better if you give them a readme file that says what each gerber file represents) <S> In a comment you mentioned, No, I don't have a "fab drawing. <S> " I'll try to figure out if this is possibly in Altium. <S> Typically for simple boards Altium users just use the Drill Drawing layer for the fab drawing. <S> If for some reason you want to have separate fab drawings and drill drawings, then you can again just rename one of your mechanical layers to be the fab drawing. <A> I would say you should define the dimensions of your board in your fab drawing, you do have a fab drawing <S> right :) <S> Showing your stackup, and board outline, and clearly labeled finished dimensions? <S> Maybe some notes about finishes, and hole tolerances? <S> That will take the ambiguity out of trying to communicate with them. <S> Also you shouldn't be worried about getting on your fab houses bad side, if they are tough to work with, or can't give you answers go somewhere better. <S> Of course at the same time it's a two way street <S> so you want to be respectful when dealing with them. <S> Ideally your fab house is your partner, and part of their job has and will always be educating new engineers/customers ;) Good luck. <A> It might depend on the board house. <S> I use a 100mil line as the outline of my board and treat it as the kerf of the router. <S> That means if you want to align a component with the edge, align it with the inside edge of the outline. <S> If you still haven't got a satisfactory response from the board house, use a different one. <S> There are hundreds of options. <S> I suggest OSH Park . <A> You have the board outline defined with the dotted line, so you don't need an outline on the mechanical layer, and the Gerber files should come out with the correct board outline. <S> You can check that the Gerbers are correct by viewing them with a Gerber viewer like GC-Prevue.
For a simple board, it's better to provide a board outline and let the fab shop generate the route tool path for the size of tool they want to use.
Using Arduino-UNO to control LED pins Greater than the Number of I/O Pins Our class have been given a project to create a miniature of our department building. It will have 11 laboratory rooms, 1 server room, 1 faculty room. Each laboratory room will contain 18 pc's, each one represented by an LED. Server and faculty room will each have 3 LED. Now each group of 3 LED's must be controlled individually using a computer program. So that's 68 groups of LED that needs individual control. We are planning to use an Arduino UNO which have only 13 I/O pins. Is there any way to use those 13 I/O pins for 68 separate controls? The deadline is near and we're in quite a pinch. Any answer will be tremendously appreciated, thank you in advance. <Q> There are basicaly two approaches, which might be combined: <S> I/O extension, and multiplexing. <S> There are chips that are connected to your Arduino using a few pins (2 or 3), and that can provide more IO pins. <S> Examples are 74HC595 shift register (requires 3 pins, provides 8 output pins, can be chained) and the MCP23017 I/ <S> O expander (requires 2 pins, provides 16 I/ <S> O pins, 8 such chips can share these two pins). <S> Multiplexing means that your split your I/ <S> O pins in rows and columns, let's say 6 rows and 7 columns, and you put a LED on each row/column crosspoint. <S> By manipulating the row and column piuns, you can selectively light up one LED (or a row of LEDs, or a column of LEDs). <S> Do this fast, and the human eye will get the impression that all LEDs are on. <S> This will give you control over up to 42 LEds. <S> There is an advanced trick called Charlieplexing which allows you to control N <S> * (N - 1 ) LEDs with N pins. <S> I have used this for 12 LEDs (4 pins0, but I am not sure it works well enough for larger N. <S> What you choose is up to you. <S> Personally I would consider either freeing up more Arduino pins and using the pins directly in a matrix, or using MCP23017's. <A> Consider using NeoPixels ! <S> You can easily control 68 ( or 1,000+! )) <S> NeoPixels from a single Arduino IO pin. <S> They come in on a roll and you can cut off how ever many you need to put in each place using scissors... ... <S> or you can buy them individually... <S> There is only one data line that goes into each pixel, then out the other side and on to the next neopixel <S> so you daisy <S> chain them together rather than having a wire for each LED in your setup. <S> This will make your wiring job very easy. <S> There are lots of Arduino libraries available for controlling the pixels, so you will have a high level interface that let you get down to actually turning the pixels on and off almost immediately. <A> You have several options, actually. <S> You hook as many drivers as needed to the same i2c line and boom, you virtually drive a lot of leds. <S> But there's also multiplexing . <S> You arrange your leds in a square matrix and turn on them one at a time, but that grants you control over 42 LEDs. <S> But you can hook your LEDs in pairs and drive up to 84 LEDs, and that should be enough. <S> Have a look here . <S> To turn on a LED you will need to tie the colum high, the row low, and al other columns and rows should be high Z. <S> To turn on its complement you will need to tie the column low and the row high. <S> This last tecnique seems very appealing <S> but: you will need to do an awful lot of wiring the maximum duty cycle is 1/68 that can be low assuming you want an average 1mA in each LED <S> you are asking 68mA to the micro, that can be high If the project is only about proof of concept go with the second option, do some math about current duty cycle and so on <S> and you don't get the wiring part. <S> I'd say go with the second because it's smart, and that's what I'd reward if I were your teacher. <A> Use 9 8-bit serial shift registers connected serially. <S> You'll only need to provide power, ground, clock in, data in. <S> (4 pins total, 2 I <S> /O pins). <S> These are capable of being daisy chained so that you can connect serial out to the serial in of the next shift register, and so on. <S> This article specifically for arduino outlines what needs to be done. <S> http://arduino.cc/en/tutorial/ShiftOut <S> For parts, you can usually get these from Digikey (www.digikey.com) or mouser. <S> In your arduino app, you will just need to know what the pattern will be to serially shift the data into LEDs. <A> Take a look at this LED driver 16 bits wide, so you'll only need five of them, outputs are constant current, and each output can sink 120 mA. <S> Plus, the thing is a shift register with an output latch, so you'll only need to use 3 of your Arduino's <S> I/Os to talk to it.
You could use some specific chips, try to search for "i2c led driver" or something like that.
Is inverting the output of a CMOS network a bad practice? I am an Electronics & Comm. Engg. 3rd yr. student and we are learning CMOS logic for the first time this semester under the subject VLSI design. While designing for the logic equation: \$Y= A + B.C\$, the professor first wrote it as \$\overline{\overline{A+B.C}}\$ , then simplified it by De Morgan's laws and then implemented it with CMOS. I was wondering if it would be better to implement \$\overline{A+B.C}\$ and then use a CMOS inverter to invert to output since this would need lesser number of gates. When I asked the professor if it can be done that way, he said there won't be any sense in using CMOS if used that way. I didn't understand what this means, and why it cannot be implemented this way. P.S. I'm new on Stack Exchange. Apologies for any mistakes in my way of putting the question. <Q> When implemented in CMOS, simple inverting logic gates take one stage, that includes inverter, NAND, NOR. <S> Non-inverting logic gates take two stages. <S> For example, a buffer would actually be two inverters back to back. <S> An AND gate would actually be a NAND gate plus an inverter... <S> I assume your professor did the following: <S> \$Y <S> = <S> A <S> + <S> B * C = \overline{\overline{A} <S> * (\overline{B <S> * C})}\$ <S> So the actual logic required are one inverter (for A), one NAND (for B,C), one NAND (final output). <S> If implemented as you suggested, it would actually be like: \$Y <S> = <S> A <S> + <S> B * C = <S> \overline{(\overline{A + \overline{(\overline{B <S> * C})}})}\$ <S> So it would be an inverter+NAND (for B,C), an inverter+NOR (final output). <S> So it takes one extra inverter -- not so bad in this case. <S> But there is a big speed disadvantage, 4 levels vs 2. <S> This quote <S> "he said there won't be any sense in using CMOS if used that way" may have lost something in translation. <S> But I am guessing that your professor was trying to convey the fact that inverting logic gates are the natural building blocks of CMOS logic and are in general more efficient than the non-inverting counterparts. <A> Standard CMOS gates used in IC design are inverting for a variety of reasons, including lower area and delay compared to the non inverting versions. <S> See this Question . <S> This also needs to be taken into account; not just the number of gates. <S> (Inverting logic being preferred). <S> Sometimes a noninverting function is required, in which case it's just as easy to implement it with a final inverter. <S> In IC design this is even the preferred way of doing it because inverters come in a wide range of drive strengths, so the final inverter in the logic can drive a long path to the next area of logic if necessary, and is smaller than the equivalent strength buffer (non-inverting). <A> Well, one of the tricks used in CMOS design to simplify logic is to selectively invert entire signals. <S> The overall logic function remains the same, but it is possible to simplify the stages and remove extra inverters. <S> Sometimes it requires adding a couple of inverters to the inputs and outputs, but in general this technique can significantly simplify the implementation. <S> This decreases area, power consumption, and propagation delay. <S> This is a common technique used when building large adder trees in things like multipliers. <S> The layers in the tree are built alternately with adders with inverted outputs and adders with inverted inputs. <S> This results in a very significant savings in area, power, and propagation delay by removing a very large number of inverters. <S> I believe the synthesis tools will perform this sort of optimization automatically.
It would be inefficient to use an inverter when the inversion can be optimised away in the logic by using an inverting logic function such as NAND, NOR etc.
Connecting resistor in LED parallel circuit I connect 3 LED in parallel with a two AA battery source 1.2V each. As i searched in the web i realized that it is not correct to connect them without a resistor as they may get damaged. How mane ohms will the resistor need to be? I think to put one resistor for all the LEDs like this: <Q> The circuit you have shown is also not a very good idea. <S> Ideally, each LED requires a series resistor. <S> If the forward volt drop of one LED is a few percent smaller than the forward drop of another LED, the first LED will "hog" all the current and possibly burn-out. <S> See this graph of forward volt drop and LED current: - If one LED's characteristic curve starts at a slightly lower voltage (say 1.6 volts), it will be dropping 1.9 volts at 20mA and the other LED (20mA at 2volts) will be forced into taking a current of only 5mA because the terminal voltage of parallel LEDs is dictated by the LED with the smallest volt drop. <S> What if a third LED was starting to conduct at 1.8 volts, with 1.9 volts across (as dictated by the first LED), this third LED will draw about 1mA. <S> In this simple scenario, you can see that the LED brightnesses will be varied a lot. <S> Ignoring this, for one resistor and one LED, if the current needed is 20mA and the forward volt drop of the LED is 2 volts then the resistor needs to "drop" a voltage that is \$V_{SUPPLY} - 2V\$. <S> If the supply voltage is (say) 5V, the resistor carries 20mA whilst dropping 3 volts i.e. it has a resistance of 150 ohms. <A> I think to put one resistor for all the LEDs like this: You think wrong. <S> That circuit is very bad and should be avoided at all costs. <S> You are assuming that each LED will have precisely the same characteristics as every other LED, which is simply not the case. <S> The LED with the lowest forward voltage will get most of the current and potentially blow, leaving too much current for the other LEDs, which then also blow. <S> That's called a Cascade Failure. <S> Instead treat each LED as a separate circuit. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> I actually tried the circuit you've described here(just that I used an RGB LED with a common anode instead of 3 separate LEDs), and the results were... interesting. <S> I didn't know about cascade failure(see <S> Majenko's answer), <S> but I did know that I had to limit the current so that even if all the current passed through one of the LEDs, the poor LED should at least survive. <S> These are the values that I used: <S> \$V = 6V\$ <S> \$R1 <S> = 270Ω\$ <S> Voltage drops across the three LEDs were specified as follows: \$V_{L1} = <S> 1.82V\$ <S> (red LED) <S> \$V_{L2} = <S> 2.72V\$ (green LED) \$V_{L3} = <S> 2.9V\$ <S> (blue LED) <S> I wired them up and... <S> only the red one glowed! <S> I measured the voltage drop across all of them and all three of them were the same, at 1.82V.Then, instead of a single 270Ω resistor I used 3 of them across each one and this time the 3 LEDs were glowing fine. <S> Of course, the combined resistance of the 3 resistors was what you'd expect: <S> 90Ω. <S> Lesson learned: the voltage drop across the three resistors is different because the voltage drop across the three LEDs is different. <S> I guess where people go wrong with this <S> is that they try to connect just one 90Ω resistor as R1, causing almost 66 mA to pass through the first LED, causing it to blow and become an infinite resistance, then the cycle repeats with the next LED, and so on until all of them blow.
Provide one resistor for each LED and calculate them all separately (or use the same value resistor for all of the LEDs if they are all roughly the same).
Connect pins with same pin designator in Altium footprint I've made a relay's footprint in Altium. The relay's two contact terminal are three pads each, as below. And the schematic symbol is as below: In my schematic, I don't give the two terminals any net, and they are floating (connect nothing). In the PCB editor, I want connect the three pads together using tracks, such as the three pads with the designator "87", but the Altium PCB editor prevent me doing this, the pads can't be connected! I tried give a net to the terminal "87", then I can connect the three pads using tracks. I want to know what's the "strategy" behind this? I think if I give the pads same designator, they should be treated as just one pad, and should be "connectable". Right? Is there other easier method to make them connectable (I have 24 such relays, and it will be a hard work to give nets to the terminals)? <Q> I once made a diode with a four-pin anode, all of which I wanted to connect together. <S> You could connect all of the anode pins separately, but I would recommend giving them different pin names (i.e. 87a, 87b, 87c) and treating them as separate pins on the PCB layout. <S> However, on the schematic, lay the three pins one on top of the other <S> so it looks like just one pin. <S> Altium will see a wire connected to the "one" visible pin as connected to all three pins, and will tell you to route all of their corresponding pads together. <S> That's probably the most elegant solution. <A> Three pads per contact implies that the relay is designed to carry large amounts of current. <S> As such, you are going to want to use plenty of copper on the PCB to make the connection. <S> Use either a trace that's wide enough to bridge all three pads when you connect it to the center pad, or a copper pour/polygon to surround all three pads with copper. <A> 2) Have 3 pads all with the same designator. <S> Connect a trace to one pad and then do a copper pour around them all attached to the net that you want them all connected to. <S> The pour should then connect the pads together.
Two ideas: 1) Connect the pads together in footprint by having only a single pad that has 3 holes in it. You will need to go into the pin editor on the schematic, though, and make sure you change the pin names and which pads they connect to.
How does the Arduino compare to PIC and AVR for serious learners I'm trying to get into microcontrollers, but as you might guess, choosing the first microcontroller to start with is a difficult task due to the many great choices available. I have studied electronics (both analog and digital), computer organization and I'm presently reading a book on computer architecture. What better way to cement my understanding than having a real microcontroller at hand. I have been tempted to get Arduino due to its popularity and its purported simplicity. However, just like programming in something like C# and not necessarily knowing what happens behind the scenes, I'm apprehensive that with Arduino, I'll only been using it like C# without understanding how the architecture works which is what I'm hoping to learn. So, in short, am I wrong in my above assessments of the Arduino above?, and how does the Arduino compare in terms of understanding how embedded systems work to other microcontrollers from the PIC and AVR families. Thanks <Q> Unless you are on an extremely tight budget (like saving-pocket-money levels), then I wouldn't sweat the decision of which to try first too much. <S> Just pick one, and expect that once you've started you will try others. <S> IMHO <S> Precisely because of its popularity and its purported simplicity (when compared to PIC) you will find a wealth of information and support on the net And with the standard IDE you can pretty much bank on an encouraging first experience as you actually get to make it do stuff (compared with going straight to an AVR chip). <S> So it is unlikely you will fall at the first hurdle and be disenchanted and frustrated as a result. <S> Do not worry too much about getting stuck in a black box that prevents you learning to deeper levels. <S> But the onus will be on you to push beyond the basics e.g.: as kyranf suggests, once you are comfortable you can throw away the standard IDE and try Atmel Studio instead or <S> you can start hacking the IDE and libraries available here write your own libraries in C/C++ eschew the board and stick an AVR on a breadboard and provide support circuits yourself (it helps that the board design is open sourced ). <S> About the only downside of starting with an Arduino I can think of is having to suffer the occasional disparaging remarks and trolling by Real™ Engineers! <S> Kind of like programmers admitting their first language was BASIC;-) <A> If you get an Arduino Uno or similar board, you can completely ignore the fact that you can use the Arduino IDE to program it, and you can write all your own code in Atmel Studio and even import the Arduino core libraries into that if you wanted. <S> The good part about Arduino is you don't have to learn the low level stuff, like how to enable interrupts and set masks for timer registers etc. <S> It just "works". <S> This helps noobs get started, and get things done quickly. <S> If you want to learn the proper way from the beginning, go straight into Atmel Studio with a AVR dev board (or use an Arduino board, just ignore the IDE) and learn from examples and read the datasheet for the Atmel AVR ATMEGA328P. <A> If you want to program microcontrollers, you need to learn (if you don't already know) <S> 'C' and arguably some assembly language. <S> Arduino is good if you just want to get something working (i.e. want to earn just enough programming to get the job done), which is fine. <S> The language that arduino uses is C-like, but has a bunch of canned routines so you don't have to know what's going on under the hood. <S> If it's control and deeper understanding, get a microcontroller dev kit (either from the manufacturer or digikey). <S> Typically you can get this for USD $30-50 or less. <S> For learning embedded C, check out the following books: Embedded C , Test Driven Development for Embedded Systems and embedded systems Start by trying to solve a problem. <S> I've gone through books and gotten bored and didn't retain as much as I did by trying to solve a problem. <S> Good luck and have fun!
you can't really go wrong with an Arduino as a first choice:
Solder joint used between copper wires and a button switch is behaving strangely. I don't think it's a cold joint The circuit I'm attempting to construct: I'm constructing the circuit shown in the above image, but I'm experiencing strange behavior when I solder on the switches and test the circuit. The switches are normally closed and are meant to break the connections between the NOR gate inputs and ground. The NOR gates (NTE74S02 TTL gates) are arranged as a SR NOR latch that is meant to turn on the lamp when the switch attached to the SET NOR gate's input is opened and turn off the lamp when the switch attached to the RESET NOR gate's input is opened. The voltage source is 5V DC. After soldering on the switches and connecting the voltage source, the lamp is meant to remain off until the SET switch is pressed. It is meant to turn off when the RESET switch is pressed. However, the lamp remains persistently on when the voltage source is connected, even after I press the RESET switch a few times. Here are pictures of the solder joints connecting the SET switch to the SET NOR gate: The circuit works as intended if pressure is applied to the completed solder joints on the contacts of the SET switch. This behavior suggests that the joints are cold joints, but use of a multimeter indicates that the joints are in fact connecting the switch contacts and the wires. I also made sure that I used flux on the contacts and the wires. Has anyone else encountered a similar problem with solder joints? <Q> The problem here is there is no input to the NOR gates when the switch is open. <S> Basically, when you have an undriven logic input, the input is undefined . <S> This means it could be high, it could be low, it could toggle randomly as a function of local electrical fields. <S> This is colloquially called a floating input, because the voltage on the input "floats" around as a function of local electromagnetic influences. <S> A few KΩ should be fine. <S> Ok, more troubleshooting. <S> First, I'd stick pull-ups in there anyways. <S> Relying on the internal behaviour of the input buffer makes me uncomfortable. <S> Next, rather then just wondering if your solder joints are bad, just measure them! <S> You should see ~Vcc at the input from the switch when the switch is open, and ~Gnd when it's closed. <S> This should be quite easy to test, even with a cheap multimeter. <A> 1) You understand that the set switch needs to be open to operate the latch. <S> Are you quite certain that your switches are NC (normally closed)? <S> Those things are pretty rare. <S> And the switch symbols you are using would ordinarily be used for NO (normally open) <S> switches. <S> I suspect you are using NO switches, and your latch is normally in the forbidden state - that is, with both outputs low. <S> Activating the reset does nothing to the output your looking at, since the high input keeps that output low. <S> I suspect that what's happening is that when you put pressure on the set switch contacts, your fingers are providing a low enough resistance to constitute a logic low input, and the set output goes high. <S> 2) You have the operation of the latch backwards. <S> If the set switch is opened, the input (particularly if you take Connor Wolf's advice and add 1k pullup resistors) will go high, and the output you are monitoring will go low. <S> 3) <S> TTL (Schottky or otherwise) is not happy driving grounded loads. <S> You will do much better to tie your indicators to +5 rather than ground. <S> This will mean that they turn on for a logic 0, but you can get around this by adding an unused gate configured as an inverter to drive the "lamp" - and I hope that you mean LED, not an incandescent bulb. <A> I'd suspect the joint and resolder it, but first I'd make sure that the switches weren't flopping around when when I "fixed" the joint since that'll just make more trouble. <S> I don't know how familiar you are with soldering, but it's absolutely imperative that the connection not move while the solder is cooling. <S> Second, - someone already mentioned this, but it's important enough to bear repeating - you should be pulling the manually switched NOR inputs up to Vcc, and sinking current, not sourcing it, through the LED; like this: Take a look at the excerpt from TI's data sheet , below, and you'll see that the recommended maximum output current is 1mA, and at that current the output voltage can fall to 2.7V. <S> As the output current is increased, the output voltage will keep falling and eventually won't be able to drive the latch input it's connected to properly and the circuit will fail.
Since it seems like you want the inputs to be high except when the switch is closed, you need to add a resistor between the inputs and the positive rail, to pull the inputs into a known state when the switch is open. First, if you apply finger pressure to a solder joint to make it work and the circuit gets flaky when you let go, there's either something wrong with the switch or the joint.
Bus value if some pins are floating I'm working on plugin for simulation software (digital IC only). For example there is 8 bit bus. User wants to read it's value. On plugin side I check each pin's state. It can be 1, 0 or undefined. At the moment if at least one bit is floating, I return nil as bus value. Is it right at all? May be better return value replacing floating bits with random [1-0] and warn user in log about it? <Q> I'm sorry, but you're out of luck. <S> There is no obvious way to tell if a digital input is floating. <S> The bus receivers cannot tell if a given input voltage level is occurring because a driver wanted to, or if it's because there is no input driver. <S> All it knows is that the input is either higher (logic 1) or lower (logic 0) than the receiver's threshold voltage. <S> It's certainly possible to build such a circuit: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> In this case, Vth is the nominal logic threshold voltage, and R4 is a largish resistance. <S> R1/R2/R3 set the upper and lower error bounds for the input voltage. <S> In operation, a valid high or low on the input will pull it either above or below the comparator set points, and both comparators will read either high or low. <S> This sets the XOR output low, indicating that the output is good. <S> If the input is left floating, R4 pulls the input to an intermediate value, and one comparator goes high while the other goes low, and the XOR output is driven high, indicating a floating input. <S> Needless to say, I doubt very much that your digital inputs look like this. <A> In most simulation software, the bus data display depends on the number representation being used. <S> The general rule is that if any of the bits that affect a particular display digit are undefined, then that digit is displayed as an 'X'. <S> When the display is in binary, octal or hex, the resulting number might have valid digits with 'X's among them, because each bit can only affect one digit. <S> But if the display is in decimal, each display digit can be affected by any of the bits, so if any of the bits are undefined, then the entire bus value is displayed as 'XXXXXX'. <A> There was an almost ghostly effect to be observed on 1980s computers with multiplexed address/data buses - reading from addresses where there was no device at all tended to give you what looked like an ASCII table in a debugger. <S> What likely really happened was that you read back the capacitive charge remaining from the address writes.... feasible if there were MOS devices on the reading end. <S> CMOS inputs without a pulldown or pullup will indeed give you whatever the capacitive charge is in the wiring <S> has in store, if there is a severe lack of interference - many times, floating CMOS inputs will give you a 50/60Hz clock.
In practice, it depends on the reading device and on what can interfere with the wiring: Almost all TTL-ish devices will treat a floating input as a solid 1 if there is no pulldown resistor and a lack of severe interference.
How to create precision reference 2.5 voltage Can I create a precision reference voltage of 2.5V using 7805 regulator and ordinary resistors(10% error)/diodes or do I need to rely on specific reference voltage generator? <Q> A precision voltage reference is everything that a 7805 and resistive divider isn't. <S> Precision isn't all about how accurate the voltage is, but how accurate the voltage remains over time. <S> An precision voltage reference: <S> Has a precise voltage - <S> the 7805 isn't very precise at all. <S> Is low noise - <S> By comparison the 7805 has massive amounts of ripple. <S> Has a low temperature coefficient - 10% resistors drift massively in resistance at different temperatures. <S> So if you want precision then a 7805 and some resistors are really not the way to go. <A> Yes, you can. <S> It all depends on how much error you can tolerate. <S> Since you didn't quantify "precision", it is a meaninless term and can only be ignored. <S> Obviously the error of a reference derived from a 7805 regulator is all the errors added up. <S> Keep in mind that the worst case for each of these is over the full temperature range you want your device to operate over. <S> Also consider the loading on a resistor divider. <S> The output impedance of that will be the parallel combination of the two resistors. <S> For example, if you use two 10 kΩ resistors, then the output impedance will be 5 kΩ. <S> If that is feeding something that, for example, has 100 kΩ input impedance, then that adds another 120 mV drop to your reference. <S> Even if the output was a perfect 2.5 V unloaded, you would only have 2.38 V when in use. <S> Lower resistances in the divider decrease this effect at the expense of more current. <S> However, the easiest way to get a 2.5 V reference is to use a 2.5 V reference chip. <S> These are intended for the application, and will have much better accuracy than a 7805 followed by a divider with two off the shelf resistors. <A> Although it's not designed as such, a 7805 (the L version rather less so) contains a bandgap reference and a divider made from matched resistors <S> so its actually not a horrible reference provided <S> you don't draw much current from it and the source is reasonably well filtered- for many purposes <S> it's actually okay, especially if you calibrate out the initial inaccuracy (which may eliminate other system errors). <S> It's not a 3ppm/degree C precision reference but plenty good enough for measurement of humidity, ambient comfort temperature and similar, so it really depends on your requirements. <S> Edit: here is the typical temperature stability of the TI 78M05 /Edit <S> The problem with a divider (and this would apply with a precision 5V reference as well) is that many ADCs have a requirement for a low source impedance so the divider could affect accuracy, sometimes in subtle ways.
Find the worst case output voltage range of the 7805, the worst case resistances of your resistor divider, and from those calculate the worst case range of your nominal 2.5 V reference. For modest accuracy, a TL431 shunt reference may be a better choice, or any number of precision series or shunt 2.5V references.
Meandering traces necessary for 24-Bit parallel RGB LCD interface? I am working on a project that interfaces an Atmel SAMA5D3 MCU with a LCD TFT display. The interface between both is 24-Bit parallel RGB with HSYNC and VSYNC signals. The resolution of the display is 800x480 pixels. I understand that it is important that all signals and the clock come in at the same time. The way to make that sure is meandering the traces to get equal trace length. I don't have a lot of space (who has) and I am worried that my meanders are too small causing reflections and/or cross talk. I am also wondering if it is necessary in my case. Trace length is around 50-60 mm. How much variance in trace length is allowed in my case? Perhaps it would be enough to just meander the few shortest traces? I also have implemented an OV5640 CMOS camera (not in the picture). It's interface is 8-bit parallel. Trace length here is about 60mm. The clock rate is around 100 MHz as far as I know. It's a 5 Megapixel camera. Do I have to meander the traces in this case? Thank you very much for your help! Phillip Update #1: I reworked my design and removed all meanders to get the trace lengths of my signals: The shortest trace is 35mm for LCD HSYNC and the longest trace is LCD_R2 (data bit) with 57.5mm. Update #2: In order to learn high speed PCB design I read a document I found at Toradex which is very good in my opinion. On page 54 and page 66 the layout guidelines for 24 Bit RGB and Camera parallel interface are summarized like that: " [...] Max skew between data signal and <100ps ≈15mm, depends on pixel clock, requirement can be relaxed for lower clock resolution display [...] ". I don't get this en par with your answers. 100ps should allow for much larger trace variance than 15mm (as posted in the answers below)? The document can be found here: http://docs.toradex.com/101123-apalis-arm-carrier-board-design-guide.pdf . <Q> The rule of thumb is that signals travel at 2ns per foot in standard PCB material. <S> That's roughly half as fast as the speed of light due to the effect of the PCB dielectric material. <S> 180psec per inch is the same thing, and in metric that's 71psec per cm. <S> Even if you are running with a 100MHz clock, thats 10ns per cycle. <S> So assuming you have half of that as allowable skew for your signals you can have 5ns / 71ps = <S> 70cm mismatch between your signals and still only have 5ns time difference between them. <S> So I seriously doubt you have to match your signals that closely in this design. <S> But without more detailed specs I'm only guessing... <A> At 800x600 pixels you have a total of 480000 pixels. <S> It <S> you were refreshing at 50fps (that's OTT, but for illustrative purposes), not including the porches, you would have a 24MHz pixel clock. <S> 24MHz has a wavelength of about 12.5m in a vacuum. <S> So I would say you can have a variance measured in the order of meters in your trace length. <S> Impedance / length matched traces are only really needed when you're working with signals in the gigahertz range. <A> If your PCB has the space, why not match the lengths? <S> It's good to practice length-matching any time you have the chance. <S> However, you should be aware of electrical lengths instead of physical/geometric lengths. <A> I done some SRAM/CPLD/DAC waveform generator (10bits) at 100 MHz clock. <S> Did not bother to match the delays at all. <S> Used Diptrace autorouter generating 20..45mm tracks (LVCMOS 3.3V). <S> Everything works just fine.
You need special software to match electrical lengths; speculating on geometric lengths is useless here.
H-Bridge with 1 PWM and 1 Output I'm looking for a solution to control the direction of a powerful DC Motor . I came up with the idea to use a H-Bridge. Since the motor uses up to 3.2A the amount of possible H-Bridges is quite limited. The supply voltage on my quad is 3.7V. Since my outputs are limited I want to control the position using only one Digital Output. Which does work in one direction if set to 0 and other direction if set to 1. The PWM output should control the velocity.Is that even possible? I found this one but I have absoultely no clue if this one can be controlled only with 2 inputs per motor (1 PWM , 1Digital Output). <Q> Above is a section from the data sheet. <S> As you can see, the bridge needs all four data lines (IN1L, IN1H, IN2L & IN2H) connected to control it properly. <A> Since, recently i am working on a tracked robot, I designed H-bridge that uses two PWM (complementary with dead band) to completely operate the motor. <S> If you are doing the same, I can provide you with more details. <A> With one inverting gate, you can control H-bridge as you <S> described.(The built-in editor is missing a motor-symbol, so substituted it with a lamp-symbol.) <S> When DIR is 1, motor turns one direction, when it's 0 <S> the motor turns other direction. <S> PWM controlled current source would work as a driver to control the speed. <S> simulate this circuit – <S> Schematic created using CircuitLab
As far as i understood your question, You can control velocity as well as direction with complementary PWM generated from any type of microcontroller.
Reading an ABS wheel speed sensor I am trying to use an Arduino to intercept and send out modified wheel speed readings on a 2014 Subaru Forester. The problem I am running into is the wheel speed signal. From what I can tell the sensor is a Hall effect sensor. There are two wires going to it (12v and signal) All 4 wheel speed sensors plug into the chassis harness and end in the Vehicle Dynamics Control (VDC) unit. There are no teeth on the wheel the sensor is reading from so I am assuming it must be a magnetic encoder wheel. With everything plugged in and the vehicle either running or just in the on position, I hooked my oscilloscope to the signal wire for the front right wheel and spun the wheel by hand. I was able to see a square wave with a period that varied based on the speed of the wheel. The issue is, the max and min voltages on the square wave only differ by ~160mV. This is too low for the Arduino to read and seems strangely low for an automobile application. The only thing that I can think is that the comparator that is normally housed in the sensor its self is housed in the VDC unit. I then disconnected the wheel speed sensor from the chassis harness to try and weed out electrical interference issues caused by the car running. With the sensor still installed in the wheel hub, I used my Power Probe III to provide 12 volts to the sensor and hooked the o-scope to the signal wire. The reading I got was just straight 12v with no fluctuation when I spun the wheel. Basically I am a bit confused and lost. Do I just assume the 160mV square wave is correct and build a conditioning circuit with a comparator? or is there something else I am doing wrong? Here is a link to the wiring diagrams I am working with in case that helps. Any help will be much appreciated. ******Update*******I got the MAX9921 chips and holy cow those are small. Luckily I was able to find some surface mount breakout boards for the form factor. Using a bread board I made this circuit: My only problem is when ordering parts I didnt notice that the capacitors on the input wires were .01uF caps and instead just ordered .1uf caps. I hooked it up with the .1uF caps and was able to get the output to trigger by touching the input to ground but when it is hooked to the wheel speed sensor and the wheel is spinning it wont trigger. I am guessing that the over sized cap is messing with the signal. Can anyone confirm what will happen to the square wave if a cap is added to it? I am going to pick up the correct cap and try it out. <Q> Most of the ABS speed sensors that I have seen are CURRENT-MODE devices. <S> That is: they modulate the current passing though them rather than the voltage. <S> This has several significant benefits for the automotive manufacturer. <S> The main benefit is the elimination of ground-induced noise in the sensor. <S> The easy way to verify this is to install a 100 Ohm resistor in series with one of the sensor leads. <S> Then measure the voltage across that resistor. <S> I've made simple adapter boards for local auto enthusiasts. <S> I had them identify the most positive lead going to each wheel sensor and interrupt that. <S> I then used some Zetex ZXCT1008 hi-side current sensors to give me a proportional current output that was then converted to a voltage at the add-on board that they were using. <S> The Zetex part is connected across an 18.2 Ohm resistor in series with the +12V lead feeding the sensor. <S> Again, keeping the sampled signal as a current eliminates ground-related problems for the add-on system. <A> The sensor is probably using a communication interface called PSI-5. <S> (PSI5.ORG) <S> The sensor actually modulates the supply current to send out the readings at 125kbits/sec. <S> To sense the current you will need to have a resistor in series with the supply. <S> kevin <A> The comment posted by @John-u ended up being the solution to my problem. <S> Of the two wires on the wheel speed sensor, one went to the input of the MAX9921 chip and the other went to ground. <S> Following that, each trigger on the wheel caused a 5v pulse from the MAX9921 chip.
The ECU modulates the supply voltage to synchronize operation or transfer data to the sensor. The MAX9921 chips allowed me to read the signals from the wheel speed sensors.
Converting battery voltage 12 volts to -5,5 volts at about 3 mA My team and I are trying to power a sensor. We need to get -5.5 volts and were not too familiar with making or acquiring negative voltages. So it doesn't have to be a 12 volt. Ultimately we'd like to use one battery and split out different rails from it to power two different devices. http://www.ti.com/lit/ml/szzn001/szzn001.pdf and http://www.eetimes.com/document.asp?doc_id=1272382 seemed to be insightful. There are solutions out there to acquire negative voltages.We are looking for cheap and simple and the "Split rail" option looks like a path. But upon looking at a few online there seems to be poor efficiency at the 3 mA load levels. Could anyone point me in a good direction of research for a good solution to get a negative 5.5 voltage from a positive voltage at a very low amp level (3mA). Please and thank you from Chuck a ELE student, having fun researching for senior project. <Q> The MAX1720/MAX1721 chips are probably one of your easiest/cheapest solutions. <S> You will have to get +5 to +5.5V from your 12 V rail using a linear or buck converter first though. <S> This chip will simply invert the input voltage. <S> With this single chip and a couple capacitors, you will have a negative voltage system for < $2. <S> No separate PWM signal needed. <S> It is very efficient at 3mA: <S> The drawback of these types of solutions is that they are not really regulated, so if you have a large dynamic current load the voltage will change a lot. <S> For something low current like this project, this is pretty much ideal though. <A> These typically take the logic supply (+5V) and first double it to +10V and then invert it to produce <S> -10V. <S> These voltages are then used to power the RS-232 drivers in the same chip. <S> But they also come out to their own pins, so if you're not using the drivers, you can use the current (usually several tens of milliamps) for your own purposes. <S> Simple linear regulators can be used to reduce the ±10 V rails to whatever you actually need. <A> Well lets separate the need for a specific voltage from the negative voltage requirement. <S> To make a negative voltage, you could consider the old reliable "charge pump" circuit... <S> You can drive the charge pump circuit from an oscillator running from your 12 volt supply. <S> then you can run the approx. <S> -12 volt output through a -5 volt regulator, such as a 7905, or maybe a 79L05 if you just need a few mA. <S> There may be other nifty one chip solutions, but I'm assuming you'd like to try engineering a solution first, so <S> this is my hat thrown in the ring. :-)
One of the easiest ways to get negative voltage at low current is to simply hijack the power supply section of any MAX232-type RS-232 interface device. And if it really needs to be -5.5, a silicon diode added between the ground terminal of the regulator and circuit ground ought to bring it down 1/2 a volt to -5.5.
How could I set up a circuit that keeps track of strikes in a baseball game using D flip flops in Multisim? What I want is two LED lights and a push button. When the push button is pressed the first time, the first light lights up. When it's pressed a second time, the second light lights up. When it's pressed a third time, both lights turn off. I set up two D flip flops. The first Q output connects to the second's D input. The push button is hooked to the Clock on both flip flops, the push button which is hooked to a power source. After going through my logic with K-maps, I determined the following: D1 = Q0'Q1D0 = Q0' Q0 is the first flip flop and Q1 is the second flip flops. So I set up the gates as necessary. Here is where the problem is. The lights have a strange behavior. Sometimes one turns on, sometimes both turns on. I'm obviously doing something wrong. <Q> While I'm not a Multisim guy, I suggest that you haven't tied D0 to any thing. <S> Try tieing D0 to a logic high. <S> Furthermore, I suspect that your description means that, the sequence of LEDs should look like Start Q0 off, <S> Q1 offPush Q0 on, Q1 offPush Q0 off, <S> Q1 onPush Q0 off, <S> Q1 offPush Q0 on, Q1 offPush Q0 off, <S> Q1 onPush Q0 off, Q1 offetc. <S> If this is so, you need a second input - Start, to force the FFs to the starting position. <S> This may not be true for Multisim, as the program may initialize FFs to 0, but you would need it in real life. <S> Assuming that no Start is needed, simulate this circuit – <S> Obviously, if a batter has one strike and gets a hit or a walk, you can push the button twice more to get back to the starting state. <A> You may be experiencing switch bounce from your push button. <S> Look for filter circuits that will eliminate switch bounce. <S> The simplest just add a small capacitor and a resistor to the circuit. <A> The proper connections would be D0=(Not)Q1 and D1=Q0*(Not)Q1. <S> This will create the sequence you are looking for.
Schematic created using CircuitLab will do.
Cutting off metal anchor legs on an HDMI port or Metal connector? What to use? I'm looking for some advice on how to cut an HDMI port anchor leg off using some type of miniature cutting wheel. I bought a dentist micro drill, but I'm unsure which type of burs to purchase and type of metal alloy that can cut through this kind of metal. currently the HDMI port is soldered onto a pcb board already and I can't seem to desolder it that easily as its mounted on 4 legs. The easiest solution i believe is to just cut off the legs. <Q> You should be careful to have <S> all the signal lines de-soldered before you try cutting the legs. <S> If you don't you can easily tear up the signal traces when cutting away the legs. <S> Use a small X-acto knife to lift up each leg of the signal lines while heating the connection with a soldering iron. <S> I find that safer than using cutting wheels that can catch or break and end up damaging other areas of the PCB. <S> I often save a damaged pair of diagonal cutters for such jobs as sometimes you may mar the blades on the cutters. <S> If you have a nice pair of cutters and don't want to risk them, go buy a cheap pair for doing jobs like this. <S> Once you have the legs cut you should be able to heat them up individually and pluck them from the holes. <A> The easiest solution is to use a heat gun. <S> You'll destroy the connector, but if you blanket the rest of the board, you shouldn't affect anything else. <S> It's rather hard to control the cutting forces on a hand-held cutting wheel, you might easily destroy the board and/or other components on it. <S> You can cut it into pieces in situ with precision wire cutters. <S> No need for a motorized tool. <A> Cutting away structural pins, then desoldering and picking them out one by one is a legitimate technique, as long as you know that you will sacrifice the connector. <S> Cutoff wheel for rotary tool (dentist's, Dremel, and so on) is efficient at cutting brass. <S> It's diameter it fairly large, so you may have to cut vertical slots and complete dice the connector. <A> Very soft metal, you will cut through it like butter. <S> Mind the metal dust.
Once you have all the signal pins lifted away from the contacts you can then cut the metal support legs, often with just a good pair of small diagonal cutters as the metal on these connectors is not that hard. Any typical burr micro drill bit or cutting wheel will work. Besides, the connector is likely made out of a soft metal.
Why does a processor get hot? I would like to understand how the computation process causes the processor to get hot. I understand that the heat is generated by the transistors. How does the transistors generate the heat exactly? Is the correlation between the number of chips and the heat generated linear? Do CPU manufacturers optimize the positions of single transistors in order to minimize the heat generated? <Q> A transistor (FET, in modern ICs) never switches instantly from full OFF to full ON. <S> There is a period while it's turning on or off where the FET acts like a resistor (even when fully ON it still has a resistance). <S> As you know, passing a current through a resistor generates heat (\$P=I^2R\$ or \$P=\frac{V^2}{R}\$). <S> The more the transistors switch the more time they spend in that resistive state, so the more heat they generate. <S> Yes, manufacturers may position specific blocks of their design (not individual transistors, but blocks that form a complete function) in certain areas depending on the heat that block could generate - either to place it in a location with better heat bonding, or to place it away from another block that may generate heat. <S> They also have to take into account power distribution within the chip, so placing blocks arbitrarily may not always be possible, so they have to come to a compromise. <A> All current flow in anything that isn't a superconductor generates heat. <S> In chips, it's mostly flowing in aluminium "metal" layers (why not copper? <S> Nasty chemical interaction with other parts of the silicon, it turns out). <S> What causes current to flow? <S> Every time a transistor changes state, this can be modeled as a capacitor (the FET gate of the driven logic gate plus parasitic wire capacitance) charging/discharging through the wire and output FET of the previous gate. <S> This is "switching" or "dynamic" power. <S> It's proportional to switching speed and the square of the voltage; hence the drive from 5V to 3.3V to 1.8V for better efficiency. <S> The insulators are not perfect, and in some places are very thin. <S> Transistors may not be fully "off". <S> If a FET has an off resistance of a megaohm, and you put a million of them in parallel, it looks like a 1 ohm resistor. <S> This is "leakage" power. <S> It's proportional to number of transistors. <S> I spent a decade working at a startup on power optimisation. <S> :) <S> There are a lot of techniques: speed/leakage tradeoffs ("high k metal gate"), turning off parts of the circuit entirely, clock gating, reduction of clock frequency, sizing and placement. <A> 1) Any time there is current flow, heat is generated by the collisions of the electrons. <S> 2) <S> Yes, generally, the correlation is linear. <S> 3) <S> It is very unlikely that CPU manufactures optimize the position of individual transistors, to minimize the heat generated (they are all inside the same casing). <S> When a CPU is "idle", although it uses a minimum amount of current, it generates heat. <S> As the processor starts to "process" information, the individual transistors switch states. <S> This switching also generates heat. <S> In addition, the switching frequency affects the heat generation rate, <S> the higher the frequency the higher the heat generation rate. <S> Since the heat dissipation capacity of the chip is fixed, it can overheat if it's operated at a higher frequency than it was designed to operate. <A> it is simple we know that according to joules law that whenever the electron are flowing through the conductor the heat produced due to the resistance of the material because every conductor have some amount of resistance in it.
So the amount of heat generated can be directly proportional to the number of transistors - but it is also dependent on which transistors are doing what and when, and that depends on what the chip is being instructed to do.
Simple ADC alternative by using a capacitor and digital Arduino pin I'd like to measure a dozen potentiometers with an Arduino UNO. Unfortunately, the UNO only has 6 analog pins, but it does have about a dozen digital pins. Could I effectively measure an analog value with a digital pin by following this procedure? Wire the potentiometer in parallel with a capacitor. Connect one junction to an Arduino's digital pin. Set this pin to write HIGH until the capacitor fully charges. Set pin to read LOW and then use pulseIn() to measure the time it takes for the capacitor to discharge across the potentiometer, causing the voltage at the pin to go from 5V to 0. This time should be proportional to the resistance of the pot. e.g. a pot with a low resistance will cause the cap to discharge very fast, whereas a high resistance will cause the cap to discharge more slowly. <Q> I would not rely on it. <S> Remember that there is a no mans land between high and low (where the analog signal would be), that theoretically could change with temperature, time or any variety of other reasons and invalidate your setup. <S> It also relies on knowing the precise time of discharge. <S> Keeping time like this is something that is very hard to do accurately on any microcontoller. <S> Take for instance <S> you get this to work and calibrate it so that you know that it reads <S> low when the input gets to 1.7v. <S> But come back in a day (or even minute) later and that 1.7v threshold is now 1.6v. <S> The calibration you did would be invalid and you would be getting bogus results. <S> What I would do instead is use the digital pins to read an external ADC over an SPI or other digital line. <S> This has the benefit of being more reliable and (in most cases) more accurate as well. <S> So to answer your question, it is theoretically possible. <S> It would be a tough circuit to design, you would need to disconnect the line being monitored while you charge the capacitor, but it could be done. <S> However it most likely would not be very reliable. <A> The optimal design will depend upon how often the pots need to be read, how stable the values need to be with time (e.g. if you set the pot to a particular position today, will you care if it reads slightly higher or lower tomorrow?), and how reliably small the wiper resistance is compared with the overall pot resistance. <S> Wiring a pot as a rheostat (one end disconnected) with some resistance is series, discharging a cap, and then timing how long it takes for the cap to charge to VDD through the pot+resistor combo is a very old technique which was used in the original Pong machine and many game machines since; I'm not sure if the Odyssey which predated Pong used the same technique. <S> The biggest problems with that technique are that long-term stability may be poor, and variations in wiper resistance may yield nasty control response if pots get old and/or dirty. <S> Another approach is to wire the ends of the pot between VDD and VSS, probably with some resistors to keep the wiper voltage some distance from the rails, and then use a comparator to detect whether the pot voltage is higher or lower than a cap-generated reference voltage which ramps from VSS to VDD. <S> Ideally one should use a constant-current source to charge the cap, but if one doesn't get too close to VDD or VSS <S> even a resistor may be "linear enough". <S> I like the second approach better than the first, since as Atari 2600 owners can attest, rheostat-style controllers get "jittery" after awhile as a consequence of the changing wiper resistance. <S> The second approach would require a couple of quad-comparator chips to read six pots, however, while the former would not. <A> If you could constant-current discharge the cap, and use a real comparator, this would be much like a slope-based A/D. <S> It's a common way to deal with thermistors. <S> Depending on how big the cap is, and the speed of your timers, this method can have better resolution than an on board A/D. <S> I recommend a real comparator, though.
While it may work there could also be some stray capacitance or other factors that also affect the reading of time and voltage value.
Manually removing bulk components from cut tape? I ordered a bulk quantity of components for experimentation and they were shipped in a cut tape format. I've been removing components individually from the tape but it requires a large amount of labor, removal of tape residue from the leads, etc. Is there a better method? <Q> For leaded components on tape, I'd just cut the component leads at the tape - you very rarely need the full lead length. <A> The top tape should just peel back, and should allow you to dump the components on the table. <S> I have never heard of tape residue on the leads. <S> EDIT: <S> I just realized you are talking about through hole components. <S> Most of the time, I have never needed to clean them, as we cut the leads after they are soldered into the board, and you can just let the residue part be. <S> An easy way to prep the components is when you are about to solder, apply some flux from a flux pen, and that should clean the surface so that you can solder it. <S> 3M Novec would also work too on this as well. <S> For reference to others, this is what I believe that you are referring to. <A> I get a lot of transistors, and resistors that are on tape. <S> Goof off softens the tape nicely and vinegar helps to get rid of the glue. <S> Old stock components are harder and require overnight soaking, so I use 2 parts water to 1 part windex for that
If there is such residue, you could either bathe them in an electronic cleaning solution (3M Novec comes to mind) or just cut the residue parts off, if the leads are long enough.
How can I parallel a battery supply and AC supply? How can I proceed if my battery does not supply all the charge I need and want to compensate by supplying the rest with an AC source connected in parallel with the battery? <Q> You cannot connect battery output with AC source. <S> As mentioned captcha a battery produces DC (direct current) <S> and it cannot be mixed with AC power supply. <S> The best solution for you it will be to connect two same batteries in parallel. <S> It must have the same output voltage. <S> Check this link for more information. <A> for this first of all please tell us if load is AC or DC. <S> for DC you need to rectify AC into DC and bring the rectified AC's output DC voltage to DC battery's voltage level and connect them in parallel. <S> if load is AC, then you need to convert DC into AC and make sure that phase and magnitude of converted AC voltage and AC supply voltage should be same. <S> share some more info, maybe then i'll be able to help you on this topic. <A> Current moves from a higher voltage node to a lower voltage node. <S> Let's assume that you have a 3 volts battery that produces DC (Direct Current) and an AC supply that swings between 0 to 5 volts. <S> Here is two cases: <S> When the AC supply produces a voltage lower than 3 volts, The voltage of the DC battery will be higher than the AC supply. <S> so, current will move from the DC battery to the AC supply and the AC supply will be damaged. <S> After a very short time, The AC supply will produce a volt that is higher than 3 volts because it swings between 0 and 5 volts. <S> so, the AC supply voltage will be higher than the DC battery voltage. <S> As a result, Current will move from AC supply to DC battery and that will consume more power and damage your DC supply.
Also you can use a battery charger (credits to captcha), but it may require additional circuits to protect the AC/DC converter or battery and may a filter required.
What is Source Impedance? I was going through data sheets of op amps and saw that bias currents usually add unwanted voltages due to voltages generated from the bias current flowing through the source impedances. What exactly does the source impedance mean ? I understand what impedance is, but since there could be a lot of circuitry before the input to the op amp, do we just use normal laws to calculate the total resistance/impedance before it(input) ? There also might just be a power supply providing constant DC voltage , how are we supposed to calculate the impedance of that ? <Q> The device that supplies a voltage signal or a dc power voltage is the source. <S> A battery for instance may have a source impedance of about 0.1 ohms. <S> See this link to Duracell's website and click on the pdf for an AA battery: - It's the same for linear voltage regulators, microphones and anything that can generate an AC or DC voltage - there will be some internal resistance that may have to be taken into account when the device is connected to a load. <A> I was going through data sheets of op amps and saw that bias currents usually add unwanted voltages due to voltages generated from the bias current flowing through the source impedances. <S> Bias currents are the dc currents for biasing the input differential stage of the opamp. <S> Because these currents are very small (<1µA) <S> these currents, in many cases, are neglected during calculation of the feedback network. <S> However, there are some cases requiring rather large resistors (some hundreds of kOhms) which cause a dc voltage drop that might be unacceptable. <S> (It acts like a dc offset and causes a dc shift of the output operational point). <S> In those cases, we can make something like balancing/compensating these unwanted dc voltages at the input. <S> That means: We try to make the dc voltage drops equal at both opamp input terminals. <S> Example: Inverting amplifier with a feedback resistive chain 500k-1k (gain of -500). <S> In this case, we could ground the non-inv. <S> opamp terminal via an additional compensating resistor Rc of app. <S> (1k||500k~1k). <S> In this example, it was assumed that the signal source has an internal source resistance Rs=0. <S> If this is not the case, this resistance Rs has to be taken into account (in series to the 1k resistor) - for computing the gain value as well as for finding the proper compensation resistor Rc. <A> You can calculate the approximate impedance of the source if not exact. <S> Here you go. <S> Connect a load across the battery. <S> Measure the drop across the load. <S> Get the difference between the defined input voltage and the actual voltage across the load. <S> Divide the difference by current. <S> That is your source impedance.
The source impedance is the internal resistor in series with that otherwise perfect source voltage.
How can this circuit read a value for amps at 0 volts I made a simple circuit using this : It can tell you the voltage and current along a wire if you mouse over it. The wire down the bottom reads 4.55mA and 0V (the little yellow dots actually move to show current, and the green colouring is voltage). I don't get how that can be. If there is no voltage how can anything possibly be moving? And if nothing can move, that implies no current. Where does 4.55mA come from? If I remove the 1k resistor, it goes up to 50mA and still 0V. It doesn't make sense to me. <Q> Some basic facts of elementary electricity: <S> Voltage is measured between two points; when mention is made of voltage at some point, that is relative to an implicit reference, the "ground"; which most often (and here) is the negative side of the power supply. <S> As a first order approximation, there is no voltage across a piece of metal wire, even if some current flows inside it. <S> Considering these two facts, it is normal that the simulator shows no voltage on any wire connected to the negative pole of the power supply, just as observed. <A> If you inspect the voltage at other nodes of the circuit you will find non-zero values. <A> Every point in a circuit has a well define voltage and a current (in steady state) that can be found through mesh analysis (KVL/KCL). <S> Since this particular circuit is a single series loop, the current at every point in the circuit will be the same (namely Vcc/1100, from which I can infer that your battery voltage must be 5V ~= 0.00455 * 1100). <S> If that weren't true, you'd build up charge somewhere in the circuit until some cataclysmic event ensued. <S> The voltage however will drop across each resistor starting from the positive terminal of the battery, by an amount <S> I <S> * R. <S> So the voltage just past the first resistor will be 5V - 0.00455 <S> * 100 = 4.545V. <S> And the voltage just past the second resistor will obviously be zero because it is connected to the negative terminal of the battery.
It reads 0V because the simulator is using the negative terminal of the supply as ground.
UV Led / Did I get Harmed? There was an UV Led lying around, I wanted to check bank notes with it. I soldered a 3W led on PCB. And powered it with 4 AA batteries (connected in series) The light was bright and purple. (I mean, visible) So I guess that wavelength was not small. Because of my ignorance; I touched the LED to check if it was overheated (and it was), and looked directly at it. I do not have any sight issues for the moment, but what I read on internet made me fear. Is there any possibilty that my finger got harmed? Does visible violet LEDs cause any illnesses such as skin cancer? By the way, the exposure and the contact (I touched the LED) lasted both approximately 20 seconds. Thank you in advance. <Q> You're fine. <S> Don't do it again. <A> UV can be described by dividing it into three categories based on wavelength. <S> UVA, UVB, UVC. <S> UVC doesn't make it through the ozone. <S> UVA is more prevalent throughout the year, and has been thought to be less important in the formation of skin cancer until more recently. <S> It is now thought that UVA may also play a role in skin cancer, but whether alone or if it has to be in combination with UVB is still being investigated. <S> However we now recommend all patients use a sunscreen that includes protection for both UVA and UVB. <S> There are others who may be able to correct me, but my understanding is that UV lights produce UVA only, so you don't need to worry about skin cancer. <S> Also, skin cancer risk is related to length of exposure (very short in your case) and is increased with burning versus tanning. <S> Since you didn't get a burn on your finger, your chances of skin cancer due to touching that LED is pretty much zero. <S> The risk to your eye is much harder to asses. <S> There is the potential for damage to show up many hours after exposure. <S> Again I suspect that you are OK, but I would get an exam from an optometrist or opthomologist to be safe. <A> If your finger was harmed it will probably form a blister within the next day or so, as if you had touched a hot stove element. <S> Any latent damage that could lead to cancer <S> it's too late to do anything about anyway <S> , so just don't do that again. <S> As far as I know, only a competent opthalmologist will be able to say for sure.
UVB is well recognized for causing suntans, sunburns, skin aging, and of course cancer. Your eyes could indeed have been harmed, without your being able to easily notice it. You might look specifically for an opthalmologist who is experienced with laser eye safety exams.
Can I an RS422 interface to Arduino's serial pins? I have a custom-designed circuit that communicates to and from the external world through an RS422 interface. I wish to communicate with it with an Arduino, preferably UNO. The RS422, much like the RS485, uses two lines for both the receive and transmit lines (one positive, one negative). From what I can find on the net, RS422 uses 0-5V digital communication, which is the same as the Arduino serial pins, right? Can I use one of the lines, the positive (?), for both the TX and RX of the RS422 interface and connect them to pins 0 and 1 of the Arduino? Or would I have to connect to the USB plug of the Arduino? UPDATE The problem I'm facing is I already have a custom-designed Arduino shield that sends and received serial data, and I completely forgot about the RS422 interface. I can easily sort out the multiple devices on one UART bus in software, but I wasn't sure whether you could simply plug one of the differentials of the TX/RX of an RS422 to the Serial pins, or not. <Q> There are special chips that do this for you. <S> Just like you would use a MAX232 (or similar) to interface the Arduino to an RS232 system, you need to shift the voltages to the right levels, and create or combine the differential pairs. <S> Maxim (the makers of the MAX232 chip) make a number of chips for RS485 and RS422 systems. <S> Their parametric search shows them all: http://para.maximintegrated.com/en/search.mvp?fam=rs485&hs=1 <S> Other companies make chips that do the same job as well. <A> TTL to RS485 converters are very cheap and easy to buy. <S> Here is one for $7 from NewEgg... <S> http://www.newegg.com/Product/Product.aspx?Item=9SIA4SR1T52538&nm_mc=KNC-GoogleMKP-PC&cm_mmc=KNC-GoogleMKP-PC- <S> -pla- <S> -Electronics-_-9SIA4SR1T52538&gclid= <S> CjwKEAjw56moBRD8_4-AgoOqhV4SJADWWVCco_vnIRyl08e2ifXOBH_v86voUoQ0z_zgjA2TuOBc4RoCrSHw_wcB&gclsrc= <S> aw.ds <S> There are many more. <A> I do interface with two RS422 devices. <S> One <S> I just listen to and the other I send and receive data. <S> A couple of resistors, a soldering iron and a small experimental PCB does it in my case.
You need to interface the RS422 properly to the Arduino.
Why is this person shocked? The voltage over the person is 250V. Why does he receive a shock? Doesn't the earth have a very big resistance so the current will be very small? <Q> The earth does have high resistance, but there is also a few thousand volts there. <S> This is the same reason that cows and sheep are more likely to be killed by a lightning strike if they are standing perpendicular to the ground current flow. <S> If you're ever in a lightning storm in an open field or in the situation depicted above, just stand with your feet very close together. <S> It might save your life. <A> The voltage over the person is 250V. <S> Why does he receive a shock? <S> Doesn't the earth have a very big resistance <S> so the current will be very small? <S> This is exactly the reason. <S> The resistance of the person is less than the resistance of the earth between his feet, so most of the current resulting from this voltage is flowing through him. <S> Equivalent circuit: simulate this circuit – Schematic created using CircuitLab <A> Humans also have a very big resistance, but likely some less than the ground, so the body becomes a current path.
They are shocked because the resistance of the ground for the distance between their feet is higher than (or comparable to) the resistance through their body.
Why print a PCB module on ceramic? This is what I am talking about (click to enlarge): It is from an old (1990s) telephone system. There were multiple lines, some digital, some analogue, and in the output stage these modules (double sided) were standing (in a slit) on the main PCB and soldered to it (with the pins you can see). There were a couple of other sub-PCBs on this thing, but only those were of this ceramic type. So the question is: Why are those printed on ceramic? It seems that the traces will have higher resistance and the overall building cost for unusual PCBs is often higher than for established processes. On the other hand, this looks like a multilayer, and the other side is a multilayer too, which made me think if this is cheaper than a "real" four-layer PCB (since it has no vias). But then some of the modules (unfortunately I cannot remember anymore which of those was for digital and which for analogue lines) only had one side populated. <Q> This is a relatively inexpensive method of construction if you are making tens of thousands of units. <S> This is / was known as a "hybrid module" or "ceramic hybrid module". <S> Note that all of the resistors are screen-printed on the substrate (dark rectangles). <S> Also note that they can do multiple layers of conductors because they print insulating layers between each of layer. <S> Finally, because the resistors are exposed, they can trim each resistor before the final protective top coat is applied. <S> You will see the trim as a laser cut in the resistor body - the cut is usually in the shape of a "L". <S> The short leg of the "L" is the initial rough trim, the vertical part of the cut is the fine trim. <S> I used to see this type of construction a lot for precision analog filters and telephone hybrid (2-wire to 4-wire conversion) networks. <A> This is a snapshot in the evolution of surface mount technology. <S> In the midish 1980s, people were desperate to increase circuit densities. <S> Existing technology was chip and wire hybrid, where IC die were mounted and wire bonded to thick-film hybrid substrates. <S> The hybrid substrates were usually Alumia. <S> About the only surface mount parts were ceramic chip cap, and then later ceramic (thick) film resistors, and also those funny looking cylindrical diodes. <S> So that the ICs did not have to be wire bonded, at first die were taken and mounted into ceramic leadless chip carriers (LCCs). <S> There was a lot of concern about thermal expansion and leadless mounting, so the safest approach seemed to be using ceramic everything. <S> Then the first SOIC packages started to appear for active parts with low pin counts. <S> Some of these sorts of SIP ceramic boards were used in power circuits too. <S> In that case thermal conductivity was also an issue, so BeO substrates were sometimes used. <S> The BeO could be released in power, which is toxic. <A> In addition to the answers already provided, I think that the superior thermal and mechanical characteristics of ceramic versus the other typical materials were the reasons for using it for this application.
BeO is fine as long as is remains a ceramic, but given the high power and voltages some of these could see in use, sometimes would be damaged. That makes this type of construction extremely attractive if the circuits require precision trimming.
Will an impedance matching network also act as a filter? Will a matching impedance network also act as a filter? I'm using a pi network and am wondering if I should also add a filter. I designed the pi network by using the program SimSmith and it consists of a shunt capacitor, series inductor, and another shunt capacitor. <Q> Will a matching impedance network also act as a filter? <S> However, a straight impedance matcher is normally only resistive (such as for the termination of cables to prevent reflections at RF). <S> I'm using a pi network and am wondering if I should also add a filter <S> The pi network will act like a filter and if you are not happy about its performance as a filter then add a filter <S> but, the filter will need to match the impedances you may be seeking to maintain. <A> They can act as a filter in the sense that the matching network will have a inherent frequency response out of band. <S> This performance is definitely secondary to the impedance matching functionality. <S> If you do add a filter to the circuit, keep in mind that most impedance matching approaches assume that you're matching to a fixed resistance, even well out of band. <S> This is not what a filter will present as an input / output impedance. <S> You should separate the impedance match with some sort of impedance buffering. <S> The details of this is left to your system design. <A> The purpose of impedance matching networks is that all the available power is delivered to the load. <S> There are many matching networks that perform this task at a given frequency of operation. <S> Once you depart from it, the frequency dependence of the matching elements (and the frequency dependence of the load) give an overall non-constant frequency response which may be called a "filter": a network whose response depends on the input frequency. <S> Some matching structures are designed to offer matching and performing an useful filter function, such as a bandpass response. <S> For this, you need a suitable structure and sufficient degrees of freedom in the element values: a two-element matching circuit can only match two requirements (real and imaginary part of impedance). <S> With a three element structure you may be able to achieve a given bandwidth, etc.
A pi network, as described, is a filter and it can sometimes be used to match impedances.
Reducing the voltage drop on a simple comparator driving a MOSFET to avoid LiIon overdischarge I would like to use a LiIon cell recovered from an old laptop to power my bike light (a bulb one, 2.4W 6V). I thought about using an opamp controlling a MOSFET to avoid overdischarge (MOSFET ON for Vbatt>3.1V), and also an opamp to signal when the battery is almost drained (LED ON for Vbatt<3.2-3.3V). As DC-DC step-up I used a small board meant to be used for phone chargers and I measured an output of 4.8V with the load connected. It is way lower than the nominal 6V of the light bulb, but this is a minor issue, since I can easily swap that circuit with another one. The circuit is (of course the LM7805 is a placeholder for the step-up board and also my MOSFET is different: a BUK556-60A I had lying around): simulate this circuit – Schematic created using CircuitLab My problem is that the LM358 (or the TL081 I have at home) is not rail to rail and apparently its output cannot put the MOSFET in saturation. For example, I measured on the breadboard the following values: 3.48V Vbatt, 3.17V threshold for the comparator OA2 (it was not 3.1V as I wrote above) and 3.9V on the gate of the MOSFET (and on the output of the opamp) resulting on a drop along the MOSFET of 0.8V. How can I prevent overdischarge of the LiIon battery without losing almost 1V on the switch I have to place inevitably somewhere? A NPN transistor would not change the situation much, I think. Update This circuit technically doesn't prevent the batteries to drain, but it will light up the LED when charge is low and will stop the bike like altogether when the battery is almost empty, resulting in me being forced to charge the batteries. I didn't show in the circuit the physical switch I plan to use to disconnect the batteries completely when no light is needed. <Q> I suggest a solution involves 1 power PMOS, one NPN BJT, one Zener and a few resistors. <S> Make the BJT conduct and pull the gate of the MOSFET low only when Vbatt >= <S> Vz+Vbe. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The Vz of <S> TL431 can be tweaked using a pot. <A> There are a few things that you can do to improve your circuit. <S> 1) Get rid of the 7805 regulator. <S> Because your input voltage is way below the drop-out voltage of the regulator, all it is doing is introducing a voltage drop to the rest of the circuit. <S> 2) Use a low-power voltage reference. <S> The temperature coefficient of the LEDs that I use is about -1 mV / degree C but this will vary depending on who makes your LEDs. <S> Nonetheless, it should be sufficiently accurate for your purposes. <S> The red LEDs that I use are in a water-clear plastic package and are really quite efficient - they produce significant light at a current of about 0.5 mA. <S> This allows the LED to be both the voltage reference as well as a (dim) power-on indicator. <S> Pick the LED resistor for about 0.5 mA current and see how well it works for you. <S> 3) Use a low-current op-amp. <S> The LM358 that you are using isn't bad but there are inexpensive CMOS op-amps that consume one-tenth <S> the current that the LM358 uses. <S> That said: if the LM358 is all that you have, it will work. <S> If you are stuck using the LM358, add a 10k or so pull-up resistor from V+ to the output. <S> That should bring your output swing close to the input power supply rail. <S> 4) <S> This is the most important step: use a better FET. <S> There is a class of MOSFETs called "Trench FETs". <S> These have very low gate threshold voltage and very low Rds on values. <S> They go by a variety of names but the word "Trench" is usually in there somewhere. <S> For example, Digikey shows more than 7700 listings for the search phrase "Trench FET". <S> The cheapest N-channel device in stock in a through-hole package costs $1.22 in singles and is rated for 54A @ <S> 40V max. <S> Rds On is less than 12 milli-Ohms. <A> You may end up needing a charge pump for the gate, if you leave with the NMOS. <A> Maybe this will help: simulate this circuit – <S> Schematic created using CircuitLab
Tweak the pot until the comparator go low only when battery voltage is high enough. This circuit won't really prevent draining the batteries. For something that is fairly non-critical, I use a standard red LED with nominal forward voltage of about 1.7V.
Boost converter safety during debugging When I was debugging my microcontroller-based boost SMPS I accidentally got 85V (instead of 15V as I intended) across the 1k&ohm; test load resistor. Does this spell a hazard for the one debugging the circuit? The SMPS is powered from a 9V wall wart capable of 1A max, and the microcontroller is powered with AMS1117 drawing power from the 9V rail. <Q> The worst case scenario for what you did would be that all 9 watts were available at the 85 volt end of that circuit. <S> This would result in a maximum current supply of 100 milliamps across a dead short. <S> Depending on how contact was made through the body, this does have the ability to be lethal. <S> In most conditions, the worst thing I would have expected to happen to you is you get finger zapped, but the point here is that you must always exercise caution with live equipment. <S> The Navy trains that anything above 30 volts must be treated as potentially lethal, and deenergized for work whenever possible. <A> Yes, it does pose a hazard. <S> 85V is unlikely to kill anyone, but people have been killed by lower voltages. <S> Even with an output limited to somewhat less than 9W it could be dangerous. <S> Also, there's no guarantee that the voltage wouldn't go higher than 85V given the right fault. <S> To be safe you should have some sort of over voltage protection circuit or clamp. <A> you can implement something called a Crow Bar circuit, you can learn all the wonderful things about these by reading the Art of Electronics by Horowitz and Hill (1989) <S> and they are cheap and simple to set up. <S> The crow bar circuit clamps the node it's attached to when the voltage rises above the defined clamping voltage - and continues to conduct until the fault condition is removed. <S> This is often used as over-voltage connections from out-side sources, and is much safer when there is a fuse or sacrificial element between the high/over-voltage source and the crow bar circuit. <S> edit: <S> here's a wikipedia article
In your case, it will at least pull the voltage down to the clamping voltage, but the circuit itself is not immune to damage and your crow bar (if the input source is powerful enough) may fail either to a complete short circuit, or in open circuit where your "protection" is now void.
Using A Relay To Control A Lamp I'm experimenting with capacitive sensors acting as switches and want to actually give my circuits some practicality. I've been researching how to use relays with microcontrollers (in my case, an Arduino) to control lamps, but I still have a few questions. Based on this guide (specifically under the "The Setup" section), I should wire my relay into the live wire. How safe is this? Is the only thing separating wandering hands from live wire just the screw terminal? If so, what would be a good way to house the relay (maybe some sort of project box?)? Could I not forgo the plug altogether and just power the bulb from my Arduino? What would be the characteristics of a lamp that could be powered solely from the Arduino? I have a lamp labeled with MAX 12 V 50 W. Is this even close to possible? <Q> How safe is this? <S> Relatively safe, this is how relays are used. <S> Is the only thing separating wandering hands from live wire just the screw terminal? <S> Yes. <S> Of course, touching only one side of a wire, with only one hand, is not terribly dangerous, compared to completing a circuit through your body. <S> If so, what would be a good way to house the relay ( maybe some sort of project box )? <S> This should be self evident. <S> Yes. <S> Could I not forgo the plug altogether and just power the bulb from my Arduino? <S> What would be the characteristics of a lamp that could be powered solely from the Arduino? <S> I have a lamp labeled with MAX 12 V 50 W. <S> Is this even close to possible? <S> The regulated line on any given Arduino is 5V or 3.3V. <S> It's often using a linear regulator that is limited to a few watts of power before it overheats. <S> The microcontroller can only drive up to 40 mA per pin, 200 mA total. <S> Any conventional lamp type bulb is not feasible, directly. <S> Any would require a relay of sorts. <A> You can't power a 50 watt bulb using the arduino. <S> About the relay, they have ratings. <A> If you do not want to deal with high voltage you can use your 12W 50W bulb and 12v 8A power supply, such as an old PC PSU.
Just get the right relay and you won't have to worry about it just make sure you insulate the live wires properly. :) Of course, the only thing separating a live outlet and wandering hands is a screw driver or fork.
Dual Mosfet Not Gate Getting Very Hot, Critique Circuit I have put together this circuit from parts I had lying around, It is to invert a normally closed momentary switch to behave like a normally open. The switch is for a car and toggles a tail light. Even though the operation is correct the N-Channel is getting very hot, (too hot to touch) worst when the switch is open. Can you help with this ? Thank you simulate this circuit – Schematic created using CircuitLab (R1 is to act as pulldown) <Q> Remove the N-channel, you have no use for it. <S> They're describing digital logic circuits where you are driving cascades of logic elements and the input impedance/resistance of the next stage is very high. <S> In your case, you have a relatively low impedance of the next stage (tail light) probably being in the 100s of ohms tops. <S> So your output will drop to zero automatically and rapidly without the NMOS at all. <S> Another potential issue with your circuit is the 3 Mohm. <S> This is going to cause a very slow drop in the gate voltage causing very slow turn-on time for the PMOS. <S> With the redundant NMOS also turning off really slow at the same time, you have a good chance that you've burned both your PMOS and NMOS <S> and that's why you're seeing the 120 ohms across your pulldown rather than the 3 Mohm. <S> Your circuit as it stands would probably work if you had a much lower (say 1-10k pulldown) which would prevent the PMOS and NMOS from turning on too long at the same time. <S> You allowed them to turn on "forever" with the 3 Mohm which causes a direct short from the top of the PMOS to the bottom of the NMOS as they transition from one state to the next. <S> Summary: 1. <S> Remove NMOS from circuit. <S> 2. <S> Decrease your pull down resistance to 1-10k ohm. <A> I agrre with horta.. <S> Just discard NMOS ... <S> Find the wattage of the tail lamp bulb assembly.. <S> if it is filament it would be around around 15 to 25 watts and normal current would be around 1 to 2 Amp. <S> The on state resistance of PMOS would be <S> 0.1 to 0.2 ohms device dessipation will be around 0.5 watts. <S> pl. <S> let me know. <S> Connect 22K(0.5 watt carbon ) <S> resitance between gate of the PMOS device and negative supply and 1 K res. <S> between gate and positive. <S> Best wishes. <S> V T Ingole <A> The other answers have the correct idea for what the problem is, however there is an alternative solution where you remove the PMOSFET and keep the NMOSFET. <S> This assumes you can use a low-side switch. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This has a slight advantage that NMOSFET's typically have lower on resistance. <S> However, this is difficult if the the tail light is grounded to the chassis.
Your NMOS is partially shorted now so you definitely want to chuck that part. If the tail lamp wattage is still higher you may have to fix the the device on a hetsink.
How is it possible for voltage to exist when only a single voltage source terminal is connected? Please take a moment to look over the circuti below: As you can see, the circuit is nothing more than a 10 volt power supply and a diode. Note that the power supply negative terminal and the diode anode terminal are not connected to anything. Also note that a multimeter is connected across the diode with the purpose of measuring voltage. Based on the circuit above, what voltage amount would you expect the multimeter to measure? Zero volts? Well, as it turns out, the multimeter actually measures around 850mv. This is puzzling to me because the circuit is not complete so no current should be flowing through the diode therefore the voltage drop on the diode should be zero right? Could someone explain this phenomenon? Thanks. EDIT: Per user request, here is a picture of the setup: <Q> You know what you have there? <S> A radio receiver. <S> The power supply isn't supplying power (as such), but the wires and things are acting like an antenna. <S> Look, same effect using just me and a diode: <S> It's kind of like the old crystal set. <S> No power source there - just radio waves: <S> Since there is no (intentional) tuning and filtering you are most likely seeing the most powerful source of EM waves in the locality - the ubiquitous 50 (or 60) <S> Hz hum from the local mains system. <A> Unless you have taken extraordinary precautions that seem unlikely, your circuit is exposed to stray radio signals, including radiation from the digital circuit of your DVM. <S> The cathode side of the diode has an ac route to ground via the power supply but the anode side acts as a wideband antenna. <S> Current flows in the diode until the input capacitance of the DVM is charged up to the 100mV that you see. <S> For an experiment, you can put the diode and a battery (conveniently 9V) in a small metal screened box and see whether a nearby radio transmitter affects the measurement. <S> Also, adding 10nF ceramic capacitors between the negative supply and each leg of the diode will remove the puzzling effect. <A> If your power supply is not grounded and it uses an unscreened transformer (or a screened transformer with a floating screen) <S> you can get weird stuff like this happening quite readily. <S> Grounding the power supply will probably make it mostly or entirely go away. <S> The problem is the the DC outout of the power supply can be floating at perhaps half of your mains voltage (or more) due to capacitive coupling across the winding or maybe a deliberately installed Y capacitor, especially on switching supplies. <S> Grounding the output, using a grounded outlet, or reversing the plug may make a big difference. <S> Think of grabbing the input of of an audio amplifier with your hand- <S> even if the amplifier is properly grounded you will get a lot of mains frequency hum. <S> Without the diode, your meter averages the hum to 0V on a DCV range, but the diode rectifies it and you see a bit of DC (almost no current, but some voltage). <A> Is it a physical circuit? <S> If yes, then the diode is picking up the ambient light through the glass package. <A> I suspect that the psu is a switched mode model so it could be generating quite a field near by. <S> It the psu is switched off, does the displayed voltage on the DMM drop to zero?
If you switch your meter to ACV and spread out the leads one to the power supply output and one floating (or touch the one that is floating) you may see quite a few volts AC.
Which are the safety recommendations for soldering? I was reading about tin alloys for electronics soldering and found it it has about 40% of lead in composition. Lead, everyone knows, it's very dangerous to breathe due to being a heavy metal. Also, I found some recommendations using the combination of an exhauster and a respirator when working with soldering. Is there any international regularization of which respirator type should I use? If not, which type do you recommend? Beyond this, is there any additional safety equipment recommended? For economics reasons and for better soldering resistance, I've already discarded Pb free solder reflow. <Q> The vapor pressure of lead is so low at soldering temperatures that there just aren't that many lead molecules in the air. <S> The hazards of breathing soldering vapors is due to the flux getting vaporized, and sometimes parts of components emitting gasses when they get too hot. <S> Lead solder is actually a little safer in that regard since soldering temperatures are lower. <S> However, the biggest variable is the composition of the flux. <S> If you are worried about this, get something called a fume extractor . <S> This is a little box with a fan and a filter. <S> You place it right next to where you are soldering. <S> It pulls the vapor from soldering away from you and thru its filter. <S> By the time the vaporized stuff gets to the filter, it's no longer vaporized but a bunch of small particles. <S> The filter removes these particles from the stream before exhausting it out the back. <A> If you want to sell your products in any civilised country you will be using lead free solder. <S> Creating lead vapour that you can breathe in with a soldering iron is impossible. <S> It has a boiling point of 1749°C, and the melting point is only just below what you are soldering at. <S> If you compare that to water, your solder is a block of ice, and when you are soldering you're melting the ice to tap water (or colder) temperature. <S> You have to put the water in a kettle and heat it up to about 50% of its boiling point (50°C) to get it to start steaming. <S> For lead that'd be around 850°C. <S> The fumes you see rising off the solder are not metal vapours, they are the fumes from the flux. <S> Most common flux is contained in Rosin , a natural plant product, and it is the vaporisation of that which you see while soldering. <S> If you really must use leaded solder the main possibility of lead poisoning is through physical contact with the solder (getting lead on your hands) and then eating without washing your hands, thus transferring the lead to your food and then to your stomach. <S> Incidentally, countries that have banned the use of lead in solder have done so <S> not because of safety or health reasons, but purely because of reclamation and recycling reasons. <A> As long as you're in a well ventilated area, you shouldn't really care about what particles are floating around. <S> If the ventilation is terrible, a table-top ventilator will improve the dissipation of particles resulting from soldering quite a lot. <S> It's a different story of-course when you put a bunch of soldering irons in the same room and use all of them frantically. <S> For example, a class of inexperienced students who have their first soldering lesson. <S> That's the moment you should worry about air quality and have a large air filter in place. <S> As @RBarteig stated, just don't stick it in your mouth. <A> The only problems I've had are minor burns, usually from holding a piece long enough for the solder to cool when I haven't had a proper vise set up. <S> Or one time, a not-so-minor burn when soldering a water pipe, when a blob of molten solder landed on my hand <S> but I considered the pain less annoying than the prospect of having <S> to re-do <S> the entire joint if I moved my hand away and let the pieces come apart. <S> I've also, I think, had minor skin punctures from DIP IC leads which can be quite sharp. <S> I've not heard of any diseases endemic to long-time electronics technicians - nothing like phossy jaw or miner's lung or whitefinger.
The dangers of breathing soldering vapor has nothing to do with lead content of the solder.
What's a production programmer for PIC I have a PICKit 3, but I understand these aren't for production. What does a production workflow look like? PC -> Programmer -> Chip. Do people usually verify that the chip copied properly, or is that not necessary (fail rate?) <Q> Microchip's "production programmer" distinction is largely only meaningful for old chips. <S> The old flash parts, like the 16F877 for example, had to be checked at both Vdd limits after programming. <S> Microchip defined such programmers as "production". <S> Note that this required the programmer to have variable Vdd. <S> Today I am not aware of any official requirement for a "production" versus "development" programmer. <S> As far as I can tell, this is purely a marketing distinction for newer parts. <S> They don't want people buying a bunch of PicKit2 for programming in production when their other programmers are more robust (less technical support required) and have a higher profit margin. <S> To be fair, it really isn't a good idea to use a PicKit2 in production where you need to rely on it. <S> It has lower drive levels and the design was optimized for low cost at the expense of robustness and accuracy. <S> However, the "production" distinction is rather hollow without a clear spec of what it takes to be a production programmer. <S> Shameless Plug <S> My USBProg2 programmer was specifically designed to the production spec for those PIC where there was such a thing. <S> It has full variable Vdd and Vpp, and verifies at the Vdd limits anyway, even for those parts where Microchip no longer says you need to. <S> Other than a little extra time <S> , I don't see a drawback. <S> You can turn off this feature with a command line option if you want to. <S> Some of the newer 3.3 V parts, like all the 16F1xxx but also some PIC24, dsPIC33, and 18F support a new programming algorithm that no longer requires high voltage on MCLR (Vpp) to enter programming mode. <S> Instead, you clock in a special 32 bit signature with MCLR held low. <S> All interactions during programming can be done with signals at Vss or Vdd. <S> This opens the possibility of a much simplified programmer. <S> My LProg is such a programmer. <S> At only $20 or so each, its the cheapest way to set up a bank of programmers for production while maintaining robust operation, if your PIC type supports the low voltage key-entry method. <A> So the chip, when being programmed, must be supplied by a programmable supply with a prescribed resolution etc. <S> Of course you're free to ignore that requirement and hope that you never get a marginal chip, but if you do, you can't really go complaining to Microchip. <S> This means that ICSP in-field (re) programming also needs to be done with a production programmer. <S> If you're making a lot of something, you can buy the chips pre-programmed with your code, and shipped directly to your contract assembler. <A> While for development one usually only cares that the programmer works and allows you access to program and debug the chip there are some additional requirements in production: performance (for lowest possible programming times, time = money), reliability (programming works correctly every time, re-runs cost time = money), robustness (production environment is usually a bit more noisy <S> so you need something that does not fall over if that big machine next to it just switches on). <S> And yes - you would normally verify after programming. <S> Unless the chip implements some sort of check-sum in which case you might use that if programming time is critical. <S> PS: That does not mean a production programmer has to be something completely different. <S> It may just be a better, more robust solution compared to the cheap programming cable one would use on the bench during development... <A> There is a nice comparison between the PICkit 3, ICD 3, and REAL ICE here : <S> As you can se, the PICKit3 is not recommended for production, while the ICD 3 and REAL ICE are. <S> The big difference is the PICkit 3 <S> only supports USB 1.1 Full Speed (12 Mb/s), which the LCD 3 and REAL ICE support USB 2.0 High Speed (480 Mb/s), 40 times faster. <S> This makes a noticeable difference for any but the most trivial of programs. <S> According to tag-connect.com :" The ICSP signals supplied by PICkit 3 do not have the same drive strength as Microchip's ICD 3 and REAL ICE debuggers .... <S> We recommend choosing the ICD 3 or similar over PICkit 3 in order to avoid noise related connection problems." <S> Production programming, implies a more robust algorithm. <S> That implies the ability to program a large quantity of boards without the risk of errors or subsequent failures due to "weak bits" in the programmed image. <S> The interface for the Real ICE is on its own little daughterboard, so if you blow the output circuitry, you only have to replace that piece.
Microchip dropped the double verify requirement in newer chips a long time ago, and there is no mention of a "production" programming algorithm versus "development" in any of these newer programming specs. The program writing is always verified. In addition, production programmers verify the program at Vdd extremes to make sure it 'took' well, in accordance with the programming recommendations for the individual chips.
Power Circuit for Raspberry pi portable I am building a hand held portable raspberry pi. I have just plugging the battery in and using the thing, but I want to make the battery completely part of the unit without the need to unplug it when i am done. so here is what i want to do completely: Have a switch to be the master on/off switch. when the unit is plugged in to a dc power source (wall wart), you will have a switch that will let you to select between powering the unit or charge the unit Have led indicators for charging, unit powered by battery, unit powered by external here is what i have come up with already let me know where i need to go from here Clarifications: the 7.4 v battery has a output of 2 A and it has a charging PCB built int the battery (which is why i bought this one) I have been using the pi with this setup less the switched for about a month no issues. Since i wanted to add in switches and led indicators AND i am just a novice on building circuits, i don't know if what i have the switches right I am using a variable switching regulator that will work down to 5.5 v and it works perfect with little current usage. <Q> Going with a single cell and a boost regulator will simplify charging by removing the need to balance the cells. <S> Additionally you should consider adding a battery charger chip that allows you to charge from USB or 7-19V power bricks while also powering the system. <A> I like what you got there. <S> Maybe a little higher voltage battery, depending on its voltage/discharge curve. <S> 7.4V is usually around the min for stable regulation with 5V ss regulators with any current draw as i remember. <A> You will want to use a higher voltage battery (a 3S 11.1V battery for example) because the 7.4V battery has an operating voltage of around 6V (dead) to 8.4V (fully charged).
When the battery voltage drops below 7V any switching circuitry will drop in efficiency/stability as the other answers mentioned.
Where is the cold junction on the commercial thermocouples? According to all textbooks and articles, a thermocouple must have a cold junction somewhere on the middle of it. But none of the commercial products have a middle point or a marked spot for indicating the position of the cold junction. They are simply nothing but a long wire. I want to place another temperature sensor near the cold junction and subtract its temperature from the measured hot junction temperature for more precise measurement. So, I need to know the location of the cold junction. How do I find it? <Q> Your cold junctions (at least two!) are where you connect the two (different!) <S> thermocouple metals to your circuit. <S> Note that this can be in multiple steps, like: thermocoupe - connector - wires - PCB. <S> These are all cold junctions. <S> Keep them all at the same temperature and measure that temperature. <S> If no heating or chilling effects occur that is simply the ambient temperature, and you can use a temperature sensor anywhere on your PCB, but it won't hurt to place it near the thermocouple connector and put heat-producing components as far away as possible. <A> These days, there are often (if not usually), virtual cold junctions in amplifiers meant to deal with thermocouples. <S> It is often referred to something like "electronic ice pointreference". <S> The temperature of the virtual cold junction is measured by some other means, and the temperature is internally compensated for. <A> For the Thermocoupler with the connector attached, the cold junction is inside the connector <S> There the 2 metals are connected to the pins of the connector, so here you'll have the cold junction. <S> For the thermocoupler with the blank wires the junction is either made by you, when you connect the two wires, or it is inside the black part just above. <A> The 'cold' junction (actually it can be warmer than the measuring junction), is where the thermocouple material wires transition to the circuit material (usually copper). <S> For most thermocouples (other than type T copper-Constantan) there are two junctions that will be physically close together, typically at a screw terminal strip. <S> If you want any kind of accuracy you must prevent thermal gradients in the region of that terminal strip (prevent air from blowing on it, for example), minimize heating from other parts of the circuit, minimize disturbances brought in through the thermal conductivity of the wires themselves, and use a sensor to measure accurately the temperature of the point where the wires transition to copper. <S> Keeping the thermal mass large in the region of the terminal block helps. <S> A 3°C error between your measured temperature and the temperature of those junctions means you will have (typically) extra ~3°C error in your measured temperature, so the cold junction compensation measurement accuracy is extremely important if high accuracy and/or temperatures close to ambient are being measured. <S> If it's a high temperature you're measuring (say 400°C) and you don't care about 5 <S> °C <S> you can be a lot more sloppy. <S> For at least one thermocouple (B) the cold junction is almost not required because of the extreme non-linearity (it actually reverses below room temperature so it is not monotonic). <S> The traditional method controlled the temperature at the transitions with an ice bath, but that's clearly impractical for most modern applications. <S> Once you have the temperature you can calculate the resulting thermoelectric voltage from the cold-junctions, adjust the measured EMF by that factor, and calculate the temperature from the adjusted EMF. <S> A straight linear correction can be used (so many uV/°C) if sloppy accuracy is acceptable, but <S> in general both forward and reverse functions are slightly nonlinear, so it's a compromise. <A> The "cold junction" for a thermocouple, is any "reasonable" distance from the tip of the thermocouple. <S> If you have good thermal insulation, a few inches will suffice. <S> If not, it may need a few feet and an "ice bath. <S> " If air surrounds the "cold junction", then its temperature will be ambient, otherwise it will be the temperature of the "bath" used to cool the junction. <S> No compensation will be required, if you calibrate the uAmeter, using accurate reference points (ice water, 0 oC; ambient temp 25 oC; boiling water, 100 oC; etc.).
The reason for the distance ambiguity, is that it depends on the thermal insulating properties of the material between the thermocouple and the "cold" junction.
Why are flat copper cables with holes used for high voltage ground? I saw that a flat copper cable was used for the ground connection in a high voltage lab. I was wondering whats the difference as opposed to a normal cable ? <Q> Flat, semi-rigid metal strapping is sometimes used to electrically bond pieces of equipment together when they aren't expected to move significantly with respect to each other. <S> A flat strap is easier to bend into shape than a round wire is, and doesn't require any specialized termination hardware. <S> (source: nibco.com ) <A> I work in high voltage in a high voltage lab for a living. <S> There are several reasons why we use flat conductors for grounding, as well as carrying current in other situations. <S> , Actually there are entire classes dedicated to explaining this, taught by physics and electrical engineering PhD types in their 80's, if you work in the field. <S> Guys that are still around from the days of microwave tubes (not that microwave tubes have gone anywhere....) <S> Flat conductors tend to be braided and flexible, but not always, but then they are they are very easy to work with as far as routing. <S> But the point is to get as low impedance as possible. <S> The way you do that is through surface area. <S> It's the same for solid wire vs. stranded. <S> A round conductor with the same impedance is going to be pretty fat and harder to route than a flat braided conductor. <S> Also there is what as know as "skin effect", where conductors tend to only really conduct at their surface skin. <S> This effect increases with higher voltage and frequency, two things you'll probably see hand in hand in a HV Lab, especially one that deals in RF. <S> The higher the surface area, the more skin, the lower the impedance to HV and RF. <S> Inductance is another factor. <S> I see a lot of misinformed people who say the difference is minimal between round conductors and flat conductors as far as inductance goes. <S> NOT TRUE! <S> In high voltage and high frequencies, inductance has a huge impact on bad things like uncontrolled oscillation and noise. <S> There are certain systems where you have huge high voltage power supplies operating devices that must have as low of a noise floor as possible. <S> Flat cables can make all the difference, along with non-inductive resistors and the like. <S> In these labs and systems we don't just do stuff because "it's what was laying around in the parts bin". <S> But if they are using strapping material like that, it's probably because that's what they had laying in the parts <S> bin!But <S> like I say, there are a few well aged old physicists and electrical engineers out there that know all the math and are smarter than I am. <S> that could tell you the deeper reasons "why" <A> The electric equipment must be properly grounded, for that, its construction must be supported with a properly designed ground contact --- generally in a form of grounding bolt connected by a conducting circuit to the ground potential busbar/contour of the earthing system. <S> That form (bolt) of the grounding contact is predetermined by international (e.g. IEC) or local (e.g. IEEE, DIN, BS, GOST) <S> technical regulation. <S> Therefore, such the cable (also why do you call this cable? <S> , it is a wire because it has no termination and has only one and only conductor <S> , i think it is more correct to call this shaped wire, or strip) <S> is a convenient solution in that situation. <S> Other motivation was previously shown in full by Dave.
The more surface area in the conductor, the lower the impedance. The holes are there so that it can be fastened to the equipment at each end with a screw or bolt.
How to gauge safety of cheap Lipo batteries? I see a ton of cheap 12V lipo batteries for sale on Ebay, but other than the mAh rating, I can't find any info or datasheets on how to safely operate them. I'm looking for a good battery to power a couple of small gear motors, so I'd like to know the maximum safe continuous discharge rate. I've emailed several of these retailers, which all seem to be based in China, and everyone one of them has basically said, "sorry, we don't know". These batteries are interesting in that they include a compact built-in charging circuit, and I'm no where near confident enough to design my own. However, the lack of documentation makes me nervous. Are these cheap Chinese batteries junk, or can they be used safely? Is there somewhere that provides a basic datasheet for them? A lot of guides I've read on how to safely use lipo batteries read like you're handling a bomb that might explode at any moment. e.g. "never leave unattended" and "always store in a fireproof container". Are these concerns still justified? A lot of cellphones and laptops include these batteries and don't come with similar warnings. I just don't want to plug in one of these Chinese batteries to charge overnight and wake-up to a house fire. <Q> I have randomly purchased several of these relatively cheap lithium ion batteries from ebay, originating from China. <S> I have a fairly high quality battery charger/analyzer that I use to test these batteries. <S> They have all been the advertised voltage, but <S> he capacity is nowhere near what they claim. <S> A 5000 mAh battery tested at 333maH. <S> Another 5000 mAh (claimed 5000 mAh) battery came in at 571 mAh. <S> Clearly these inexpensive batteries are closer to 1/10 the claimed capcity. <S> I have managed to get a refund when I complained to the seller. <S> I saw a video on YouTube where a person took an 18650 battery bought off of ebay from China (that had a tested capacity significantly lower than claimed) <S> and he took the battery apart. <S> Inside was a minature battery that looked like a triple 'A' battery surrounded by a powder that looked like flour! <S> In other words you get what you pay for. <S> From my experience, it appears as though batteries manufactured in Japan tend to be of higher quality/capacity, although that can change quickly. <S> If the battery you are looking at has a 'C' and mAh rating, then you might be able to get a refund from ebay if the battery doesn't perform as advertised. <S> Fire proof boxes are not necessary for storage, but recommendations from manufacturers still tend to include the instruction to "not leave the battery charging unattended". <S> I suspect that this has to do with the fact that there are a lot of really cheap and poorly made chargers that potentially slightly overcharge the battery (usually through trickle charging which you should not do with lithium ion) which is what leads to fires and explosions. <A> LiPo's are usually rated by a discharge value "C". <S> This is capacity multiplied by the C value. <S> For example, a 11.1V 5C 1000mAh battery: <S> 5 <S> x 1000mAh <S> = <S> 5000mA or 5A discharge <S> You should be able to draw at-least 1C safely from most lithium batteries. <S> Check the eBay listing again to see if they include a C value, it might be there. <S> I always try to order batteries which include a C value in the listing, now whether or not the listing is accurate is a different story.. <A> Having their own charging circuit is a good sign, especially if it includes a thermistor. <S> Probably the best way to assess it is to charge it once under a careful eye while monitoring current and voltage. <S> During this process it should not get too hot (body temperature is about right, <S> 50C absolute max in 20C ambient). <S> R/C batteries can put out high current and tend not to have protective current limiters. <S> This means that shorting them out can ignite them. <S> Puncturing the battery can give you an unextinguishable fire. <S> But just leaving them lying around is not going to spontaneously explode.
Today's lithium batteries appear to be relatively safe as long as you don't use them beyond the abilities or 'C' rating. It should have a constant current charge up to its nominal voltage of ~4.2V per cell then constant voltage with diminishing current, then finally turn off (not trickle charge).
How many LiFePO4 cells can be in parallel? How many lithium iron phosphate (LiFePO4) can safely be connected in parallel, in order to achieve higher power output (and capacity)? Wired directly together, without components such as resistors or power transistors limiting current flowing between parallel cells. Precautions taken would include ensuring they're brand new cells from the same manufacturer lot, at about the same state of charge, and letting them rest for a day to equalize before charging or discharging the pack. This chemistry is supposed to be much safer than other lithium chemistries, as it doesn't catch fire even when punctured. Is it also safe to add more cells in parallel? The most I've seen discussed for other chemistries is around 3 cells in parallel. Would it be possible to get to 10, 20, 30 cells in parallel with this chemistry? The completed pack would drive a DC motor. If it's not safe to wire that many directly together, would it be safe if current limiting components or fuse/polyswitch were added between parallel cells? Or is it better to architect a large pack in strings of at most 3P x (however many) in series? Note: NOT asking about other lithium chemistries such as lithium polymer. Specifically LiFePO4 in form factor of cylindrical 18650 or 26650. Advice about tradeoffs in using much larger cell sizes rather than parallel small cells welcome. EDIT: When cells in parallel are new and well-matched, they balance well. As the cells age, their internal resistances get progressively less matched. Somewhat self-correcting as a cell with lower internal resistance will charge & discharge at higher current than others - thus getting aged faster and catching up to its peers. However if one cell fails to open circuit or very low internal resistance, current will now be flowing mostly through that one cell. Say the pack normally gets charged at 1C rate, now that cell is getting 3C rate. If there are 20 cells in parallel, now it's 20C rate. The more cells in parallel, the more current can flow to the most unbalanced cell. It seems dangerous not to limit this current. @SpehroPefhany recommends self-protected cells. Are there methods which add protection circuitry around unprotected cells? Are lithium iron phosphate cells considered safe enough (no fire/explosion) not to require it, with cell failure simply leading to low pack performance or requiring pack replacement? How are dead/shorted cells normally handled in these large pack designs? <Q> There really isn't a maximum! <S> You have already hit the major concerns including using the same state of charge, using batteries that are in the same condition, from the same manufacturer (and preferably the same lot number to get an even closer match). <S> You also want to make sure that you never short circuit that battery pack as it will have an incredible amount of power and can release that power really quickly. <S> Where did you read that 3 is the maximum for parallel for regular lithium ion? <S> I built a battery pack from 40 - 18650 lithium ion cells in parallel and use it every day. <S> I connected a PCB to protect against short circuit, over charge and over discharge. <S> It is used for relatively low current, 4 amps and less, but charges at as fast as 10 amps with no problems. <S> For your project I would look at the electric bicycle group. <S> They probably have the most experience using larger LiFePo4 batteries. <S> I am sure that they have added them in parallel and can share their experience. <S> I agree with you that the LiFePo4 is a relatively safe chemistry. <S> Another alternative is the lithium Manganese battery chemistry found in the Nissan Leaf. <S> There are videos on YouTube showing people hammering nails through the battery with no fires or explosions. <S> The Leaf's battery runs at the usual lithium voltage of 3.0 - 4.2, unlike the LiFePo4 which runs at a lower voltage. <A> I upvoted Filek's answer, as it is technically correct, and answers the question as posed - there is no electrical safety reason to limit the number of cells in parallel. <S> However, when designing a large scale battery, one does have to consider other kinds of safety. <S> Stored energy is, well, stored, waiting for something to use it. <S> So let's take this question to its logical extreme - in an infinite array of cells connected in parallel, all of which are equipped with protection hardware, all installed at the same time with the same state of charge, what would be the worst thing that could happen? <S> Well, eventually, the thing is going to catch fire. <S> Out of infinite trials, one of these is going to both short circuit AND have it's protection circuit fail. <S> Once it catches, there's really no way to stop what happens next - subsequent cells, full of energy, melt, short circuit, explode and continue a never ending cycle of Murphy's Law, because we have infinite energy waiting to jump out at us. <S> So we modify the array to make ensure that there is sufficient containment on all sides to endure the instantaneous discharge of a short circuit from the worst case <S> scenario failure cannot possibly cause a primary containment failure of the next nearest cell - and there you go, we no longer have an infinite fire. <S> Obviously in a real application, there would only be a very finite fire, but suppressing that risk is a task largely for chemists and mechanical engineers. <S> Over here on the electrical side, we'll specify current and voltage ratings as usual, and generally, only specify the capacity we need. <S> If you think I'm being silly about the fire thing, please read up on the battery fire of the USS Bonefish - it gutted the ship and killed three people. <S> Fun fact - in an oxygen starved, burning environment, when a high pressure air line melts open, the line itself becomes a flame-thrower. <A> Suggest you use protected cells if you're going to put them in parallel- protected against overcurrent (in or out) and overcharging and overdischarging (they have a small PCB inside- <S> at the end actually- <S> with a bunch of parts on it). <S> Many cells are not protected, some are only partially protected (short-circuit only), and there are many, many, many (probably dangerous, definitely inferior) fakes around.
Putting the cells in parallel also lowers the internal resistance.
Dependence of output voltages of an op-amp on rail voltages I want to use an op-amp as an inverting amplifier to convert negative voltages to positive voltages, simulate this circuit – Schematic created using CircuitLab If my input varies from 0 to -5V and I want from 0 to +5V as output, is it Ok to connect V+ to 5V and V- to ground? From what I know, the rail voltages just saturate the output between the V+ and V- values but I'm not sure about how it sources and sinks the functions internally. <Q> A couple of things.. <S> the op-amp won't get all the way to the positive rail, how far it gets will be 'splained by the datasheet . <S> Note that so long as the amplifier is balanced, the inverting input is a virtual ground so the feedback resistor acts as a load on the amplifier output, just like a resistor to ground. <S> Maximizing the resistor value will allow the output to get closer to the rail, but that difference might be 10mV or it might be 2V, depending on the op-amp. <S> A 'rail-to-rail' type will usually get to within some hundreds of mV or better with a 'reasonable' load. <S> When the amplifier output is very close to either rail, the characteristics change somewhat and you might find micro-oscillation going on or other strange stuff that requires some thought to compensation. <S> Increasing the feedback resistors generally decreases the phase margin and increases the likelihood of strange stuff happening, as well as increasing errors due to input bias current and leakage, so it's a trade-off. <S> If you're going into an ADC with a 0-5V range you might choose to use a 0.5~4.5V output (requiring an offset so a couple more resistors) to make sure you can actually measure 0V in and -5V in. <S> The cost of that is a loss of 20% of your resolution or about 1/3 of a bit. <S> The input common mode range must include ground for this application <S> but it does not have to be R-R input, <S> a device advertised as "single supply" with "rail-to-rail output" is probably going to be your best choice. <A> You will need an op-amp that has rail-to-rail output stage and an input stage that accepts (V-) <S> within its' common-mode range. <S> A <S> TL-081 is NOT suitable. <S> I assume that you don't really plan to use 100 Ohm resistors for the input and feedback? <S> [Edit] I see from your later comments that you have a +10V rail available. <S> So long as your op-amp can handle that voltage, use it. <S> The reason I mention this is that some op-amps are good for only 5.5V or 6.5V. <S> Choose a device that is good for more than your supply rail. <S> If you are going to be feeding the output of the op-amp to an a/d converter, look also for low input-offset voltage when choosing your device. <S> This minimizes error near 0V input. <S> Also be aware that some a/d converters have significant input capacitance and that can make your op-amp unstable. <S> The cure for that is to include a low-value resistor in series with the output and take the feedback resistor from the a/d side of that resistor (instead of from the op-amp). <S> You really need to have a supply voltage higher than 5V if you do that and still want a full 5V into the a/d, though. <S> Finally, unless there is good reason to, I'd choose resistors higher than 1k. <S> 10k is a better choice, I think. <S> Keep in mind that the op-amp has to supply output current equal to the output voltage divided by the resistor value. <A> Do not do so.
If you attempt to apply a voltage beyond the rails to an input then there is a very good chance that you will destroy the op amp through the input clamp diodes. But yes: what you propose to do is possible.
Does an electrolytic capacitor degrade each time it receives reverse voltage? I know that I mustn't connect an electrolytic capacitor reversely. It will explode if I apply the reverse voltage long enough. But, what happens if the reverse voltage is applied for a short time? For example, a fault occurs in the circuit and the capacitor becomes reverse biased or exposed to AC voltage for a short time, but it still looks OK from outside. Does the internal physical and chemical structure of the capacitor change permanently? Would it still have the rated capacitance, voltage and life time? Is it okay to keep it using if it doesn't explode? I feel that the answer is "no", but I'm looking for an explanation for it. <Q> There are many types and subtypes of electrolytics, I will concentrate on those most common for hobbyists: the liquid electrolyte aluminum one. <S> Most details can be read in the corresponding wikipedia article but in short: <S> The cathode oxide layer can withstand up to 1.5V of reverse voltage <S> it can receive permanent damage earlier, but 0.5V is deemed safe When applying too high reverse voltages for too long, one of two things can happen: <S> gassing makes the cap explode dissolving of the oxide layer shorts the cap <S> These numbers and probability of failure mode can greatly differ when going far outside of what is considered "room temperature". <S> Even short application of too much reverse voltage can permanently damage the capacitor. <S> Sometimes the self healing abilities can reverse this a bit over time, but there will be permanent damage. <S> Some ways to see the damage is: increased leakage current (due to partly dissolved oxide layer) decreased capacity (due to self healing of oxide layer holes) <S> Other types of electrolytics have different kinds of behaviour, but most people deem short exposure of up to 0.5V reverse voltage ok. <S> This is why a lot of LCR meters measure capacitance with 0.5V AC regardless of any polarity. <A> In detail, aluminum electrolytic capacitors with non-solid electrolyte can withstand a reverse voltage of about 1 V to 1.5 V. Solid tantalum capacitors can also withstand reverse voltages for short periods. <S> The most common guidelines for tantalum reverse voltage are: 10 % of rated voltage to a maximum of 1 V at 25 °C, 3 % of rated voltage to a maximum of 0.5 V at 85 °C, 1 % of rated voltage to a maximum of 0.1 V at 125 °C. <S> These guidelines apply for short excursion and should never be used to determine the maximum reverse voltage under which a capacitor can be used permanently. <S> More on Wikipedia <S> What you're talking about mostly happens in ac where for a short period of time a reverse voltage is applied and then a positive voltage immediately after that to reverse the small damage. <S> Reverse polarization does not occur so fast enough to damage the capacitor permanently. <S> Time for it to get damaged depends on the reverse voltage applied, size of the capacitor and the material used for the dielectric and the electrodes. <S> Generally when used in ac, most common application being the filter, I have not see capacitors sustaining damage sufficient enough to interfere with the operation. <S> Capacitors are used in filter in dc chargers and we use them every day, and they work for years. <S> When used in such applications, there could be slow damage and oxide layer could form, but no hindrance in the normal operation. <S> Although, frequent transient voltages can damage the capacitors quite fast. <S> That's why, always when turning off any device, turn down the volume, switch off the device and then remove the ac power plug. <A> If you feel that you circuit may have a failure mode like this (Holy cow - at the places where I rely on the polarity of electrolyte capacitors reversing the polarity would usually fry the whole circuit!), it would be the best to consult the data sheet of the specific part, not wikipedia on reverse voltages of the specific cap you are using use a bipolar electrolyte capacitor <S> take protection measures (diodes or diodes + fuses) against external polarity changes/battery flips use voltage watchdog circuits to only power up the electronics if all supplies are ready - and power down fast if one fails (i observes a really weird failure mode where the loss of the negative rail lead to a input clamp diode of an opamp sending the positive rail to the supposedly high impedance input....) <S> Never make that a normla oprating mode
Electrolytic capacitors can withstand for short instants a reverse voltage for a limited number of cycles.
Can we short the neutral to earth (ground) at entry point of our home electrical supply? Normally in our 230V power outlet, the voltages are as given below. Neutral to Earth - Less than 2V Neutral to Phase - 200V to 230V Earth to Phase - 200V to 230V But nowadays, after around 10 am, until the evening, these voltages change as below with some variations as the day progresses. Neutral to Earth - 77V Neutral to Phase - 228V Earth to Phase - 282V After the inspection by the power distributor in our neighboring firm, it was found that there is a short between the phase line to the body of an electrical panel when the power switch of a fan is turned on. But they have not rectified the problem yet. So our electrician shorted the neutral to earth (ground) at our power entry point. Now the neutral to earth voltage is close to zero. But is this a good solution? <Q> As the comments already said, this is most likely due to a break in the neutral: <S> A floating cable next to the phase wire collects some voltage due to capacitive/inductive coupling. <S> As your measurement device also plays a role, you usually will not measure 77V, 151V and 228V (=151V+77V) between the three wires. <S> However, 77V is a typical voltage measured in this case. <S> Finally, neutral is broken, because you measure the expected voltage between earth and phase, and neutral gives strange results. <S> If you connect any load to the circuit, you will see that neutral will be at 228V to earth an 0V to phase. <S> Once I had the same problem. <S> Finally, there was a single luster terminal where all neutrals of a room (five) were connected to. <S> One of them was pushed in too far, the part inside the terminal was covered by insulation. <S> The screw bit into the insulation, and it was working for 20 years. <S> From one day to the other, the connection became loose. <S> This could have ended up in a disaster, but there was not even a sign of heat at the terminal. <A> to add to comments already said; Hi Adbul, a friendly note, please have any live electrical works done by professional electrician. <S> Electrical power is dangerous and it is critical that your house PE protective earthing system is in correct working order for both personal and asset safety. <S> The shorting of neutral with earth conductor at main incomer panel / fuse box is acceptable if your house main power is provided by the utility as a two wire system ( Active and other is neutral). <S> In this situation you should have an earth bond electrode buried in the ground closer to main incomer panel. <S> But again this connection to electrode has to be in good working order, otherwise earth connection would become active if neutral wire from utility is broken. <S> If you have more than two wire coming from utility then shorting of earth connection with neutral is not acceptable.(Active, neutral and PE are provided by utility. <S> In this instance neutral and earth connections are bonded already at supply transformer) <S> There could be a phase to ground insulation failure within the Fan Motor, which is a common type of failure due to aging. <S> If this is the case then this fan need to be disconnected and replaced. <S> If your house does not have a RCD installed, then it is recommended to have one installed for personal safety. <S> Hope <S> this helps. <A> Instead of 2 faults there are now 3. <S> Best to get them all cleared. <S> If you have a grounded metal water main or reliable earthing point you could check to see if your whole service is not 77 volts above the true ground. <S> If this is the case I would keep phoning service number every hour to have the problem repaired immediately. <S> Avoid uninsulated equipment as much as possible while waiting. <S> Unplug physical telephone line fax/modem/answering machines if still using them and cable TV/internet incomer to avoid damage from uncontrolled ground loops. <S> Use gloves on coax connector. <S> Neighbour has damaged equipment. <S> There is weak grounding on your (shared) earth circuit letting it float orthere is a resistive neutral letting it droop. <S> Bonding the neutral and earth at your power entry may cause all this(possibly large) leakage current to flow into and out of yourincoming cabling through the connection while the neighbour iswaiting to get their equipment serviced. <S> I would hurry them along and then have your local ground and earth and neutral conductors inspected after removing the neutral ground bond. <S> It is not a good idea to leave the situation like this. <S> Your local RCD/earth-leakage-detector should still be protecting you if the bonding was done on the supply side. <A> Your "electrican" is a dangerous cowboy AND your electricity supplier is feeding you misinformation. <S> Your results tell me that the real problem is a bad neutral in the electricity suppliers wiring, other faults may have contributed but that is the primary problem and it needs to be rectified ASAP. <S> By connecting the neutral to the earth you have effectively turned the earth conductor into a combined neutral and earth conductor. <S> This indeed solves the immediate problem but it raises two problems of it's own. <S> The earth conductor was designed only to carry brief fault currents, it may be significantly undersized for carrying continuous operating currents. <S> Combined neutral and earth conductors require specicial care to minimise the risk of a break since a break in a combined neutral and earth conductor can be very dangerous. <S> A conductor that was intended only to be an earth conductor is unlikely to have been installed to such standards.
The short circuit between phase line to body of electrical appliance could be due to fault within fan motor winding.
Generating a PWM ramp signal using logic gates I have a microcontroller outputting a ramp signal on an I/O pin in PWM form. i.e. the duty cycle steadily increases from 0% to 100%, then drops to zero and repeats. After smoothing I end up with a sawtooth-like wave (except of course the sudden drop to zero takes a bit of time due to the filter). My microcontroller code uses a 1kHz interrupt and upon every interrupt decides whether the output should be high or low based on a) the current progress through the ramp, and b) for how many interrupt cycles the output pin has already been high or low. This is all fine and dandy, and it works well for my application, but I need a faster solution. Something tells me this should be realizable with a pure logic circuit rather than with firmware code. After all, we have a steady clock pulse and a steady increase from 0% duty to 100% duty. But I'm struggling with the implementation concept. Can anyone think of a way to do this with logic gates, so that I can write this onto an FPGA/PLD and have many (much faster) waves being generated? -- NB: To complicate matters, frequency must be adjustable. In my MCU code this is as simple as having a variable representing how many samples the ramp should last for. <Q> Low pass filtered PWM can do what you want, but you need the PWM frequency to be much higher than 500 Hz. <S> Use the PWM hardware built into most microcontrollers. <S> If yours doesn't have any PWM outputs, go use one of the many many micros that do. <S> All you have to do is set the duty cycle, and the hardware takes it from there. <S> Let's say the micro can clock the PWM hardware at 10 MHz (very easy to get), and that you want 8 bit resolution. <S> That means each PWM pulse will take 255 clock cycles, which is 25.5 µs, which comes out to a frequency of 39 kHz. <S> That is much easier to low pass filter to remove the 39 kHz pulse frequency but still leave a reasonable number of harmonics of the signal you want. <S> You can now update the duty cycle in the hardware register independently of the individual PWM pulses. <S> With the right kind of PWM hardware, a new duty cycle will take effect at the start of the next period. <S> However, if your periods are 255 instruction cycles long, then you can easily interrupt once for each one, adjusting the duty cycle each pulse. <S> To compute the desired duty cycle, use a byte or two or three of fraction bits below the integer duty cycle byte. <S> For example, you can use a 32 bit counter which you think of as the high byte of the actual duty cycle you write to the hardware, and the low 24 bits as the fractional part for intermediate calculations. <S> For whatever ramp speed you want, calculate the amount to add to this 32 bit value up front. <S> Higher increment values will result in faster ramps. <S> Each interrupt, add the increment into the 32 bit counter, then take its high byte and write it to the hardware PWM duty cycle register. <S> Even a 8 bit micro can easily accomplish this in well under 255 instruction cycles. <A> Maybe consider using this very simple chip: - All you need to feed into it is a sawtooth signal generated by a couple of op-amps: - <S> Take the output from the op-amp and reduce it via a potential divider to give 0 to 1V output suitable for inputting to the LT6992's analog PWM duty cycle control input. <S> The LT6992 can produce a PWM waveform from low Hz to 1MHz. <A> Logic circuits won't (really) work here as it is not a digital circuit but an analog one. <S> Use NE555 , or <S> any 8-pin 555 's will work, and if you need two of them, get a 14-pin 556 . <S> Use op amps just throw those cheap LM358 's (or TL082 's if you stock those) in. <S> Use <S> 74HC14 <S> if you have to use some logic chip somewhere in your circuit. <S> Or you can build one using discrete transistors . <S> If you love exotic parts, how about unijunction transistors ? <A> You will need a counter and a (digital) comparator for this. <S> Just count upwards (let the counter roll back over to 0) and compare the output of the counter to your input value. <S> You may need to adjust the clock frequency of your counter to get an appropriate PWM frequency. <A> A simple way to generate a PWM ramp wave digitally is to have two divide-by-N circuits with slightly-different periods (they could be reloadable counters, counters with a terminal-count compare circuit, feedback shift registers which reset when a particular value is reached, or any of a number of other things), along with a circuit which sets an output high when it receives a pulse from the first circuit and low when it receives a pulse from the second. <S> The "PWM rate" will be roughly the average period of the two counters, and the sawtooth output period will be the product of the two periods divided by the difference (e.g. counters which count 997 and 1004 pulses at 1MHz will have a PWM period of about 1000.5us, and generate a sawtooth wave with a period of about 142998Hz (about 7Hz).
PWM hardware in the micro will take care of producing the individual pulses for you. Yes, you can get hard-wired logic to do some of this task.
Why use AutoCAD Electrical? I'm an electronic & electrical engineering student in first year of university. I have had to use a few core programs as part of my course for programming and simulation software. However I came across AutoCAD Electrical and struggling to understand the use of the application. It being an electrical CAD software, I assumed that I'd be able to carry out similar tasks as Micro-Cap (which I use to analyse AC, DC circuits) or Proteus (which I use to simulate code for PIC micro-controllers). However I've yet to find any tutorial that says that AutoCAD Elec does any of those. If not, then I would like to know the essential point of it? If drawings is the main use of it, can't I just continue using Visio, which I had to map a fuse-box design for a side project. It is pretty fiddly on Visio, but if all AutoCAD Elec is, is a drawing tool, in what way would it excel Visio for the kind of drawings I need (all car related: looms, fuse-boxes, motors)? <Q> As I understand it, AutoCAD Electrical is normal AutoCAD, but with some features that support electrical designers. <S> In this context, 'electrical designers' means people designing low-voltage motor control centres, industrial plant, control cubicles, and so on. <S> Note the distinction between electrical design and electronics design. <S> Electrical design is concerned with switchboards, 200 metre long cables, motor control contactors, junction boxes, and so on. <S> That is the audience AutoCAD <S> Electrical is intended for. <S> We use AutoCAD Electrical to draw power single line diagrams, motor control circuit schematics, switchboard general arrangements, and so on. <S> In industrial contexts, all wires and terminals need to be individually numbered. <S> A feature I am aware of is that AutoCAD Electrical can automatically track wire numbers (ferrule numbers) and terminal numbers, making sure these numbers are all unique and sequential. <S> I would have really appreciated this on the last electrical design job I did, where we numbered all the wires and terminals by hand, with frequent mistakes. <S> If you aren't designing something like what's shown above, AutoCAD Electrical probably isn't for you. <A> A bit of foreword; I work in an industrial site where, much like Li Aung has mentioned, uses CAD for schematic and termination drawings of our MCCs (Motor Control Centres, for those who forgot since reading Li Aung's post), Distribution system single lines, communication systems and control (instrumentation inclusive) drawings. <S> See below for example of 'Industrial like' Schematic. <S> We have just moved across to using AutoCAD Electrical for our electrical drawings from using standard AutoCAD. <S> The electrical component doesn't help much for editing the existing drawings, however when a new installation comes up (replacement of a MCC for example), AutoCAD electrical will allow us to keep track of wire numbers, help with equipment layouts and the like. <S> , it's more for documenting large complex plants. <S> For example, one of the sites (we have 8), has about 15 folders full of drawings. <S> There would be over a thousand drawings there. <S> To answer your question about designing a wiring loom and a fuse box, I would say you would be pretty safe using something like Visio. <S> Especially since you can create your own blocks in Visio, you could just create some fuses. <A> Yes why do that to yourself :). <S> In my experience the people who use this are designing things like building wiring, maybe industrial equipment wiring diagrams, or something like a simple appliance with no boards. <S> I think you will find it most where the primary product has a lot of mechanical drawings already done in autocad and the electrical plays a tiny part. <S> As opposed to something where complex boards and circuits have to be designed and simulated. <S> There's already plenty of autocad licenses and users <S> so why try to do the work in orcad for instance, if you just need something simple. <A> capturing a circuit that is 100% representative of implementation and drawing something to show the concept are two very different things. <S> There is a time and a place for visual representation of the detail design (design review, formal documentation) and another to help describe something (higher up presentation, pretty diagrams). <S> Quite a lot of CAD packages for circuit design and simulation do not provide the greatest of visual 1st glance. <S> This is why I use SIMetrix/SABER for simulation, Mentor for capture and Inkscape for presentation images. <A> Keep in mind that electrical installations have to conform to physical requirements when installed. <S> So a lot of designers would use 2D or 3D CAD programs to map out wire placement, for instance for vehicle harneses. <S> They weren't ideal for a lot of reasons, but they were necessary to capture wire lengths, placement in the main harness, etc. <S> AutoCAD <S> Electrical makes this easier by incorporating features that support this type of use. <A> I disagree with the original author as Proteus and Micro-Cap are not CAD tools, they are simulation tools. <S> Neither of which were designed to create drawings and lack many of the tools required for doing so <S> Visio is one of the worst tools to use for creating drawings from my fifteen years of experience. <S> It has no error checking of any kind no decent dimension tools, no wire list output capability, no ability to create intelligent symbols like in AutoCAD Electrical, Promise, ECAD, and a few others that slip my mind. <S> Tools like Visio, Plain AutoCAD, Proteus, Micro-Cap are horrible tools for creating drawings. <S> I wouldn't use any of them for creating professional drawings. <S> You loose so much time not having error checking, wire list reports, etc.
I haven't played with it too much, but from what i have seen, it has the ability to automatically create layouts of cabinets, allow you to move components around without having to redraw wires and a few other nice neat little things. It's not built for electronic design or simulation (well not that I have found)
FCC certification for nrf24l01+ Is nrf24l01+ from Nordic Semiconductors FCC certified ? It is hard to find out from their datasheet whether FCC approved ?Is it FCC approved ? If it is approved and I use it in my PCB and control it via my ARM cortex processor, do I need to get the entire PCB board FCC approved ? Also, I am using sierrra wireless HL series modem chip which is FCC approved. This will also be on my PCB. So, do I have to get my PCB FCC approved again although my modem is FCC approved ? <Q> The nrf24l01+ is an IC. <S> The FCC does not certify IC's. <S> If you search around, you can probably find an FCC approve module <S> that uses that particular IC. <S> For small quantities, this may be a very cost effective way to go until FCC certification is in your budget. <A> To avoid tens of thousands of dollars in certification costs you can use a pre-certified nRF24L01+ module such as www.taloncom.com/NordicRFmodules.htm so that like your Sierra Wireless Module you place a label on your final product that states "Contains FCC ID...". <S> You will still have to pay for FCC testing for the unintentional radiator i.e. the non radio frequencies above 9KHz <S> but this is far less costly than certifying your entire product as an intentional radiator as Talon and Sierra have done. <A> Contact <S> them ask them if it's approved and ask for its FCC <S> i <S> d number. <S> Yes you need FCC testing for your device combo but <S> having the the module already approved will make it easier.
The IC itself cannot be FCC approved.
Which optical sensor for detecting moving paper? I am building a mailbox notifier and looking for sensor and thresholding circuit suggestions to detect when mail is dropped in, here are my requirements: very low power (when no motion at least) sub 1mA at 3.3/5V output LOW when no motion output HIGH during motion I have started testing with an off the shelf PIR sensor board ( https://www.adafruit.com/products/189 ), but there are a few issues, mostly the PIR sensor does't always trigger when an envelope is dropped it, even with the sensitivity at maximum. I believe this is due to the PIR sensor not working well with paper temperature. I am considering the following options: photo diode/transistor -- because luminosity changes when the lid/door is opened photoresistor -- maybe too slow to respond? integrated active proximity/IR sensor ( http://www.adafruit.com/datasheets/vcnl4000.pdf ), but will it detect a thin piece of paper? What other options should I consider? The problem with sensing luminosity is mailboxes have thin openings and if it's on a door, and the door is opened or lights are switched on/off outside, it may get confused. For the threshold circuit, I need to basically only trigger when mail falls in/move, and optionally the door is opened/closed (luminosity goes up/down at once), and go back to LOW as soon as things are still. The ideal would be detecting when paper is moving, but I am looking for ideas to do this on a low power circuit... <Q> In my youth I had built something that depending on your mailbox physical dimensions may or may not work. <S> Essentially it was a thin metal sheet that was fixed inside the box at one end. <S> It was thick enough to hold itself with a bit bending, but thin enough to be bent even more by the lightest envelopes. <S> You dropped one envelope in there, it bends down and makes contact, an led was lit up. <S> No current consumption while no mail inside. <A> The IR LED would be pulsed/modulated, which both saves power and allows to mitigate the effect of other light sources. <S> There are ready-to-use parts for receivers, like those famous TSOP-1738 (see e.g. http://www.electro-tech-online.com/threads/need-help-for-tsop-1738-reciever-circuit.19551/ or http://arduinoguides.blogspot.de/2012/05/tsop-ir-receiver.html ) which are used in TV remotes too. <A> This assumes you're putting a micro in and making this wireless, because everyone is making everything wireless right now. <S> I would start with an array of reflectivity sensors like <S> this in the base or side(geometry dependent) of the mailbox. <S> ( Sparkfun sells a little module.) <S> Tie their Vccs together, and pair them with a P channel MOSFET so they aren't drawing current all the time. <S> Then you can turn on and poll them ever couple of minutes. <S> If you're worried about false positives, put a debounce on it, where it checks again in another minute before giving you a positive notification. <S> Bonus points if you pair it with a RTC and never poll them outside of main delivery hours, or on days the mail doesn't run.
You could use an IR LED and a matching phototransistor.
Need for Buffering Signals ? What is the need for Buffering signals ? Is it to provide the ability for the source or circuit to be able to provide high current amount ? The buffer I was reading was the Op Amp unity gain amplifier. <Q> The op-amp has such a high-impedance that it essentially draws no current from the input stage. <A> Consider the following simulate this circuit – <S> Schematic created using CircuitLab <S> You have some signal (V2) and you have some load (RL). <S> V2 has a high output impedance, its 1Kohm. <S> What would the voltage be on RL ? <S> It would be 0.5Vin. <S> If you are measuring some sensor, say a temperature sensor that is part of a system that is meant to shut down when the temperature reaches 100C, and 1V repreesents 100C <S> , you would NEVER shut down in time. <S> Because the system would think that the temperature is only 50C (if in this scenario its a linear relationship). <S> As Rs decreases more the value of RL, then most of the voltage would be seen by the load. <S> Rs << RL. <S> A voltage divider formula can prove this. <S> Obviously you can't just physically a sensors output impedance, so instead, you buffer it or convert its high impedance to a low one. <S> And that's what a unity gain <S> op amp does. <A> By definition, a (voltage) buffer provides high input impedance and low output impedance. <S> That means that if you place a buffer in line with a signal, it essentially isolates that signal from whatever is on the other side. <S> You're also right in that it can provide a higher current to a load, power amplifiers do precisely that. <S> Here's an example of when I used a buffer in a circuit once. <S> I was building a VU meter and used the MSGEQ7 graphic equalizer IC (datasheet: https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf ). <S> If you look at the schematic, the L and R channels get mixed after having a 22k resistor placed in series with them, but I designed my board to play music at the same time the chip was receiving these inputs. <S> In order to isolate the channels from each other, I placed a unity-gain amplifier (buffer) between the audio and the inputs to each of the IC pins, which effectively isolated them from each other.
When op-amps are used as unit gain amplifiers, they are often used to convert a high-impedance input (which doesn't have much drive) into a low impedance output which has more driven to interface with the next stage of the circuit.
Staggering PWM waveforms for servos to minimize current spikes If I'm controlling multiple hobby PWM servo motors, is there an advantage to staggering the pulses sent to each servo? By which I mean, each servo needs to see a pulse of width ~1ms every 20ms. Let's say I have 20 servos. If I send a 1ms pulse each ms to a different servo, then will that change the spikiness of the current draw, or otherwise improve the circuit? Intuitively it seems that sending the 1ms pulse to 20 servos all on the same 1ms tick could cause a synchronized current spike, thus maximizing the chances of tripping a fuse in my power supply. Is this a real concern? (I ask because the Adafruit PWM python library has the capability to specify rise and fall times for pulses to a given servo, rather than just specifying the frequency. I can see no reason to build the API this way unless you'd want to stagger the signals for some reason). <Q> First, I'll assume by "servo" you are really referring to hobby servo motors that are controlled by 1-2 ms pulses, not the general meaning of "servo" in electronics and control systems. <S> You really should properly define this term in your question. <S> These hobby servos only use the 1-2 ms pulse as a way of communicating a analog level. <S> The old all-analog hobby servos would integrate the pulse, hold it, and then use that as the control signal to compare the position feedback signal to. <S> Newer digital types measure the pulse width digitally, then use that value to compare the position feedback to. <S> Either way, the driving of the motor is not synchronized to the pulse. <S> The motor's drive signal is constantly updated internally to the saved control value derived from the last pulse. <S> A new pulse only changes this control input. <S> That said, a sudden step in the control signal will likely cause a short term error, which the control mechanism will react to by driving the motor harder until it settles to the new position. <S> Therefore, while the motor is always driven, it will usually be driven harder after a step change in the input, which can only happen immediately after a pulse. <S> Overall, I'd say it is good to stagger the pulses to multiple hobby servos if it's not much burden to do so. <S> Note that this comes automatically if using a off the shelf radio link. <S> These will send the pulses for each of the hobby servos <S> it controls sequentially anyway. <S> If it works out more simply to generate all the pulses at the same time, then go ahead and not worry about it. <S> 20 ms is a short time, and the extra current from a sudden control input change will take longer than that in most cases. <S> Put a bigger cap on the power supply if you're worried about it. <A> With older "analog" servos, it's very likely that any current spike in the motor driver would correspond with the pulse on the control signal, so your concern would be a valid one. <S> Although such pulses tend to be very narrow, and can be handled by adequate decoupling capacitance on your power rail, with little likelihood of actually blowing a fuse. <S> With newer "digital" servos, the motor drive pulses are essentially independent of the control signal pulses, so there's no benefit to playing with the timing of the latter. <S> But the motor PWM frequency is usually much higher, with correspondingly lower ripple on the power supply, as compared to analog servos. <A> In an analog servo the motor PWM pulses are created by subtracting the servo pulse from the internal feedback pulse, then stretching the difference to produce a wider PWM range. <S> Therefore the start of each motor pulse is loosely synchronized to the end of each servo pulse, and staggering servo pulses may reduce peak power supply current when multiple servos are moving. <S> Most Digital servos generate high frequency PWM pulses which are easier to smooth out. <S> Servo Current Waveforms <S> HS-125MG Analog Servo Current (50Hz PWM) <S> (horizontal 5mS/div, vertical 500mA/div) <S> HS-5475HB Digital Servo Current (~1kHz PWM) <A> At a 20 ms period, maybe there would be problems with current supply. <S> You may find a snubber or freewheel diode useful. <S> Instead, though, what if you sent digital pwm signals (.4mA per line) into a voltage controlled current source? <A> Traditionally the servo pulses were staggered anyway, because they were transmitted one at a time down a radio link. <S> If a worst case servo movement takes more than 20ms (which it does) then several servos will be running simultaneously, so staggering the servo pulses won't help (much) in eliminating current pulses, during high activity periods. <S> To guarantee that (say) six servos would never run simultaneously at a 20ms update rate, not only would you have to stagger the servo pulses but each servo movement would have to last <S> less than 3ms - very light activity. <S> So perhaps the API limiting the rate of movement is about controlling mechanical momentum? <S> I can't see it having much impact on the power supply.
If you are controlling multiple hobby servos from a single microcontroller, then multiplexing might dictate sequential pulses too. In the case of slow changes, the steps are small anyway, so the current should be relatively even.
Why do they make traces to LTZ1000 in spiral shape? I was browsing Google images of LTZ1000 voltage reference IC. I saw that in some of the PCBs, the traces that go to LTZ1000 are in spiral shape and cut out gaps are left between them. What is the reason behind this? <Q> It is to reduce the thermal gradient across the device. <S> A longer meandered track will carry less heat to and through the part than a short straight track. <S> Note also that the PCB substrate has been milled away between the tracks; the PCB probably conducts most of the heat. <S> We normally think of a PCB as performing mainly the electrical function of connecting the parts together, and the mechanical function of holding them securely. <S> As the manufacturing process is simple, reliable and accurate, PCBs are also useful for simple mechanical engineering tasks like this. <S> The datasheet says: Thermocouple effects are one of the worst problems and can give apparent drifts of many ppm/°C as well as cause low frequency noise. <S> The kovar input leads of the TO-5 package form thermocouples when connected to copper PC boards. <S> These thermocouples generate outputs of 35µV/°C. <S> It is mandatory to keep the zener and transistor leads at the same temperature, <S> otherwise 1ppm to 5ppm shifts in the output voltage can easily be expected from these thermocouples. <S> So the elaborate board design seems specifically to counter this thermocouple effect. <S> The thin leads and cutouts increase the thermal resistance from rest-of-board to the device, and the circular patterns near and under it try to keep the footprint a highly conductive region. <A> As well as the reasons given (thermal EMFs, mainly, mechanical stresses I think are less of an issue with TO5 than with a SMT reference) it will also reduce power consumption. <S> The LTZ1000 is normally run in an (internally) ovenized mode with the die at perhaps 70C <S> so it is a major heat source on the board with relatively vast (for a precision circuit) quantities of heat flowing radially outward from the device to the surrounding PCB. <S> By reducing thermal losses through the board (and keeping the board at the leads solid and with something like a ground plane), disturbances and losses can be minimized. <S> By increasing thermal resistance in relation to the thermal mass at the package, the temperature controller will be able to maintain the temperature of the die (and thus the buried zener reference junction) <S> more constant, all other things being equal. <S> Finally in a typical LTZ1000 application there will be other parts which could be affected by thermal gradients on the PCB caused by having a part with large and varying power dissipation. <S> The thermal isolation helps with that too. <S> Of course, ovenizing the entire circuit might be better from a stability point of view (not leakage though, unless the 'oven' can cool too), but that's often impractical. <S> An array of LTZ1000 devices can be used to get somewhat better stability (ideally improving with he square root of the quantity of devices)- expensive but not in the range of Coulomb blockade devices. <A> Such stresses can be transmitted to the package and directly to the silicon inside, causing undesired voltage offsets. <S> Dave Jones discusses this in a recent EEVblog video .
In addition to minimizing direct thermal effects, the PCB is milled away in order to minimize the mechanical stress that is put on the leads by the expansion and contraction of the rest of the PCB.
Temporary connection between two individual very small wires I've separated a bunch of phone wire to connect a bunch of small devices (small motors, switches, buttons, electromagnets, etc all embedded in Lego blocks) and I need a way to temporarily connect them. I have some connectors like this: But they're far too big and bulky, I need something tiny, it doesn't have to fit very tightly or be insulated, it would be nice if there was only one kind (so any two could connect together). Maybe some kind of micro alligator clip? Magnetic connections? Maybe little jewellery clasps? Or like this? Surely instead of making my own I can go buy a bag of something, right? How do most hobbyists handle this? <Q> You can get screwdriverless terminal blocks like these: - Solder <S> two together <S> and it makes a 4-way wire connector. <S> Here's one that looks useful: <S> - <S> And you can multi-way versions like these <S> : - These look useful too: - link <A> For really temporary connections, jumper wires with grabber clips, like these, are very commonly used. <S> They can grab onto a lot of different things, including each other. <S> (source: apogeekits.com ) <A> Small solderless breadboard (photo from Adafruit) used by electronics hobbyists: Only 1.4 x 1.6". <S> Bullet connectors (photo from robotshop.com) used by RC hobbists. <A> The phone company uses punch down blocks... ...to connect pairs of phone wire. <S> This method is super fast because you do not need to strip or crimp the wire before punching it down. <S> Some blocks have metal clips that bridge the connections. <S> These can make debugging problems very quick since you can make and break connections without ever disconnecting the actual wires.... <S> Punch down blocks as create a nicely organized layout rather than a big mess of wires. <S> The blocks come in many sizes and shapes .... <S> Some punch down blocks even have places to label the incoming and outgoing connections... ... <S> which also helps keep things organized. <S> You will need a punch down tool , available for $10-$20 from amazon. <S> Once you get the block and the tool, you will be able to make lots secure connections in less than 1 second. <A> From professional to ghetto <S> Mini alligator clips or test clips. <S> Lead less clips, just use the clips to hold the two wires in the jaws together. <S> Small paper clips. <S> Same as lead less clips above. <S> Aluminum foil folded over into small strips. <S> Roll or fold over wire joint, then crimp with some pliers. <S> Twist the wires together. <S> Duh. <S> http://www.tubelab.com/images/MeterUse/B-Clips.jpg <A> If you are using 24 AWG solid wire such as telephone wire (from a 25-pair or larger telephone cable) or wire from a cat-5 cable for your temporary jumpers, there is an easy and reliable solution for making temporary connections. <S> You need to get a machine-pin IC socket. <S> Then cover with small heat-shrink tubing, making sure to leave the opening in the socket pin open. <S> Now you can just use 24 AWG solid wire to connect to whatever you want to connect to. <S> [EDIT] <S> I just noticed that you would like connectors that are the same for both ends of the connection. <S> Their pins are small and flat and have a slit up the middle. <S> Two such connectors mate by sliding the slits on top of each other. <S> In other words, the flat part of one pin is rotated 90 degrees with respect to the other so that the slits mate up. <S> They then just push together. <S> Here is an example of the connector pins: EDAC <S> pin <S> They are available as solder-tab, crimp, PCB mount. <S> Doing a Google search on "edac pins" brings up multiple suppliers. <S> Digikey has them as part <S> # 151 <S> -1049-ND costing about $0.50 each in hundreds. <S> eBay cost is about half of that (200 pcs $50)
24 AWG wire is a perfect fit into those socket pins and this makes a very reliable connection. You can then break the pins free from the plastic socket and solder the tail end of the pin to whatever wire you want to connect to. Mini clips are quite small and handy. With or without leads on them. A company called EDAC makes rectangular connectors that are popular in the professional audio industry. These pins are highly reliable because of the wiping action that occurs as they mate. They are also readily available from places like eBay.
What are these cream plastic-like blobs on my circuit board? I see these white/cream colored blobs all over the board (I've surrounded them with red rectangles in the image above), something which I've never encountered before. They're plastic like in texture, deforming with small amounts of pressure applied to them. Does anybody have any idea what these might be, and whether or not they're indicative of some kind of failure? Context My motorcycle's EFI control unit is complaining about not getting enough supply voltage (it is, I've checked the input pins) after breaking down recently (and this is now preventing the bike from starting up), so I figured this electronics degree must be worth something, right? Hoping it might be as simple as a blown capacitor or damaged track, I removed the control unit from my bike and pried off the metal cover covering the pcb, which was attached with some kind of waterproof sealant (somehow without damaging the circuit board myself). The image below is what I found myself presented with. Also, if anybody happens to notice anything obviously wrong in the circuit board above, I'd appreciate very much if you could post a comment and let me know! p.s. The supply rails on either side of the board measured ~5mV across with the bike's ignition turned on (what the hell? basically nothing). The Infineon CPU seems to be rated for 3.3V of supply voltage... so one thing I tried was putting a small 3V DC supply in parallel across the rails, hoping it might stop complaining about having low voltage (it didn't), was this stupid? Yes it was. <Q> I've read @Matt's answer. <S> The adhesive for holding the components during reflow is usually red in color, it's less runny, and there's usually less of it. <S> Here's an example of such adhesive. <S> I've got a different hypothesis. <S> It may be improving the thermal conductivity between the PCB and the heat sink (or case). <S> Notice that this white adhesive occurs mostly around components which are heat-sunk to the PCB. <A> The first picture has pads for a couple DPAK components that have white stuff around the body pad. <S> It looks like the populated DPAK next to it has the same stuff under the component. <S> There are a couple other places where missing components have white stuff. <S> I would venture a guess that there are components on both sides of this board, and that is the glue to hold the components in place for reflow. <S> The random dots throughout the board are glue seeping through vias from the other side. <A> Based on my experience they are blobs of rtv used to seal moisture sensitive low level and/or analog signals against potential moisture and/or condensation.
I would guess that this is a thermally conductive adhesive that's holding something on the other side of the PCB.
First checks after oscilloscope unboxing You bought your first entry level oscilloscope (e.g. Rigol DS1004Z series, 4 Channels, 50-100MHz, 1Gs/s) and while it is slowly warming up to room temperature you are wondering if the unit you have is really working well and did not suffer any damage from shipping etc. Since your next complex measurement equipment is a multimeter, you wonder how to test it. Like, for a new computer you run memory test, hdd test, burn in tests (like mprime), so what is kind of an equivalent for oscilloscopes that can make you certain it is functioning mostly correctly? Besides the built in square wave generator, what can you measure and check if it is properly displayed? I am thinking of something like A simple (breadboardable? though probably not at 100MHz) circuit that is almost guaranteed to work and can be used to check most things like bandwidth and accuracy of the scope. A signal source that is rather easily accessible to most people and has quite known characteristics that when off tell you something is wrong. Note: I am not asking about how to get familiar with the scope, but rather than some simple checks that assess it is functioning probably correctly. <Q> If the square-wave looks fine after probe compensation and the scope passes self-check/self-calibration, then there really is nothing you can do at your level. <S> To properly check it, you'd need a good lab and you don't have that. <S> Presumably, manufacturer would have performed quality control on the unit and did factory calibration with equipment much better than you have, so if you trust the manufacturer, you should be fine. <S> If you don't, then, as I wrote previously, there is nothing you can do without proper equipment. <A> Probe the circuits at various points with your new oscilloscope and the borrowed one, and check they see substantially the same thing. <S> In most consumer devices, you will find a range of analogue and high frequency signals, just stay away from the mains power supply until you are competent to work in that area! <S> This does depend on temporary access to another oscilloscope, but is probably the simplest and most reliable method outside of having a full calibration laboratory. <S> As a bonus, it will let you test your oscilloscope capabilities and give you confidence that you can use it correctly. <S> Any solutions which involve 'building a simple circuit' will always leave you wondering whether the circuit or the new oscilloscope is doing something unexpected. <A> Here's a list of more basic things you can check: <S> Check all the knobs <S> (360 degrees in both turning directions) and buttons. <S> Compare readings at each voltage range to some reference, such as a multimeter. <S> (If you hear a relay click at certain levels, you should test the range at each relay click.) <S> Compare the levels at which the scope triggers compared to where you set it, and compare the offsets for each direction. <S> Do all input tests for each channel. <S> Verify that the input of one channel does not affect any other more than it should. <S> (Your manual probably specifies the minimum rejection ratio. <S> At the very least, two channels of similar voltages shouldn't visibly impact one another.) <S> If your scope has additional functions like USB, Ethernet, SD card, etc, make sure to test these as well. <S> Obviously, these checks are far from perfect (you certainly won't be able to validate your scope this way, as AndrejaKo mentions), but this should help you find any glaring hardware faults. <S> Just make sure you fully understand what you're seeing before you freak out about anything that seems off.
Find a friend with an oscilloscope, and some circuits you can probe (these can be anything you have available). Test as many trigger types as you can.
What are some (bi-grid)tetrode tubes with negative resistance? I asked earlier about Dynatron oscillator tubes but instead what I'm looking for is a bi-grid tetrode that has the "kink" in its plate-grid charactestic curve. I actually have a Sylvania 12K5 tetrode, but does that one have negative resistance? If not I'd like some suggestions for a better tetrode model I can find somewhere. <Q> Checkout the 12k5 data sheet here <S> What you are looking for is this I believe: - Test/picture taken from here <S> And as far as I can tell the 12k5 doesn't exhibit this characteristic but it may be documented somewhere else. <S> However it is a low voltage tube/valve <S> so I have my doubts. <S> Maybe try some pentodes like this: - <A> This kink (which will give name to Kinkless Tetrods aka KTxx series) is due to an anode emission phénomena. <S> At a certain low voltage, the electrons hitting the anode create an electron stream (ejected electrons) that is attracted by the second grid. <S> This is the reason of the existence of the penthode : a screen grid at cathode potential is introduced between the secondary grid and the anode to repel this stream to the anode. <S> Edit: Typo <A> So I did a little big more research on Google and wikipedia for kinky <S> tetrodes(teehee <S> :-p)and what I came up with(and just recently received from FedEx) is the Radiotron UY224 tetrode. <S> Kinky tetrodes can be a problem for amplifiers because the negative resistance leads to parasitic oscillation that introduces excessive(or entirely unwanted)distortion <S> but it can be useful for oscillator circuits like the Dynatron oscillator . <S> This particular tetrode has quite a bit of negative resistance from looking at the graph in the article which plots the plate and screen grid current as a function of control grid voltage. <S> Just what I was looking for! <A> An alternative is to use any old pentode, with g3 (the suppressor grid) connected to the anode. <S> This effectively turns it into a tetrode. <S> (Similarly, it's fairly common practice to connect both g2 and g3 to anode for triode operation). <S> You may need to browse some detailed data sheets or experiment with a curve tracer (or variable DC voltages and an ammeter) to determine the best bias conditions for the kink. <S> Normally the suppressor grid is connected to the cathode, or to 0V, to drain off secondary emission electrons from the anode before they interfere with electric fields around the screen grid (which is the mechanism behind the negative resistance region, or kink). <S> The story (anecdotal by the time it got to me) was that it was a sneaky way to run around the patent on the power pentode (as in EL34).
As I understand it, the Kinkless Tetrode (as in KT66) happens to have a suppressor grid, not brought out to a pin, but internally connected to cathode.
Canon no longer makes CanoScan 8800F AC adapters, help needed to replicate its functionality The CanoScan 8800F uses a proprietary 32VDC AC adapter that's no longer manufactured. A Flickr user did the trial and error to find out how to modify another 32VDC AC adapter for use with the 8800f. It seems simple enough. One pin carries the 32VDC of current, and other pin carrying current starts off carrying current through a resistor only to have that resistor shorted after a few seconds so that the full 32VDC of current can be delivered. Could someone advise me what the parts and schematics would be to build "a time delay relay assembly" to "short a 1.5k ohm resistor" "after a few seconds" of the scanner being powered on? I tried messaging the user to get a more detailed answer, but to no avail. I figure he assumed that if you have more electronics knowledge his solution would be easy to interpret. Here is his original post from Flickr: "Here is the real deal. I purchased Canon Canoscan 8800F with no power adapter. After extensive testing here is how it works. Looking at the back of the scanner the left pin will be referred to as pin 1, center pin as pin 2 and right pin as pin 3. Now, I had to build a circuit which adds a time delay. Let me tell you how to get your scanner to work. Pin 2 is ground, Pin 3 is 32VDC. Pin 1 wants the same as pin 3 (32VDC) with the following exceptions: when pin 3 receives 32VDC pin 1 will receive the same 32VDC BUT in series must be 1.5k ohms. Then, after a few seconds, the 1.5k ohm resistor must be shorted allowing the full 32VDC to be applied to pin 1. I built a time delay relay assembly to facilitate this function and now the scanner will power on when the power button is pressed. Hope this helps." https://www.flickr.com/groups/767295@N20/discuss/72157627293403452/72157647465205394 Thanks. <Q> Sounds like a job for "time delay relay"/"delay-on relay". <S> You have three options: <S> Buy industrial 24V units. <S> They are beautify and expensive. <S> Example: http://www.alliedelec.com/schneider-electric-magnecraft-822td10h-uni/70185255/ ($57) <S> Buy cheap relays from ebay: <S> http://www.ebay.com/itm/New-DC-12V-Delay-Adjustable-Timer-Relay-Switch-Module-0-to-10-Second-/261852010468 <S> -- this one is $1 with free shipping, but it is 12V only so it will also 12v power source. <S> http://www.ebay.com/itm/DC-24V-1-Channel-Relay-Module-switch-on-delay-turn-on-up-to-1-hour-relay-24V/221522754320 <S> -- this one is $8 <S> and I think it does what you need if it will survive 32 volt <S> (you never know what the real max voltage of '24V' circuit is) <S> Assemble one. <S> Most 555 circuits cannot operate off 32V DC, so use transitor based circuit such as this one: http://www.bowdenshobbycircuits.info/page2.htm#delay.gif <S> This one has great property that three transistors would limit the voltage on capacitor, so there is no need for high voltage capacitor. <A> If you want a time delay circuit to build yourself, here's one for you -- the TL431 is a wonderfully underrated part, capable of serving as a comparator/reference combo in addition to being a programmable shunt reference. <S> The IRF7540 can be replaced by any standard gate (i.e. Rds(on) at 10V Vgs) power PMOSFET, and the timing capacitor should be a stable, low-leakage type such as a polyester film or a good grade of tantalum cap -- the current values are chosen for a 3s delay-ON in the simulation and will need to be tweaked for a real TL431. <S> Also, the inrush limiter resistor should be rated for at least 1W. simulate this circuit – <S> Schematic created using CircuitLab <S> As to how this thing works -- U1 (represented by the cobbled-together macromodel in the dotted box because CircuitLab, in their infinite wisdom, does not provide a TL431) is used open-loop as a comparator, turning ON when Ctiming charges to 2.5V via Rtiming, while R2 holds Q1 and Q2 off until U1 turns on. <S> (SW-IC is used to set the initial condition for Ctiming to 0V as CircuitLab lacks SPICE's .IC command.) <S> When U1 turns on, it pulls its cathode to about 2V above the anode -- <S> D1 adds another 18V of voltage drop atop that to keep Q1s gate from being pulled beyond its absolute voltage rating (i.e. to keep Q1 from going bang). <S> Once U1 is solidly ON, Q1 and Q2 <S> both switch ON, shorting out Rlimiter (i.e. the 1.5k&ohm; resistor from the spec) and pulling U1's adjust terminal HIGH through R1 in order to prevent noise from causing the output to chatter (in other words, Q2 and R1 turn the TL431 into a crude Schmitt trigger). <S> RL serves as a demonstration load. <A> @ThreePhaseEel has a good approach; I'd simplify the circuitry somewhat,because there doesn't seem to be need for accuracy or sharp turnon. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> If you want a sharper turnon, R4 can be replaced with a 24V zener diode.
You will want to increase 10K resistor to 20-40K and use a relay which can handle 32 volts (or add an extra resistor to 12 V relay)
what is sensible to debug msp430? As you know, msp430 launchpads have their own debugger, nothing else required to debug,on the other hand fet-debuggers are sold in high prices on ti.com,what the hack is that? and if i buy only MSP430G2x53 what should i use to debug and make it work. Thanks in advance <Q> The Launchpad board includes some debugging hardware that allows you to debug the microcontroller using only a USB cable. <S> This makes it a very affordable eval board for TI's customers because they don't have to buy a special debug cable. <S> When a developer designs a custom board for the MSP430, they don't typically include the debugging hardware that is included on the Launchpad eval board. <S> This makes their custom board more affordable in large quantities because they don't have to include those debugging related parts on every board. <S> But then in order to debug the custom board they typically buy one of the special debug cables. <S> One debug cable can be reused to debug all the custom boards. <S> If you're making something that you plan to make only one or a few units of then it's most affordable to buy the Launchpad and design a booster for any specialized hardware that isn't already included on the Launchpad. <S> (A Launchpad booster is analogous to an Arduino shield.) <S> If you're designing a board that you plan to make many units of then you'll eventually want to invest in one of the specialized debug cables. <S> But even in this case it could be very helpful to start off with a Launchpad and use it for some early software development while you're waiting for your custom boards to become available. <S> I'm not familiar with that <S> but you can probably search for information. <A> You could try a third party debugger like this one from olimex... <S> but price wise is comparable to buying a launch pad <A> The value line <S> msp430 g launchpad has a spy bi wire debugger, a single wire half duplex proprietary debugging interface. <S> It's a limited version of jtag TI developed. <S> It also has limited breakpoints. <S> It may be limited to the value line chips. <S> The regular debuggers have both spy <S> Bi wire and full JTAG interfaces. <S> More hardware breakpoints, and should be able to communicate with all TI chips using either of those interfaces. <S> Other launchpad models may or may not have the same restrictions to other chips in their model line.
It might be possible to use the Launchpad to debug your custom board (in place of the special debug cable).
What does this strange symbol refer to? I am referring to the symbol with +4V next to it. Seems like a voltage source to me. I just haven't seen this anywhere before. <Q> Strictly speaking, it is not a full circuit, but an equivalent full circuit can be easily derived from it, because it has the full information. <S> It has two "labels" (which are not an actual components), which are denoted with the GND symbol (the bottom one) and the triangle symbol (the top one). <S> Both are denoting the voltage levels of the nets they are connected two. <S> The ground is denoting the voltage of 0V (reference potential, to be precise), and the triangle is the denoted (+4V) voltage relative to that reference. <S> The equivalent circuit would look exactly like this one but with a 4V power supply with "+" connected to the triangle, and "-" connected to the GND. <A> I assume you are referring to the top symbol, the triangle pointing up to "+4V". <S> That is showing that the net is connected to a +4 V supply. <S> The other symbols with "R" designators are resistors. <S> The symbol with the "D" designator is a diode, cathode to the left, anode to the right. <S> This means current can flow thru it right to left but not left to right. <A> That upwards pointing triangle symbol represents a power terminal in labcenter proteus . <S> By default in projects the terminal is connected to VCC net (5v) but can easily be connected by the user to any other power rail, even negative ones (referenced to the ground). <S> Another option if for a user to asign a voltage directly to the terminal by typing a number as a label with a + or - sign in front of the number for positive and negative voltages respectively.
A +4 represents a 4v voltage source referenced to the ground, it's the equivalent of connecting a 4v battery or voltage source between the power terminal and ground.
Can I use a transformer to drop a DC voltage? Can I use a transformer to drop down the voltage from a generator? Or should I just use a regulator? The generator outputs about 9.3 V and I need about 5 V, and I want to conserve power. <Q> I am guessing its DC. <S> A Regulator will have to be used. <S> Using a 7805 voltage regulator will do the trick. <S> If you want to conserve power, I think you can also just use a switching regulator - Buck converter. <A> Use a voltage regulator. <S> Texas Instruments has a decent selection , just input the parameters you need. <S> A linear regulator would work too, but will not be as efficient as a buck topology. <S> A transformer will not work at all. <S> Transformers are for alternating currents, not direct currents (AC vs. DC). <A> The simplest way will be using a linear voltage regulator. <S> I personally used LP2950 from Texas Instrument to drop from 9V to 5V. Goodluck.
A switching voltage regulator will be the most efficient. So a Transformer won't work.
Is there a change in the voltage/current when motor is locked up? How can one sense this? I am working on a motor control system, and I'd like to be able to know when the motor has reached its max output and has locked up (shaft no longer able to rotate, due to mechanical force pushing back). The motor will be used with a ball ramp mechanism to create a linear motion. I need to know when the motor stops spinning so that I can move on to the next task in the system. What would be the best/most efficient way to do this? <Q> You should be able to measure the current during normal load operation (from experimentation) and then measure the current during an overload (stall) condition, and then use a shunt resistor (like, a 1% 0.1 ohm resistor) and an op-amp based comparator circuit to indicate when it has reached it's <S> end-point/cannot move any further. <S> Measure the resistance across the motor terminals <S> (this is assuming a simple 2 terminal DC brushed motor) with an ohm-meter. <S> Then you can estimate the stall current by Ohms law, V = IR , meaning I_stall = <S> V_applied <S> / R_motor . <S> As the motor begins to move and starts generating back EMF, it will reduce the input current to something more reasonable. <S> When the motor meets something which stops the output shaft from moving, the resistance reduces again back to the motor's armature resistance (R_motor i mentioned earlier). <A> Rather than stalling the motor when it reaches the end of its travel, I'd prefer to use a limit switch to sense the position, and turn off the motor before it reaches the physical end-of-travel. <S> This would be much kinder to the motor and to the mechanism than forcing the motor into the mechanical end stop. <A> Just looking at current isn't reliable, as it can change based on the motor type and design, and the way a load is applied. <S> Looking at shaft speed, you can also see exactly when it is starting to get overloaded, and take action before it actually stalls. <S> Also, going to locked rotor stall is very damaging to almost all types of motors. <S> Induction and brushless motors will experience overheat conditions on the windings and all the winding joints, DC motors will burn the commutators and brushes. <S> To answer the exact question though, is there a change in voltage/current at stall... again, it depends on the type of motor, very low torque shaded pole AC motors like clock and small fan motors probably won't see much change, but any actual wound DC or Induction motor will go to it's locked rotor current which is just the applied voltage divided by the winding resistance.
The very best way to tell if a motor is locked up is to use and encoder on the motor shaft (there are very inexpensive encoders out there now for the hobby market), and monitor its speed.
LED fuel indicator instead of halogen I have this problem which is driving me crazy: I want a LED light to indicate when my motorbike is running on emergency fueltank. The system works with a normal halogen bulb, and the system is generating 13,5V whenever is runs on the emergency tank. When the fuel level is above the critical limit, it Will generate ni voltage which is just fine. But, whenever i change the halogen light bulb to s LED with an appropiate resistor it stats on forever and generate 13,5 V ni matter what the fuel level is. It's maybe Nice to know, that whenever the system start it Will turn on the fuel indicator for 2 sec, and turn off again, it's like it's testing for something. Best regards <Q> The LED isn't a heavy enough load to pull the voltage down. <S> Apparently whatever was driving the halogen can "leak" a bit, and the designers thought it was okay because the halogen wouldn't show it. <S> For a quick solution, you could put a second resistor in parallel with the LED/resistor combination that is roughly the same or slightly higher resistance than the halogen was. <S> Note that halogens, like incandescent bulbs in general, increase their resistance when they get hot, so you might want to account for that by a factor of 2 or 3 from the cold measurement. <S> Also don't forget to handle the power as Watts = <S> Volts^2/Ohms. <S> Or you could redesign the driving circuit to allow a lighter load. <A> Try connecting a 1 watt 220 Ohm resistor in parallel with your LED+resistor, that might draw enough current to prevent the LED from lighting. <S> It could also be that the circuit provides a low voltage, not enough to light the halogen but the LED only needs 2 volts or so. <S> Try a 6 V Zener, reverse biased, in series with the LED, and reduce the series resistor accordingly. <S> Let us know what you find, there might be another way. <A> My guess that the low-fuel sensor is a NTC thermistor. <S> The light bulb consumes enough current that the thermistor tries to heat up. <S> When it is submerged in fuel, it can't get hot enough to lower its resistance to the point where the bulb glows brightly. <S> When the fuel level drops below the sensor, it self-heats and the resistance drops. <S> Current to the lamp increases <S> and it illuminates brightly. <S> You need to provide a similar load as the original light bulb.
Something might be providing a small trickle of current, which was not enough to light the halogen but is enough for the LED.This could be the sensor for a failed lightbulb, or if it's not such a fancy bike, perhaps some current leaking through the fuel gauge.
Passive voltage drop from 6V DC to 5V DC for 3W circuit I plan to put an Arduino onboard of my hub-generator powered bicycle circuitry. Currently, I have a circuit consisting of: 6V/3W AC hub generator (variable frequency and power); Rectifier bridge; 6v/5W Zener regulator; 6800 uF electrolytic capacitor; With this circuit, I can safely drive anything needing 6V up to the 3W limit. Now for the Arduino, I'd want to provide 5V at Vin , and for that I would like something like this: link Vin to GND with a 5V Zener (and possibly a generous capacitor); insert some voltage drop between 6V output and Vin ; drive external loads with transistors (BC 548 have served me well for up to 100mA per transistor); (of course) ground everything together; But I am not sure if voltage-dropping is a good practice, or if I would find a suitable diode with the desired drop. If everything I proposed is b*shit, I would like some guidance, preferably involving only simple components. Absolute efficiency is not a must, and I can leave with some lost current through the regulators (zeners for example). Update: I plan to add a battery to this circuit, but it should be able to run only from generator by design, anyway. More update: I have read something about "Low Drop Out" regulators (LDO). Can I build one myself? Is there any off-the-shelf, widely available component for that? Can I use some of these together with the Zener and the capacitor, or it wouldn't make sense then? Yet another update: a coworker suggested the TPS-76650 (Texas) . Are there "non-proprietary" components with similar characteristics? <Q> For any application, this very basic (and not much reliable) <S> Considering: Vout <S> = 6VPout = 3WIout = <S> Pout/Vout <S> = 0.5A <S> for a total voltage drop of Vr = 1V , the resistor value should be: R <= <S> Vr/Iout = 2 Ohm Higher value of R won't let you use the total 3W of your power source. <S> If value of R is too low, your circuit will have high Ibias when in standby mode (arduino not connected). <S> Consider the case where R-->0, and see that your 5V zenner will drain more current, and also make your 6V power source more unstable. <S> At the same time, you should take into consideration the resistor's dissipation power: Pr = <S> ((Vr)^2)/R = ((1V)^2)/(2ohm) <S> = <S> ~ 500mW where Vr = Vout-Vin . <S> Finally, calculate the zener's dissipation power. <S> edit: for a 500mW resistor, it would be safer to use a 1W resistor. <S> This way it won't overheat, reducing it's variation and hence the output stability. <A> Unless the design of bicycle generators has changed, I expect the output voltage to vary with speed. <S> Now, if "6V" is the rms value, rectifying it will get you 7 to 8 volts DC. <S> In the message you linked in your comment, there's a paragraph stating the Arduino has an on board regulator that runs from 7 to 12 volts. <S> I think that's the easiest, safest (and maybe the best) way to power this. <S> Just make sure the DC in <S> doesn't go over 12 volts at high speeds. <A> For anyone interested, I ended up using an LM2940 , which is a Low-Drop-Out (LDO) voltage regulator. <S> It is cheap, easily available on local stores, and very easy to set-up requiring only two common electrolytic capacitors. <S> With it I could not only power my Arduino, but also recharge my cell phone, with a quite good performance, while riding my bicycle at normal speeds.
"dc-dc step down", could be done using a resistor between your 6V output and Vin .
Single-supply DC amplifier circuit with "gain" of 0.66? I have a DC voltage source \$V_{in}\$ which slowly varies in the range 2.5…4.8V. I need to linearly scale it down by ⅔, to feed into a 3.3V ADC pin. For a voltage divider, the source has too high output impedance (it's HIH4030, an analog sensor). I thought that an LM358 from my box would come out handy. However, I'm not ready for dual power supply in this application, and I can't figure out the needed feedback network for the less-than-unity gain of ~0.66. What's worse, the non-inverting configuration has gain of \$1 + \frac {R_f} {R_g} > 1\$; the inverting configuration OTOH must be biased — and this is where my ground starts to feel shaky. Perhaps something like this would kinda work?.. I'm not even remotely sure that the biasing and feedback will actually work that way. The idea is to chain two inverters biased around 2.5V, one with gain \$ - \frac {R2} {R1} \approx - 0.66\$, and another with gain unity. Would be thankful for any kind of canonical advice or circuit for this kind of purpose. <Q> Something like this should do you. <S> Note that the input common mode voltage range of the LM358 amplifier only goes to 3V so you can't just buffer a divider with voltage follower (which would be the easiest way, and would typically work around room temperature, but <S> this is engineering <S> so we have to consider worst-case and temperature). <S> The output range, with load of more than 2K, goes to within 3.5V <S> so it's fine. <S> The input divider has a ratio of 0.50 (and it loads the input with 40K) <S> The amplifier has a gain of 1 + 10K/27 <S> K Total gain is 0.5 (1+10/27) <S> = 0.685, so 4.8V -> <S> 3.28V. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Ideally, pick values such that R3||R4 ~= R1||R2 to cancel the effect of input bias current. <S> In the above schematic they are about 30% different. <A> A problem of amplifier gain less than unity <S> is loss of usable number of bits (UNOB), since the full input range of the ADC will not be used. <S> In fact, if the ADC has input range of 0V to 3.3V then <S> any gain less than 1.44 will result in loss of UNOB. <S> Gain actually needs to be increased. <S> Here's a circuit for reference: <S> With the proper voltage reference value and gain (alpha), the range of \$V_{\text{in}}\$ can be made to fill the input range of the ADC. <S> \$V_{\text{ref}}\$ = \$\frac{V_{\text{inmax}} V_{\text{outmax}}-V_{\text{inmin}} <S> V_{\text{outmin}}}{V_{\text{inmax}}-V_{\text{inmin}}+V_{\text{outmax}}-V_{\text{outmin}}}\$ = <S> \$\frac{\text{(4.8V)(3.3V)}-\text{(2.5V)(0V)}}{-\text{0V}-\text{2.5V}+\text{3.3V}+\text{4.8V}}\$ = <S> 2.83V <S> \$V_{\text{out}}\$ = \$(\text{alpha}+1) V_{\text{ref}}-\text{alpha} V_{\text{in}}\$ for \$V_{\text{inmin}}\$ <S> for example, \$V_{\text{out}}\$= (2.44)(2.83)-(1.44)(2.5) = <S> 3.3V, while, for \$V_{\text{in}}\$ of 4.8V, \$V_{\text{out}}\$ = 0V <S> Advantage is you get the full range of the ADC. <S> It is necessary to provide a 2.83V reference voltage, but that fits well with the common mode range of the LM358. <S> Operation may get sketchy around \$V_{\text{out}}\$ of 0 volts, because the LM358 doesn't pull down very well and a pull down resistor (10kOhm or so) may be needed. <S> Of course, \$V_{\text{out}}\$ is inverted, but that is easily corrected in micro-code by subtracting the converted value of \$V_{\text{out}}\$ from the max range value of the ADC. <A> According to the HIH4030 datasheet , it doesn't have a high-impedance output; in fact, Figure 9 shows an 80kΩ minimum load . <S> It should be easy to build a 2/3 (or 1/2, or whatever) <S> voltage divider that adds up to this value. <S> However, the datasheet shows that the output is ratiometric to the supply voltage. <S> In other words, if your 5V supply is actually 5.5V, the sensor output will be 10% high. <S> The better way is to use an ADC that's powered from 5V. <S> It can use the 5V supply as its reference. <S> Then, your accuracy won't be degraded by voltage dividers.
You can correct for this by using the ADC to measure the 5V supply voltage using another voltage divider attached to the supply, then dividing.
Is this SSR design recommended? I want a hard power switch for some battery-powered BLDC motors, but the currents (5A, up to 20A transients) and voltages (up to 60V) limit the kinds of switches I can use. Because I want some small pretty switches that have the same effect of a hard switch, I've come up with this design with a voltage regulator and solid state relay: The DPDT switch controls flow to the coil of the SSR as well as the ground of the voltage regulator, resulting in 0 standby current, ideal for my batteries. Because the electrical requirements are less demanding on the coil side of the SSR, I cam less constrained to the switch I use. Are there any reasons why this design wouldn't work or should be avoided? <Q> You have probably discovered this by now <S> but ... <S> Are there any reasons why this design wouldn't work or should be avoided? <S> The big problem is that you are using a triac to control a load on a DC supply. <S> This won't work. <S> Once the triac is turned on it will remain on until the supply current is switched off. <S> You need a DC SSR. <A> If the input is rated for operation at 24 volts, fine. <S> Otherwise, you need a limiting resistor to keep from killing the SSR LED. <S> The second problem arises from your statement that you're using DC motors. <S> You need (at the least) transient protectors on the regulator input. <S> Actually, you can incorporate a voltage dropper into the protection circuit, as well - see Spehro's comment. <A> The first problem with your design is that, the 24V voltage regulator will fail when you exceed 36V in practical sense. <S> I therefore recommend that you use a step down or buck converter as shown here http://helpersalone.blogspot.com/2016/08/simple-dc-to-dc-step-down.html
The current transients will translate into voltage transients which will feed back to the regulator input, and may very well destroy it. The first and most obvious problem you have is your SSR input. Finally, with these current and transient levels, you'll need to be careful about current routing and layout.
Will repeatedly turning a light bulb on and off damage it? I have been hearing a common saying that if one keeps switching the lights on and off you will probably damage the light bulb itself, since every time you close the switch there would be a sudden rush of current through the circuit. Given that we are talking about modern light bulbs you would find in a normal household environment (incandescent /fluorescent/LED), will repeatedly switching it on and off cause long term damage to the light bulb? I personally do not think it will because of the fact that the initial rush of current will not even have enough energy to cause any noticeable effect. That's what I believe, but I'm not sure if that's true or not. Aren't those lights in decorations and signs also flashing all the time? I don't see them wear out faster. <Q> It depends on the type of lightbulb! <S> Halogen, incandescent, florescent, and vapor lights all use tungsten filaments that heat up and emit electrons via thermionic emission . <S> In that sense, they are similar. <S> However, the method to "turn on" the lights varies. <S> Incandescent bulbs are simply turned on once and left on. <S> The inrush current is on the order of 12 to 15 times the peak current if not limited by the methods described in the application note. <S> Florescent bulbs <S> operate by a "starter" and "ballast" design. <S> The filaments heat up more gradually since the starter (D in the diagram below) has to switch multiple times in order to kick-start the electrons flowing through the tube, not just one time like the incandescent light. <S> Basically, the starter (a bi-metallic switch) heats up and opens periodically, causing the magnetic field generated by the ballast (G) to collapse and release an inductive kick into the tube. <S> If the kick isn't strong enough, there won't be enough electrons to sustain the circuit through the tube and the light will flicker. <S> The light will only sustain when the magnetic field is strong when it collapses. <S> For an animation of this, check out "How a Florescent Light Works" . <S> Anyway, the idea is that the tungsten element undergoes thermal shock every time the light is turned on. <S> I conjecture that the thermal shock is less for a florescent than for an incandescent, since the florescent lights are not immediately heated up to full throttle because the starter has to try multiple times to start the light (usually over a period of several seconds). <S> Either way, turning on the light every time does damage the filament and will result in long term damage. <S> The LED however, is the only type of light emitting device out of the list that doesn't use a tungsten element. <S> It uses a PN junction instead. <S> This means that the LEDs require much less voltage and current, meaning low power consumption compared to the lights with filaments. <S> As such, LEDs won't be damaged at all by switching, since there is no filament to damage and the power going through the bulb is lower. <S> In fact many applications switch them at high speeds using PWM which they handle with no problem. <S> Also, check out MinutePhysics' great video on modern lights for a short explanation of how these lights work! <A> According to the U.S. Dept. of Energy: It is best to turn off incandescent and halogen bulbs whenever theyare not needed, due to their high consumption of electricity. <S> For a compact fluorescent bulb, a rule of thumb is to leave it on ifyou leave a room for 15 minutes or less (depending on several factors). <S> For LED lighting the operating life is unaffected by turning it onand off. <S> https://energy.gov/energysaver/when-turn-your-lights <A> Inrush Current <S> :An example of inrush current is an LED downlight fitting with 9w (0.0375A at 240v) will have any average inrush current of 7A for 300ms (not enough time to trip a circuit breaker breaking contact at 400ms). <S> Thermal Expansion:The more faulting factor is the temperature stress (thermal expansion) on the driver and control gears (Ballasts, LED control gears, transformers etc.). <S> Every time something heats up (which is anything electrical due to resistance), it needs to cool back down. <S> This causes expansion and contraction on cable joints, soldered or terminated, causing faults and will ultimately result in PCB's (printed circuit boards) to burn out resistors, dislodge cabling from contacts and arc contacts/cabling. <S> This is why you see control gears fail consistently in LED fittings that have 50,000hour lamp lifespans. <S> This is a common occurrence in circuit breakers and fuses. <S> As time goes on, screw fastened terminations will begin to expand, pushing termination screws to undo, but when it contracts, there is a arc gap between terminals. <S> This causes a hot joint. <S> Sorry for the long winded reply <S> but I have been asked this question in the past.
General rule of thumb is every time you turn a light on and off it will shorten its life span, but this also applies to leaving lights on 24/7.
How to best connect a temperature sensor to an aluminum block? 2 questions: How would you connect a temperature sensor to an aluminum block? Could I use a thermal adhesive, basically just gluing the sensor to the block? Which sensor would you buy? I like the nice cables of the waterproofed versions, but I'm thinking the plain sensor is maybe better suited to gluing to the aluminum block? DS18B20 Digital temperature sensor + extras Waterproof DS18B20 Digital temperature sensor + extras High Temp Waterproof DS18B20 Digital temperature sensor + extras Background: For our DIY PCR project we need to continuously measure the temperature of an aluminum block. The temp. range will be from room temperature to around 100 °C. From what I have read I understand that we need a digital temp. sensor, because the Pi does not have analog inputs (not without additional extensions anyway). <Q> A lot will depend on the size of your aluminum block. <S> The bare sensor takes more work to connect reliably, but for blocks less than (say) <S> 2" x <S> 2" x 2 <S> ", it will give significantly faster response times than the encapsulated versions. <S> For the prepackaged units, you're best off drilling a hole in the block and inserting the tube, or you can make a clamp for it. <S> Be careful, whichever technique you use, to get good thermal contact - this generally means a lot of surface area in contact with the block. <S> If you go with the bare sensor, almost any expoxy will do. <S> Just make sure you apply pressure to the sensor and squeeze out as much epoxy as possible. <S> There's no need to worry about silver paste or anything like that, since there is almost no heat flow through the sensor. <S> But make sure you also make a cable clamp to securely hold your wires to the block, so you don't accidentally rip them off. <S> That means drilling (and tapping if necessary) holes to provide a strong attachment. <A> I currently have the waterproof sensor. <S> Keep in mind <S> it has a plastic cylinder at the end, which would be hard to hot glue/epoxy, though it would still be possible. <S> I just use mine to sit outside and monitor that temperature. <S> Also, The first one HAS NO CORD. <S> you would need a little more work connecting it. <S> Unless you're playing with high voltage, you won't need the third one. <S> That's for industrial purposes. <A> Be sure of course to use some thermal grease. <A> I recently used a thermal epoxy for a heat sinking application to connect an aluminum plate to a larger aluminum body for good heat transfer and heat dissipation. <S> It should work nicely for a sensor application as well. <S> Buy on Amazon <A> I use a temp sensor in a TO220 package because it has low thermal impedence junction to case .Also <S> it is easy to install with a M3 bolt. <S> This gives good response and makes closed loop temp control easy to stabilise.
If it absolutely must not move, then the best is to tap a hole in the aluminum block and either use a sensor with a screw thread in it or use a bolt/washer to secure the sensor.
How to shut off a valve safely in the power outage In a scenario of sudden power loss, my latching valve will be still open by default. That valve operates with 5V, and needs 0.5A current with duration of 0.1s to be shut off. How to do that in a cost effective and safe way? <Q> A supercapacitor or a small battery should provide adequate energy storage. <S> Most supercapacitors have too great of an internal resistance, but some low ESR devices are available, e.g. something from the AVX BestCap range . <S> A 100 mF device ($11 USD) would drop from 5 V to 4.5 V after a 0.5 A, 100 ms discharge. <S> If that final voltage is too low, you could use a 200 mF supercap (I would not recommend charging the capacitor greater than 5.0 V, since its rated voltage is only 5.5 V). <S> You'll obviously need a switching device (e.g. power MOSFET) and logic to detect the power failure and enable the FET to supply power to the valve. <S> If this sounds too complex and expensive, and you can accept a greater current draw when the system is normally powered, perhaps you could use a spring-loaded normally-closed valve that has to be held open with power. <S> TI even makes an IC just for that purpose. <A> I'm assuming from the way you word your question that you have a latching valve. <S> One pulse opens the valve, a different pulse causes it to close. <S> This is a standard problem for latching valves and there are standard solutions. <S> All involve storing energy in a capacitor and using that energy to close the valve when required. <S> I don't have any links handy right now <S> but I'm pretty confident that a quick Google search will show you some of the different techniques used. <S> One of the products that we build uses latching solenoid valves in hazardous locations (Class 1 Div 2). <S> We use, I think, 10,000 uF at about 6 Vdc to open and close the valves. <S> This amount of energy storage works extremely well. <A> I'm no genius <S> but how about keeping on a relay, when that relay loses power than a capacitor and resistor setup powers your valve, it would be passive and should not consume that much power. <S> Oh and connect your capacitor to your power
To make the consumption (and heating) less egregious, you can use a special circuit that uses a higher current to move the valve and a lower current to hold it open.
100 Mhz clock frequency for a 16 Mhz MCU I would like to ask what will happen if I set, for example, 100 Mhz as a clock frequency for a MCU, which can operate at maximum speed of 16MHz. Why wont it work? <Q> It won't meet timing for one. <S> All the paths through the circuitry of the chip are designed to run without errors at a certain speed. <S> Everything is timed to work together <S> it's part of designing a chip. <S> If you go above that speed then you'll violate those timings and start to hit errors. <S> For instance if you had plenty of time for a signal to go high at 16mhz before the next clock, you have a lot less time when your next clock is coming at 100Mhz. <S> Another thing to think about is heat. <S> Your package is designed with certain thermals in mind. <S> As your increased clock rate pushes it last this power rate you risk damage as well. <S> That's a broad way of stating it anyway. <A> Typical high-speed digital circuits consist of clocked registers and unclocked combinational logic. <S> When the register outputs change, the combinational logic calculates the next value of the clocked registers. <S> The combinational logic takes some time to reach its new correct state. <S> So you must allow a certain amount of time to pass between clock edges so that this process can complete correctly. <S> If you overclock a processor, there is some danger that the combinational logic will not have enough time to reach its correct state, and so the old value will be latched in at a register. <S> This will lead to undefined and incorrect behavior for the processor. <S> Calculation results could be wrong. <S> Program flow may jump to some unpredictable and incorrect address. <S> In short, if you overclock to the point that the processor malfunctions, it will probably not be a graceful or recoverable malfunction. <S> The expression "not meet timing" basically means that the combinational logic will not reach its final stable state prior to the next clock edge. <A> If the chip is sufficiently over-designed, it might work. <S> These factors will conspire against it, taking physical, analog and digital factors into account: <S> Semiconductor device limitations <S> Heating in CMOS gates is proportional to clock switching frequency, so the device may overheat or thermal noise may cause bit flips <S> Parasitic capacitance and inductance in the IC interconnects may attenuate high frequency or cause ringing and generally undermine signal integrity, leading to internal communication failure <S> Internal phase locked loops used to generate other internal clocks may fail to stabilize, leading to timing chaos Clock distribution circuits may fail to synchronize cross-chip functions As others mentioned, combinational logic that is normally expected to complete in a certain time may not complete, leading to logic errors <S> Where present, analog VLSI devices (on chip capacitors, resistors) may have inadequate frequency response to deal with higher frequency internal signals <S> External systems <S> External ICs may depend on the MCU's clock, and might also exceed their limits A PCB not laid out for the higher frequency might lose signal integrity <S> The MCU will probably not have enough decoupling capacitors, so it may destabilize the power supply's oscillator, experience internal "brownouts", or interfere with other ICs by imposing noise on the power supply lines
Transistors may not be able to switch fast enough to pass the higher frequency signal CMOS leakage current may cause bit flips Semiconductor circuit limitations
How to connect PWM output from a dsPIC MCU to 12V LEDs? How to connect PWM output from a dsPIC30F MCU channels to 12V LED diodes? 4 x PWM channels will be used. For use with following voltage: 12V 5A Power Supply 1W high-power LEDs with working current 350mA (4 banks of 1 watt LED's) Overcurrent protection on output of each channel. And another setup, same as above, but for Operating Voltage range 9-27V (for use 12V or 24V LED's, either type) What is be better to use, MOSFET transistors, example IRF8313 , or Darlington Transistor Arrays, example ULN2803A? LED connection diagram like: : <Q> The easiest solution is to use N-channel MOSFETs. <S> I assume that your controller is running at 3.3 Vdc - <S> that means that you need MSFETs with low turn-on voltage. <S> You can't use a chip like a 2803 because of the load current you want to use. <S> The 2803 is rated at 500 mA absolute maximum <S> but you would never want to run it that high - the saturated voltage on that chip is really high and any significant amount of current leads to large amounts of heat that the package can't dissipate. <S> My favourite type of NOSFET for your application is a class called "Trench FET". <S> Several manufacturers make these - the names they call them are all different <S> but they all have the word "Trench" as part of the name. <S> The reason this class of MOSFET is ideally suited for your application is that they have very low Rds-on values and very low Gate turn-on voltage. <S> The Gate can be driven directly by your microcontroller at low-frequency PWM speeds. <S> Their main limitation is that they can't handle high voltages on the Drain but your supply voltage is well within their operating range. <A> If you want to use that board for production you may need to use an LED driver. <S> This would also provide the overcurrent protection and it is much more efficient than a solution with serial resistor. <S> I used and can recommend LT3956 , but this one might be a little oversized and expensive. <S> Do a google search, there are many solutions out there. <S> for your supply voltage of 12V there should be also some cheaper parts from infineon, on semiconductor or others. <A> This topology assumes that the 12 V supply is well regulated. <S> You pick the number of LEDs per string so that the they drop a bit less than the 12 V of the supply. <S> This gives you some voltage to drop across R1 to keep the current reasonably constant and predictable. <S> Fewer LEDs and therefore a larger drop across R1 give you better current regulation, but wastes more power.
A low side FET switch is a easy way to do this: This particular FET can be driven directly from a 5 V digital output and can handle up to 30 V. Your favourite supplier should be able to sell them to you.
SR Flip-Flop: NOR or NAND? I started studying flip-flops recently and I am stuck at this point: At some video tutorials, people explain the SR flip-flop like this: So they use NAND gates, producing a transition table like this: | t | t+1| S | R | Q| 0 | 0 | INVALID| 0 | 1 | 1| 1 | 0 | 0| 1 | 1 | ? However, some other people explain the SR flip-flop using NOR gates: (source: startingelectronics.com ) which has a different transition table. Are both correct? Why do both exist? <Q> Both are SR latches. <S> The SR NOR latch will have the following truth table: ----------S <S> R <S> Q----------0 <S> 0 <S> no change0 <S> 1 <S> 01 <S> 0 <S> 11 <S> 1 <S> not allowed---------- <S> SR NAND latch is an inverted version of SR NOR latch. <S> The truth table of which is: ----------S <S> R <S> Q----------0 <S> 0 <S> not allowed0 <S> 1 <S> 11 <S> 0 <S> 01 <S> 1 <S> no change---------- <A> There is this this nice small (and incomplete) set of rules about digital circuits, about the little balls to be more precise: little balls can travel around over wires (not always at T sections) little balls can travel across logic gates <S> little balls neutralize each others when they collide The second needs a little expansion. <S> If you have a little ball on the output of an AND gate, thus making it a NAND gate, you can take the ball, double it, put the new balls in the input and turn the AND in an OR. <S> Things are similar if you start with an OR gate (that with its little ball is a NOR gate).Someone call this rule De Morgan's Laws <S> if you ever have to explain this to a teacher. <S> Back to your circuit: take the two little balls, cross the NAND gates (splitting the balls). <S> Now you've got two OR gates and four balls. <S> Remembrer that a ball represents a NOT gate: simulate this circuit – <S> Schematic created using CircuitLab <S> Now as you see R and S are negated as soon as they enter the circuit. <S> We can agree and "simplify" NOT3 with R and call that input nR, and similarly with S and NOT2. <S> Now let's push NOT4 till the T crossing: what happens there? <S> Well you can negate the AND output, and to keep the downstream value of nQ you should put a not there also. <S> A diagram is worth a thousand words: simulate this circuit <S> Now you can simplify Q and NOT1 and label that output nQ, and simplify nQ and NOT2 and label that output Q. Does the circuit look more familiar now? <S> Your second circuit is just like the same, only what you call set and reset changes. <S> The real question is: why did I bother with the whole "small balls" story? <S> You could have just written down the truth table and "easily" see what was going on. <S> Well I think that sliding little balls around helps quite a lot in solving simple problems and even a little more complicated ones. <S> Plus it's fun . <A> There isn't much difference in the output. <S> The only minor difference occurs because of the properties of a NOR or a NAND gate. <S> Consider a SR flip flop using NAND gates:- <S> The truth table can be given as:- <S> Now, consider SR flip flop using NOR gates:- <S> The truth table can be given as:- <S> The circuit will work in a similar way to the NAND gate circuit above, except that the inputs are active HIGH and the invalid condition exists when both its inputs are at logic level “1”. <S> It just depends on the one you prefer to use otherwise both have the same working. <A> NOR gates are used to build active high SR latches and NAND gates to build active low SR latches YouTube videos about latches
It is possible to construct a simple SR flip flop using NOR or NAND gates.
Schmitt trigger IC/circuit with thresholds set by voltages I want to make a Schmitt trigger for a signal, X, who's thresholds are set by two voltages, A and B. I think I'm having a brain fart. I don't think it's possible to do this with just a single comparator and some resistors, but It would be interesting to know what simplified options there are to do this. My inelegant half-solution is below: simulate this circuit – Schematic created using CircuitLab Perhaps assume that A is always greater than B, but otherwise they may be any value. <Q> Something along these lines MAY meet your specification. <S> I'll not develop the cct fully at this point as eg M1 & M2 may be deemed to be excessive to spec. <S> If so, what is allowed? <S> eg are diodes <S> OK - a diode switch could be implemented which is 'unblocked' by high or low output. <S> Here OA1 +ve output sing has to have Vout <S> > <S> Vhi + Vgsth of M1 and the opposite applies with M2. <S> Vin connection to IC1-+ input makes this look like negative hysteresis but M1/M2 may invert input polarities depending on how Vhi and Vlo are set. <S> I have not fully thought through what the bounds are on the various voltages or even how they are best switched, but something along these lines looks workable. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Why only one IC? <S> Being able to use two probably makes life more straightforward. <S> A diode gated version could look something like this. <S> Vlimhi and Vlimlo are either fed to point C via diodes D1 or D4 respectively or blocked by input from Vout via diodes D2 and D3. <S> R3 is a high value resistor shown as fed from Vdd/2 - but call this Vref instead. <S> This resistor is intended to provide diode conduction of D1 and D4 when they are not blocked by Vout. <S> Vref should lie about midway between the high and low limits and could be provided by a divider between them so it can move as they do. <S> D1 & D4 should be Schottky diodes to minimise difference between the input voltages and opamp input. <S> D1 & D2 maybe be silicon or Schottky. <S> Odds are that the circuit would need a little playing with to optimise it <S> but it should work well enough for many purposes. <S> I my have made some major error in polarity somewhere but hopefully not. <S> Regardless, the principle should be clear enough. <S> In the circuit the waveforms at A B C D are all the same in polarity and shape but assume different levels as shown by the captions. <S> simulate this circuit <S> Resistor values are nominal. <S> R1 R2 stop the IC output fighting directly with the control voltages and R3 is intended to be >> R1 or R2 <S> so reference voltages are not greatly diminished by resistor divider. <A> I've had to design this circuit in the past and what I opted for was two comparators and a D type flip flop. <S> The upper threshold comparator clocked logical 1 into the flip flop and the lower threshold comparator reset the flip flop. <S> It worked of course <S> but I'm intrigued to see if there is a simpler (or more effective) solution. <A> Try using a microcontroller like the PIC12F675. <S> Not sure if you are this inclined or if your requirements allow it <S> but it's something I did in the past for a simple sensor. <S> Issues may include: Execution speed may be an issue though depending on your signal frequency. <S> Voltage level of your signal and its compatibility with the microcontroller input pins. <A> If one inverts the polarity of one of the comparators, one may use pair of NAND or NOR gates to build an RS latch; the outputs may then be treated as inverting and non-inverting Schmitt trigger outputs. <S> On the other hand, like all latching circuits, there will be a danger that a signal which crosses the switching threshold of the upper comparator but never stays above it very long may generate runt pulses or another anomalies. <S> If one would wish to condition a signal for use by a counter, a safer approach may be to generate a two-phase non-overlapping clock and then use latches rather than flip flops. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The SO schematic editor is a little inconvenient, but the circuit below simulates a four-bit counter which will work cleanly even though the input is very noisy, provided that whenever the input brushes against the 4-volt threshold it must go solidly above 4 volts before the next time it brushes against the 1-volt threshold, and whenever it brushes against the 1-volt threshold it must go solidly below 1V before it brushes against the 4V threshold. <S> Note that the phi1 and phi2 clocks generated by the comparators are themselves noisy, but such noise wouldn't matter even if it caused the latches to go momentarily metastable <S> (the latches in this simulator don't do so even under extreme conditions, but real latches might) <S> since any noise event that caused a latch to go metastable would be followed by a valid latching event.
Use three of the ADC inputs, one for your signal and two for the thresholds and do your comparison and output activation in software.
Height of the substrate in online PCB impedance calculators Is the height of the substrate just the non conductive portion between copper layers ? Using this calculator as an example In a 4L board, if the top and bottom traces are of the same thickness and width with the same height for their respective substrates, would that imply that the impedance of the trace of the same since, they are both exposed to free air and a substrate ? Are these calculators assuming that the adjacent layer is a ground plane ? <Q> 1) <S> Yes, H is the thickness of the prepreg between the top layer and the plane in layer 2. <S> After pressing the board. <S> 2) <S> Yes, if you mirror the configuration from top to bottom the impedance will be the same. <S> 3) <S> Yes <S> and No. <S> The term is "plane" (not "ground plane"). <S> The fields can't read... :-) <S> Planes will work the same no matter what you name them. <S> Note 1 <S> : The impedance tolerance after manufacturing may be around +/-20% on outer layers and +/-10% on inner layers. <S> Note 2 <S> : This and other formula based impedance calculators may easily be way off if you have thin dialectric and skinny traces (which is what we often want in order to squeeze a lot of traces into a given area). <S> If you want more accurate results in those cases, find a 2D field solver like the one in Hyperlynx og Cadence SigXplorer. <S> There is a free one on the net called TNT as well. <A> The impedance of a coaxial cable is defined by the ratio of the core radius to the shield radius, and the permittivity of the dielectric. <S> On a PCB, we approximate these as close as we can, replacing the shield with a ground plane, which can be on both sides (stripline) or just one (microstrip). <S> If there is only one ground plane, the impedance increases, but is still controlled by the ground plane. <S> If I remove the ground plane, the controlling factor vanishes, and you get different values along the trace, depending on what other traces are nearby. <S> The height is indeed the non-conductive portion only. <A> Referring to your link H is the thickness of the dielectric between two copper layers. <S> This calculator assumes that the bigger trace is a low impedance plane, ground, vcc or whatever, and that it's bigger than your microstrip, i.e. wider and longer. <S> The last assumption is needed to neglect "edge effects" (is it correct?). <S> About your last sentence, if you make a microstrip on TL and one on BL for them to have the same characteristic resistance, apart w and t, you will need to provide a plane at the same H for each one. <S> In a 4L board that can be achieved only with two planes in the intermediate layers, for a 5L board maybe one plane in L3 can do the job. <S> Keep in mind that you can bury a ustrip in an internal layer, here's another random calcolator , maybe that can suit your needs better.
Yes, the assumption is that these are ground planes, and these are required for the impedance to be correct. For a four layer board I guess it depends: if having an higher H can be good for you you can leave a copper layer "unpopulated" as in "with no copper", and make the plane in layer 3 or 4.
Why and How does Power Plant generate Watts? I know my question is stupid, it is stupid because I am not understanding it correctly. I thought two of following is required to calculate watts. Voltage, Current or Resistance/(Impedance in AC) is required. The only way to get current is when we have a load. How does power plant generate in unit of watts when where is no load. <Q> If there's no load, and it's disconnected, it can't really be said to "generate" any power. <S> No current = Zero watts. <S> Mechanical work will be wasted spinning the generator shafts. <S> Some generators (e.g. small wind systems) have "dump" loads that can be switched in if there is no real load, in order to avoid the generator accelerating beyond its design limits. <A> A power plant or generator will be rated for the maximum power it can deliver, but only produces that amount of power if a load requires it. <A> A power plant is like a water pump. <S> It generates a pressure (voltage) between its flanges, but water (current) can only flow when the flanges are connected. <S> If you connect them via a thin pipe (small load / small resistor), water will flow, but the flow is limited by the friction inside the pipe. <S> With a wider pipe, more water flows. <S> As long as the pump is strong enough, it will maintain the pressure 1) . <S> However, if your pipe is too wide, the pressure between the pipes will be smaller than nominal. <S> Pressure difference times flow is power 2) , so <S> if there is pressure (voltage) but no flow (current), no power is consumed/produced. <S> Little flow means little power. <S> The pump (plant) only generates the demanded power. <S> A label of 1000W just indicates the maximum output, i.e. the strength. <S> So, nothing is wasted. <S> (OK, in reality, there are some difficulties. <S> You can not switch on/ off power plants as fast as you need / don't need power, but that's nothing to care about when trying to understand the principles of electricity) <S> 1) <S> This is not true for most pumps in reality, but it describes quite well what happens 2) <S> Here, power = energy / time, i.e. wattage etc. <A> Mr Alessandro Volta, during some chemical experiments didn’t like the unbalance in electron between two plates, and connect a wire to transfer the excess of electrons from one plate to the plate that today we call anode. <S> During this transfer, the wire becomes hot. <S> The next day he decide to cut the wire and put something in between to use this work (the heat) to do something for him….and <S> this was the start of a big change of our world! <S> No matter if this is DC or AC <A> During supplying current, motors starts to rotate, like that during the mechanical rotation of motors it creates change in flux, thus potential create that leads to voltage. <S> This is the principle for alternator. <S> Watts is only to calculate power consumption or power production. <S> Current is produce during the flow of electron by potential.
A power plant will produce only voltage if there is no load, however, it will be able to deliver current if a load is connected, and demands current (or power).
Feeding higher voltage sine wave to Arduino interrupt pin I want to use Arduino to count cycles from a bicycle generator. This generator has variable frequency (which I want to measure), but also variable voltage that is proportional to wheel speed, typically being above 6V. What I want is a way to limit the voltage of the wave so that I can detect the rising of a pin voltage ( attachInterrupt(pin, RISING) or maybe pulseIn(pin, HIGH) ). My doubt concerns either voltage limiting (for which I'd think about a 5V zener), but also impedance, since I don't want to drain current from the generator (which has to power the rest of the bike circuitry). Is the zener idea correct? What other components should I add, and how should they be combined? I know there is something called a Schmidt trigger, but I don't know exactely how I could use it here (and frankly, I'd rather not to use an IC if not needed). <Q> There's a dirty method of connecting AC to a microcontroller - just use a resistor. <S> I happen to have the Atmega datasheet open, it shows you that the input pin looks like this: <S> The two diodes on the left are for ESD protection, they shunt any overvoltage to earth or to the 5V rail. <S> You can abuse these diodes to clip your AC signal to the range 0-5 <S> V. <S> Selecting a resistor: use the largest possible value that will reliably drive the pin. <S> Leakage current is 1 uA, and the capacitance is 10 pF. <S> If your dynamo frequency tops out at 1 kHz, the input impedance will be around 1.5 MOhm. <S> 1 <S> uA leakage will also become a problem in the MOhm range. <S> If you choose a resistor near 100 kOhm, and the voltage rises to +10V, the current into the protection diodes will have a peak of perhaps 20 uA, which won't cause any harm. <S> Things to consider: <S> This only works if the AC voltage is higher than 5 V. <S> If it is lower, try using the comparator module to compare it to a 1 V reference you make with a resistive divider. <S> If the arduino is powered by the AC voltage, then think carefully about where you connect the AC, and ground. <S> I am currently doing it like this: simulate this circuit – Schematic created using CircuitLab <S> You might need to do something different depending on the ground reference of the AC source. <S> All of the above is really dirty and unprofessional. <S> Good for a quick frequency counter or zero-crossing detector for a circuit. <A> Your Zener idea is correct, and since you're concerned about loading the dynamo, you could use something like this, where the LM4040 draws less than 1 mA: <S> As I understand it, the Arduino's MCU sports internal pullups, so the LM4040 will clamp the dynamo's negative half-cycle to about 500 mV below ground, and R2R3 will limit the negative voltage into the interrupt pin to about 250 millivolts, which will keep the input protection diodes happy. <A> I personally would go with the schmitt trigger idea because it does provide nice clean transitions to your digital input which is really what you want for your interrupt input. <S> Also you do not need to use an IC to build a schmitt trigger, you can build an schmitt trigger from BJTs like the one in the picture. <S> Also wikipedia had a good explanation on schmitt triggers
If you're going to sell the product or show it to anyone else, you should definitely use a diode clamp and a Schmitt trigger.
Is there such a thing as a pin (or pogo pin) clamp for testing? I'm an amateur tinkerer of electronic components, and was wondering if a product like I'm about to describe exists for testing components. Say you have an arduino pro mini board . You want to access the FTDI pins for flashing, but ultimately are going not to solder those pins to something else. As I know it now, I have to solder header pins to it to connect the FTDI programmer, then I after I'm done with all of that I can use those pins to solder it to whatever it needs to be a part of. But say I just want to program the board without soldering header pins, so I could reuse it in an application where those original pins wouldn't need to be connected. Is there some sort of clamp or something that has a bunch of pogo pins (or whatever) that would make contact with the board, then have exposed pins on the top where I could plug the programmer in? It would be the equivalent of an IC test clip, but for boards with pins. I can't seem to find it on Google. Does this exist, and if not, why not?! <Q> Look for "test fixture" for PCBs. <S> There are plenty of ideas- generally customized to the board you're using them with, so some kind of custom machining is required. <S> There are companies that specialize in making test fixtures for professional use so they'll have clamps and so on. <S> A "fixture" in this context (as opposed to a "jig") holds the work (in this case, the DUT- the device under test) in position. <S> Depending on what equipment you have <S> access to you might use different construction techniques- CNC <S> machined acrylic plastic plates, laser cut acrylic, inexpensive CNC-milled <S> commercially made PCBs or 3D printed parts. <S> There are generally several layers- see this photo from this web page : <S> Plus some kind of clamping system. ' <S> Universal' style clamps exist, but in my experience (mostly Asian manufacturing) <S> most jigs are custom made from standard parts for one specific board design, and look more like this : If it looks like there is a lot of work in designing and making the test fixture- <S> there is. <S> The design work in making test fixtures and test programs can easily exceed the work for the board design itself. <S> For methods applicable to lower quantities and more hobbyist-y applications, consider the methods Sparkfun has disclosed here - using inexpensive PCBs as parts of fixtures. <S> If you design the PCB according to their guidelines they work decently well. <A> For a simple PCB it's not too hard to make your own - the precision part requires a spare unpopulated PCB and a pillar drill. <S> First you need a suitably laid out PCB, with the signals you want to access all available on test pads on the wiring side (the less populated side). <S> It's easiest if the test pads have through holes, and it's good to keep these design rules in mind if you're laying out the PCB. <S> Here, I want to access points T5,6,7,8,9. <S> Clamp a blank PCB to a 12mm sheet of plastic, and drill (0.6mm or whatever hole size) into the plastic, to locate these holes. <S> You don't have to drill right through. <S> If you're careful, you get to keep the PCB, though there's a risk you have damaged the plating. <S> Remove the PCB and drill the correct diameter for your pogo pins, right through, using the original pilot holes. <S> This really requires a pillar drill, it's critical these holes are upright. <S> (If you have a mill, you can use the drill file to drill on proper coordinates : even better.) <S> The pogo pins should be a push fit in these holes - if they are too loose, be careful with the superglue and don't tell anybody. <S> Fit it on a base to protect the wiring underneath, and fashion some guides and clamps to hold the board in the right place. <S> Mine are all round because I have a lathe : careful use of ordinary woodworking tools and scrap plywood is acceptable. <S> Just avoid the wiring-side components when placing supports for the PCB. <S> The base doesn't have to be polished mahogany, unless you're going for a steampunk look for your test fixtures. <S> Nice big mounting holes on the PCB makes another good PCB design rule, not possible on this crowded board. <S> If you have mounting holes anyway, you can drill for these as well as the pogo pins, mount pillars in them, and fix the PCB to them for testing. <S> Finished result: <S> And clamp the board to it for testing. <A> I have exactly what you want. <S> I bought it direct from China using taobao from within google chrome. <S> Try searching for "編程 測試 夾子" on Taobao.com - this translates as "Programming test clip". <S> eg. <S> http://m.intl.taobao.com/detail/detail.html?id=42343856957&spm=a2141.7631730.0.i1 <S> You can buy using a taobao agent like bhiner.com <S> I have not seen these anywhere else. <A> Sparkfun has several POGO kits and parts for Arduino's and ISP https://www.sparkfun.com/search/results?term=pogo
There are also reasonably priced cables made by Tag-Connect that can be held in place by hand or snapped in place (the kind of with legs).
Term for a chip that is used in a camera to detect light In terms of an integrated circuit, what is the term for a chip that is used in a camera to detect light? I hope this photo helps. What is the technichal term for the light sensitive IC in a camera? <Q> This is called an image sensor . <S> This particular image sensor in your picture is a CMOS image sensor, commonly found in pretty much anywhere a small to medium sized camera is used, as well in some big and/or professional gear. <S> The camera in your phone is almost certainly a CMOS image sensor. <S> It is probably also the type of sensor captured the image you posted here. <S> The other major type of image sensors besides CMOS is CCD , which is an older (but in no way inferior) technology and commonly found in older gear as well as more professional digital photography gear now. <S> In the construction of a digital camera, the image sensor is placed where photographic film used to be placed in traditional film cameras. <S> Some modern DSLR even accepts lens assemblies from those film cameras (like the one I occasionally used which took over the set of lenses from my older film SLR.) <A> The general term would be an image sensor, the underlying technology would either be a CMOS sensor (a.k.a. active pixel sensor ), or a charge coupled device (CCD) . <S> I have no idea which of the two it is based on your image. <A> See this site for more details
I'd call it an image sensor: - You can also call it a pixel array.
Help understanding the code I am new to C programming. I need your help in understanding the some particular lines in a code segment for sensored control of a brushless dc motor. It was written for a 16-bit MCU (dsPIC33FJ32MC710). This particular section is from the interrupt service routine, and contains two ISRs.Can you please explain to me in simple words, the lines marked by //??? ? What is being done there, and why? Any other comments are also welcome. int DesiredSpeed;int ActualSpeed;int SpeedError;long SpeedIntegral = 0, SpeedIntegral_n_1 = 0, SpeedProportional = 0;long DutyCycle = 0;unsigned int Kps = 20000; // Proportional gainunsigned int Kis = 2000; // Integral gainvoid __attribute__((interrupt, no_auto_psv)) _T1Interrupt (void){#ifdef CLOSEDLOOP ActualSpeed = SPEEDMULT/timer3avg; SpeedError = DesiredSpeed - ActualSpeed; SpeedProportional = (int)(((long)Kps*(long)SpeedError) >> 15); // ??? SpeedIntegral = SpeedIntegral_n_1 + (int)(((long)Kis*(long)SpeedError) >> 15); //??? SpeedIntegral_n_1 = SpeedIntegral; DutyCycle = SpeedIntegral + SpeedProportional; PDC1 = (int)(((long)(PTPER*2)*(long)DutyCycle) >> 15); // ??? PWM duty cycle 1PDC2 = PDC1; PDC3 = PDC1;#endif // in closed loop algorithm IFS0bits.T1IF = 0;}void __attribute__((interrupt, no_auto_psv)) _IC1Interrupt (void){ int Hall_Index; IFS0bits.IC1IF = 0; // Clear interrupt flag HallValue = (unsigned int)((PORTB >> 1) & 0x0007); // Read halls if (Flags.Direction) { OVDCON = StateTableFwd[HallValue]; Hall_Index = HALL_INDEX_F; } else { OVDCON = StateTableRev[HallValue]; Hall_Index = HALL_INDEX_R; }// The code below is uses TMR3 to calculate the speed of the rotor if (HallValue == Hall_Index) // has the same position been sensed? if (polecount++ == POLEPAIRS) //has one mech rev elasped? // ??? { // yes then read timer 3 timer3value = TMR3; TMR3 = 0; timer3avg = ((timer3avg + timer3value) >> 1); // ??? polecount = 1; } } <Q> In order to do fractional integer math in C (and other languages that don't support fractional math), it's necessary to pull tricks like this. <S> What you would really like to do is to multiply two 16-bit numbers and keep the high bits of the product. <S> The first set of expressions cast 16-bit numbers into signed 32-bit numbers, then calculate the 32-bit product. <S> They then shift it right by 15 bits, discarding the least significant bits. <S> It's a bit like what goes on with floating point math when you multiply two mantissas (though the floating point math would be done more efficiently since there's no need to calculate what will be discarded). <S> In the second expression (polecount++ == POLEPAIRS) has a boolean value based on the comparison of the value of the variable polecount to POLEPAIRS. <S> The variable polecount is post-incremented (incremented after the comparison). <A> The >> operator is a bitwise shift to the right. <S> Shifting all bits left or right within a binary number will multiply or divide the number by 2 (per each shift). <S> There may also be times where you want to have certain bits shifted into certain positions, possibly for aligning bits on an I/O port or the bits within a special internal data register. <S> Also, In some of these formulas one or more of the variables are being converted to a certain data type, (using a prefix such as (int) or (long) just ahead of the number). <S> For bit shift operator See: http://www.cprogramming.com/tutorial/bitwise_operators.html <A> These lines represent the proportional and integral part of the motor control. <S> The SpeedError is multiplied by the Kps gain directly and the Kis gain multiplies the SpeedError and adds it to last cycles integral output SpeedIntegral_n_1. <S> There should be some lines of code later that sum the proportional and integral terms to determine the motor input. <S> Adjusting the proportional and integral gains will effect the speed and stability of the motor control.
This control method is attempting to ensure that the motor speed control is stable and does not oscillate.
Why do wall plug power supplies use audible switching frequencies? Every plug-in power supply ("wall wart") I have ever used starts off silent, but eventually starts to emit high frequency switching noise. It usually happens only when the charger is on, but not charging anything. I presume it is due to the capacitors failing, or maybe the glue around an inductor. My question is, why do they all use switching frequencies around 18 kHz which is audible and really annoying ? Why not go up to 25 kHz or even higher? <Q> Unfortunately, it comes down low enough to be heard. <S> Under normal conditions, the switching frequency should be much higher. <S> This type of converter uses something similar to pulse density modulation to control the output voltage with a fixed pulse width, varying the spacing been the pulses to control the duty cycle. <A> Most small offline SMPS use <S> Flyback Fixed frequency peak Current mode. <S> This approach gives a simple cheap circuit that is reliable considering the price. <S> The switching frequencies are well above audio <S> but there are ways that you can still get audible noise. <S> Sub harmonic oscillations can and do occur in these types of supplies. <S> They can be difficult to cure. <S> It is plausible that a say 100 kHz peak current mode switcher could make a noise at 12.5 kHz or 10 kHz etc. <S> Another possibility is an unstable feedback loop which often makes noise around the corner frequency of the output filter which could be say a twentieth of the converter frequency. <S> The part load efficiency of these types of SMPS and some others is poor. <S> Manufacturers do things like frequency fold back, Burst mode, Green mode, Minimum on time etc. <S> All of these standby power saving tricks mean low frequency operation which could mean audible noise. <A> The problem is that most switched-mode toplogies will enter "discontinuous mode" under light load. <S> In this mode the duty cycle must be reduced dramatically to keep the output voltage constant. <S> But there is a minimum feasiable length for the pulses, so at very light load the pulse rate has to drop to maintain output regulation. <S> This brings the switching frequency down into the audible spectrum. <S> Inductors and transformers aren't totally rigid and they can get less rigid with age. <S> So they can convert the audible switching frequency into actual audio.
In many cases this is a side effect of a converter that uses a variable frequency that shifts down when under light load.
How does 8032 execute program? I have been studying the 8032 microcontroller. It is mentioned that 8032 doesn't have internal ROM. Now there are few questions I have Do we need an external ROM to execute programs necessarily? Can't we use the 256 byte internal RAM? Suppose I am using the 8032 microcontroller with an external ROM 2732 and also using a latch for storing the address (lower order) of port P0.(which may transfer address/data). Now after enabling EA and connecting the PSEN how does 8032 execute the program? What happens if I turn on the system ?(How does the program counter of 8032 microcontroller executes intructions? From which address of external memory the program should be read ? I have read these manuals- Intel 8032H Keil , Atmel 80C32E . <Q> No, you can't use the internal RAM to hold code. <S> The 8051/8032 uses a Harvard architecture, which means that it has completely separate memory spaces for code and data. <S> Instructions are fetched from code space, but the RAM resides in data space. <S> Now after enabling EA and connecting the PSEN how does 8032 execute the program? <S> The 8032 fetches instructions from code space. <S> Since EA is asserted, these fetches (memory reads) appear on the external memory bus, with PSEN asserted. <S> When PSEN is NOT asserted on an external memory read operation, it is a data-space read. <S> What happens if I turn on the system? <S> The 8032 begins fetching instructions from code space address 0. <S> How does the program counter of 8032 microcontroller executes intructions? <S> The program counter is simply responsible for holding the address of the next instruction to be executed. <S> Other parts of the CPU execute the instructions. <S> From which address of external memory the program should be read? <S> Address 0. <S> If you want to use interrupts in your program, there are other addresses in low code-space memory that are reserved for them, so the code that you execute on reset will eventually have to "jump around" those reserved addresses. <A> Instead, an external ROM/EPROM/EEPROM must be used to hold the program. <S> Two ports are used to access external memory: <S> Port 0 (lines P0.0-P0.7) emit the the low 8 bits of a 16-bit 64K address, and also serve as the read/write 8-bit data bus after the address has been latched by the external memory. <S> P2 (lines P2.0-P2.7) are used to emit the high 8-bits of the 16-bit 64K address. <S> Although the 8032 has 256 bytes of internal RAM, this can be extended by adding a RAM chip onto the external address bus also. <S> The external address line \$\mathsf{\small \overline{\text{EA}}}\$ is held low to indicate whether that an access is being made to external program memory, otherwise external RAM is assumed. <S> To execute code out of external memory, the address from the program counter is output on the Port 0 and Port 2 data lines; then during the read cycle, the byte(s) retrieved from the ROM on read into Port 0 and executed by the processor. <S> Only one instruction is fetched at a time. <S> \$\mathsf{\small \overline{\text{PSEN}}}\$ is a strobe used during the external program memory access. <A> If you look at a typical 80(C)32 circuit below (from here ): <S> You can see that the 8032 talks to external EPROM, RAM and EEPROM via a bus - 8 bit data and 16 bit address. <S> The latter is latched and thus demultiplexed with the HCT573. <S> There were some chips with the latch built in designed to be used with the 8031/8032 but the above was the more common configuration- using low-cost standard memory chips. <S> There's also a bit of "glue" logic to decode the addresses and to generate the proper signals for the memories (the HCT138 and the quad NAND). <S> It is vital that the glue logic is designed such that the EPROM resides at address 0 because after a reset, execution always begins by the 8032 fetching the first byte of the instruction from that address. <S> This is a function of hardware in the 8032 and cannot be changed. <S> Typically the instruction is a 3-byte LJMP instruction that jumps to the beginning of the program. <S> We call that the "RESET VECTOR". <S> Other vectors occupy the bytes immediately above the reset vector- for the external interrupt service routine and timer interrupt service routine. <S> In those days, the EPROM would be programmed (written to) by a separate programmer outside of the circuit and then typically plugged into a socket. <S> No in-circuit programming in those days. <S> The RAM and EEPROM could be written by the micro, but the program would have to be loaded into the EPROM before any of that was possible.
The 8032, which is a variant of the 8052, has no internal ROM for program storage.
Why All 1's used as a second input in decrement operation of ALU? Suppose the first four data inputs are X (X0, X1, X2, X3) and the second four data inputs are Y (Y0, Y1, Y2, Y3) in a 4-bit ALU. Why "All 1's" are used as an input for Y in the decrement operation of ALU? <Q> Think about it. <S> With a N-bit number, adding 2 <S> N doesn't change the value because the change is in the first bit past the number. <S> For example, consider adding 16 to a 4-bit number. <S> In binary that is: XXXX + 10000 ------- <S> 1XXXX <S> which is still just XXXX because by definition of a 4 bit number you only save the 4 bits. <S> So if adding 2 N yields the same value, then adding 2 N -1 <S> will yield one less, which is the same as subtracting 1. <A> It might be easier to understand this in decimal. <S> Imagine that we're doing arithmetic on three-digit base 10 numbers: 445, 900, 132, 042, 007, etc. <S> We can add the numbers together, but the result is always truncated to three digits. <S> Here's an example: \$900 + 132 = <S> 1032 \to <S> 032\$ <S> Now, look what happens when we add 999 to a number: <S> \$042 + 999 = 1041 \to 041\$ <S> \$041 + <S> 999 = 1040 \to <S> 040\$ <S> \$040 + 999 = 1039 \to <S> 039\$ <S> As long as we drop the fourth digit, adding 999 (the largest possible three-digit number) works just like subtracting 1! <S> Binary works the same way. <S> In your example, adding the largest possible four-bit number works just like subtracting 1. <S> Again, this is because we're dropping the carry out from the high bit. <S> \$0110 <S> + <S> 1111 = 10101 \to <S> 0101\$ \$0101 + <S> 1111 = 10100 \to <S> 0100\$ <S> \$0100 <S> + 1111 = 10011 \to 0011\$ \$0011 <S> + <S> 1111 = 10010 \to <S> 0010\$ <S> This is called two's complement arithmetic . <S> Using this system, you can compute the "negative" of any n-bit binary number by subtracting it from \$2^n\$ . <S> For four-bit numbers, it works like this: <S> \$-1 = <S> 2 <S> ^4 - 1 = 10000 - 0001 = <S> 1111\$ \$-5 = 2^4 - 5 <S> = 10000 - 0101 <S> = <S> 1011\$ <S> So adding 1011 to a four-bit number is just like subtracting 5, as long as you drop the last carry. <S> There's a faster and more common way to compute the two's complement -- invert all of the bits, then add one. <S> This lets you compute a four-bit negative using inversion and addition, instead of needing five-bit subtraction. <S> Here's how to compute -1 and -5 using this method: \$-1 = <S> \lnot <S> 0001 <S> + 1 = 1110 + <S> 1 = 1111\$ <S> \$-5 = \lnot 0101 <S> + 1 = 1010 + 1 <S> = 1011\$ <A> Think of the subtraction between two numbers as adding the inverse of the second, x+(-y) , so to decrement you add -1 . <S> This expressed using the method of Two's complement encoding, which states that: To obtain the inverse of a number you find its complement (replace 0 with 1 and vice versa) and then add 1 to the result , leads to your question, in which: 1 in binary representation is: 0001 , its inverse element (i.e -1) is: 1111. <S> Check Signed number representations for further reading.
Because all 1s is -1 in twos-complement encoding.
Why pulsed DC passes through a capacitor? OK, the current flowing through a capacitor equals C*dV/dt, I'm aware of that. What I don't understand is the physics of the process: why does a capacitor pass pulsed DC (0-10V for example) when charge carriers don't change their direction? Even if I use the "water analogy" it doesn't make sense: the flow moves in one direction, so the "diaphragm" will not be able to move back and forth. <Q> Zero volts doesn't mean zero current. <S> Assume your circuit looks like this: simulate this circuit – <S> Schematic created using CircuitLab <S> When the switch turns on (connects to 10V), current flows to the right and charges the capacitor up to 10V. <S> Once that happens, the current stops*. <S> When the switch turns off (connects to ground/0V), current flows to the left and discharges the capacitor. <S> (The capacitor acts like a voltage supply.) <S> The current stops when the capacitor reaches 0V. Short version <S> : Pulsed DC is actually AC. <S> *The charge and discharge are actually exponential decays, so mathematically, the current never really stops. <S> It approaches zero asymptotically at a rate determined by the resistance and capacitance. <A> The voltage across a capacitor cannot change instantly - it takes some time, determined by the capacitance, and resistances in the circuit. <S> If the pulses in your pulsed DC are sufficiently short relative to the circuit's time constant, the voltage across the capacitor will not have time to change significantly during the pulse (the capacitor will charge or discharge very little), so the voltage changes on the output side of the capacitor will closely follow the voltage changes on the input side. <S> Therefore, it will appear that the DC pulses passed through the capacitor. <S> This effect is used in "coupling capacitors" in analog circuits, among other places. <A> I think this becomes much clearer if you look at it in the frequency domain. <S> The impedance of a capacitor is $$\frac{1}{j\omega <S> C}$$ <S> So far so good: <S> with a frequency of 0 Hz, the impedance goes to infinity ( or even eleven ) <S> But what kind of signal are you applying?A <S> rectangular pulse: <S> Image from: http://en.wikipedia.org/wiki/File:Rectangular_function.svg <S> The fourier transform of the pulse is this, with x being the frequency \$\omega\$: <S> Image from: http://en.wikipedia.org/wiki/File:Sinc_function_%28normalized%29.svg <S> I think this makes it easy to see that there are components in the signal that have frequencies other than 0 Hz and that means that the impedance is not infinite, hence a current flows. <A> Assume that you are sending repetitive rectangular pulses at frequency \$f\$ to the capacitor as seen below. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You are not sending a single sinusoidal at frequency \$f\$. <S> But sinusoidals at frequencies \$f\$, \$3f\$, \$5f\$, \$7f\$, \$9f\$, ... <S> If you guarantee that the sinusoidal with the frequency \$f\$ can pass the capacitor without distorting (i.e.; \$\frac{1}{2\pi f C}\ \!\! <S> << \!\! <S> R\$), the others will pass even easier. <A> Your statement that "charge carriers don't change direction is not true. <S> For you to see this more clearly, use a battery of 5v and connect a DC supply that provides + and - 5v. <S> When the supply provides +5v, the total will be 10v <S> and when the supply provides -5v <S> the total will be 0v . <S> From the point of view of the capacitor, it sees a signal changing from 10v to 0v to 10v... etc. <S> but from the point of view of the 5v battery, it is providing 5v bias and an AC signal that goes from +5v to -5v
That's how DC pulses pass the capacitor in a correct circuit design.
How to get equal number of clock cycles before ISR on an AVR While writing a time critical piece of code for an Attiny13, I figured I could use the rising edge of an input as a trigger to read in some self clocking data . However, the number of clock cycles needed to go into the interrupt routine differs depending on the instruction being executed at the moment. How can I ensure the time from rising edge interrupt until start of the interrupt routine is always the same number of clock cycles? Except for the interrupt routine there's no code running at the moment, so maybe there's a way to loop with a single instruction in the main code? <Q> One option would be to have two triggers, the first causes the code to jump into a loop waiting for the signal to go low and then back high. <S> As soon as the signal has gone back high, then start clocking the data. <S> Something like: while(PINREG & (1<<PORTBIT)) <S> ; //wait for lowwhile(!(PINREG & (1<<PORTBIT))) <S> ; //wait for next high//Clock in your data here... <S> In that code, the two while loops should simplify to branch when bit in register is set (or clear), which means that every 2 clock cycles it would check the trigger bit, and once the second edge was found, it would start with a predictable latency. <S> The latency would however be +/-1 cycle depending on where the rising edge occurred with relation to the clock, but this would be the case in all scenarios as the signals go through a clock synchronised in the I/O chain. <S> If your data symbol rate I less than ~F_CPU/4, then minor variation in latency of the above shouldn't be an issue. <S> Any faster than that <S> and you probably wouldn't be able to process in <S> anyway - no time to actually do anything with the data as you clock it in. <A> This then clocks a D type flip flop and if the D input was set (meaning a pending interrupt) then the output from the D type becomes the "new" interrupt edge. <S> It all depends on your ability to flag readiness. <A> I think you can spin in an infinite RJMP loop waiting for the interrupt. <S> RJMP always takes 2 cycles, so you should have less than 2 cycles of jitter between the pin change and the entrance into the ISR. <S> To kick out of the RJMP loop, the ISR can pop the return address off the stack and then jump to the next state.
You could also use the Timer to generate an interrupt to time out of the RJMP loop. Maybe you can flag readiness to accept an interrupt from within your code.
Brown Out Problem in Raspberry Pi Over Power Tether Cable I am in the middle of making my own ROV with six DC motors as the thrusters. The main controller inside the ROV is a microcontroller that is connected to Raspberry Pi that can send and receive control command over TCP. Power and control from-and-to the surface is established using tether cable which consists of power cable and Cat-5 cable for ethernet connection. The power transmitted is 36V with maximum current rating of 20A. Inside the ROV, the transmission voltage is converted to 12V for motor usage and 5V for other electronics (microcontrollers, Raspberry Pi, other sensors). The problem is every time I start the motor, Raspberry Pi seems to be browning-out (flickering power indicator) and then turned off. I have tried using separate source (e.g. battery) for the 5V devices and it works seamlessly. Do you guys have any solution to this? I have thought about using optocoupler, but then again the power came from the same source (tether cable) so I thought it will result in the same way. The best that I can think of right now is to find isolated DC-DC converter for the Raspberry Pi. Thanks! Edit:I made my own driver, which consists of a single NPN transistor (TIP142) acting as a switch.The motor will draw around 7ATo convert 36V to 12V, I use this http://www.ebay.com/itm/DC72V-36V-48V-60V-to-12V-240W-16-20A-converter-Electric-Storage-Battery-car-/221381653107?pt=LH_DefaultDomain_0&hash=item338b5ff273 .As for the 12V to 5V converter, I 'm using Turnigy UBEC 5A <Q> The problem you are experiencing is due to the resistance of your umbilical. <S> You have a transmission line. <S> The \$I^2 R_{Cable}\$ losses are eating up your power. <S> Measure the voltage and current at the terminals of your motor. <S> As I increases \$V_{Load}\$ will decrease. <S> There might be enough voltage to start at no-load (especially if rov is out of water - pushing air) but as current increases, voltage drop to wire increases, which explains your observed characteristics. <S> Solution would be to send ac at a higher voltage to rov, step it down in the rov and drive motors. <S> Edit... <S> Or increase the gage of your power feeder cable as suggested by: Tether - Power and Voltage Drop Examples . <S> It really depends on your current. <S> 6 motors can draw a lot especially going from locked rotor to full speed. <S> 20A is a lot depending on length of your umbilical. <S> Look up resistance of wire from AWG (American Wire Gage). <S> They have R/100ft. <S> Multiply it by your tether length <S> * 2 / 100ft. <S> The 2 is because you have to get current to load and back. <S> Think about number of pins on a lamp. <S> Or you can also calculate resistance. <S> $$R_{Cable} = <S> \frac{ρ l}{A}$$ρ = <S> 10.37 Ω CM/ft, l = <S> 2 <S> * length of your umbilical, A in CM from AWG. <S> $$V_{DROP} = <S> I R_{Cable}$$ Components of an ROV system <A> Make sure that the ground wires are connected appropriately. <S> In other words, simply move the +DC wire that feeds the Pi and other stuff away from your tether power supply and connect it to a battery of the appropriate voltage. <S> You can then troubleshoot the problem, looking for ground-related problems (ground bounce), voltage sag from the tether power supply, etc. <S> You will want to use a DSO to capture any sags. <A> DC-DC converter, especially if it's a buck-boost type, seems like a good idea. <S> If your internal grounding is suitably "star" shaped then I wouldn't expect too many problems with return current and therefore it may not be necessary to isolate it. <S> You could try the usual EMC solutions: <S> Pi in a metal box, ferrite chokes on its power and data leads. <S> You could also add more capacitors to the Pi power supply to smooth glitches. <S> If you have an internal datalogging/telemetry system for things like system temperature, add "tether voltage" to it <S> so you can assess the impact of running the motor.
The easiest way to troubleshoot this problem is to add an internal battery to power the Pi and anything else that might be affected by a brownout.
If Li-Ion battery is deeply discharged, is it harmful for it to remain in this state unused? It is well known that Li-Ion batteries should not be deep discharged. But sometimes they do discharge deeply. Is it OK for the device to remain in such state for a long time (and recharge again only when the device is needed again after a year) or it should be charged back as soon as possible? In other words, the battery was discharged deeply. Now I need to know the best way to prevent further damage to the battery. Should I recharge it immediately or leave it in a deeply-discharged state until I need it again? Does deeply discharged battery have higher or lower self-discharge compared to normally charged battery? <Q> No, it is not OK to have a Li-Ion deeply discharged at all. <S> Here is why:When discharged below its safe low voltage (exact number different between manufacturers) some of the copper in the anode copper current collector (a part of the battery) can dissolve into the electrolyte. <S> The copper ions (atoms?) <S> then in turn can stick on to the anode during charging by chemical reduction and cause dendrites. <S> The dendrites might cause a short circuit inside the battery. <S> So basically discharging too much is as bad as charging too much. <S> But the dendrites caused by overcharging is formed out of lithium. <S> Normally the battery pack should have some sort of supervisory circuit that disconnects the cells from the charger or load when the cells are above or below the recommended voltages. <S> Question 2: <S> Does a deeply discharged battery have higher or lower self-discharge <S> compared to normally charged battery? <S> A deeply discharged battery might have a higher self-discharge due to the above mentioned damage. <S> From what I can see in the data sheet provided by a large manufacturer (under NDA) <S> the best relative (%) capacity retained is at somewhere around 50% charge and at low storage temperature. <A> Bigclive says there won't be any internal short circuit before the cells have been reverse charged to -12% which equals to about negative 2 volts. <S> It will grow nasty copper spikes if the cell gets pushed beyond -12% (-2 V), then it's dead-dead. <S> The research he found <S> The main concern is with series connected cells: they're not perfectly balanced, so when one goes flat the others will reverse charge it and potentially kill it or at least weaken it. <S> Of course, they're not going to be happy about being drained to 0. <S> This just says that it's a lot less worse than what was previously believed. <A> Deeply discharged Li-Ion won't last a year, especially in storage where large ambient temperature changes are possible.
It is recommended to store Li-Ion half-charged, to prevent "overcharged state" (i.e., when fully charged cell cools down to below 0C).
Spreading of a pulse in time domain I have a small doubt. Suppose I transmit just 2 square pulse with frequency of 100 MHz over a wireless channel, will it spread in the time domain when received by a wireless receiver. In other words, a 100 MHz square pulse will have a High for 5ns, and then low for next 5ns and then again a High for 5ns. At the receiver, I receive the same pulse attenuated and which looks like a guassian distribution. But will the difference between the 2 peaks be still 5ns or it may change? <Q> Simon is right except there is one more assumption required. <S> If the transmitter and receiver are moving toward or away from each other, then Doppler effects will cause the pulses to be closer together or farther apart in time. <S> One other kind of weird thing to consider. <S> The channel between TX and RX could be time varying. <S> The propagation speed of EM waves depends on the dielectric properties of the space in between. <S> If a large dielectric solid material was somehow inserted between TX and RX after the first pulse, then the second pulse would be substantially delayed due to the slower EM propagation in the dielectric material. <S> I don't think it is possible to do this in the space of 5ns, but since I don't know what your final application is, I thought I would mention it. <S> Other things like humidity or rain or snow can have an effect also, but normally these are not high-speed processes. <S> I suspect multi-path will be your biggest problem. <S> You will need to look into some kind of correlation detection scheme. <S> Also, you will have a hard time getting approval from FCC or similar agencies. <S> In other words, have fun experimenting, but don't think you are going to market a product in the developed world based on broadband pulse transmission unless you are willing to go through a lot of trouble. <S> One last thing. <S> The shape of your received pulse will depend somewhat on the channel bandwidth, which will depend on antenna bandwidth. <S> The more bandwidth your antennas have, the closer the RX pulse will look to the TX pulse. <A> At 5 nsec between pulses, that's a pretty good bet. <S> What can happen, though, is that the pulse shapes at the receiver can change. <S> There are at least two reasons for this. <S> Keep in mind that a square wave at 1 MHz will contain the harmonics of 1 MHz (2 MHz, 3 MHz, 4 MHz, etc) with differing amplitudes. <S> The first effect is that the absorption rate of the atmosphere can and does vary with frequency. <S> This will cause the square wave edges to become increasingly rounded with distance. <S> The second effect is dispersion, and this will cause the harmonics to propagate with different speeds, again distorting the received waveform. <S> For short-range wireless signals, neither effect is important. <A> If the transfer system is time invariant, the time between two events in the output is the same as the time between the events that caused them. <S> A wireless transmission channel is time invariant, so that is given. <S> The receiver needs to accurately identify the events though. <S> If the wireless channel has two paths of different length, the receiver sees an "echo", and needs to distinguish that from the signal received for the next pulse.
Strictly speaking, the time between pulses will not change, at least as long as the nature of the air between the transmitter and receiver do not change appreciably during the interpulse interval.
Is the design decision for different frequencies in PAL and NTSC related to the AC mains power frequency? In discussion a friend mentioned: In the original implementation of PAL and NTSC they used the AC current as a means providing the frequency for the TV. As the different mains had different frequencies, they designed the TV standard to have different frequencies. I wasn't sure about this so I wanted to check. My question is: Is the design decision for different frequencies in PAL and NTSC related to the AC mains power frequency? <Q> Yes, it is related. <S> In early TV implementations, it was not easy to remove all of the AC line ripple from the DC power circuits that drove the CRT, and this resulted in a slight variation in intensity from top to bottom. <S> It was found that if the vertical frequency of the TV signal was the same as the power line frequency, these intensity variations would appear in the same location on every vertical sweep, effectively causing them to "stand still" on the screen, and this was much less objectionable than having them drift up or down. <S> There are also sources of RF noise that are related to the power line frequency, and the visual artifacts caused by that kind of noise also stand still on the screen. <A> PAL and NTSC are colour encoding systems and are not necessarily related to horizontal and vertical scan frequencies. <S> With the power line frequency and vertical scan frequency <S> the same, any such disturbance would be stationary on the screen, and so would be less noticable than if the disturbance was rolling through the screen, as would happen if the frequencies were different. <A> Dave Tweed's answer is largely correct. <S> But it wasn't just AC ripple on the DC power circuits that caused the variation. <S> The signal cicuits in early TV used tubes (a.k.a. valves). <S> The cathodes usually had a heater filament that was often driven by low voltage AC (typically about 6 V). <S> This caused the temperature of the cathode, and consequently the gain of the tube, to have some variation at twice the power line frequency (the heater power varies with the square of the AC voltage, hence the doubled frequeny).
The choice to make the vertical scan frequencies the same as the local power line frequency was to make the picture disturbance due to poor power supply filtering, and power current magnetic fields less obvious.
Is there a simple way to diffuse the light of a "super bright" 5mm LED? I want to put yellow leds inside the turning-signal cases used in motorcycles. The problem is: since the case is not deep enough, when I look from far I can only see the focused, pin shaped LED sources (two, in my case). The leds I am using are like these: As I see it, the case from the motorcycle turning light is supposed to receive the an incandescent lamp, so the internal diffusions gives its whole area the same brightness as seen from far away. So my question is: how should I "unfocus" these leds (which I already bought, by the way)? Possible options would be: Cover the led "lens" with some "cap" made of a diffusing material (semi-transparent glue?). Possible problem would be loss of effective luminous power? Paint the led lens with some suitable diffusing paint or material? Sand the led lens surface, so as to scatter the light? Reshape the so that it distributes the light in more directions? I know I could try every option myself, but I imagine this is not a rare situation, so perhaps someone has already done something about it. <Q> A total internal reflection lens with no direct path from LED proper to subject, or a Fresnel lens based "diffuser" will do what you want. <S> See below. <S> Cheaper, easier, maybe good enough: Wide angle through hole LEDs are often referred to as Top Hat or Straw Hat LEDs due to their shape. <S> The die is close to the external face and the package is often blunt ended to obtain the required radiation tpattern. <S> You can get substantially LESS directionality from a typical existing epoxy encapsulated through hole mount LED by simply cutting part of the top off so that the end is "squarish" and closer to the die. <S> In this case, cut off probably all of the domed part and some more. <S> You can round the edges but this will probably not be necessary. <S> Practice on a cheap LED first :-). <S> Commercial "straw hat" wide-angle LED. <S> Wide angle domed orange Fresnel add on lens for 5mm through hole LED. <S> Data sheet - brief <S> Pricing - in stock in 1's $1.04 <S> In stock Digikey in 1's Squarer Fresnel for 5mm surface mount LED Dimensions Data sheet - poor <A> You should try sanding. <S> Rub a fine sandpaper (such as 400 grit) all over the lens of the LED until it looks opaque or covered in white dust. <A> The way larger encasements do it is by using a small conical mirror right in front of the bulb to reflect almost all of the light back on to the larger concave mirror. <S> ( Example ) <S> We can use this same idea in a smaller way: use a small M&M-sized piece of aluminum foil placed directly in front of LED (glued to inside of translucent cover) to reflect focused light back to the source, and more foil around the led to spread out the light. <S> As long as you can open up the encasement, it should work regardless of the size.
TIR or Fresnel lenses are available which will convert almost anything to anything - including light from narrow angle through hole LEDs to very wide angle radiation. Go down too far and you risk interfering with the LED proper - but you should be able to tell how much you can probably safely remove by examination. This approximates a "top hat" or "straw hat" LED. These are available commercially at from about $0.50 from western suppliers and for much less for identical product from Chinese suppliers.
Measuring a voltage that is higher than your reference voltage Question: How to measure an input power rail? Let's say I want to build a circuit that switches in a load that draws 1A from a 5V power rail (that is the supply for the device) and then measures that rail to see if it droops and if so by how much. This seems like a chicken and egg problem as you obviously can't use the 5V as a reference. I have little practical experience with ADCs but suspect that if this is solvable a band gap reference will play a part. Is there any way to do this? <Q> Suppose you have an ADC with a reference equal to the supply voltage you're trying to measure (5.0V in this case). <S> If you use an LM431 shunt 2.495V reference (that's a cheap one, there are ones with much tighter tolerances available) with a resistor you can calculate the supply voltage. <S> Call the 2.495V input <S> Vx <S> Since (for a 10-bit ADC) <S> ADC_count = 1024 <S> * Vx/Vref, we can calculate Vref = 1024*Vx/ADC_Count. <S> This will give a result with 9-bit resolution (accuracy will depend on how accurate your Vx is). <S> So if Vx = 2.490 and your ADC_Count is 0x212, then the supply voltage/reference is 4.81V. <S> If you don't like having to calculate the reciprocal, you can operate the ADC with a reference that is regulated and divide down the supply voltage so that is within the ADC range. <S> This would also give more resolution if you don't divide it as much as 2:1. <S> You can also connect the LM431 with two resistors to give you (say) <S> a 4.0V <S> nominal Vx, which will also improve the resolution. <S> Or use another reference with a higher output voltage (4.096V references are available). <A> If I understand the question correctly, it's desired to measure the same supply rail from which the ADC is powered. <S> (?) <S> Create a stable reference voltage <S> V 2 <S> < V cc , but not use it as a ADC's voltage reference. <S> Use V cc as ADC's voltage reference and measure V 2 with respect to V cc . <S> If V 2 is stable and V cc is dropping, the ADC measurement for V 2 will increase. <A> The droop measured in volts when 1A is drawn is numerically equal to the output resistance in ohms of the 5V supply; for a regulated supply that will likely be a few milliohms. <S> If the 1A load is continually switched at a low frequency the task can be done by measuring the peak-to-peak voltage swing on the supply, which can be done with highest accuracy by an ac coupled scope or a synchronous detector.
One common solution is to measure a stable reference voltage V 2 with respect to varying V cc , rather than deriving a lower voltage from varying V cc and measuring it with respect to stable voltage reference.
Detecting HI-Z state of charge controller I have been building a Li-Ion charge controller with MCP73831 . The STAT pin has 3 states as shown below: The circuit I come up so far is this: Is there a way to detect the HI-Z state with another transistor and an LED? <Q> The best way to measure the Hi-Z state is to hook up a voltage divider to the output. <S> When the output is not being driven, the voltage will settle at the potential set by the voltage divider, which provides you with a third voltage to measure. <S> Distinguishing these three voltages using transistors is tricky, and probably not worth it - using an MCU, or failing that, window comparators, is a better solution. <A> I'm reasonably new to circuit design, but was struck with the same problem in that I did not want to put 5v on my 3.3v MCU. <S> I also wanted something that did not draw much current. <S> I then took STAT and put it through a simple inverted to ensure it is within the MCU 0v - 3.3v range. <S> Note: <S> Weaker Pull-up and pulldown resistors could probably be used to even further reduce current usage. <S> For this to work, the MCU would then need to take 2 readings, the first with CTL low and the second with CTL high. <S> If the readings change, then ~STAT must be floating. <S> Hope this helps everyone. <A> I don't think so. <S> You cannot know the potential of your hi-Z output, as it is is tied to no potential. <S> If you look at page 2 in the datasheet, you see that the output pin is driven by two mos-fets that are leading to the high impedance output. <S> The voltage at 'IN' will be anywhere between Vdd and Vss. <S> Thus, there might be a different voltage, every time the Output is switched to hi-z. <A> Use R and 2R resistors. <S> R can be 1.8k, then 2R is 3.6k. <S> Wiring:VCC--[2R]--A--[R]--SIGNAL--[R]--B--[2R]--GND (A XOR B) <S> = <S> /(SIGNAL=="Hi-Z") <S> If SIGNAL==Hi-Z, A is 2/3VCC (logical HI), B is 1/3VCC (logical LO).Please continue... <A> You could try the following configuration. <S> It shows one LED for high, the other LED for low and both LEDs (slightly dimmer) for Hi-Z. Check that your input voltage is enough to turn both LEDs on in series. <S> You could also consider making the resistor a higher value if you have particularly bright LEDs, to avoid dissipation in the charger IC.
As an alternative to the voltage divider that others have suggested, I used a second GPIO pin of the MCU to toggle a pull-up / pulldown resistor using a P-Channel and N-channel MOSFET (see circuit below).
What is the difference between a solid state relay and a transistor? Along with the difference between a solid state relay and a transistor, I'm also interested to know if there are transistors that act a lot like the typical relay modules you can find on ebay (where you only need a 5V signal from the microcontroller to toggle the state of the transistor...) A lot of transistor datasheets I've seen so far have wildly different saturation specifications (where the collector/emitter value is highly influenced by how much voltage is applied to the base), but this saturation idea doesn't really apply to a electromechanical relay... https://www.fairchildsemi.com/datasheets/2N/2N3906.pdf https://www.fairchildsemi.com/datasheets/TI/TIP31A.pdf Doing a search on Digikey's website for solid state relay gave me a list of components that all have input voltages close to 1.25 V... Am I correct in believing the solid state relay is a lot like what I just described? <Q> One essential feature of a relay, solid state or not, is that the input and output are isolated . <S> In practise this means optical isolation in the SSR (solid state relay) case. <S> In contrast, ye olde phashioned mechanical klunkety-klunk <S> relays are magnetically isolated. <S> One could conceivably make a solid state relay using magnetic isolation in various forms too, but optical isolation makes more sense for the requirements. <S> So solid state relays are more than just a tranistor, triac, or whatever is used to perform the actual switching. <S> They have an isolated input that then ultimately controls the solid state switch. <S> In practice, this usually means at least a LED and phototransitor in addition to the switching element. <S> That is all packaged together and called a Solid State Relay. <A> There is another major difference between a transistor and an SSR. <S> SSR is an on/off device, <S> current either flows or <S> it doesn't. <S> A transistor CAN be used as a switch, but in many cases, it operates as an amplifier, ie an extremely small current through the base allows a much larger current through the collector (assuming bipolar transistor). <S> Bipolar junction, MOSFET, JFET, etc... <A> The short answer is no. <S> An SSR is typically optoisolated. <S> This means that the input is, for all practical purposes, an LED. <S> It may have a current-limiting resistor included. <S> The light from the LED then drives the switching element. <S> This may be a MOSFET with an optically active gate, or a triac, or it may be a photosensitive driver circuit which then drives a triac or thyristor.
There are actually many different kind of transistors!
How to detect reverse-polarity post-mortem? Original - Apr. 13, 2015 There are many questions here about preventing reverse-polarity, most of them ending up with a series FET that is driven by the opposite supply rail: (shamelessly stolen from Russell McMahon's answer here ) However, I'm working on a product that has this: simulate this circuit – Schematic created using CircuitLab (parasitic diodes shown for clarity) So the idea here is that when Customer returns a unit because "Stuff" no longer works, D1 can be inspected to see if the polarity was reversed. Not the way I would have done it, but that's how it is. Unfortunately, D1 has a tendency to survive unharmed according to my post-release bench tests. It's presently a 1N914 in a SOD-523 package subjected to a ~0.6 Farad capacitor at ~12V. I've looked at: A different diode. They all seem to share the same or very similar V-I curve, which according to a 'scope capture (1) allows the peak voltage to forward-bias the big FET diodes and save D1. Diode + fuse. Seems promising: diode protects fuse during correct polarity but blows it when incorrect, and requires minimal changes to the PCB layout. But again, it needs to win a race with 2 FET diodes in series by enough margin to blow the fuse, and low-voltage/high-current diodes are hard to find. If my parts order gets through, I'm going to test this in a few days. NFET protection as shown up top, instead of detection. Superiors didn't want to change the circuit that much and thought it would cause too much running loss. I just finished measuring M1,2's Rds_on and they didn't like those numbers either. Everyone seems to be okay with the idea of letting Customer blow up his unit and us detecting what he did, so I guess I'm just looking for a cheap, reliable way to deny a warranty claim. Comments, suggestions please? (1) 'scope capture of V_D1: 500mV/500us per division, yellow and green traces are directly on either side of D1, mechanically switched with resultant sparks, exponential decay following this Added Apr. 14 2015 Thanks everyone for the quick replies, but I would like to remind you that reverse-polarity protection has been rejected by my superiors because it's "too different from what's already there" and/or "too lossy". Personally, I would much rather do that than post-mortem detection , but that's what I'm stuck with. Sorry guys. Basically all I can do is replace D1 with some collection of 0603-ish or smaller components to make something that is easily identifiable if it was ever powered backwards. There are schottkys and there are fuses in that size, and it looks like I'll have an assortment of them later this week, but I'd also appreciate a backup plan and I'm almost drawing a blank right now. My other idea is a FET-based fuse-blower, but I can't think right now of how that would work. Depletion-mode FET, perhaps? Added Apr. 15 2015 Okay, I got my parts, did some testing, and I'm a bit puzzled now as to why it doesn't blow the fuse. According to my 'scope: (okay, so I didn't hook it back up EXACTLY the same way, but the same information is all there) Ground->Yellow(1) is across this diode Yellow(1)->Green(2) is across this fuse (the 62mA version) Pink/Purple is a math function to read the fuse voltage directly: ~0.5-1.0V and it isn't fusing Diode + fuse in series directly replaces D1 in my original schematic This test is only the last in a series of reverse-polarity zaps using my ~0.6 farad capacitor recharged to ~12V each time. The fuse measures ~2 ohms afterward and has no visible damage. So, with that being the smallest fuse that I found on DigiKey, and the diode having one of the lowest forward voltages at a decently high current, I'm not so sure that the whole diode+fuse idea is going to work at all. At least not with ~1.0-1.5V as clamped by the power FETS M1,2. I've also thought some more about the depletion-mode FET idea, and I think that'll fail in the correct polarity by becoming a constant-current source through the fuse. If that idea is going to work, I think I need an equivalent to a FET but with an inverted response to the gate voltage. Enhancement and depletion mode have the same polarity of response in that "towards the drain voltage" turns it on, but the offset is different so that the E-mode is default off and the D-mode is default on. This idea needs a depletion FET with an inverted/reverse response in that "away from the drain voltage" turns it on, which I don't think exists. Dwayne Reid's idea of a series fuse is becoming more attractive now, even though it violates the requirements of how I'm allowed to modify the circuit. But before I call it impossible and say that we have to do that, does anyone have another idea to quickly, reliably, and permanently detect -0.7V or so and ignore +0-50V? <Q> Schottky diode- <S> a hefty one such as this . <S> The 1N914 can't conduct enough current to protect the MOSFETs. <S> There are cheaper 10A ones- do a parametric search. <S> But it would be nicer to use a series MOSFET (or a unipolar TVS and a polyfuse) and protect the product against reverse voltage. <S> Every customer who has a warranty claim denied is a potential source of a lot of bad publicity, even if it was entirely their negligence that caused the issue. <A> The 1N914 has fairly high voltage drop at high current (~1.4V at 800mA) so it probably won't keep the reverse voltage down low enough to prevent damage to other devices. <S> I would replace replace D1 with a Schottky type (eg. <S> PMEG2010 ) which should conduct at lower voltage and higher current than the devices needing protection. <S> You could combine this with a regular fuse, a polyfuse, or even just a narrow PCB trace that blows out at high current. <A> How about a large fuse in series with the power supply input? <S> If they blow that fuse, then they did something bad. <A> I think I'm going to give up on this and declare it to be impossible with present technology as I know it. <S> There may be a solution, but it's not worth chasing anymore. <S> I've upped the ante to 2.5 farads, nearly 25 volts, and a much bigger switch, and all I did was make a bigger spark. <S> Every detection scheme that I tried survived except for one diode+fuse arrangement that then survived when the fuse was replaced and zapped again. <S> For your viewing pleasure: This was 2.5 farads at 22 volts. <S> The black thing in the foreground is a magnetic DC current probe. <S> The diode+fuse showed no sign of stress. <S> Typical 'scope shots: <S> These were two different diodes, one chosen for low forward drop, the other for high current, both in series with a fuse. <S> The high current one didn't even power the fuse. <S> Using the low-drop one, I suspect that the fuse increases resistance as a thermal function so that it requires more voltage than my setup allows to burn a 62mA fuse. <S> The current probe goes non-linear at super-high current, which probably explains the kink in the middle of the blue trace. <S> It's measuring the total current <S> , the vast majority of which is taken by the FET diodes M1,2. <S> So I guess there are two morals here: <S> Reverse-polarity detection for a bipolar driver is probably not worth the effort. <S> Electronic prevention might be viable, depending on whether the extra IIRds_on of a FET is acceptable. <S> Fuses are not magical short-circuit devices that simply pop when the current exceeds their ratings. <S> They have resistance ( <S> ~2ohms cold for this one), which causes them to heat up. <S> Heat causes the resistance to rise, which lowers the current when fed with constant voltage. <S> Only if the temperature crosses a certain threshold does it actually burn up and open the circuit.
I would go with a surface-mount fuse that is sized not to blow until the FETs are about destroyed.
Why is the rectifier necessary in this circuit? I asked a previous question about this circuit: I am fairly confident that I understand why the transformer coil only sees something like 2V. What I am now unsure about is why the rectifier is needed in the first place. From what I understand, if the rectifier is removed, there will still be a small voltage drop over the coil of the transformer, with the rest going to the load. So what does the rectifier actually do here? <Q> You have to consider that the load (the motor?) may go into a stall condition and without diodes you can't limit the 6V AC voltage. <S> If this rises to say 20V AC, the output from the secondary (called 120V AC) would be stepped up by the turns ratio of the transformer. <S> The turns ratio is 120/6 = <S> 20 <S> so, with an unrestricted 20V AC fed into the 6V winding, the output voltage would be 400V AC. <S> It could be more under stall conditions. <S> It could fry the relay (K1) <S> , destroy the diodes D2 and D3, explode C2 and fry the transformer due to core saturation. <A> A big part of this project is that these are "parts on hand" or parts you can get at a local electronics store (possibly in bankruptcy) with poor part selection. <S> A couple of parts are being used in non-conventional means, and are referred to in their original purpose. <S> Bridge rectifier D1 is effectively functioning as a current shunt. <S> As long as current is flowing through the diodes, you will get a 1.2V AC drop, roughly independent of the magnitude of the current. <S> An alternative would be to use just a resistor, but that would decrease the power available to the tools, waste a lot of power, and give a variable amplitude signal. <S> The transformer is listed as a 6VAC to 120VAC transformer, but again, that's just what you'd look for when you're shopping for parts. <S> In reality, it is a voltage transformer with a 20:1 turns ratio (120V/6V). <S> It's wired "backwards" to give a 1:20 ratio, meaning that the 1.2VAC signal generated by the diodes on the primary will result in roughly a 24V signal on the output. <S> Note that the transformer is connected across the bridge rectifier, so it only "sees" 1.2V, not the full 120VAC provided by the wall outlet. <S> On the secondary of the transformer, the AC signal is now rectified by D2, and turned into roughly 10V DC by C2 and D3. <S> When the tool is running with enough current, this should result in sufficient voltage to activate the relay. <S> Below is a CircuitLab model of the system that you can simulate to see what's going on. <S> The saw is switched on at t=0.1s, and the vacuum will switch on shortly after that. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Here is the simulation waveform. <S> I have hidden the Line voltage, as it is a regular 120V AC signal. <S> I ended up getting about 2V across the diodes mainly due to the diode model selected, so the voltages are a bit higher. <A> The rectifier limits the voltage over the 6V secondary of the transformer (misused here as primary) to ~ 1.2V (assuming it is a Si rectifier) so it doesn't have to take all the current. <S> You can think of a transformer as an 'impedance transformer'. <S> In this case the impedance at the 120V side will probably be rather high, so the trasnformed impedance at the 6V 'primary' will be ( sqrt( 6 / 120 ) <S> * high ) <S> (or was it pow(), I don't recall for sure) which is still high :). <S> But a high impedance in series with a load is not a good idea, hence the diodes are added to provide a low-impedance path in parallel, while still giving enough voltage to the transformer esction to do whatever it is supposed to do (what is that K for?)
D1 (the bridge rectifier) protects the transformer 6 volt winding from receiving a voltage that could be tens (or maybe hundreds) of volts from "line in".
Arduino resetting/hanging due to sparks in ac line This is the PCB design of the project I have been working on recently (my first pcb design). The idea is to control ac appliances (fans, bulbs etc) without relays. I am using triacs which are better than relays for such applications. I am using opto-isolators for complete isolation from ac lines. I tried running the arduino using USB cable connected to my laptop (with charger unplugged) as well as wall adapter (12V). At first, circuit seemed to work fine. I was able to dump the code into the controller and control bulbs (On/Off as well as dim them) using UART. I sent the commands via UART.However it seems that whenever there is a spark on the ac lines (when I plug in/out a fan), the micro-controller doesn't look happy. Sometimes it resets (which is the better part of the picture) and other times it hangs and I am unable to send commands via UART. I am not sure whether burnt code gets affected as well but sometimes I had to re-upload the code. If I switch on/off a fan in other room, there is no effect. Possible issues: 1) Absence of ground plane on the PCB. 2) Some sort of EMI due to sparks. I also tried plugging in a water heater (800 watts resistive load) the same way as fan but nothing happened. So, I think it's the inductive load which is giving problems. Any constructive solution for this issue will be very much appreciable. Thanks. <Q> You should respect your voltage isolation. <S> The way you have placed (and routed) resistors R16, R13 R10, R2, R31, and R4 compromises the isolation barrier created by your opto-isolators. <S> Below I have marked your existing layout with your isolation path, which is fairly poor: <S> Have a single isolation zone that is as wide as possible <S> (the width of your opto-isolators). <S> Keep line circuits on the line side, and isolated circuits on the isolated side. <S> See image below for suggestions. <A> You didn't show a schematic, but I don't see any obvious bypass caps or local on-board power supply reservoir caps. <S> That and lack of good grounding is quite likely causing the problems. <S> As others have said, you should also leave proper isolation distance between the AC and DC sections, and at least try to make somewhat of a ground plane. <S> You have a large board with few components and large pin pitch, so routing most traces on the top layer should be fairly easy. <S> You will occasionally have to go to the bottom layer becase <S> in general a circuit can't be routed in a single plane. <S> However, you can keep the traces on the bottom layer short. <S> Consider them as "jumpers" just long enough to connect two tracks on the top layer that you otherwise can't connect in a plane. <S> The measure of a ground plane is not how many islands it has in it, but the longest dimension of any island. <S> Keep the jumpers short and unclumped. <S> However, you absolutely must put a bypass cap on every power feed to every IC. <S> These should be small ceramic caps physically close to the IC with the overall loops as small as possible. <S> 1 µF 0805 is about right. <S> Not only will those be cheaper and perform better than the equivalent thru hole caps, but will be easier to solder too. <S> Since the DC power is coming from elsewhere and its impedance therefore suspect, put a decent size electrolytic cap right across where the power enters the board. <S> A few 100 µF should do it. <A> Ground plane, ground plane, ground plane and very few excuses. <S> Take a look how you could have done a lot of this circuit board: - I spent about 5 minutes marking (with bright red) blue tracks that could be red with hardly any brain work at all. <S> I'd scrap it and start again. <A> In my experience, set and reset lines, flip-flops, and other circuits, are very susceptible to "electrical noise. <S> In addition, gating/enabling input lines with a clock signal, will reduce the opportunity for "transients" to affect the circuits. <A> when i was working on DTMF based Load control project, i found the same issue with AC load. <S> Without AC load my 8051 Micro-controller circuit works fine. <S> When i power up the AC load, entire circuit behaves in variety manner when i switched ON/OFF the AC load through relay circuit. <S> Later i found that the ground pour on the 8051 board is not good. <S> Finally i replace the old 8051 micro-controller board with new 8051 micro-controller board with good ground pour. <S> Now its works fine. <S> Therefore, i thought that your PCB should have good ground pour.
" The best practical way to avoid unpredictable circuit behavior, is to decouple the power lines at each chip, with appropriate capacitors.
Is it possible to use 2 rotary encoders at once? I'm working on this project: http://www.corsaclube.com.br/viewtopic.php?t=102183 I'm basically installing an iPad mini on the dash of my new car, but I'm facing a problem:The iPad doesn't offer volume control when it's in Dock Mode and the head unit will be hidden behind the Tablet.I was thinking in solder a second and identical rotary encoder as a "parasit" on the original one for the volume control, so I install that second one somewhere handy on the dash. The rotary encoder my head unity uses isn't optical, it's the "clicky" one (same feel of the scrolling wheel on some computer mouses, sorry for my ignorance) Will it work? If not, how can I do that? <Q> It depends on how the first is configured. <S> If it connects the output to ground and uses a pullup resistor to hold the output normally high (or vice versa) <S> then it is possible to put a similar device in parallel. <S> The tricky part is finding a device that uses the same output encoding. <S> Some are pulse per detent, some are two pulses per detent. <S> Make sure that the new device matches the original device's encoding exactly. <A> What you want to can work <S> but you are going to have to do some cut & patch wiring. <S> The problem is that your existing rotary encoder has 4 possible states: 00, 01, 10, 11 <S> Where a "1" means the encoder has an OPEN switch contact and a "0" means that the switch contact is closed. <S> Note that I'm using active LO terminology because most encoders are wired with the switches to ground and pull-up resistors providing the "1". <S> If you were to simply wire the encoders in parallel, you have a 25% chance of the encoder on the head unit being in the "11" position and allowing your external encoder to work correctly. <S> I see two easy ways to fix this <S> but they both involve cutting the traces to the existing encoder. <S> 1) Use a 3.5mm stereo mini jack on the head unit and wire the existing encoder to the normally-closed contacts on the jack. <S> The jack Tip & Ring connections go to the circuit where the existing encoder used to connect. <S> Then simply connect your external encoder to a 3.5mm plug and connect it to the head unit when needed. <S> 2) Use a small microcontroller such as one of the PIC 12F family. <S> This controller has a total of 1- Input-Only and 5- I/O lines available. <S> The input and one of the I <S> /O lines goes to the external encoder, 2 more I/ <S> O lines go to the internal encoder, the last 2 <S> I/O lines go to the circuit. <S> Simply rotating one encoder or the other causes the microcontroller to switch to that encoder. <S> You'll have to decide what to do if both encoders are turned at the same time - personally, I'd simply ignore the external encoder in that situation. <A> At first I thought you could sum the two-digit binary outputs of the two encoders to combine them, using 2 bits from an adder like the 4-bit full adder <S> 74LS83 . <S> But the quadrature encoder outputs are actually in gray code, so that won't work. <S> You'll need a truth table like this instead: | 00 <S> 01 11 10----+------------ 00 <S> | 00 01 11 10 01 <S> | 01 11 10 00 11 <S> | 11 10 00 01 10 <S> | 10 00 01 11 <S> The table can be shifted without affecting the performance of the encoders. <S> Rather than building a custom truth table it may be easier to convert both encoder outputs from gray code to usual binary by XORing the second digit with the first: -->00 <S> | 0001 <S> | 0111 | 1010 | 11 Then use binary addition: | 00 01 <S> 10 11----+------------ 00 <S> | 00 <S> 01 <S> 10 11 01 <S> | 01 10 11 00 10 <S> | 10 11 00 01 11 <S> | 11 00 01 10 <S> And for output, convert back to gray code using the same XORing method: -->00 <S> | 0001 <S> | 0110 | 1111 | 10 <S> If you don't do this on a microprocessor, this takes 3 XOR gates from a quad XOR gate such as the MC14070B . <S> It may be useful to read the possibly noisy rotary encoder signals through single gates so that there is an agreement on their logical value. <S> To do this and to further filter noise you can add an inverting or noninverting quad Schmitt trigger such as the quad NAND Schmitt CD4093B . <S> You may need pullup/down resistors depending on how the rotary encoder is constructed. <S> Noise can be a problem in this approach, as summing the output of two rotary encoders doubles the maximum numerical peak-to-peak noise from 1 bit to 2 bits. <S> It may be better and easier to use a microprocessor to select for output one of the rotary encoders when both of its gray code signal lines have changed state since de-selecting it, indicating that it was rotated more than could be expected from a noise spike. <A> In general this may not be possible easily. <S> The usual mechanical encoder connection appears as two switches with a common connection. <S> Usually the common connection is connected to GND and the other two connections go to pullup resistors and to inputs on a micro. <S> The problem is that many encoders are not guaranteed to have both switches 'off' when they are at rest in the detent position. <S> I have specified some that do not have a guaranteed state on one of the outputs in the detent position (could be open or could be closed). <S> That allows looser tolerances on the manufacturing and will be more common on encoders with many pulses per revolution. <S> I suggest it might be easiest and most straightforward to wire a small DPDT toggle switch to switch between the two encoders. <S> DPDT is enough- <S> you can parallel the momentary switches (if present) <S> and the encoder grounds can be connected together.
When you pull the connector for the external encoder, the jack normals the internal encoder connections to the circuit and everything works correctly. Write some code such that any movement on either encoder passes those signals through to the circuit and ignores signals from the other encoder. This may confuse the device being controlled.