source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Practical Considerations of a Butterworth Filter I'm trying to design/implement a low-pass filter for the amateur 2M band (144-148 MHz). To meet FCC regs, I need harmonics to be at least 40dB down, so I calculated a 7-stage Butterworth Filter with a 175MHz cutoff. This gave me the following component values: L1, L3 = 56.70371 nH L2 = 90.94568 nH C1, C4 = 8.094927 pF C2, C3 = 32.77569 pF There seems to be a lot of information on the theory of operation of these filters both on here and on other sites, but I can't find as much on the practical implementation and component selection aspects. Given that, obviously, you can't buy components with those values, I'm picking "close" values, but I'm not sure to what extent that will affect the resulting filter. I now have: L1, L3 = 56 nH L2 = 91 nH C1, C4 = 8 pF C2, C3 = 33 pF Is there any way I can calculate/simulate what the curve for this filter will look like? Mostly I just need to calculate it at 144-148 MHz, and 288-296 MHz (the 2nd order harmonic) to make sure I'm not attenuating my pass band and that I am attenuating the harmonics adequately. Secondly, how can I determine the voltage and current ratings I need for the components? The transmitter is a mere 1W, which should be about 10V peak, and 200mA (50 ohm characteristic impedance) but I'm not sure if that holds true of the individual components in the filter. Finally, is there anything else I need to know in actually implementing one of these? Specific types of capacitors to use or avoid (currently planning on SMD ceramics) and the same for the inductors? <Q> Here is a calculator that you can use and it plots frequency/phase responses <S> AND it seems you can tweak the values: <S> - Here is another one. <S> Here is another <S> And another <S> I can't underwrite any of them <S> but there appear to be plenty to choose from OR <S> get LTSpice (now that's my main recommendation). <A> 1 - Get yourself a SPICE program. <S> Even a limited-functionality version will be able to handle this sort of thing. <S> You'll be able to enter the exact values. <S> 2 - That said, don't bother. <S> Your nominal values are as good as any. <S> At the frequencies you're working, nothing will behave exactly as you think it will. <S> Parasitics and construction techniques will be major modifiers of your filter response. <A> These are relatively narrow band signals, so the harmonics also have closely defined frequencies. <S> Form a lowpass filter with two notches at 2nd and 3rd harmonics <S> - these can be combined in a Cauer (elliptic) filter of lower order - less complex, easier to build. <S> Or given a suitable power stage, it may be possible to eliminate the 2nd harmonic by design leaving only odd order ( <S> primarily 3rd) harmonics to worry about. <S> Then a single notch at 432 MHz as part of a 3rd order Cauer filter will suffice. <S> (At lower frequencies, a push-pull amplifier cancels out the even harmonics <S> , I don't know if a similar approach works at 2m.) <A> I'm wondering why you picked the Butterworth configuration in the first place for such a tight requirement. <S> Only advantage of Butterworth that I can see is the zero passband ripple. <S> You can get very small to almost non-existent ripple with Cauer (elliptical) filters, for a simpler circuit order and maximal rolloff. <S> One other zero passband ripple filter topology is Chebyshev Type 2, possibly simpler, but I haven't played with it, yet. <S> To answer your question as to the topology and implementation of the circuit of the components you've calculated, and without further information as to your source of calculations, the components could possibly be placed in a ladder topology (aka Cauer topology) - the capacitors in shunt (ie parallel), alternating with the inductors in series, with \$ C_1 \$ leading, like so: <S> You may want to try a filter design program called Elsie , that has been written for the amateur radio community by a US radio amateur. <S> The free version of the program calculates a range of filter topologies up to a certain order, and is packed with a lot of nice features like a well-written tutoria-style online help, plotting of performance and schematic, 5%-value component substitution, editing of circuit schematic, Monte Carlo simulation, etc.; too many to list here. <S> You're also missing out on the fun of experimenting as a radio amateur <S> (I'm presuming you are one, by your first sentence) if you're not willing to try at least throwing up the circuit into a circuit simulation programme/ <S> s (already mentioned by @Andy Aka and others) to play around with topology and component values. <S> For an open source modelling and simulation programme, try SciLab . <S> 73s <A> @WhatRoughBeast is right, at those parameter values parasitics will be a big deal. <S> However, if you had rather think about doing things than actually do things here is an alternative. <S> You will need a model for your filter (state space or transfer function), which you had to have to design it (even if you didn't realize it). <S> You can use Python with the Controls System Library to analyze your system. <S> I wanted to mention this technique because 10 years ago this required a pricey Matlab license <S> so I think free is a good deal here. <S> There is a lot of functionality <S> in there, you could analyze parameter sensitivity, step functions, or whatever. <S> So many options you may never get around to actually trying it(don't do this). <S> You can also do all this in Spice, but the learning curve and design iteration time is steeper. <S> Here is a bode plot of 1/(s+1) low pass filter. <S> from control.matlab import *num = <S> [1]den = <S> [1,1]G = tf(num,den)bode(G)
| Consider simpler alternatives to butterworth.
|
What should the switch pin output of an SMPS look like on a scope I'm continuing to troubleshoot a broken SMPS. At this point, I'm just trying to understand what components are broken, working under the assumption that it saw a voltage spike as a result of input ringing . Here's what I'm seeing when I scope the switch pin (10uS/div, 1V/div): The FB pin is sitting at 200mV, output is sitting at 800mV, input is steady at 11.8V. Given this information, is it possible to guess what is broken? Is it the SMPS IC, the inductor, both? Circuit for reference: Switch for reference: http://www.ti.com/lit/ds/symlink/tps62125.pdf <Q> It is typically the power switches and control circuits that break. <S> The most common mechanisms are over-heating and over-voltage breakdown. <S> And especially considering your previous question , which suggests that you had \$V_{IN}\$ overshoot, over-voltage breakdown is quite likely. <S> When semiconductors experience over-voltage breakdown, they suddenly absorb a lot of power (often in a snapping, positive-feedback fashion), which causes damage. <S> As for the inductor, essentially the only way you could electrically break it would be to over-heat it until it melts. <S> The solder will melt long before that happens. <S> I suggest you swap out the IC and see if it works again. <A> The waveform that you show makes it seem as if both the chip and inductor are working fine. <S> So now you need to find out what the internal reference voltage for that chip is. <S> If I were home in front of my computer, I'd go to the chip website and look up the datasheet. <S> But I'm not, <S> so I'll calculate it from the voltage divider network. <S> Output voltage is supposed to be 3.3V. Feedback voltage divider is 1.8M & 575K. <S> A little bit of math shows that the reference voltage is 0.8V. <S> That happens to be exactly the voltage that you are getting at the output of the power supply. <S> Therefore, R17 is most likely open. <S> Note: it is possible that R16 is shorted but that is less likely. <S> [Edit] Upon reading the comments and re-reading the question, it looks as if the FB pin is supposed to be sitting at 800 mV but is currently sitting at 200 mV. <S> That means either of two possibilities: 1) the chip is in current-limit. <S> 2) the chip is defective. <S> Not sure where I'd go from here. <A> Okay, I'm going to take a stab at this. <S> Don't laugh, I don't do this much. <S> 200 mV on the FB pin is consistent with the given feedback divider, provided 800 mV on the output. <S> Based on the waveform on the SW pin, it would appear that battery voltage is being made available, and there is nothing attached to that pin to store it, so something in the 3.3 V rail is disconnected such that battery voltage cannot make it to the bulk capacitor. <S> Under the condition that VOS outputs Vref - I don't know why it should - with sufficient current to sustain the feedback resistor divider current, the most likely single point failure is that L2 is broken or disconnected anywhere in the line before it joins the VOS node. <S> I cite as evidence that it would appear that the SW peak to peak is receiving battery voltage - briefly - <S> and it appears that it is not connected with any significant source of capacitance. <S> Take an oscilloscope reading from SW to VOS to confirm.
| If you can reasonably guess that something is broken due to electrical overstress, the most likely candidate is the integrated circuit. I'm going to guess that R17 is open.
|
Can I use PIR + HC-06 Bluetooth Module without arduino to send events to Android? I want a PIR sensor to send a "something moved" event to Android. Can I use a simple PIR + Bluetooth module to send such an event?I was thinking that I could connect the PIR output (which goes 5V when movement is detected) to the TX of the bluetooth module, so that "something" would be sent to android (which has been paired before), which would read "something" from instream.read(buffer) Would this work? Is it ok to just put +5V on the TX of the bluetooth module? I would say that it would send garbage, but I'm not interested in "what" is sent, just the event that something was sent... <Q> Not with the HC-06. <S> The HC-06 is a specialized firmware for the CSR bluetooth module it runs on. <S> It lacks any options for GPIO, either from a master or to it. <S> There are other versions. <S> The HC-05 is even more limited. <S> A newer version known as the BC-04C or some variation on that now has a limited GPIO option, and can be run without a microcontroller host hooked up. <S> (Electrodragon, not affiliated) , but it has poor documentation. <S> See <S> https://www.youtube.com/watch?v=ExtMyV3fDLM or https://www.youtube.com/watch?v=KMUMnF0F4jE <S> Even so, you would need to setup the module at least once, with a microcontroller or a usb-to-ttl serial cable, and put it in Monitor/Collection work mode (input reading mode). <S> As for directly hooking up the PIR output to the TX pin , that can create garbage characters that might lock up the module. <S> I don't recommend it. <S> The easiest solution would be to use an Arduino clone, or ATTINY and make a quick sketch that involves reading an input pin, and sending a string via the TX and RX pins (software serial). <S> It wouldn't take much. <S> Edit: <S> A simple hack would be to use a device like a Bluetooth Selfie Stick button . <S> These buttons are a fully contained bluetooth with multiple digital inputs, and even a battery. <S> Add a transistor and a resistor and your all done. <S> There are apps that can configure what the button "press" does on the android side. <S> I may do this myself now! <A> The HC-06 module does not have the proper IO circuitry to communicate with android. <S> You would need a microcontroller to do that. <S> If you are worried about the size of the arduino you can use a Pic instead. <A> Not with that module, but if you get a different module designed to be a simple remote control (presentations, selfie stick remote shutter, erc) or keyboard (preferably non-multiplexed) <S> you may be able to rig the PIR output to effect a keypress using a transistor or gate. <S> Details would depend on the output characteristics of your unspecified PIR, and whatever the bluetooth module expects in the way of switch wiring. <S> Most micros with a moderately stable clock can transmit serial words, encoding them in software even if they lack a hardware UART peripheral. <A> Bluetooth Module HC-05/06 won't cut it. <S> No GPIO functionality on it. <S> Another option : <S> ZigBee/Xbee modules. <S> It has ADC/GPIO built in <S> and you don't need any controller on the TX side. <S> Connect Arduino on RX and parse the data received. <S> Simple and effective.
| Or yes, you can use a simple microcontroller to send through your serial bluetooth module.
|
LDO or Switching for 24V Input, 5V Output I have a 24VDC supply that needs to be regulated down to 5VDC to power an Arduino Mega and a XBee Series 2 module. How would you choose between a Switching Regulator ( LM2576T ) and a LDO Regulator ( LM3480IM3 )? I think 100mA is sufficient to drive the Arduino and XBee. <Q> Using a switcher instead of a linear regulator is a no-brainer without even doing the math. <S> Also a LDO specifically is silly, since your problem is that you have a very large drop range. <S> In case some still need convincing, let's do the math. <S> A linear regulator will drop 19 V, which times 100 mA is 1.9 W. <S> That's more than any bare package in free air will be able to dissipate and stay within operating temperature. <S> You'd need something like a TO-220 or TO-3 with a heatsink. <S> That is going to be big and expensive. <S> A switcher will be smaller due to not having to get rid of so much heat. <S> Let's say you get a buck regulator that is only 80% efficient (quite poor by today's standards). <S> The output power is 5 V x 100 mA = 500 mW. 500 mW / 80% = <S> 6.25 mW into the switcher, which means it will dissipate 125 mW. A SO-8 package or similar just normally mounted on the board can handle that kind of power. <S> You would be able to feel it being warm, but you wouldn't even burn your finger. <A> There is a huge difference between the input and output voltage, thats why I would go with the switching regulator. <S> The LDO dissipates the unwanted voltage, and it will heat your circuit a lot. <S> On the other hand, the switching regulator has a high efficiency (above 80%) and does not waste much power. <S> Especially recommenceded when there is a significant difference between input and output voltages. <S> Example from a datasheet(GSM module): <A> First, you need to think about what you're asking. <S> An LDO is a Low DropOut regulator. <S> See, for instance . <S> Now, "low dropout" isn't actually defined anywhere, but a good start is "functions normally with an input to output voltage drop of less than 2 volts". <S> Since you are asking for advice on a 24 to 5 volt regulator, with an input-output difference of 19 volts, asking about the utility of an LDO is not remotely useful. <S> Assuming that you mean "linear regulator" as opposed to "switching regulator", the other answers do an excellent job of answering your question. <A>
| In general a switching regulator is more power efficient than an LDO.Depending how much your circuit will consume I would prefer to use the switching regulator(LM2576T). Any linear regulator would do, not just low-dropout ones.
|
Is it possible to simulate hardware of MIPS architecture computer defined using Verilog/VHDL? I am reading Digital Design and Computer Architecture book and if I will be persistent then I will have MIPS architecture computer at the end, implemented from scratch by me . I wonder is it possible to somehow define different components of this computer using Verilog or VHDL or something else maybe and simulate them on a computer? I'd like to build it from most basic blocks like NAND or AND and do one step at a time building each layer of abstraction. Then when I am done with hardware part I'd like to write an operating system for it. Is it possible to do all of this without buying any real hardware and using only some simulation software? If so, please, point me to some resources where I can read more about it.Or explain how this can be done. Thanks in advance. <Q> Yes, this is most definitely possible. <S> This is what Verilog and VHDL were designed for in the first place. <S> You may need to install a waveform viewer such as gtkwave as well to look at the simulation traces. <S> Most of the FPGA toolchains will also include a free simulator as well. <S> Xilinx ISE comes bundled with isim and can be downloaded for free, though you pay for it in hard drive space (~10 GB). <S> I believe their newer Vivado environment is similar in both bundled features and hard drive footprint, though I'm not familiar with it as I use mainly Xilinx 6 series devices which require ISE. <S> Altera's Quartus software includes a free version of Modelsim and can also be downloaded for free, but it's also about 10 GB. <S> The open source simulators are three orders of magnitude smaller (~10 MB). <A> Of course it is possible to simulate a computer microprocessor using Verilog and VHDL. <S> As Alex said, that's what they are intended for. <S> Three points: <S> You won't get far building it out of primitive gates ( <S> AND, OR, etc). <S> While it is instructive to learn to build modules such as Adders and Counters at the gate level once you get past that it becomes a grind and you don't learn as much anymore. <S> Modern digital design is done at a higher level of abstraction called the Register Transfer Level. <S> Code written at that level is called RTL. <S> A great place to learn about how to write Verilog RTL is at Asic-World (I use it all the time): asic-world <S> It's never, ever, ever going to simulate fast enough in RTL for you to write an operating system on it. <S> If you're interested in higher-level abstractions what you should do is write an instruction set simulator in C (not difficult) <S> and you can use THAT to write and operating system. <S> There are a lot of open-source VHDL and Verilog cores that implement the MIPS instruction set and include source code. <S> You can download them, play around with them, and learn a lot. <S> Here is just one project of many: <S> miniMIPS <A> Or, Just use Logisim , a GPL logic simulator. <S> Its not hard to build simple processors in Logisim once you get the hang of it. <S> Very cool software.
| There are multiple open source Verilog and VHDL simulators available, including Icarus Verilog, cver, GHDL, and probably quite a few more.
|
What makes this active antenna "active?" I'm using a external taoglas GPS/Glonass active antenna. It has a male SMA connector and I don't see where any voltage source hooks up to thing. So how is it active? Or does the power required for the internal active components come in on the signal line (center conductor of connector)? The datasheet says "active" but I don't see anywhere in the datasheet it talks about it. <Q> The antenna has a low noise amplifier inside so that the long cable will not add as much noise. <S> You need to use a bias tee to power the amplifier via the signal wire. <S> Basically, you need to add a DC blocking capacitor in series with the signal line and then hang an inductor off on the antenna connector side side of the cap. <S> Feed the DC in through the inductor. <S> You may want to add some filtering on the feed into the inductor to make sure you don't get RF leaking in or out. <S> You can also buy a bias tee that has these components built in. <S> I would only recommend buying a bias tee for testing purposes, it's much cheaper to build one in to your circuit. <A> The datasheet says you have to supply between 1.8V and 5.5V DC. <S> The power is supplied via the same SMA connector as the output signal. <S> Since the output signal is RF it can be easily separated from the supply voltage using a high-pass filter. <A> Page two says it expects 3VDC. <S> It doesn't mention how the antenna is powered, presumably because providing power over the antenna cable is the normal way this is done.
| Power is supplied over the antenna cable.
|
Getting the desired output voltage swing from the op amp output I am designing a microphone preamplifier circuit. I have used op amp OPA 37 which amplifies the signal coming from the microphone to be used by the ADC. The usable voltage range of ADC is 0-2.5V. I am using a 9V power supply and two biasing resistors at the input to obtain the output voltage swing. The bias point is at 4.5V. I want to know what can be done at the output of the op amp to get the bias point at 1.25V so that it can be used by ADC.In the actual circuit microphone replaces signal generator. <Q> As long as the resistor values are high enough it should work fine, although it might put in more noise than you want. <S> As it is now, the ADC input does not seem to be biased (unless the ADC is self biased). <A> That op amp (OPA 37) is not suited to this application, and there is no reason to think that it will do what you want. <S> If you look at the data sheet, its output voltage range (at +/- <S> 15 volts supply) is only guaranteed to be +/- <S> 12 volts with a fairly light load, and worse for small load resistance. <S> That is, for a +/- <S> 15 volt supply, the output is not guaranteed to get closer than 3 volts to negative supply. <S> If this number applies in your setup, you cannot produce an output of less than 3 volts. <S> Does the number apply? <S> I don't know. <S> The data sheet has no specs for a 9 volt ( <S> +/- <S> 4.5 volt) supply, <S> but I'd guess it does. <S> What you need is an op amp with "rail-to-rail output". <S> Additionally, you'll need to get rid of C3. <S> This cap will produce audio signals which are centered at zero volts, and all the negative portions will be outside the ADC range. <A> What about taking the output from C3 and putting that into a summing amplifier? <S> http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/opampvar5.html <S> In input is your audio and the other is 1.25V. <S> Since this is audio, you probably don't care about inversion of the signal.
| You can put a voltage divider at the output of C3 (the ADC input).
|
Is it safe to treat a system downstream of a reverse-biased diode as de-energized? Suppose I have a 480 VAC line, feeding a rectifier and filter caps. Obviously this is not something to be trifled with while live. Now, suppose there are blocking diodes coming off the DC bus, as shown. simulate this circuit – Schematic created using CircuitLab In theory, in a perfect world, no current can reach the non-energized side of those diodes. Does that mean that side of the diodes is safe to work on without de-energizing the entire system? If not, why not? Are there specific safety standards this would violate? EDIT: If you're interested in the broader context of this question, I asked a related question about ethics at the engineering exchange. <Q> It's a good idea to take this one step at a time. <S> Well, not strictly true. <S> If you look up the data sheet for the venerable 1N4007, rated for 1000 volts, you'll see that the maximum reverse current is 5 uA at 25 C, and 50 uA at high temps. <S> Let's use the lower number. <S> Next, let's establish the parameters of a Standard Tongue. <S> I stuck the probes of my trusty Fluke 77 on my tongue, and got a resistance of about 10 kohms (which shows, once again, that I'm not in the running for the title of Silver-Tongued Devil). <S> 5 uA into 10kohms gives about .05 volts. <S> Furthermore, at 1 MHz the junction capacitance is less than 5 pF for voltages more than 10 volts. <S> Assuming a line frequency of 60 Hz, and enough load to produce a 10% ripple on the cap, the impedance of the two diodes is about 177 Mohm. <S> This will produce an AC voltage of about 4 mv. <S> So as long as the diodes are in spec, and there are no other current paths available, yes, you can lick it all day long. <S> But that's not what you asked. <S> What you asked is, <S> Does that mean that side of the diodes is safe to work on without de-energizing the entire system? <S> And the answer to that is, if I may quote Russell McMahon, <S> No NO <S> Next question: <S> If not, why not? <S> Because counting on everything working to spec when the price of a mistake is death does not, in most circles, count as safe. <S> Remember the part when I weasel-worded, and said "and there are no other current paths available"? <S> That's a really important bit of weasel-wording. <S> Trust me on this. <S> The ability of electrical systems to produce unexpected current paths is mind-boggling. <S> In a properly designed, constructed and maintained system, these things are rare. <S> Counting on a system to adhere to these criteria is really, really, dumb. <S> Are there specific safety standards this would violate? <S> Assuming you're American, 29CFR 1910.335 (Safeguards for personnel protection.) would be a good place to start. <S> I'm not sure exactly which paragraph "contacting an energized 680 volt electrical source with the tongue" outrages, but it's probably in violation of at least a half-dozen. <A> In a perfect world ... <S> Shudder! <S> In a real world ... <S> NoNo <S> No !!! <S> No NO NO NO NO !!!!!!!!! <S> Capacitive coupling alone would almost certainly make you VERY much regret the impact on your tongue. <S> If your brain survived to have regrets . <S> Diode reverse leakage would add to that. <S> * <S> * Note that Schottky diodes (unlikely to be used here) <S> have baddish reverse leakage at 27 °C and horrendously bad leakage at, say, 70 °C. <S> In the real world I'd not touch that outlet with a barge pole (unless it was <S> a certified 11 kV proof barge pole). <S> Plus Murphy loves to see things break when they cannot possibly [tm] do so. <S> * <S> *-De-rerendered the stylistic and undesired edit: If your brain survived to have regrets, capacitive coupling alone would almost certainly make you VERY much regret the impact on your tongue. <S> Diode reverse leakage would add to that. <A> No, that would not be safe. <S> First, even with the diodes and open circuit, you will still measure some large voltage, depending on the meter's input impedance. <S> Second, if you put a load there, current will flow, and depend on the diode's reverse leakage current. <S> As far as safety standards, no idea, I don't work on those types of systems, but my bad idea detector immediately goes off looking at the circuit.
| In theory, in a perfect world, no current can reach the non-energized side of those diodes. NO NO NO !!!!!!!!!
|
What is the fastest and easiest way to transmit arduino's sensor data to a PC wirelessly I have a specific problem : I'm working on a testing platform. It has to be absolutely isolated, so I cannot wire it back to my PC. I again reiterate it. There is no way to wire it to my PC. IT HAS TO BE ABSOLUTELY ISOLATED It has about 10 different sensors on it and I need to read sensor's data simultaneously at 100Hz. It is currently working fine with 16Hz, but I need to improve it further, so I think maybe in future sampling rates higher than 100 is beneficial. 7 Hz is the lowest possible value that doesn't botch the whole things up. I have a laptop on the platform which reads the sensor data via RS232, then it processes them in a fraction of a second and produce a control signal and send it to the actuators. It has to happen at real-time. Control algorithm is not heavy, it is several PIDs. It has 6 actuators with the fastest possible reaction time of 0.005 second. The main sensor currently is Microstrain 3DM-GX1 . It is a very good sensors. I want to add a GY-80 sensor in parallel to 3DM-GX1. I want to test various filtering algorithms on the GY-80's output and compare them to 3DM-GX1. Platform has 6 degrees of freedom so I think laser transmission is not practical. Distance between the computer and the platform is at most 3 meters. For some reasons I am not able to use the laptop anymore. I want to read the sensor's data with an Arduino, preferably Arduino Mega 2560. My problem is that I don't want to load the control algorithm to the Arduino. IMHO the perfect solution is going to be a Wireless link between the Sensors via Arduino to my PC. This way my PC logs data and also the Control Algorithm can promptly calculate the feedback signal and send it to Arduino which will send them to the actuators. This immensely makes things easier for me. I think I need a RS232 shield for the 3DM-GX1 & Arduino, + some wireless solution for sending data from both sensors to my computer. Then I need to send back the control signal back to the actuators wirelessly. Now what is the fast and easy way to transmit the data between PC and Arduino in real-time? Thank you in advance ! <Q> Have one arduino connected with the sensors and a nRF24L01 wireless transmitter, and another with a nRF24L01 receiver connected to a PC. <A> Easiest and fastest to laptop? <S> then nearly any pc, laptop, phone or tablet can get the data. <S> You could also use HC05 and custom api to directly sample the data without an arduino. <S> You could use xbee, but then you need another xbee at pc. <S> With bt that is likely already there. <A> I run into this problem on a regular basis. <S> My technique is to use plastic 1mm optical fibre. <S> These are available from a variety of sources. <S> The Industrial units that I use are marked HP (although these are old - now probably Avago) and the consumer-level stuff that I do uses products from a company called Industrial Fibre Optics . <S> You would need two fibres for a bi-directional data path but most of the stuff I've done is uni-directional - the data travels from one box to another. <S> This gives a voltage isolation that is many thousands of volts. <S> Short runs of the fibre and the appropriate drivers and receivers will also give a fast data rate - one particular pair of devices is good for 155 Mbps.
| I use RN42 or HC05 serial of arduino to bluetooth.
|
Avoiding static shocks from vehicles I don't entirely understand static electricity; particularly how it seems to flow through rubber shoes and paint, but seemingly not rubber tyres or car seats. I am tired of getting shocks from my van. I've read that those anti-static strips for vehicles that drag on the ground were banned from being marketed since they don't actually work. I also read that the strips are less effective than the tyres depositing charge as they roll on the road. I've read that the best methods for avoiding the shocks are to either hold onto the frame of your car as you're getting out, or alternatively, once you're out of your car, before touching the door to close it, hold the metal of your key and tap it with the end. I believe I've had some success with these, but not all the time. What different ways and where might the static electricity be building up? Why do/don't the above methods work? And what can be done? Some ideas: Cover the seat with anti-static [something] Try an anti-static strip anyway <Q> When you get out of your car, friction can rip off charges from the electrically neutral environment (this is called tribocharging ) such that the potential difference between you and the ground increases drastically. <S> When you set foot on the ground, your shoes are normally isolating you sufficiently for you to retain that charge. <S> On the other hand, the chassis is pretty much at ground potential: yes, it is isolated from ground by the tyres, but there is still electrical leakage through the tyres so over time, any difference of potential leaks out. <S> As you guessed, the so-called antistatic strips will not help you because the chassis is already pretty much at ground potential. <S> This is the same thing as the protection against electrostatic discharges in chips. <S> Standard practice is to never use isolating materials (which prevent equipotentiality) nor conductive materials (which do not control discharges) for your environment, but dissipative materials instead. <S> Now, you are not going to redo the interior of your car with dissipative mats, but you can still control the discharge the way you prefer. <S> Touch it after you are finished rubbing yourself against the seat and before you close the door and you should be fine. <A> Have you tried to simply spray your seat with anti-static spray? <S> Note that many consumer-grade anti-static products simply absorb humidity from the air (and water makes fabric conductive) <S> , so they won't work if the air is dry. <S> Incidentally, an air moisturizer could help. <S> Another idea is to try an air ionizer (ionized air is itself conductive and dissipates the static charges), although I don't know how effective car ionizers are. <S> This method is used to dissipate charges in labs where conductive sprays would interfere with the experiments. <S> This would eliminate the problem at it source, as you're definitely get those charges from your seat. <A> Touch the metal of the car before touching the ground with your shoes. <S> This will make you ground through your shoes (which you won't notice) instead of through your finger.
| Therefore, when you touch the door to close it, you are effectively triggering an uncontrolled discharge to ground. There are also much more effective industrial conductive sprays (some of those are transparent) if a simple anti-static is not enough. In most cars, you are isolated from the chassis when you're driving: everything is plastic, leather or textile. Personally I would place a small metal plate in the door near the handle connected to the chassis via a 100k-1MOhm resistor (which makes it a dissipative material), or even hack the inside handle to make it nicer.
|
Rising edge pulse detector from logic gates The circuits I describe are entirely made of 7400 series logic gates (7402, 7404 and 7408 ic).I'm trying to build a rising (positive) edge pulse detector using logic gates. The following circuit should work in theory: (see this ) I do not expect the short output to be seen through a LED so, to test it, I make it trigger an SR latch to its up state: However, it doesn't have effect on the latch. So I added an inductor to delay the input to the NOT gates in the pulse detector circuit and it worked: But now I can see the short flashing output through a LED which I should not because it would mean it is too long to work with a circuit like that: Which intends to toggle the D Latch output on each clock rising edge (Note that this is a D Latch not a D Flip-flop) And anyway there is no place for inductors in integrated circuits so there must be a way to do this only with logic gates. Can someone solve this mystery? BTW It does not show in my schematics but I did put 10K pull-down resistors where there might be floating pins. <Q> You may implement this digital design for detecting rising edge. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The output will go high as soon as a rising edge is detected on the Dinput. <S> The output is cleared on the next rising clock edge. <A> May be the delay generated by three not gates is less than the set up time. <S> So you might want to check with some more odd number of not gates and this also explains why your circuit worked with an inductor <A> You could achieve this without the pulse detector circuit by replacing the D Latch with a D flip flop (which is edge triggered). <S> A D Flip Flop can be constructed from two D Latches and a NOT gate as shown here <S> (I can embed the image because the file format isn't supported) <A> Use one Schmitt-inverter with a resistor in series and a capacitor parallel to the input, or use an even slower type of inverters. <A> If your schematic is correct, your problem is that you're letting the R input float. <S> With 7400 chips, a floating input functions as a logical 1. <S> As a result, immediately after your set pulse occurs (and it's only about 30 - 50 nsec, so you won't see it visually), the flip-flop is immediately reset. <S> You need to generate a normally-low reset pulse on the R input before you try to operate your circuit. <A> I suspect the parasitic cap on the input of the S/R latch is high enough that the output pulse never reaches Vhimin to drive S. <S> I bet if you put a scope on the net connected output of pulse to S-input you would see <3V peak. <S> In the past I have made pulse choppers with 7400 series logic and found that the inherent gate delay (tau) of 7404 inverters isn't enough to generate a clean enough edge without an OpAmp trigger on the output (instead of an S/R latch). <S> One solution would be to add more inverters to your pulse generator. <S> Another would be to use a differential detector with a lower threshold and higher input impedence. <S> You need to create a specification for your circuit. <S> E.g., what are the static timing characteristics of the pulse you want to detect? <S> Is there a minimum slope, and a minimum threshold that constitutes your pulse? <S> The circuit would look very different if your hold time is picoseconds vs milliseconds.
| Form what I understand you are trying to build a circuit (using on logic gates) that toggles an LED on the rising edge of the input.
|
how the LIFX or Hue generate millions of colors? I see the Philips Hue and LIFX led bulb can generate the millions of colors, I can find . can anyone tell me how this light works to generate millions of colors, what is the yellow LED light and white LED light, are they all the RGB led lights ? is each LED individually controlled by the circuit, and use all of them to make a color combination and is each LED controlled by simply opening/closing or dimming in different levels. Thank you <Q> Imagine you have three LEDs (red/green/blue "RGB"). <S> So a perceived color is created by a combination of the intensities from the three LEDs. <S> If we include intensity of color as a discrete color, then for 1,000,000 colors we would need log2(10^6)/3 bits per color or about 7 bits per 'color'. <S> Most likely they are using 8 bits PWM intensity per color (about 0.4% steps in intensity), giving 16,777,216 or 16 million 'colors'. <S> In reality you are not going to be able to visually distinguish anything like that many, and many of the 'colors' are just different intensities of a color that is visually the same. <S> White LEDs look yellow when not on- also some sources use a yellow component to the light to make the color appearance better for sensitive things like flesh tones and food (so they're <S> RGBY <S> rather than RGB). <A> can anyone tell me how this light works to generate millions of colors, what is the yellow LED light and white LED light, are they all the RGB led lights ? <S> The white LEDs are individual red, green, or blue LEDs as indicated by their silkscreen. <S> The yellow LEDs are white LEDs; the yellow part of the LED is a phosphorescent material that absorbs high-energy photons (e.g. blue light) and emits lower-energy photons (e.g. orange-yellow light). <S> is each LED individually controlled by the circuit, and use all of them to make a color combination and is each LED controlled by simply opening/closing or dimming in different levels. <S> It is very common to use PWM dimming in order to have fine control of a LEDs output; I have no proof that it is used here <S> but that is very likely the case. <A> The connector in the center has four leads labelled "R", "G", "B" and "W". <S> So it's safe to assume that all red LEDs controlled by one signal (they work in unison). <S> Same for the blue, green and white LED groups. <S> The traces seem to indicate that the LEDs for each color are connected in series. <S> Dimming LEDs by PWM is patented in some countries, so the dimming for each color could be achieved by by a very similar method, which is however sufficiently different from patent lawyer's perspective. <S> Analog dimming is, most likely, not used as it would produce more heat in the driving electronics (and make them more complex; the controller circuit is digital anyway).
| Each LED primarily stimulates a corresponding type of "cone" in the human eye as described here .
|
How to calculate voltage in an open resistor circuit I have an open circuit that looks like this: I can measure the voltage at these points using a voltmeter: A -> D: 4.65V (the batteries) B -> D: 4.3V C -> D: 4.23V Say I did not have a voltmeter: What formula would I use to determine the voltage between B -> D and C -> D? <Q> Without a voltmeter you would have \$V_{cd} = V_{bd} = V_{ad} \approx 4.65 \mathrm{V}\$. <S> The reason is that with an open circuit, the current through each resistor is 0, and so by Ohm's law, the voltage drop across each resistor is 0. <S> The only reason you don't read this result with your meter is that there is a small leakage current through the voltmeter when you connect it to the circuit. <A> Adding to what Allan & The Photon said: Your results are in good agreement with what you would expect if your meter has a resistance of close to 1 megohm. <S> The results are within the tolerance range expected due to typical component value variations. <S> I = <S> V/R <S> Across the 82 k resistor you see (4.65 - 4.3) = <S> 0.35V <S> The current that causes this can be determined from I = <S> V/R = 0.35/82k <S> = 4.268 microamps. <S> When measuring from point B to ground you would have that current flowing through Rmeter. <S> R = <S> V/ <S> I = <S> 4.3 <S> V /4.268 <S> uA = <S> 1.007 megOhm <S> Similarly, when measuring from point C to ground similar reasoning indicates Rmeter = <S> (4.23 / (4.65-4.23)) <S> x (82k + 18k) = <S> 1.007 megohm (again). <S> I have purposefully not spelt out the steps in arriving at that equation - it makes the same assumptions as in the prior calculation. <A> The only reason you measure a lower voltage than the battery voltage on the B->D and C->D cases is that your voltage measurement device has some resistance inside that allows some current to flow. <S> If you so not inject the volt meter into the circuit because you did not have one then the B->D and C->D voltage levels would be the same as the A->D measurement. <S> No current across the 82K and 18K resistors means no voltage drop across them. <A> If assumption is that the meter has a 1 mega ohm resistance then the total resistance between ground and the 82K resistor is: 1,820,000 ohms. <S> The current would not include the 18K ohm resistor in this case, therefore the total current would be: 4.65 volts / 1,820,000 ohms = 2.555 micro Amps <S> The voltage drop across the 82K ohm resistor would be: 2.555 micro Amps X <S> 820,000 ohms = 2.095 Volts. <S> The voltage drop across the internal 1 mega ohm resistor of the meter would be: 2.555 micro amps X 1,000,000 <S> = 2.555 volts. <S> Total Voltage: 2.095 + 2.555 = 4.65 Volts. <S> If you take the voltage measurement from C to D (C to ground) it now includes both resistors and the 1 mega ohm resistor of the meter to get total resistance. <S> Divide total voltage by total resistance to get the total current and use that to compute the voltage across each resistor. <S> This is all based on the meter resistance included in the circuit. <S> Otherwise everywhere in the circuit is just an open circuit with 4.65 Volts when the meter is not included in the circuit since open circuit equals 0 current (amps).
| Since every measurement device will have some resistance (some as low as the K ohm range whilst others up into the multi megohms range) you can place an equivalent meter resistance in the circuit and use KCL to solve the circuit for voltage drops.
|
3v3 Microcontroller controlling a MOSFET that needs 5V I'm designing a heater controller that has a primary input voltage between 12 and 24V. Everything except the heater runs on 3V3, including microcontroller, LED's, potentiometers and the MOSFET. The problem is the MOSFET wont be operating at it's full potential, http://www.onsemi.com/pub_link/Collateral/NTD5406N-D.PDF Figure 2 shows that 3V3 limits the current to about 5-6 Amps. I need to switch up to 8 Amps. As a work around I've considered the following: Using a 5V Regulator with a Shutdown Pin (LP2951) not ideal for PWM. Using a 5V Regulator a level shifter. I'm planning to manufacture 1,000's so my goal is low parts count and reliable, cost is always a consideration but at around $0.50 (either of the above solutions) isn't too expensive. Since I don't need much current (<1mA) and I only need a little more voltage (<4V total) on the MOSFET could I safely use a Zener diode or a voltage reference? What would that circuit look like? The couple of attempts I made at simulating these types of circuits didn't work. Edit: I created a simulation of what I think is Alex's answer could somebody verify my understanding? Simulation of Alex's Circuit If this would work in the "real world" I like it. Simple and doesn't require another Voltage Regulator. FYI: The Zener pictured is 5V1 and the Input ("L") is 3V3. <Q> What you probably want to do is add another small transistor (NPN or NMOS) in an open-drain configuration as a buffer. <S> So what you would do is add a pull up resistor to the gate on your current transistor and then use the new transistor to pull the gate to ground to turn it off. <S> You will also want to add a pull up to the new transistor as well so that it turns off the power transistor by default. <S> The control voltage will end up being inverted, but you should be able to turn the transistor all the way on. <A> You might want to consider an alternate MOSFET. <S> The NTMFS4897 has similar specs to the one you selected, but can handle 40A <S> Id at 3v Vgs <S> (Figure 2 in the datasheet). <S> You can get it from Digi_Key for $1.75. <A> If you consider < $0.50 cost acceptable, an elegant solution is to use a MOSFET gate driver such as the Microchip MCP1401/2 . <S> It provides level shifting as well as a buffered output that can drive about half an ampere into the MOSFET gate in order to get it to switch quickly. <S> Of course you could just build this with discrete transistors- 3 BJTs and a couple resistors, which would have a BOM of a few cents.
| You can add a Zener diode to limit the gate voltage.
|
How to calculate the time of one single tick on microcontroller I have been in Embedded system for 8 months. I have worked application part more compare with low level. I have basic questions on systems ticks, How to calculate the system tick of Timer, if I am starting the Hardware Timer of a controller for generating any delay. If I am having the 16-bit timer for example and I configured the system clock for 8MHz. As per my knowledge the single tick will be T=1/f. Then one single tick will take 0.125 microsecond. Is this correct? or any other dependency to calculate it. Whether this calculation will vary with controller by controller? Is there any way to configure the clock(eg 1MHz) for only Timer or any other peripheral with out changing the System Clock(eg 8Mhz) If controller goes to low power mode(typically a changing of power mode). The timer resolution will also change? whether I need to change the setting of Timer for each power Mode. <Q> To answer your first question. <S> Basically it is all the same with all microcontrollers and your calculation <S> was correct. <S> In your example, with a 16 bit Timer and,$$f_{\text{SystemClock}} = f_{\text{timer}} = 8MHz$$ <S> As you said we have a tick in every,$$T_{\text{timer}} = \frac{1}{f_{\text{SystemClock}}} = \frac{1}{f_{\text{timer}}} <S> = \frac{1}{8MHz} = 0.125μs$$ <S> With a 16 bit <S> Timer <S> it means, $$ticks_{\text{max}} = <S> (2^{16} - 1) = <S> 65535$$ <S> ticks. <S> So the timer will overflow in every, $$t_{\text{overflow}} = ticks_{\text{max}} \times T_{\text{timer}} = <S> 65535 <S> \times <S> 0.125μs = 8.191875ms$$ <S> You can count overflows to get a specific delay. <S> Now if you want to change t overflow 's value You can divide the f SystemClock as the other answers mentioned it, and run your timer with a frequency different from the f SystemClock . <S> This way you will have more time between two timer ticks and t overflow will be higher. <S> Or, you can set a maximum value for the timer <S> so it will overflow earlier and <S> t overflow will be less. <S> This way, a lot of delay value can be obtained. <A> 1. instruction clock / system clock frequency <S> the instruction clock frequency is different on different micro controller families. <S> a PIC micro controller has a instruction clock of 1/4 the clock frequency. <S> and every (mostly) instruction (except goto) takes 1 instruction clock cycle, goto takes 2 cycles. <S> on an atmel <S> µC <S> the instruction clock is the same as the clock frequency. <S> 2. <S> other clock for only one timer on various <S> µC <S> you can set a bunch of dividers and overflow settings please check the data sheet of your specific µC on a nearly every PIC you can set dividers like 1/8, so every 8 instruction clock cycle the timer increases with one. <S> so the timer runs at 1MHz if your instruction Clock is 8MHz (oscillator running at 32MHz) or a divider of 1/2 <S> so your timer runs @ <S> 1MHz <S> if, system clock @ 2MHz and oscillator @8MHz <S> 3. <S> low power mode <S> some µC have multiple internal oscillators e.g. : a 8MHz a 4MHz and a 32.786 kHz <S> and if you switch between those frequency's you can lower the power consumption. <S> but you change the instruction clock and thus also the timer <A> That might be depends on prescaler Register. <S> The purpose of the prescaler is to allow the timer to be clocked at the rate you desire. <S> For shorter (8 and 16-bit) timers, there will often be a tradeoff between resolution (high resolution requires a high clock rate) and range (high clock rates cause the timer to overflow more quickly). <S> For example, you cannot (without some tricks) get 1us resolution and a 1sec maximum period using a 16-bit timer. <S> If you want 1us resolution you are limited to about 65ms maximum period. <S> If you want 1sec maximum period, you are limited to about 16us resolution. <S> The prescaler allows you to juggle resolution and maximum period to fit your needs. <S> Go through the Timer Register. <S> Some Controller will have fixed Value(Not modifiable by Programmer) prescaler and in some controller it can be modifiable <S> I think this will answer for your 1st and 2nd Question
| Follow the Datasheets of controller which you are using.
|
Protect 555 timer from high voltage I built a circuit which I strapped one electrode to the bottom of my shoe, and the other to my leg. This circuit consists of a high voltage DC supply in my pocket driven by a 555 timer. When it works, I am able to make static sparks to objects with a capacitance to ground and huge sparks from my finger to grounded objects. The issue is that I have to keep replacing the 555 timer because high voltage must be getting back into it. What is the best way to protect the timer from high voltage and is that likely the cause? The whole circuit is powered by 9vdc. <Q> I suggest using a combination of clamps and separation by other semiconductors being in the way. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Something like that - to protect the 555 pin from inductive kickback, output voltage swings, separation by the totem pole driving circuit (which is a nice high-power fast switching bonus too) and clamp over the MOSFET to protect that, plus a clamp over the transformer. <S> Its as little overkill, <S> but I think it's crazy enough to work! <S> I hope others can critque/improve upon this suggestion. <A> You can save your 555 cheaply by using a diode from the supply to the primary transformer winding and clamping the primary with a zener. <S> The zener will shunt any high voltage kickback on the primary, and the supply feeding diode will block any fast reverse voltage spikes that are too fast for the zener to shunt out. <S> If you don't have a zener, you could use about 4-5 LED's in series (depending on your supply voltage) to shunt the high voltage back EMF in the primary (and it looks cooler than a zener). <S> Next a diode from the GND plane of the 555 circuit could be used to isolate it from any reverse voltage. <S> The last bit of protection I would add is a diode from output (3) of the 555 to the base of the driving transistor. <S> * <S> A note on the schematic, I chose the components arbitrarily. <S> For example the zener in the schematic is Vz = <S> 5.1 which wouldn't work with a 12V supply. <S> You'll want a Vz of at least 15V if the supply voltage is 12V. <S> I typically use a 2N3055 BJT to drive the primary of an auto-ignition coil to produce some awesome sparks, and it works pretty well. <S> A curious experiment might be adding a ceramic capacitor across the primary; you'll have yourself a class C amplifier and possible RF generator. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Since you're operating near the absolute maximum voltage of the 555, I suspect inductance in the layout may be causing power supply spikes. <S> I suggest a 7812 regulator (78L12 might be okay) to supply the 555 only , and parallel that <S> 470uF electrolytic with 1uF to 10uF ceramic.
| Just make sure the voltage rating of the capacitor is above the clamping voltage of your primary shunting zener or else you might blow the capacitor.
|
Panel mount DC barrel jack on PCB Is it possible to solder the panel mounted DC connector shown in the image below on to a PCB? I was unable to find an Eagle library for the same. If it is not possible to solder on to a PCB, any ideas on how I could interface b/w a PCB and such a connector? Thanks. <Q> Yes, it is, but I see a problem with that- <S> you'd have to pass it through the panel first, so serviceability of the PCB would be severely constrained. <S> The PCB could use round holes, but slots would be better, and you'd have to take some care if there were traces and pads on the connector side to design the footprint and apply keep-outs to avoid potential shorts- or space the connector off the board a bit. <S> That kind of rigid mechanical/electrical connection is a potential failure point, so that should be considered (for example, dropping the device will put stress on the connections because the PCB has inertia). <S> If you want to do a nice job, shrink wrap on each wire can be used. <S> If you use a connector small enough to pass through the mounting hole (Edit: and the inside of the nut, perhaps sideways), then the entire thing can be disassembled without unsoldering or cutting. <S> In a production product, that would have the additional advantage that the harness subassemblies could be manufactured or procured with wires and connector attached, and simply snapped together in final assembly. <A> Break out some calipers or a ruler and make your own eagle footprint. <S> Or you know, interface it with wires like it's designed for. <S> Board mounting a panel mounted part is non standard use. <A> A connector like this: digikey is intended for PCB soldering and is also panel-mounted. <S> (Whether or not this is a good idea is debatable...)
| At risk of stating the obvious, the usual way of 'interfacing' is to attach wires to the jack and then affix them to the board, either directly or through a connector.
|
Does USB Power Delivery handle USB cables that are not PD-aware? I think USB-PD is still fairly new (I don't know anyone who owns a device that has it) but reading wikipedia and info sites does not make it clear what happens when you use a cable that is out of spec in a USB-PD charging setup. So if I have a host and device that are USB-PD compliant, and my device wants to use say a 12V profile, can I get away with using a normal USB cable? Or will it not charge or charge at a lower profile instead? What about the edge case where I use the 5V profile at 2A. Technically that is out of spec also since USB BC1.2 is spec'd to 7.5W (1.5A), but many normal cables work fine with 2A in practice. <Q> USB-PD only uses two wires (GND and VBUS), but the standard has the whole section (4.4 in ' USB_PD_R2_0 V1.0 - 20140807.pdf ') <S> which describes how the cable detection is implemented. <S> In short, regular USB-A to USB-B cables need to have the special mechanical mark to be considered for >5V/>1.5A, while micro-usb send special signal on "ID" pin, and determines capabilities from that. <S> In practice, I bet there will be manufacturers which produce very cheap cables which still claim to support maximum power, so we might still read about cheap cables catching fire. <A> USB power delivery has cable detection mecahnisms at the host end of the cable and will refuse to raise the voltage if a power delivery cable is not detected. <S> However with the number of noncompliant cables and adaptors on the market it is certainly possible to assemble a combination of cables and adaptors that will fry stuff. <S> For example one could plug a power delivery cable into a power delivery capable host, connect the power delivery cable to an A female to B female coupler, and then connect a "power combiner" cable with it's host plug connected to the coupler, it's device plug connected to a power delivery capable device <S> and it's power only plug connected to the item you want to fry. <A> USB-PD no more works on VBus. <S> It uses USB Type-C connector signals for power negotiations. <S> Yes cable plays an important role in this ecosystem. <S> Not all cables will support 100W. A power source will detect cable capabilities and ten advertises its power capabilities <S> A standalone USB Type-C cable can now support upto 15W. With these new specifications I believe BC spec may obsolete soon.
| In theory, if you do not use special PD cable, then the devices will silently limit the maximum power to pre-PD levels, and all will be safe (at most 5V, 1.5A current).
|
Driving 50-pin e-ink display with one chip? I'm trying to connect this 50-pin e-ink display to an Atmel ATmega328p for a hobby project. The biggest design challenge I'm facing is connecting all the pins from the display to the MCU in an orderly way.Originally I was using six 8-bit serial to parallel decoder / shift registers (e.g., 74HC595, chaining them together) then connecting the 2 leftover pins to the MCU directly. But this approach is a mess on the breadboard. Is there any way to get a wider shift register (e.g., 32-bit or 64-bit) to make things better? Or is there another type of (inexpensive) chip entirely that would work? I've looked at LED drivers, but thought it has too many special features for this application. Thanks in advance! <Q> You can cascade shift registers to get a big shift register. <S> The 74HC595 has the Q7S pin for that. <S> simulate this circuit – <S> Schematic created using CircuitLab Add as many Shift Registers to the chain as you like. <A> They aren't even expensive these days and for simple tasks like this you may even get away without learning a HDL language like verilog or vhdl. <S> For breadboarding you would need some kind of DIY friendly breakout board, and if you do so you could just as well make a custom board, put your three 595's and a proper connector of your e-ink display onto it. <S> Otoh <S> if you go the CPLD route, once you've learned how to use them you'll never have to buy and connect individual logic chips for prototyping anymore. <A> The part what you need is called "port expander" or "I/O expander". <S> Try to google it. <S> The biggest one I've found is 60 bit.
| If you want a single chip solution you could buy a CPLD with enough IO pins and program it to work as a shift register.
|
Use GPIO to disable voltage divider I'm using a voltage divider to read the battery level of a wireless sensor platform using STM32L151. I'm shooting to use 20k for R1 and 10k for R2, to be under the 50k limit of the MCU's ADC peripheral. How do I calculate the current wasted by the divider? Originally, I was planning on using a P-channel MOSFET to enable the divider when taking measurements to reduce power consumption, but I see that MOSFETs have leakage current and raise the part count. Can I just set the GPIO to push-pull as the ground for the divider and set it low when I want to measure and high when I don't? <Q> First thing - if the ADC is okay with 50K you can use 150K and 75.0K (the source impedance will be exactly 50K). <S> The current used by the divider will be 4.3V/225K = <S> 19.1uA. <S> Unlike most micros, I think you can actually lift the lower end of the divider and reduce the current, if you pick a 5V-tolerant input that is shared with the ADC and use another 5V-tolerant pin for the divider control. <S> At least that is what it looks like to me. <S> To disable set both pins to digital inputs. <A> The simple answer is "probably don't bother." <S> As pointed out by Sphero, your losses are tiny, and are probably going to be dwarfed elsewhere in the system. <S> I suggest reading Jack Ganssle's excellent report on ultra low power design with coin cells so you can see all the places where things can go wrong that you don't expect. <S> But , if you absolutely must disconnect this voltage divider, you have a couple options, both of which unfortunately require more parts. <S> P-channel MOSFET switch on the high side of the divider to switch it in and out. <S> Disadvantage is you also need a BJT or an N-channel FET for the high switching voltage demanded by a P-channel FET. <S> Use a very low power opamp to buffer the signal from the voltage divider. <S> You don't end up switching it in and out, but you can make the voltage divider values very high. <A> How do I calculate the current wasted by the divider? <S> Since the battery voltage is 4.2V, the current consumed is \$I= <S> V/R=4.2\rm{V}/30\rm{k\Omega}=140\rm{\mu A}\$. <S> Can I just set the GPIO to push-pull as the ground for the divider and set it low when I want to measure and high when I don't? <S> If your MCU was powered from the battery, then yes this would work. <S> However, since your MCU isn't, you will continue to waste \$I=(4.2\rm{V}-1.8\rm{V})/30\rm{k\Omega}=80\rm{\mu A}\$. <S> I see that MOSFETs have leakage current and raise the part count. <S> Understand that your MCU is also built out of MOSFETs, and also has leakage current. <S> An additional MOSFET (when off) won't substantially raise the circuit's power consumption over what it already is. <S> As for part count, well... How much is this feature worth to you? <A> Nobody has given you the best answer yet. <S> Do it like this, with two transistors. <S> Put a PFET on the top of the divider (between battery + and voltage divider). <S> PFET source is connected to battery. <S> Drain is connected to divider. <S> PFET has pull-up from gate to source. <S> Pullup can be around 100k or even more if you want. <S> Connect NFET drain to PFET gate. <S> Connect NFET source to GND. <S> Connect NFET gate to processor VCC, or to a processor GPIO. <S> When NFET gate is high, divider will be in operation. <S> When NFET gate is low, divider will be disconnected from battery. <S> Personally, I think it is a good idea to make sure the battery sense divider does not drain the battery when the device is powered off, even if it is just 10s or 100 <S> uA. <S> Furthermore, the battery voltage should not be applied to the ADC input when VCC is not present, not even through a large resistor (unless this is a highly specialized input pin). <S> So I would argue that you MUST disconnect the battery from the ADC any time VCC is not present. <S> If you cannot visualize what I typed, let me know <S> and I will draw it for you. <S> Edit: <S> Use BSS138 for NMOS and BSS84 for PMOS. <S> Just a recommendation. <S> These parts are very low cost in volume and are readily available.
| You would set the control pin to low/output for divider operation and have the ADC input active. As you pointed out, there is leakage current, but it should be very small if you choose the right FET.
|
How to detect stuck relay in PLC? Is there a standard method of detecting a stuck relay in PLC? Say, I want to build a H-bridge using relays: simulate this circuit – Schematic created using CircuitLab In case one of the contacts in RLY2 gets stuck, I'd cause a very bad short-circuit, therefore before switching direction I'd want first to disengage "Enable", VERIFY that at least one contact of "Enable" has disengaged, toggle "Dir" and then VERIFY that RLY2 has switched both contacts correctly. Only then I'd switch "Enable" on. What kind of sensors (commonly used with PLC controllers) would I use to achieve that? Optional extra problem: PLC input contacts not rated for the PSU voltage. EDIT:eh, I saw the short circuit problem with my imagination's eyes, then failed to reproduce the circuit that would cause it, making one immune to this problem instead... Here's my former worry (obviously most easily mitigated by turning it into the above version...) - and yes, in this case one of contacts of RLY2 stuck would mean a short circuit. simulate this circuit <Q> If you have to be absolutely sure that the relay contacts have transferred, the best bet is to use a "Force-Guided Relay", or "Safety Relay". <S> They are made by various manufacturers. <S> On the FG Relay, use an extra contact as feedback to make sure that the relay has transitioned. <S> By design, FG Relays cannot only partially transition, even if one contact in the stack is welded together, the others cannot transition. <S> Even using FG relays, depending on the size of the motor, as you stated in your question, I would make sure that your direction switching relay only transitions when the power is disconnected to the motor. <S> That will eliminate some contact arcing. <S> Put some snubbers around the actual power switching contacts. <S> For what you are doing, that seems about the best approach with an electromechanical solution. <S> Depending on the size of the motor, you might do better with a small DC regenerative drive. <S> When all else fails (and from industry, I know it will), fusing is always a wise idea. <A> You could add an Auxiliary Contact block on your relays, most Industrial Relays have this option. <S> Then wire Control Voltage to the Aux Contact Block, monitor it with a PLC in and a PLC Timer block (in software). <A> I don't see the potential problem in this cse. <S> In this case, even if the direction DPDT was implemented with two separate relays and one failed, the load would simply see no voltage. <S> Shorting from N.O. to N.C. contacts (what, I think, you are worried about) is not a normal failure mode of a relay. <S> The contacts are attached to the same bit of metal that swings back and forth, so even if the relay is abused by a surge current or the contacts eventually wear out they will never short N.O. to N.C. <S> Now, we can imagine a pathological situation where such a short does happen- <S> maybe the 3rd shift operator fails to crimp the contact into the spring adequately and it falls off, rolls around and makes the short we're worried about. <S> Okay, there's a short. <S> It's not a particularly "bad" short, it's just a short- same as if some idiot poked a screwdriver across the wires. <S> The other relay closes (probably damaging it by the surge) <S> the (properly sized) wires experience a brief surge in current, and the properly rated fuse or circuit breaker (not shown) opens, safely interrupting the fault current. <S> Service personnel diagnose the fault, replace the bad parts, and all is well. <S> You must have the proper fusing (rated to carry the load current, to interrupt the maximum fault current , and for the maximum source voltage) and proper wire sizes (surge capability is built into the recommended minimum wire sizes) for safety even with <S> no relays in there, so <S> that is a non-negotiable requirement. <S> I have not considered any potential safety situation with the motor sticking "on" but you may wish to add some redundancy to prevent that from occurring (perhaps another SPST relay or replace the DPDT with two SPDT). <S> In that case, you might have to add a feedback input to the PLC to detect potential sticking because otherwise you would not know service was required until the second failure (which could be an unsafe condition). <S> A better solution would be a big red mushroom-top emergency stop button rather than anything involving the PLC! <A> Not a direct answer to the question as stated, but it solves both that problem and a bigger one: <S> What you have will control on/off and direction, but it's not really an H-bridge. <S> This is an H-bridge: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> (don't energize both A's or both B's at the same time!) <S> My off-road winch simplifies it to this: <S> simulate this circuit <S> It's the same idea, but it combines the two A's and the two B's into a single SPDT each. <S> This pretty much guarantees that you can't short the supply, <S> even if a relay fails (automotive starter batteries are scary when shorted), in addition to making the controls easy. <S> The side-effect is that the motor becomes a drag brake when off, which is useful in a winch. <S> You can evaluate whether that's useful to you as well.
| Relays are generally made with the contacts mechanically coupled so that one pole cannot stick without the other sticking. If you want to detect a failure and respond automatically somehow, you can do some electrical conversion from the motor terminals, or you can watch the motor shaft or the machinery that it drives.
|
Benefit of (logically/virtually) separate I/O and memory bus In my course on embedded systems, it is explained that memory inputs can be separated from I/O inputs using a "mode bit" for the address decoder. The most obvious advantage of this is that the amount of address lines need to be decoded can be reduced if you have a separate addressing system for your memory and your I/O. Are there any additional benefits? Does having these logically separated have other benefits such as being able to use different clock speeds or transfer logic? <Q> My interpretation of what you are describing is to simply sub-divide the address space into two halves - one half for IO and one half for memory. <S> You're not creating two separate busses there, but only one that is used for two logically different tasks. <S> While that can make decoding of the address bus simpler, it doesn't improve performance at all. <S> Many embedded microcontrollers use an architecture known as Modified Harvard Architecture. <S> In this you do have a number of different physical busses, each with its own purpose - one for RAM, one for ROM, maybe one for IO. <S> These have the big advantage that it is possible to access different things at the same time which you can't with a single sub-divided bus. <S> It does make programming more complex though. <A> This is what the X86 architecture does with IN/OUT instructions, which address peripherals rather than memory. <S> Different transfer logic can be useful. <S> For example, not caching access to peripherals. <S> Or having different behavior for unaligned reads. <S> It also gives you a "free" 17th bit in a 16-bit architecture, which is when the technique was introduced. <S> The clock speed must remain the same, but potentially you can have a different number of "wait states". <S> However, these days it's considered better to just make the MMU smarter and allow it to handle these effects. <A> This means you can have different data/address widths, as well as different clock speeds.
| According to my instructor, there are many potential benefits, because designing the buses in this way allows for totally different setup parameters.
|
What makes solder harden? Soldering wire is very soft and pliable, but solder on a circuit board is hard. Why? I haven't been able to find a definitive answer, but some ideas that come to mind are: Some kind of chemical reaction that takes place when the solder is heated and then cools. If so, what is this reaction? Maybe with flux reacts somehow, but what about solder that doesn't have flux? The solder wire is less dense, either through being hollow or having a flux core, making it seem easier to bend. This seems less likely, because tin whiskers seems much harder than solder wire despite being thinner. <Q> Solder on a circuit board is just as soft as the wire solder it came from, since it's the same material. <S> However, the wire solder is not supported by anything, so feels much more bendable. <S> Note that softness isn't the same as bendableness. <S> Wire solder can also feel softer to something like pinching with your fingernails because most solder is hollow with a soft flux core, and you are collapsing it by pinching. <S> Solder on a circuit board is usually a thin layer that is well supported by a the board itself thru a thin layer of copper, and pins of whatever device is being soldered down. <S> This makes it feel a lot harder than the unsupported wire. <A> @Kaz & @LongStrokinYerMomma are near to the right explanation. <S> When you talk about mechanical properties of a metal/alloy we have to consider lattice structures. <S> And in this case not much chemical reaction is of our concern. <S> You see, two phenomena are responsible for this observation: 1. <S> Re-crystallization Ability of metal/alloy to be drawn into wire is called ductility. <S> Hence when you melt it, it loses strain hardening & undergoes re-crystallization which makes it appear more brittle . <S> 2. <S> Perfection of lattice structure Diamond is the hardest material, not just because of its bonds but because of its perfect lattice structure. <S> If you compare degree of perfection of lattices PER unit mass of a small cube, say 1mm 3 & a large cube, say 20mm 3 of chemically identical alloy/metal/mix, you will find the smaller cube to be more perfect hence stronger/harder than the larger cube, even though their chemical compositions are exactly same <S> (this is what user @LongStrokinYerMomma pointed out in his Abstract from that paper ) <S> To get a simpler everyday feel of it, think of breaking a stick, you can easily break a 2-feet long stick but <S> not 10-cm long stick, yes <S> in this case lever-action/torque-arm plays a role, but you get the idea. <S> Your logic: <S> The solder wire is less dense, either through being hollow or having a flux core, making it seem easier to bend. <S> This seems less likely, because tin whiskers seems much harder than solder wire despite being thinner. <S> is perfectly valid <S> , it partly explains why soldering wire is pliable. <S> But note that the assertion Solder on a circuit board is just as soft as the wire solder <S> it came from <S> is definitely incorrect. <A> It's all about shape. <S> A small bead of nylon is hard. <S> A nylon fiber (such as a fishing line) is flexible. <S> Ditto for glass and other materials. <S> Glass can be a rigid crystal ball, a somewhat flexible window pane, cloth, or soft and fluffy insulation in your walls. <A> There is one more thing I do not see in the answers: Most solder on reels has the flux in the core. <S> This flux can be as much as 45% of the solder wire by mass, and is burned away as part of the soldering operation. <S> The flux is far more flexible than metals, so the real amount of metal in the solder wire is actually less than the base weight, thus making the overall wire more flexible. <S> The purpose of the flux is to clean the surfaces to be soldered and is the substance we see burning off during soldering. <A> I'm going to go out on a limb here and say that there is a basic relationship between the solder's metallic crystal structure and it's mechanical performance. <S> This paper says that: ABSTRACT With the continuing increase of the integration density in electronics, dimensions of interconnections for electronic components have been miniaturized to a scale that is comparable to those of their crystallographic structure. <S> For instance, a SnAgCu solder joint in the flip chip package can contain only one or a few grains. <S> In this case, the mechanical behaviour of the micro-joint is expected to shift from a polycrystalline-based to single-crystal one.
| When solder wire's billet is drawn through various dies of reducing diameters - it undergoes a process called strain hardening which makes it more resilient (i.e. to bend repeatedly without fracturing easily) to shear/deforming forces as compared to the initial cubical billet of same alloy.
|
Can I replace a 0.1µF capacitor with 1µF in this circuit? I want to make a traffic light circuit but the problem is that I don't have a 0.1µF capacitor. I do have a 1µF capacitor, would it be OK to replace it? The circuit diagram I am using is shown below and is taken from an online tutorial : <Q> Seeing how it is across the 9V supply rail it is just decoupling for the power supply rail. <S> Better designs (as most people here would be quick to point out) would have a decoupling cap local to each Vcc pin per IC, but for a simple design like this, one cap across the rail is probably fine. <S> Using a 1uF cap is okay. <S> Just make sure it is rated for >9V . <S> Safest bet would be 16V caps, 10V is cutting it close. <S> Truthfully this design would probably work with no cap too, you might just experience weird glitches every once in awhile if the power supply blips from sudden current demand changes. <A> Yes, you can replace the 100 nF (in engineering you keep 1-3 digits left of the point and adjust the units multiplier accordingly) with a 1 µF, but only if it is low ESR (equivalent series resistance). <S> The 100 nF you show is almost certainly a ceramic or some other type with very low ESR. <S> This means it must be able to shunt the high frequency power currents generated by the ICs. <S> The right way to do this is to put a 100 nF to 1 µF or so ceramic cap immediately across the power pins of each IC. <S> That shunts the high frequency power currents generated by the ICs immediately around the IC. <S> This does a better job than a single cap for the whole board because of the lower series parasitic inductance in the shorter leads to the cap, and will radiate less due to the smaller loop size. <A> It's unclear exactly what the designer intended the 0.1uF capacitor for, but it would be very common to have a 0.1uF (100nF) capacitor across the power rails of each IC for decoupling . <S> There would usually be a 0.1uF capacitor for both the 555 and 4017 ICs, close to the power pins. <S> You could use 0.1uF <S> and in this circuit it will likely work just fine <S> (it might work fine without, why not try it?). <S> However you should probably buy a large pack of 0.1uF/100nF <S> capacitors for use in the future because they will appear in most circuits.
| Replacing it with a 1 µF electrolytic is not a good idea because this single cap is apparently also the bypass cap for the two ICs.
|
chopper-stabilized op-amp latching up, cheap op-amp doesn't I have a simple pressure sensor buffer/amplifier that I'm experiencing some weird latch-up when using a fancy chopper-stabilized op-amp for U2. The pressure sensor is an MDPS-002 (the 700kPa version). The datasheet is locally mirrored here . The common mode voltage from the sensor is about 1.5V. VIN is 5V and the 3.3V sensor supply comes from an LDO sourced by VIN. 1uF and 0.1uF capacitors at the op-amp and the output of the LDO. The output of the op-amp is feeding into an ADC input on an AVR, but I've also removed the AVR in an attempt to isolate the issue, to no avail. Basic operation: pressure sensor creates 0-100mV voltage across its outputs for the 0-100PSI range. Op-amp gain is intended to be 20, but I need to adjust the resistors to take into account the sensor impedance (TODO). Until then the gain is ~17. Testing the sensor, I ramp the pressure from 0-100PSI and monitor the output of the op-amp. It largely seems to track correctly, but if there is a sudden drop in pressure or even a slow (over minutes) release of pressure there is a very good chance that the op-amp will latch up. When the latch-up occurs, the op-amp output will be "stuck" at ~1.5V. Cycling power doesn't correct it, nor does temporarily shorting the output of the op-amp to ground. Bringing the pressure back up (either slowly or rapidly) will allow the output to kind of get back in line to where it should be, but it's often off by a couple hundred mV. If the pressure falls back down so the sensor output is ~40mV, the op-amp will latch up again. Weird. Eventually (many minutes) the op-amp will recover, but the output may "wander" all over the place (from the 60ish mV it should be at ambient pressure up to the latch-up voltage. Sometimes this wandering output will occur right from power on. I can't seem to identify the source for this. Replaced the op-amp, replaced the sensor, nothing seems to have much of an effect. On a whim, I replaced the MCP6V11 chopper-stabilized op-amp with a cheap as dirt MCP6001. No latch-up, ever, and the circuit works as expected. I've tried removing C1, thinking perhaps a brief negative pulse was causing the op-amp to latch up, but this didn't change anything. The supplies are clean, and this op-amp is so slow (80kHz, yes kilohertz, GBWP) that I can't imagine it oscillating given the impedances in the circuit. I spent part of the day reading about chopper stabilization and potential gotchas with these kinds of op-amps but this particular behaviour is something I did not encounter in my readings. Has anyone seen this before, or does anyone have any ideas about what I might do to mitigate it? I'm looking for an answer which explains the phenomenon and solution. 20150428 Updates I'm back at it now, and I can report some findings. First, I'm using a scope to watch the output of the op-amp. It's definitely not oscillating. AC coupled, 50uV/div and 10us/div there isn't any noise there that the scope doesn't already show when I just short the input of the scope out. I removed C1: no change. Added 10nF bypass caps to R1 and R4: no change. Shorting the outputs of the sensor (short pin 3 to pin 6): op-amp output drops immediately to 0V and stays there as long as the short remains. Remove the short and it jumps back to the common mode voltage of approximately 1.5-1.6V. Varying the supply voltage to the op-amp from 3.4ish to 5.25V: no change. Just watching the output of the op-amp with the scope connected I saw it wander down to the 100-ish mV it's supposed to be at. The "wander" was more or less linear and took about 6s. It stayed there for about 30s then wandered its way back up to 1.5V over the same amount of time. 20150509 Updates Working with a colleague, things are getting a little clearer. We (he) noticed that the output voltage of the op-amp was exactly the voltage at the negative input. He hypothesized that there is a stable point in the operation where when the output voltage equals the input voltage, R4 becomes irrelevant (there is no current flow through it). Shorting out the output of the op-amp can sometimes cause it to recover, but not always. I repeated the "short the bridge outputs" test and the op-amp does always go to 0V output, as reported earlier. The op-amp appears to be doing its job correctly because I can use my hand to introduce an error by bridging +3.3V or GND and the sensor pin 3 or 6, which injects some current, unbalancing the bridge and driving the output up or down. I took my old 5.5 digit Fluke 8842A and measured between pin 3 and 6 of the bridge and then, with another meter, measured the output of the op-amp. The readings indicate the gain is about right, and when the op-amp is reading higher than it should (but not "stuck" at the common mode voltage) it is because the bridge is showing a higher than expected output. At this point he and I are both starting to suspect that there is some stray leakage path which, combined with the more complex input structure of the op-amp, is causing it to operate this way. We tried putting a 1M resistor across the bridge outputs but that caused the op-amp to immediately jump to the 1.56V common mode voltage. If I ground either leg of the bridge the op-amp output either goes to zero or to fullscale (5V), which makes sense as well. I washed down the board with anhydrous isopropyl alcohol, no change in output, so I'm ruling out physical contamination. 20150511 Updates It looks like @DwayneReid was on to something. I built up an emulated bridge with four 10k resistors on 0.100" headers and the op-amp was working correctly: A 1.3mV difference was getting turned into a 50mV output, giving a gain of about 38.5. I then soldered the actual sensor to more 0.100" headers and connected them so that I could try one or the other: The sensor was showing a 48mV differential (which is wrong for this sensor at atmospheric pressure) but more importantly, the op-amp's output jumped to 2.38V (a gain of 50). I then took a new sensor, soldered it to 0.100" headers and tried that. The voltage difference was 3.25mV and the amplifier output 147mV (gain=45). More importantly, the output remained stable for hours and despite all my finger touching and cajoling, remained at this value. Long story short, it looks like I damaged the sensor, and to my chagrin the "correct" output voltage just happened to be the common mode voltage. With my breadboarded solution I was also able to easily vary the sensor excitation voltage and that's where I could see how the op-amp output was tracking the gain correctly. With the sensors on breakouts it was easy for me to measure their impedance as well. The sensor impedance is stated on the datasheet to be 5k typically (with a range 3-6k). I measured the Thevenin impedance as 2.5k, which threw off my gain calculations (I'd used the 5k typical value from the datasheet). With 2.5k and 2k as the input impedance of the op-amp and 100k feedback resistance, the gain should theoretically be 100/4.5 or 22, which is still off from my measured gains. The 10k bridge has a Thevenin resistance of 5k, so the gain should theoretically be 100/7 or 14.3, yet with the resistor bridge I am seeing 50mV out with 1.3mV in for a gain of 38. I am not sure what the reason for this discrepancy is. Anyway -- thank you everyone. I learned a LOT during this exercise. <Q> Having a capacitor directly across the op amp inputs always looks iffy to me. <S> It can make the op amp trend to oscillate because high frequency feedback gets attenuated. <S> Try placing C1 before R2 and R3 and see if that improves matters. <S> Better yet (in terms of stability), you could place C1 across R4, as e.g. seen here and also suggested by Zeke R. <S> This will act as a lowpass filter too, but it works by enhancing the feedback at high frequencies, so it doesn't degrade the stability. <S> One drawback is that noise on the positive and negative inputs won't be attenuated exactly the same, so I expect that your common mode noise rejection would be rather poor. <S> Eventually you'll probably want to use two extra op amps to make a full instrumentation amplifier. <S> That will make your gain independent of the bridge resistance. <S> This circuit is shown e.g. here . <S> As you can see, the bridge outputs go to two different op amps in that circuit, so placing a capacitor across them won't cause any problems with feedback. <S> This way you could filter the bridge output with C1 just like you intended in the circuit you have shown above. <A> Is there any chance that there is a problem with either the connections or the bridge itself, particularly on the (+) input? <S> My suggestion: replace the bridge with 4 resistors (match them if you wish) and see what happens. <S> This really is starting to look like a bad connection somewhere around the (+) input of the op-amp. <A> You say the op amp isn't oscillating, but be sure to check under identical conditions. <S> In particular, if you have a capacitive load on the output of that op-amp (such as a long cable) it could cause it to oscillate. <S> I always put 50 ohms in series with the output of an op amp to prevent this. <S> Also, LDO's are famous for oscillating, especially with too much capacitance on the outputs. <A> Several problems: R4 is fairly large with no parallel capacitance, this gives the circuit excess gain at high frequencies. <S> It seems counter intuitive, but C1 which seems placed to clean up noise would be better used across R4. <S> Another issue is referencing a single supply op amp circuit to ground through R1, if this were a dual supply circuit that connection would be equivalent to using the -VCC rail. <S> Suggestions: <S> There is a reference circuit in the MCP6V11 device doc which looks precisely like what you intend to do here <S> Further details on bridge amplifiers and even a single supply design are in these Analog Devices materials.
| If you are measuring the 1.5v "latch-up" voltage with a DC volt meter, you might simply be seeing the average voltage of an oscillation.
|
How to control the current output from usb slots of computers? Is it possible to control output from a computer usb port so, for instance if I have a usb led I can make it blink or do whatever with it. Whenever I send a high signal it would glow and whenever I send a low signal it would turn off. Is it possible? NOTE: I don't know if it is the appropriate site for this question. So, tell me where to ask if not from here. <Q> USB is a communication protocol. <S> When I say its a protocol, it means that there are certain rules that you have to follow in order for your computer to communicate with the targeted device. <S> Bellow is the wire structure required for USB communication. <S> Now, by default, your USB power supply is always on. <S> If you just want to control a single led (turn on or off) then you would want to check weather this facility is available with your motherboard. <S> If you don't have, then the solution becomes a bit difficult. <S> This is because you can not control the voltage levels of DATA- and DATA+. <S> Thus you might have to create a device that would understand and decode a USB packet. <S> So when you send the turn on or off signal encapsulated in a USB packet, the device would understand your command and control the led for you. <S> for the second option, check out Arduino . <S> There are very good examples for you to work on for arduino. <S> These boards make use of FTDI chips that @MarkU suggested. <A> USB ports use a more complicated protocol than GPIO (or the old PC parallel printer port). <S> You can't just directly connect a GPIO (like an LED) and toggle it. <S> The simplest way to use USB is to connect an FTDIchip.com FT232; these are very low-cost and readily available both as bare chips and as assembled modules, and the device driver is already installed on most modern operating systems. <S> Then you can open the port using FT_Open() and configure the chip for "bitbang mode". <S> This gives 8 pins of GPIO that can be driven by any USB port. <S> There are other ways too, but they always involve using a USB Serial Interface Engine, either inside the chip (like FT232) or in an IP core (like in an FPGA). <S> The details of the protocol can be found in the USB specification, at usb.org. <A> There are hubs that can turn ports on and off programmatically using C++ or Python. <S> Check out the Acroname USBHub2x4 and USBHub3 <S> +. <S> We use these in our regression test setup and love the APIs.
| But there are few computer motherboards that provides you to turn on or off depending on your need.
|
Using a microcontroller ADC to measure a 4-20mA sensor Question from a SW Engineer again. I've got a device which is mains powered and outputs a 4-20mA current depending on the flow rate in a pipe. I'd like to measure that flow rate with a microcontroller. On the face of it it's easy. My microcontroller is 3v3 so max current should produce max voltage of 3v3. So R = 3v3/20mA = 165 Ohm. If I pass the current through 165R and measure the voltage across the resistor it's all good. My problem is I'm unsure if I can actually do that. The uC will measure a voltage relative to it's ground connection so I have to connect the uC Gnd to the negative side of the 165 ohm Resistor. Is that safe? I was then looking at current mirror circuits but they all share a Gnd plane between the two sides of the mirror so it's no better then the simple 165R. Is there a "correct" way to isolate this sensor or is it a case of just connecting the ground. My uC will be powered by a Mains - 12v DC power converter so maybe ground will be the same on both sides? <Q> Yes, just connect the negative end of the resistor to the microcontroller analog ground. <S> This is one advantage of a current signal. <S> Since the microcontroller supply and the flow meter supply are isolated from each other, you get to pick one point on each where you can connect them together. <S> While your calculation of 165 Ω is correct, I would use just a little less to be able to sense some overrange. <S> 150 Ω might be a good value. <A> I've forgotten where I found this, likely as part of an isolated switchmode power supply, but with a little cleverness, you can make a linear current sensor with optoisolators. <S> Here's the basic idea: <S> simulate this circuit – <S> Schematic created using CircuitLab R1=R2. <S> The current through R3 will be the same as the original current being measured. <S> The advantage of this circuit over a single isolator and R1 is to cancel the non-linearity that optoisolators are famous for. <S> The optoisolators should be identical so that their non-linearities match. <S> If you're not dealing with particularly high voltages, this is best done with a dual or more package. <S> Otherwise, two singles from the same batch should be used instead to allow the isolated circuits to remain separated by the required minimum distance. <A> 4-20mA loops can be troublesome if you don't know exactly how they are fed. <S> Most common isolators have outputs of 0-10VDC, or 0-5VDC, but are widely adjustable. <S> That being said, if you KNOW that the sensing resistor is going between the devices output and the negative supply for the device, and that there are no wildly high voltages present (AC or DC) between the common of the transmitter and your uC, then you can directly connect them, common to common and high side of the sense resistor to your input. <S> Caveat on either approach... <S> Some instruments will generate either a 0mA or up to 30mA signal in the event of an instrument fault; so I wouldn't try to make 20mA represent exactly your maximum voltage to your uC unless you clamp the input to protect it.
| Your best bet would be to use a complete isolator, and while you are at it, get an isolator that can also convert the 4-20mA to a 0-3VDC signal.
|
Is there an affordable Power Supply capable of 12 Volts and 7 Amps? I am trying to power a pump that requires 12 Volts and 7 Amps to run. I have looked around but cannot seem to find a power supply capable of the voltage and the current. Does anyone know where would be a good place to find something like this? (If an off the shelf power supply is not affordable) Is there some simple combination components to go from 110V AC to 12V DC and deliver the 7A? I have to admit I am not very well informed in this field, so any help would be greatly appreciated. Thank you <Q> There are plenty of decent quality 'enclosed' (you will likely have to add an external enclosure for safety etc.) <S> switching power supplies in the $50 range with 12V output and good for more than 7A, however you may wish to determine what the requirements are for starting. <S> As well, depending on the pump, the current may vary significantly during each cycle. <S> You might find you actually need a 350W supply to start and run an 84W (running) pump. <A> There are many companies that make industrial power supplies capable of 12V and 7A, or way more--such as Meanwell, PULS, or Lambda, to name a few. <S> These are available in enclosed, open frame, DIN mount, and other form factors. <S> Whether or not you consider them affordable is something only you can answer--for ~100W <S> you're looking at probably in the $20-60 ballpark. <S> Mouser, Digikey, and other similar electronics suppliers will have these listed in a nice searchable form. <S> For DIN rail format supplies, you may have better luck at an automation supplier. <S> You could use a very simple arrangement of components to make your own power supply-- <S> all you need is a transformer, a few diodes to make a bridge rectifier, and some capacitors to smooth the output, however to get 12V and 7A out of such a simple power supply will not be very efficient or demonstrate very good regulation--and it will be very heavy due to the large transformer required. <S> For better efficiency, you'd need a switching power supply, which is decidedly NOT a simple arrangement of components, particularly if you care about safety, reliability, or EMC. <A> They provide 12v at 17A and even have a remote switch (just cut off the silly Dell plug). <S> I use 5 in series to charge my electric bike. <S> I have also run then in parallel (with a couple of low forward voltage diodes to isolate the supplies) to double up on current. <S> They make ideal supplies for a heated bed on a 3D printer.
| Dell DA2 'brick' power supplies for small format PCS can be found very cheaply in surplus.
|
Ohm's Law confusion -- can there be voltage without current? I know there has been asked a similar question about this before but I still have some issues to understand the whole voltage and current thing. ( Current without Voltage and Voltage without Current? and Is Ohm's Law violating itself? ) Ohm's law states:$$V = R \times I$$ But what came to my mind is: if either the resistance or the current is zero the voltage will be zero, too (according to ohms law): $$V = R \times 0 = 0$$ and $$V = 0 \times I = 0$$ I'm not sure if Ohm's law is applicable here. Please correct me if I'm completely wrong or missing something obvious! So lets say I have a single power supply with a 5V fixed output: I'm going to measure the voltage with a typical \$10\text{M}\Omega\$ input resistance: Since there is a "resistor" as a load, current will flow: $$V = R \times I$$$$I = \frac{V}{R}$$$$I = \frac{5\text{V}}{10\Omega} = 500\text{nA}$$ But what if I disconnect the probes? Now we are at a point where it gets really confusing for me: There will still be a "load" on the supply, since: air is not a perfect isolator so it must have electrical resistance: (I'm assuming \$1\text{G}\Omega\$ here) Same as before, current would theoretically be: $$I = \frac{V}{R} = \frac{5\text{V}}{1\text{G}\Omega} = 5\text{nA}$$ So my question is: does this small amount of current really flow? Because if not there will be no voltage across the two terminals according to Ohm's law! This is really confusing and I don't think current will flow because it simply sounds really unlikely. <Q> Your estimate is off by several orders of magnitude. <S> Wikipedia gives the resistivity of air as being around \$10^{16}\ \Omega <S> \cdot m\$. <S> I'd guess an actual resistance between two points would be at least on the order of teraohms. <S> Assuming \$1\ T\Omega\$, that gives a current of 5 picoamps, which is far too small to measure easily. <S> As pointed out in an answer to another EE.SE question , the material the battery is made of is probably a better conductor than air. <S> To actually figure out what's going on in extreme situations, you need a more detailed model of the materials involved. <S> How many electrons and/or ions are available for conduction? <S> An ideal dielectric (insulator) has no free electrons, but a real dielectric might. <S> What's the strength of the electric field? <S> If you have a 40 kilovolt voltage source, you can rip apart air molecules, creating lots of free electrons! <S> A less extreme example would be a vacuum tube, which "conducts" through empty space \$(R = <S> \infty)\$ using electrons liberated from a piece of metal. <S> Ohm's law is an approximation that works for many materials at low voltages, frequencies, and temperatures. <S> But it is far from a complete description of electrodynamics and physical chemistry, and should not be treated as such. <S> To answer your question more directly, regardless of whether a tiny current flows through the air, there can definitely be a voltage between the terminals. <S> Voltage is another way of describing the electric field. <S> HyperPhysics shows what this looks like. <S> Specifically, the gradient of the voltage field gives you the magnitude and direction of the electric field: $$ <S> \vec E = <S> -\nabla <S> V$$ <S> I don't know whether a tiny current actually flows through the air, but hopefully now you have a better appreciation for the physics of the situation. :-) <A> The voltage across the (ideal) battery is independent of the current through. <S> That is to say, the battery is not an ohmic device and thus, does not 'obey' Ohm's law. <S> In other words, the voltage across the (non-zero) resistance is fixed by the battery; that voltage is given and is independent of Ohm's law. <S> Since the voltage across the resistance is fixed, the current through is determined by Ohm's law. <S> Thus, for an (ideal) open circuit (the limit as \$R \rightarrow \infty\$), the current through is zero but <S> the voltage across is fixed by the battery voltage . <S> In summary, the voltage across the resistance (in this ideal circuit) is not determined by Ohm's law, it is determined by the battery. <S> When the resistance is 'infinite', <S> the current through is zero by Ohm's law. <S> Note that there is difficulty if we allow the resistance to go to zero. <S> In the ideal case, the current is unbounded. <S> However, this isn't physical. <S> A physical battery cannot supply unlimited current (there is an effective internal resistance) and so, to model this, we add a small resistance in series with the battery. <A> Open circuit means infinite resistance. <S> So: $$ V <S> = I\times <S> R = <S> 0 <S> \times <S> \infty$$and $$ 0 <S> \times \infty$$is not defined. <S> See: <S> Why is Infinity multiplied by Zero not an easy Zero answer? <A> When you have a fixed voltage and unknown current, you should re-state <S> Ohm's law this way: $$ I <S> = \frac{V}{R} $$ Since V is constant and finite, then you can see that $$\lim_{R\to{}\infty}I = \lim_{R\to{}\infty}\frac{V}{R} = <S> 0$$. <S> So even though R is never quite infinite, Ohm's law still shows that the more you increase R, the closer I gets to zero. <A> Ohm's Law confusion — can there be voltage without current? <S> Yes. <S> The wall outlet has voltage all the time, but current only flows if the circuit is closed with something that has a resistance.
| Wherever there is an electric field, there is a voltage difference, even in a vacuum with no matter at all!
|
4 digit 7 segment CC - all digits count the same number Ultimately I'm looking to build something that's going to count revolutions as part of a guitar pick up winder. I've got a circuit hooked up with 4 x 4026 counters going into a 4 digit 7 segment display. I believe I have the correct linking of the chips withe carry from one going into the clock of the other. But every time I provide a clock pulse all 4 digits on the display increment by 1 rather than just the least significant. I have the pin outputs from each of the chips going into the corresponding cathode of the 7 seg display but I just cannot get it to count more than 0 - 9. What am I getting wrong? This is my first question on here. I'm new to electronics and have been working at this for a few days but always run into the same problem. Really appreciate any help. Thanks for the comments and answers so far. I've added what I hope passes for a circuit diagram... I think I've got the clock in and carry out (/10) connected correctly and I think I've got the right outputs going into each of the common cathodes on the display. I'm not worried too much about re-setting or inhibiting the clock right now so I've put them to negative. I'm not doing anything with Pins 4 and 14. The LED on the left is just another method of me knowing a clock pulse should be going in <Q> You have the clock running to all of the chips, and therefore they count in parallel. <S> What you need to do is hook the clock to the clock of the first (least-significant) digit, and then the carry out from that digit goes to the clock of the next digit. <S> And so on. <A> The 4026 has a 'divide by 10' output on pin 5. <S> Connect this pin to the clock input to the next digit for each stage of the counter. <A> You have all cathode leads of the display grounded. <S> This will force all digits to display the same number. <S> The display you have needs a multiplexed input. <S> You will need seven 4:1 multiplexers between the counters and the display, with the segment outputs of counter 1 going to input 1 of the multiplexers, counter 2 to input 2, etc. <S> You also need to arrange to ground one cathode lead of the display at a time, switching the mux and cathode selection in sync, so that display 1 will be enabled when the mux selects counter 1. <A> Peter Benett has told you what your problem was <S> but I have a better solution for a fix: simply change your display to 4 separate 7-segment displays. <S> The 4026 was designed to drive a single 7-segment display. <S> There are other chips available that will directly drive a multiplexed display without all the extra glue logic that Peter mentions. <S> Be careful which 7-segment displays you purchase: they are available as "Common Cathode" and "Common Anode". <S> The 4026 is designed to drive Common Cathode displays.
| According to your schematic, you have the outputs of all counters connected in parallel, and to the anode inputs of your display.
|
How to detect the rising edge of a pulse that is not in sync with the clock This may be a trivial question. I have a microcontroller that will attempt to recognize the rising and falling edges of a pulse. This pulse is not in sync with the microcontroller's clock or any clock. For my intents and purposes, the voltages are adjusted to the voltages that the microcontroller requires. How should I expect the microcontroller to behave if it tries to detect the rising edge when... ...the pulse begins near the beginning of the clock cycle? ...the pulse begins in the middle of the clock cycle? ...near the end of the clock cycle? As well, what should I expect if I try to detect the falling edge with the same timings? (1. near the beginning, 2. in the middle, 3. near the end) I don't know if this question depends on the specifics of the MCU or the pulse. If so, I can provide specs. Thanks! EDIT: I think I worded my question poorly. I understand that the MCU will only sample each clock cycle. I was mostly asking what would happen if the pulse were to change polarity in the 1. beginning, 2. middle, 3. end of a clock cycle. Will this affect what the MCU samples? Specs: ARM9 MCU http://www.nxp.com/documents/data_sheet/LPC3141_43.pdf Pulse: Pulses are generated by an avalanche photodiode. Each pulse represents the arrival of one photon. Pulse high lasts 30 ns, pulse dead time is minimum 50 ns. The current goal of my project is to use the internal timer to time these pulse arrivals. <Q> Here is the way it works. <S> If you have a pulse, assuming voltages are OK, it will be detected at clock N if it meets the setup and hold time for clock N. <S> If it is too late to be detected at clock N, it will be detected at clock N+1. <S> If the timing is marginal, it may be detected either at clock N or clock N+1, there is no way to know ahead of time. <S> Please note that there is a minimum detectable pulse width. <S> If the pulse is too narrow, it may not be detected at all. <S> Generally, "too narrow" means less than one sample clock period (but you need to work it through with the setup and hold time specifications to fully understand the minimum pulse width). <S> So if the minimum pulse is less than one clock cycle, then there is the possibility of missing a pulse. <S> Welcome to the joys of asynchronous design. <S> Depending on what you are interested in, there are all kinds of things you could do. <S> If pulse timing is what you are most interested in, you can start an integrator on the pulse rising edge, then sample the analog voltage output of the integrator with an ADC synchronous to the digital sampling. <S> Then you convert the ADC voltage to elapsed time. <S> This will allow you to figure out the time of the pulse with sub clock accuracy and precision. <S> Have fun! <A> The sampling theorem states that you should at least sample with double the frequency of the signal. <S> (very basically speaking) <S> There's no such thing as the beginning, middle or end of the sample, because the sample is the atomic unit of time so to speak. <S> You do not have more resolution. <S> If the next rising edge comes in before you can finish the current one, interrupts queue up and data can be lost. <S> The theorem is not all that matters here, because you need some cycles to run your code, too. <S> µCs often come with dedicated peripherals for such tasks. <S> capture/compare <S> units for example can run a timer until a rising edge is detected and write the timer value into a register. <S> This is very quick because it is done in hardware. <S> The register can then be copied to some block/array of memory, in order to save it from being overwritten by the next incomming timer value. <A> The relationship between input data and input clock for a gate is specified by its setup and hold times. <S> For an individual flip-flop, this provides a window when the change will be registered properly and a small time in which it may not (possibly resulting in a "metastable" state). <S> Since there is not really such a thing as an edge, only a slope of finite time, the risk window cannot be made zero size. <S> So the normal solution is to cascade several flops one after the other, with special metastability resistance. <S> There will be a fixed multi-cycle delay between the signal arriving at the pin and it registering internally. <S> There will also be an interrupt latency if you are triggering an interrupt. <S> For practical purposes, if you read two pulses from an input pin the timings may be off in each direction by up to one whole clock cycle. <S> Your signal may be up to 20MHz; trying to read this on a microcontroller with anything other than a dedicated serial input peripheral is likely to have issues. <S> You can probably measure a pair of signal timings with a capture/compare peripheral though. <S> Edit: this is related to your previous post, isn't it? <S> This would be much easier if you described where the pulses are coming from and what protocol they mean. <A> Directly using interrupts or polling values will anyway make you depended on digital sampling rate. <S> Instead, use a flip-flop buffer. <S> After polling the data, reset it. <S> May there be numerous signals that be lost until you poll? <S> Than use a fast counter IC, poll the value in a statistically meaningful period (I mean, considering some tolerance for the counting that may be lost in poll and reset sequence) and reset.
| You could have the pulse enable an analog integrator so that pulses can be counted in an analog way, then occasionally sample and reset the integrator to avoid overflow.
|
Current decreases while reading I'm a bit confused about reading current on a breadboard using a multimeter (I'm a complete beginner with electronics). I'm using a self-powered breadboard which should deliver 5V / 1A. Multimeter is a Fluke 87V. Voltage is OK, but when trying to read current on a simple circuit with no component (voltage out -> multimeter -> ground), the multimeter starts by giving a reading of ~2A, continuously decreasing (even below 1A). When placing a single resistor on the circuit, the reading is perfectly correct, based on the resistor value, and stays stable. So is this something normal (then why), or am I doing something wrong / missing something? <Q> You DO NOT EVER connect an ammeter directly across a power supply - <S> the ammeter is very low resistance - essentially a short circuit - so the power supply will deliver as much current as it can - possibly damaging the power supply or the meter. <S> You say the power supply is rated to provide up to 1 Amp, but it provides 2 Amp when the meter is first connected. <S> That 2 Amp apparently overheats the voltage regulator, causing it to protect itself by reducing its output voltage and current. <A> You are using your multimeter's Current Shunt to short out your power supply. <S> I'm guessing that the power supply on your breadboard is going into thermal limit to protect itself. <S> In other words, because there is a dead short across the supply, the supply is going into current limit. <S> Many (most?) supplies that are built into self-powered breadboards use linear regulators. <S> One reason is cost, a better reason is that they have dramatically less noise on the output. <S> Having a low-noise power supply is important when breadboarding sensitive analog circuits. <S> Most single-chip voltage regulators (78xx, 79xx) have thermal limiting internal to the chip. <S> They will automatically reduce the current when the internal die temperature rises above some threshold. <S> The hotter the regulator, the more the current drops. <S> These symptoms match what you are reporting. <A> No more breaking circuits to install an amp meter for a couple minutes, easy to switch wires that you are monitoring without shutting down, safer on high voltage / high current applications. <S> If your voltmeter does not have a fuse on the amp circuit, get a better meter.
| My recommendation is to get an amp clamp and remove the fuse on your voltmeter's amp circuit (disabling it).
|
Is moving fast will effect WiFi transceiving beavior? Let's say I'm driving a 2010 Bugatti Veyron 16.4 Super Sport , with speed of 431 km/h = 268 m/h = 119 m/s Now I have a WiFi signal receiver installed on the top of the car and a WiFi transmitter in a fixed base station.[An access point in a fixed station that covers area of 4km , and a WiFi receiver with high power] Will moving this fast effects receiving the signal ? What are the parameters to calculate the possible drop in signalreceiving ? Will any packets get dropped when moving this fast ? Is it the same situation for transmitting from the car to the station? What I found till now that Doppler effect may effect , but I don't know how. Update#1: Wi-Fi in high-speed transport communications <Q> At a speed of 119 m/s and a frequency of 2.45 GHz, the doppler shift will be 971 Hz. <S> See this on-line calculator. <S> That is what a receiver may have to cope with. <S> If you then consider the accuracy of the crystal oscillators at either end of a radio link, the frequency differences are likely to be in the realms of hundreds of hertz BUT the receiver copes. <S> The receiver copes by tracking the signal <S> it is trying to receive with several methods but ultimately it boils down to a phase locked loop (PLL) adjusting a voltage controlled oscillator (VCO) to keep absolutely spot-on in sync while decoding data. <S> I'm going have a stab at a guesstimate that several kHz of clock difference can be tolerated using this method. <S> If there is a mechanism that can take account of clock differences then it will take account of doppler shifts too. <S> The only thing to really shake this theory is really extreme accelerations because the "system" will have a small time lag and it might just get out of sync for a few moments and of course reception of a packet may be jeopardized and that packet may require to be retransmitted. <S> I recently watched a programme on TV about the sad loss of Malaysian Airlines flight MH370 - <S> the system that was used to receive the hourly automated transmissions also "held" values of control voltages used to tweak shifts in transmit and receive frequencies and these numbers held all the information about doppler shifts too. <S> In effect they were able to tell what direction the plane was flying and pin-point a crash area of about 100 sq miles. <S> I was amazed that the "tweak" parameters were held in a data base and that this information was available retrospectively. <S> The slow moving (or static) <S> "value" offset would represent the almost fixed difference in frequency between the tx and rx oscillators whilst the more dynamic changes would be the doppler shift effect. <S> See this article about the doppler method used. <S> Ultimately, what I'm labouring to say is that doppler effect is likely to be "fixed" by the same mechanism that fixes the difference between clock frequencies at either end of the link. <A> My answer relies on my experience in multiple generations of Wifi systems design (802.11g/a/n/ac). <S> The Doppler calculation in the previous post is correct. <S> Wifi receivers deal with crystals with an accuracy of about 20ppm (20 parts per million). <S> This means a receiver and a transmitter can have a difference of 40ppm between them, because one can be shifting up while the other is shifting down. <S> If you compute the frequency difference such a clock drift generates at 2400MHz it is 2400e6 <S> *40e-6 = 96KHz. <S> Far greater than the Doppler shift mentioned. <S> Therefore, there shouldn't be a problem from a frequency tracking perspective. <S> Furthermore, the ability to discern the frequency shift is limited by the specification (frequency estimation ambiguity point) at 625kHk, again, no problem here. <S> Regarding path loss... <S> If you are taking the a 4km distance of free space, the loss is (based on the Friis equation: https://en.wikipedia.org/wiki/Friis_transmission_equation ), neglecting antenna gains. <S> PL [dB <S> ] = 32.5 + 20*log10(F*R), where F is the frequency in Ghz and R is the distance in Km 32.5+20*log10(2.4*4) <S> ~ 52.5 dB. <S> A Wifi transmitter can transmit at about 16-30dBm. <S> Taking even the low range of 16dBm, the signal will reach the receiver at 16-52.5 <S> = -36.5dBm. <S> This is a very high signal for Wifi systems. <S> Their sensitivity for OFDM is in the range of -90 to -70 dBm. <S> Therefore, the signal strength poses no issue. <A> While it is true that WiFi receivers can tolerate 20ppm frequency error in reference crystals, it is important to realize that the frequency error is somewhat "fixed" relative to 1/(symbol time) and changes very slowly with temperature and aging. <S> Doppler has no real impact here. <S> It is the actual symbols which are phase related that need consideration. <S> 802.11ac/a/n/g OFDM signals use QAM modulation on each tone. <S> QAM is quadrature amplitude modulation. <S> Each rate can only tolerate a certain amount of phase or amplitude error usually quantified as error vector magnitude or EVM. <S> Each symbol is about 4uS in duration, so any errors in phase or amplitude during that symbol period will result in a degraded EVM and if too large, then that symbol set is lost which could cause a packet loss. <S> The calculations for Doppler shift effects should include the symbol time and the bandwidth of phase tracking, not frequency tracking of the system. <S> A shift in phase is not necessarily a shift in frequency, but a shift in frequency is definitely a shift in phase.
| It should also be noted that most WiFi APs don't have 4km of range, so at this speed, the car could be out of range before the association is completed. Frequency tracking is not really the issue when considering the Doppler effects on WiFi OFDM signals.
|
Overpowering a peltier element I have a peltier element rated at 15.4V, 6A, and 60 watts that I got from China and has no datasheet to be found. When I drive it with a 12 volt power supply, I can get up to about 5.5 amps giving a power output of over 60 watts. Is this an issue? Maybe the specs I have are misleading, but they don't make very much sense to me. is going over the rated power okay if I keep it cool? I have a heatsink on the hot side and it is not even noticeably warm. Is driving it over the rated power going to hurt it? It doesn't make sense to me that the given current and voltage levels would yield so much more power than it is rated for. It makes me think the 60 watts is just a suggestion. It says TEC1-12706 on it, but as far as I can tell, that is not unique to the particular product. <Q> 15.4V <S> x 6A is over 90W, not 60. <S> So 60W is not the "rated power" but the heat pumping capacity. <S> This is in line with other Peltier coolers I've seen - they take about 1.5W of electrical power to pump 1W of heat, whereas a compressor-based refrigerator would pump 3-4W of heat for the same 1.5W input power. <S> So you can use it at 12V, 5.5A ( <S> 66W in) <S> and it'll probably pump about 40W. <S> Add these together (106W) and add a safety margin : plan your heatsink/cooling to remove something like 120W from the hot side. <A> You might try looking at a few TEC data sheets, such as this one. <S> http://www.hebeiltd.com.cn/peltier.datasheet/TEC1-12706.pdf <S> You'll note that, for a given current, the voltage required increases as the hot side temperature rises. <S> Since you don't have a data sheet, I suggest that the ratings you've got are probably based on a somewhat elevated temperature. <S> As for damaging the TEC by driving too much current through it, apparently the answer is yes. <S> See, for instance, http://assets.newport.com/webDocuments-EN/images/AN14_TEC_Drive_Current_IX.pdf <S> where the subject of thermal runaway is mentioned. <S> However, that's not what you are interested in: you want to go for cooling effect, and that depends on several factors. <A> The current and voltage rating of a Peltier are ususally the maximum cooling point. <S> You should also consider them the maximum value to not exceed to avoid damage. <S> While there is probably some margin past the maximum cooling point before damage occurs, it is stupid to go there anyway. <S> The cooling power of a peltier is proportional to the current thru it, but the internal heat caused is proportional to the square of the current. <S> Eventually the square wins over linear, and at some point adding more current actually decreases the overall cooling capability. <S> Put another way, the incremental current causes more internal heating than additional cooling power to get rid of that heat. <S> This is what the maximum cooling point is, and which is why you don't want to exceed it even if no damage is done.
| In general, it's true that the more voltage you apply, the more power the TEC will produce. Efficiency depends on things like your heat sink capability.
|
Who triggers transistors to become H/L? Admittedly that's quite a beginner question: When I learned that transistors work like relays and produce the digital values 0 and 1 what I always asked myself was: they have to be triggered by someone, but by whom? When I turn the light on and off, then it's me who triggers the relay but who is it in an electric circuit or within a CPU? Or when thinking about a flipflop, who tells the transistors to go to 0 or 1? I never understood how that happens, I image it like the chicken or the egg causality dilemma. <Q> In very most cases (maybe 99.999%) <S> the transistors of digital circuits are triggered by the output signal of other transistors. <S> The remaining few cases are interfaces to the non-electrical or analog world: peripherals like keys (interfaces to digital but not electrical signals), ADCs (interfaces to electrical signals thar are not digital), oscillators, etc. <A> Individual transistors are amplifiers. <S> They may handle very small voltage changes in analog circuits, or in digital circuits they are driven to turn fully on or off, in order to give the voltages that correspond to 0 and 1 <S> (typically 0 is 0V and 1 is +5V). <S> A flip-flop or "bistable" circuit needs two transistors. <S> They are wired to stay in whichever of the states ON-OFF or OFF-ON <S> they were last put into. <S> Like the spring in an ordinary light switch keeps the switch as you last set it. <S> In order to change the state, a pulse of energy must be applied. <S> Like your hand that pushes the light switch. <S> Do inspect the description of the flip-flop which is fundamental to all computing. <S> http://en.wikipedia.org/wiki/Bistable_circuit <S> It is really more predictable than chickens. <A> To run a CPU, you need program code which can be executed. <S> When powering, most CPUs start with program code address 0. <S> The byte at that address tells the CPU what to do. <S> After executing the command, the CPU goes to the next address and so on. <S> For example the program code for "load 3" (on a Zilog Z80 .) <S> : <S> 3E 03 , whereas this is in hexadecimal format. <S> 3E means load. <S> With these bits, the CPU can trigger transistors to do what the command tells him to. <S> In this case load the following Byte. <S> The following Byte then is 03 <S> which is exactly what we want to load. <S> This is done by logic gates in digital circuits . <S> For every command, there is a "code" and every code triggers the internal transistors differenty. <S> These codes vary for every CPU. <S> Windows PCs usually have x86 architecture CPUs, that differ greatly from the Z80 CPU used for the example.
| Transistors inside the CPU are switched depending on user defined program code.
|
Can reading VGA signals from my computer harm the hardware? I was really hoping to be able to get (or make) a Y type VGA cable with two outputs and one input. The input would be coming from my desktops graphics card(specifically an R9 270). One output would go to my monitor as normal and the other output would be going to a breadboard/oscilloscopesetup Im looking to study the signals coming out of them (average values, manipulating the output signal, etc). Are there any issues with this? Are there any precautions I should take? Any possible ways I could accidentally fry my graphics card or other components? <Q> Splitters are quite simple with VGA- the information only flows one way unless the monitor has an I2C identification channel. <S> Damage is unlikely, and provided you follow proper procedures there is little that can go wrong. <S> Of course if you accidentally attach any of the VGA wires to something that sends current into the output port, or there is something seriously wrong with the grounding on your oscilloscope etc. <S> bad things <S> could happen, as with any direct connection. <S> Take normal anti-ESD precautions (touch the metal case before touching any connections or use an anti-ESD wrist strap with a high-value internal resistor to earth), make sure the oscilloscope is grounded to earth as the computer, and you should have no problems. <S> Here's the pinout of a standard VGA por t: <S> The timing diagram looks like this : <S> The RGB analog video levels should be in the range of 0 (dark) to 0.7V (full bright). <S> Sync signals are logic level 0V/3.3 or 0V/5V. <A> Graphics cards should tolerate the capacitive load of a wide range of VGA monitors so the additional load of a high impedance (>10 kohm) <S> oscilloscope input will not cause a problem. <S> If the branch to the scope is long the horizontal resolution of the display will be degraded by reflection or added capacitance. <S> If you need to measure risetime, I advise disconnecting the monitor and terminating the VGA signals in 100 ohm at the scope input to match the cable impedance. <S> Here are the VGA pins: http://www.computerports.net/vga-port/ <A> You might want to google "VGA breakout board" to make your life easier.
| Take care not to short-circuit VGA signal leads together or to ground. As long as you're just monitoring the signals and not actively driving them from some other circuitry I don't think you'd have anything to worry about.
|
What type of molex connector is this? I've been buying wire-to-wire and wire-to-board Molex connectors that look like this: from a local hardware store for years (the image is taken from SparkFun, which sells them with the crimp terminals and wire pre-installed). I'd now like to buy a large number of them from an online supplier (e.g., DigiKey or Molex themselves) but I can't figure out what specific type of Molex connector they are. Molex's site has quite a variety of connectors and I'm finding it difficult to determine which product line these ones belong to. Their pitch is approximately 2.5 mm (possibly 2.54) and they use crimp terminals that are held in place by a raised metal "flap" (one per terminal) that catches on a narrow rectangular hole in the plastic casing (in the photo above, these holes are on the underside of the female end of the connector). <Q> They are pretty common. <S> You are correct, they are 2.54mm pitch, or 0.1". <A> They are molex kk connectors. <S> Specifically the variant with "locking ramp". <S> IIRC theres also a couple of different lengths of locking ramp, you seem to have the ones with the large locking ramp. <S> (replace xx in the part numbers below with the pin count you want) <S> 22-01-2xx5 for the housing22-27-2xx1 for the PCB header08-50-0032 for the terminals <S> You can solder and heatshrink wires to the PCB mount connectors but it's a bit of a pain. <A> This is most likely a KF2510-2P connector as these are ubiquitous and can be acquired cheaply nowadays. <S> They are very popular among businesses that sell kits such as SparkFun Electronics . <S> These connectors can be found in various pin counts and orientations. <S> They are very popular in China. <S> The "KF2510" designation seems to be an equivalent to the Molex KK 254 (which came first). <S> Note that the 2P <S> portion of the part/model for this type of connector indicates that it has two pins. <S> I don't know if it's possible to source KF2510 on a reel for a large production run as this part number doesn't seem to have a listing with the parts distributors I looked at. <S> In this case, you would want to source the Molex KK 254 specificlaly, usually from either DigiKey or Mouser Electronics .
| Its a Molex KK 254 type connector (or just Molex KK) - or equivalent from other manufacturers. Unfortunately while i've seen PC accessories with cable mount male variants of this connector molex don't seem to sell a male version intended for cable mounting. Because this equivalent connector is ubiquitous in China, it can be obtained easily and very cheaply in either small or large quantities from both eBay and AliExpress.
|
Circuit design recommendation to prevent a failing regulator I designed a PCB that contains, among other things, a switching regulator circuit and an H-bridge for a DC motor. The whole circuit is powered by a 15V Lithium battery. The switching regulator converts the battery voltage to 5V to power the digital logic on the board. The DC motor is driven directly from the battery through the H-bridge. The motor itself was torn out of a hand-held impact driver with a stall current around 15A. Without the motor attached, I'm able to get full functionality of all the digital logic components, so the switching regulator is doing its job. When I attached the DC motor, however, the switching regulator went pop. It appears to be completely dead. No signs on life on any pin. Here's the switching regulator circuit using an LT8609 . I've intentionally cut off the input and output caps so the schematic will fit nicely on the screen. There's about 32uF of capacitance on Vin and about 88uF downstream of the inductor. VIN of the regulator is attached to the net named V_BATT: Here's the H-bridge using the MC33883 H-bridge driver. I apologize if the image is unreadable here. You may have to view it in a separate tab on your browser or save it and open it in an image editor: The ACS711 in the upper-right hand corner is just a Hall-effect current sensor. Here's the sequence that I performed that lead to the LT8609 failing: 1. Battery power was applied to the circuit. 2. The LT8609 powered on and was stable, providing 5V to the digital logic components. 3. The microcontroller (which uses the 5V) was programmed in debug mode. 4. Almost instantly upon running the code in debug mode, the LT8609 popped. The only instructions that were programmed into the microcontroller (besides the usual oscillator and other initialization settings) were: 1. Enable the H-bridge (set pin G_EN high on the MC33883). 2. Read a voltage value from a potentiometer. 3. Set the duty cycle (based on the pot value) of the PWM signals to the H-bridge to turn the motor. At the time, the pot was turned to 0V, which would have translated to a near-zero duty cycle of the H-bridge. 4. Loop forever Both the LT8609 regulator and the MC33883 H-bridge are powered from V_BATT. The worst thing I can think of is the H-bridge caused a shoot-through condition as the microcontroller that controlled it was coming online. But even so, I don't see how that would kill the LT8609. I would appreciate if anyone can give me ideas as to what might have been the culprit to help me troubleshoot. Also, point out any fatal flaws in the circuit that I'm missing. <Q> Some things to think about: <S> The H-bridge was tried with Vb and micro on a lab supply, but without 5V switcher, right? <S> Has the source impedance (of Vb) been compared to load impedance of motor drive and switcher combo? <S> Source impedance needs to be much lower than load impedance. <S> If not, supply could oscillate, especially if kicked by a motor hard start. <S> Are all the PWM signals generated by timers in the micro, so that they maintain proper phasing and timing (i.e., not bit banged in code)? <S> Were all the PWM inputs to MC33883 correct before giving enable? <S> No tri-stated output,or highs when should be low. <S> Are you sure the ADC readings from pot are OK? <S> Noise here could cause trouble. <S> Is motor drive frequency compatible with switcher filter, both input and output? <S> I.e., not on top of a filter resonance. <A> I think the problem is on the inductive load (high flyback voltage from motor), have you tried a resistive load. <A> Except what was already said (i strongly support overvoltage protection) <S> i can tell, that this acs711 will give you nothing, put it on the motor.
| If is working with resistive load you may need some separation on the supply of LT8609 or a snubber on the motor.
|
Transformer at primary winding If transformer is coil (primary and secondary), then when we connect ac source across primary winding which is a nothing but a coil, so entire coil impedance will come across ac source and it will be short circuit condition at input winding ( considering low resistance of primary winding ) and at secondary even if secondary is open then ac line is short circuited by low resistance primary winding. Does it actually do short circuit of ac mains? Please someone elaborate , I have this basic question. <Q> It is mostly an inductive reactance, due to the fact that it is wound around an iron core. <S> This limits the amount of current drawn by the primary, when nothing's connected to the secondary. <A> Not sure if I get the question (due to my low experience), but if you only have a circuit with a coil then the only "resistance" you have is the cable's resistance and the special ability of the coil. <S> The current through the coil creates a magnetic field and because of this field, the coil induces a voltage (or "emf") that stops your current. <S> This only lasts for a very short while, but since it will happen everytime the alternative current changes direction I guess you're permanently protected from short circuiting. <S> simulate this circuit – <S> Schematic created using CircuitLab - physics 2nd year student <A> The transformer will generally have a high inrush current, and the larger the transformer <S> kVa wise, the larger the inrush current, but the high current is only on the first AC cycle. <S> As the core magnetizes, the idle current drops off to just about zero. <S> It isn't a short across the mains, since the magnetic field builds up in the core nearly instantaneously. <S> It is just that applying power initially, there is no magnetic flux to oppose the AC. <S> Often, on single phase transformers, you can reduce or eliminate the inrush surge by powering them up at a zero crossing <A> What you are describing is essentially performing an OC (open circuit) test on a transformer. <S> During an OC test we can apply rated voltage to the transformer. <S> (Applying voltage over the rated voltage will result in the degradation of the insulating material.) <S> If you think of it purely are once circuit, yes <S> the AC source is short circuited. <S> But it isn't one circuit. <S> The primary coil is magnetically coupled to the secondary which as you said is open circuit. <S> This initial current which runs through the circuit is high, but it is not nearly as high as what the transformer can run under full load. <S> The only current the transformer will pull is the current required to overcome iron losses and magnetizing current. <S> This current is usually 2-10% of the rated current. <S> The designer of the transformer will choose an appropriate gauge of wire to handle this current. <A> For all learning intents and purposes, you can view it as this; It only short circuits if you short circuit the secondary, otherwise it simply acts as if it's a circuit with a coil on either line, i.e. like a normal output, but with the effect of the transformer ratio. <S> So if it's 1:2, you put in 110VAC @ <S> 2A and get around 220VAC @ <S> 1A. <S> You shouldn't do anything with mains unless you isolate yourself with a 1:1 transformer, a fuse, and gloves. <S> You don't have the basic stuff quite down yet. <S> For a more complex view; Neither end of the primary connection is really touching in terms of a typical circuit. <S> You can view it as the above image if the concept doesn't agree with you. <S> However, there is coupling in both cases of my separation examples. <S> If you short the secondary, you short the primary. <S> They depend on each other, treat the secondary like you'd treat the primary.
| The "coil impedance" is not the short circuit that you imagine it to be.
|
Microcontrollers: What to do with unused non-IO pins? There's plenty of information on what to do with unused IO-pins on a microcontroller. You can set them to a floating output, ground them, or pull them up to Vcc or down to ground. However I can't find any information on what to do with non-IO pins. Do the same rules apply to those, or can they simply be ignored when they're not being used? EDIT: Sorry for being unspecific. The microcontroller I am using is a Microchip PIC18F4550, and it has a Vusb-pin (non-IO). I was looking for a general answer for how to treat non-IO pins, but I guess it's specific to the individual pins. <Q> The data sheet for your micro will have a brief pin description for all pins that will generally tell you what to do with it if is going to go unused. <S> For example, if pin x is unused, connect to 100nf capacitor to ground. <A> This question seems to be a less specific version of What to do with unused analog inputs? <S> An answer to that question suggests connected unused ADC inputs to a pull-down resistor. <S> An Analog Devices page says to ground such pins. <S> A TI app note for C2000 MCUs <S> says to connect unused ADC inputs to the analog ground, and to ground reference voltage inputs if the ADC is totally unused. <S> A Freescale app note <S> likewise says to ground unused ADC pins. <S> You should always defer to your MCU's datasheet or reference guide, but it seems like the rule of thumb is to ground unused analog inputs. <A> How unused non-IO pins should be connected depends on their function. <S> For example, here is what the MSP430 F5 series User's Guide says: <A> You specified that you use microcontroller. <S> Use the microcontroler's datasheet. <S> It is written there. <S> For PIC uC it says to put them to output and connect them to VSS <S> Unused <S> I/ <S> Os <S> Unused <S> I/ <S> Alternatively, connect a 1 kΩ to 10 kΩ resistor to VSS on unused pins and drive the output to logic low.
| O pins should be configured as outputs and driven to a logic low state. The only reliable way to find out is to read the datasheet.
|
How do integrated circuit design companies create their datasheets? Especially for something like a microprocessor. I assume the majority of information is "auto-generated" or we'd see a lot more typos and errors. A laughable scenario keeps popping into my head where a handful of engineers pass around a word document, export it as a PDF and then manually apply bookmarks. Are these companies big enough that they can afford to have departments that churn out custom software, databases, etc. to assist their design process? I'm very curious because I'm finding it very hard to keep data/information/specifications uniform throughout the design process. Maybe this question belongs in a different exchange? <Q> I work for a large IC manufacturer and we do have a separate department that handles the generation of the published versions of datasheets. <S> This department is in charge of making sure that the datasheet has proper English, uses the correct industry and company terminology, complies with the company's formatting standards, doesn't contain any text that would have bad legal implications for the company, etc. <S> The document is XML-based. <S> Before that department gets involved, the engineer in charge of the product's specifications (usually called a "systems engineer" or similar) maintains the datasheet. <S> Throughout the development process, the systems engineer updates the specifications based on inputs from the other development engineers (all the development engineers can read the document from a central repository, but only the systems engineer can write to it). <S> In the course of these updates, plenty of engineers get a chance to correct technical as well as spelling/grammatical errors (because they're reviewing the datasheet for their own work anyway). <S> These engineers also provide the systems engineer with data to add to the datasheet (e.g. block diagrams, application circuit diagrams, scope captures, etc.). <S> When it's time for release, the development engineers have a final review to make sure all the technical data is correct. <S> At this point, the publishing department gets involved. <S> The publishing department has no idea whether or not the technical details are correct -- their purpose is to ensure the correctness of the formatting, spelling, etc. <S> There's some back and forth between the publishing department and the systems engineer as both sides ensure the final draft is both technically correct as well as formatted correctly. <S> To summarize the main points: Datasheets are based on the datasheets from previous-generation products (or at least similar products), so they aren't created completely from scratch. <S> The development team is responsible for ensuring the datasheet is technically accurate. <S> A separate department handles the formatting, terminology, etc. <A> It depends very much on company culture, as The Photon implied. <S> In some companies the designer(s) is/are responsible for the datasheet. <S> In others it is an Applications Engineer. <S> I can only tell you my personal experience. <S> The take away is datasheet development really informal. <S> For chips I've been lead engineer for <S> , I've written the datasheet myself using Word. <S> The first draft of the datasheet is often the first part of the Microarchitecture Specification (MAS) which is written early in the design process. <S> In big companies, as Null said, this is driven by the Systems Engineer. <S> Where I work, the designer is usually responsible (and takes on many of the roles of a systems engineer). <S> After the design is finalized, the chip is taped out, and I'm waiting for wafers, I will take the beginning of the MAS and then turn it into a preliminary datasheet. <S> All the text is written, and simulations are put in for all the plots. <S> This is passed around the group for feedback. <S> Then, the chips come back and the Product Engineer does bringup. <S> The Test Engineer starts measurements and I replace all the simulations with measured data. <S> I also replace the specifications table with real measured data (sometimes specs change after the chip comes back, you know!). <S> Then, when I deem it complete, I send it to our technical writer (we only have a few where I work) and he or she puts it in the standard form. <S> As The Photon said, during the design process a lot of ad hoc procedures are used. <S> I used to use Excel for keeping track of pads and signals, now I use Google Docs. <S> The actual DESIGN data, however, is kept in specialized databases accessed by expensive CAD tools with version control and so on. <A> At places I've worked engineers pass around Word documents during product development. <S> We usually call that a "target data sheet". <S> Then a tech writer reformats everything nicely, fixes grammar, re-draws diagrams, etc., to produce a customer-ready document. <S> Are these companies big enough that they can afford to have departments that churn out custom software, databases, etc. <S> to assist their design process? <S> A good tech writer can do a lot with Framemaker. <S> And it doesn't really take a custom database to keep track of the functions of 1000 pins or 1000 registers. <S> That kind of thing can be doen with Excel or even Word. <S> I'm very curious because I'm finding it very hard to keep data/information/specifications uniform throughout the design process. <S> It's helpful to keep just one "master" copy of the target datasheet. <S> Historically in places I worked the project's tech lead kept it on their desktop. <S> Nowadays we use a cloud site with collaboration tools so that any team member can read or (possibly) edit the up-to-date document at any time.
| All the engineers in the development team read and contribute to the datasheet, but actual editing of the datasheet is controlled by one engineer (the systems engineer). The initial datasheet is usually based on a previous-generation product, so much of the information has already been generated.
|
Implementation of a NOT gate with two transistors - Why not one? I just encountered this implementation of a NOT gate: My question is: Why do we need the lower transistor? Why can't we do this: Thanks! <Q> ...because to represent logical 0 you need (close to) 0 Volts and not just a floating output. <A> In addition to the previous answers, the NOT gate CAN be implemented using a MOSFET and a resistor: simulate this circuit – Schematic created using CircuitLab <S> But the problem here is the current that will be constantly flowing while <S> In is high. <S> The transistor will be then conducting, effectively closing the circuit with current around \$V(1)/R_1\$. <A> In your example, what pulls the output down to ground? <S> Essentially when the PFET is off, you will be left with the output signal floating. <S> If it is required to drive another logic gate for example, then it will not be able to sink current to discharge any parasitic capacitance of the next stage. <S> CMOS is what is known as 'fully restored logic' because you have two transistors which can pull to opposite power rails meaning that the output voltage levels are equal to the power rails. <S> This is advantageous behaviour if for example you need to chain multiple CMOS devices together. <S> Without fully restored logic, then your digital signal will get lower and lower with each gate until the signal gets corrupted (a 1 is no longer high enough voltage to represent a 1). <S> This need far outweighs the space cost of the extra transistor. <A> Actually both varieties are used, two transistor and one-transistor (although the latter is not how you drew it). <S> The first is called push-pull[totem-pole also called active pullup], and the second is called open-drain. <S> Push-pull outputs can both source (supply Vcc) and sink (ground) outputs. <S> Open-drain can only sink outputs. <S> The Vcc supply must come from somewhere else (usually a pull-up resistor). <S> The 74HC04, with six inverters, is an example of push-pull outputs. <S> The 74HC05, also with six inverters is an example of open-drain outputs. <S> Here is the output stage of each inverter on the 74HC05: <S> When the input is ground, the output is floating. <S> When the input is high, the output is grounded. <S> There are two common applications of open-drain outputs: 1) Connecting more than one output to the same line. <S> This is called a wired-OR. <S> For example, you may have a normally high reset pin on a device, which is reset from both a microcontroller pin and another source, say a pushbutton. <S> The reset pin is tied high with a pull-up resistor. <S> The microcontroller is configured as an open-drain output. <S> The pushbutton is tied to ground when pushed. <S> If either the microcontroller pulls its output to 0, or the pushbutton is pressed, the device will be reset. <S> 2) <S> Controlling devices connected to different supply voltages. <S> Say you have a relay that requires 20 mA, but a voltage of 5 volts. <S> But your microcontroller output can only drive pins up to its power supply (VCC) voltage of 3.3v. <S> With an open-drain output, you can connect one side of the relay to 5 V, and the other to the output pin of the microcontroller. <S> When the output of the microcontroller in is 1, nothing happens (again, acts like the pin is disconnected). <S> When it is set to 0, this grounds the bottom side of the relay completing the circuit and operating the relay. <A> You need something to both source and sink current. <S> Transistor gates look like capacitors and they have to be charged and discharged. <S> If you can't sink current, then the only way the transistor will turn off is to wait for the charge in the gate to leak out, which could take quite a long time. <S> It is possible to replace one transistor with a resistor, but resistors take up a HUGE amount of silicon area as opposed to transistors, and the output drive characteristics will be asymmmetric. <S> The static power consumption will also become state dependent. <S> NMOS logic generally uses only the lower transistor, plus a pull up of either a resistor or a weak transistor configured as an always-on pull-up. <S> CMOS logic uses transistors on both sides, sized to be symmetrical in drive strength. <S> CMOS also fully regenerates the logic level after each gate. <A> You are correct, it can be done with one transistor. <S> What you drew needs a way to pull the output down to 0v when the transistor is off, a resistor will do that. <S> The two transistor version has the advantage that it uses very little power when the output is either high or low. <S> The one transistor version you drew will use some power when the output is high [current thru the required pull-down resistor].To reduce this power you would want to make this resistor a large value [lower current], but then the current available to discharge capacitive loads would be reduced,making the transition time from output high to low longer [slower]. <S> If you make the resistor smaller it gets faster but uses more power. <S> The two transistor version gets around this by having low static power and fast tpdHL and tpdHL times.
| Using another transistor results in symmetric output drive and low static power consumption.
|
USB Flash drives up to 2TB? I found USB Flash drives on aliexpress.com up to 2 TB. So much people bought them, and I'm reading feedbacks and 90% says: "It works perfectly, thanks", just a few customers have left a negative feedbacks. Is it possible that flash drive with 2 TB of memory space exists nowadays? Why not, and whats the maximum flash drive storage capacity? Which type of formatting do they use, FAT32, NTFS? What is this all about? Here is the link <Q> Usually the size is a few GB, with a custom firmware that gives you the illusion that you have 2TB, but when you start filling it up it starts deleting old files, see here: http://www.instructables.com/id/Dont-fall-for-the-Flash-Drive-Scam!/ <A> However, Kingston has made a 1 TB flash drive <S> and you can buy it for about $800 on Newegg . <S> Still though, I'm not sure that having a flash drive that big <S> that would be the best idea just yet; I'm sure they have many bugs to still work out. <S> You wouldn't want to store a TB of data on a flash drive just to plug it in the next day and find out that it's not working any more. <A> Why it's not possible to have that large capacity flash drives? <S> Simply speaking, the technology is not there, quite yet. <S> At least not in the $10 market sector. <S> For example, Samsung is one of the leaders in R&D of multi-layer NAND Flash memory. <S> link , reference ; <S> And yet, they "only" produce a 1TB 2.5'' SSD. <S> I have no doubt however, that we will see proper terabyte-range pen drives in the future. <S> Just not on Ebay for $18.
| I don't believe that there's actually a 2 TB Flash Drive yet, at least not one that actually is 2 TB.
|
Photodiode - Turn Digital Input pin into 1 with little light Input Currently I am trying to work with a photodiode(SFH 203) that is supposed to detect very small amount of light.Using the digital of an arduino the photodiode cannot turn the pin to 1 due to the low level of light.If I measure light with an anlaog pin I receive a value arnd 25-30. Is there any way to bring the digital value to turn 1 using a small amount of light? <Q> From what I know, photodiodes work "backwards". <S> That is, they create a current flow from the cathode to the anode , so in your schematic \$PD\$ is likely the other way around. <S> This way, there's no light detection going on, I guess current will flow through the circuit at all times. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The above schematic is my attempt at minimizing what's required for digitizing the PD output. <S> It relies on the roughly-100 current gain (Beta) of the \$Q_1\$ transistor. <S> \$10\mu A\$ should be enough to cause \$1mA\$ flowing through the collector-emitter junction. <S> \$R_1\$ is simply a pull-up that says, that in dark conditions, the output will be HIGH. <S> \$Q_1\$ <S> then pulls it low-ish, when \$PD\$ gets illuminated enough. <S> To fine-tune the sensitivity threshold, you can try adjusting \$R_1\$ (or potentially replacing it with a potentiometer.) <S> Feel free to point out any mistakes I've made. <A> The datasheet shows the photodiode's sensitivity as 9.5 uA per 1000 Lux. <S> Now I don't know what counts as "low light" to you, but let's try 10 Lux as a reasonable switching lu]evel - at that point, the photodiode will produce 95nA. Not very much ... how does it compare with the dark current? <S> well that is specified as <10nA <S> so 95nA is clearly above the dark current. <S> So we want to set the Arduino input to 1 ( <S> i.e. <S> > 2.5V) with a current of 95nA. Neglecting the LED for the moment (there's no way it'll light up anyway) <S> you can simply do this by replacing R1 with R = 2.5/95e-9 = <S> 27 <S> Megohms or so. <S> If the Arduino input pin leakage current is much greater than 10nA <S> this won't be accurate, and if it's greater that 100nA <S> it may not work at all, or the switching level may be something greatly different from 10 Lux, but you haven't posted the relevant datasheet so I can't check that. <S> (and as John D points out, connect the photodiode right way round!) <A> It is less sensitive (up to 10% of max) at the visible light frequencies. <S> There is a sensitivity chart included. <S> So if you are using a blue LED for light, this can explain all of the loss in sensitivity. <S> Use an 875nm near-IR LED and it will be much more sensitive. <S> Or if you are already using an 875nm LED and it's still not sensitive enough, then you'll have to use an op-amp such as one of these to increase the gain. <S> In your circuit, the 10k resistor would limit the current in the (regular) LED to a value so small, it would probably not even emit light. <S> Also, photodiodes generate a tiny reverse current when emitted to light, not forward conductance. <S> Take a look at this post for another way to implement the photodiode. <A> As noted in the datasheet, the SFH 203 can only deliver around 10 microamperes of current. <S> Your LED alone will draw more current than that. <S> The Arduino input should be happy with the 10µA. Remove your LED and R1.
| If it still doesn't work, you may need to buffer the photodiode with a transistor to increase the current. The SFH203, from looking at it's datasheet , has a λS max sensitivity range from 850-900nm, which is the near-infrared range.
|
Hack for fitting 0.04" leads in to a 0.025" hole on PCB This might be a ridiculous question to ask - but I have made a mistake in a new library I created in Eagle for a component. The drill diameter of the plated holes for the component leads should have been 0.04" but I missed the fact that the default diameter of pads inserted by Eagle is ~0.025". The PCB has come back and lo & behold, I cannot fit my component leads. What are my options (if I need to get a proto build done immediately)? The only option I can think of is: to file away the component leads until they fit into the hole. Is there a better way? <Q> This is a one-off prototype, so doesn't need to withstand end-user mechanical abuse. <S> I would probably trim the leads a bit, then set the ends of the leads on the pads, using the holes to align them. <S> Now use solder blobs to hold the component in place. <S> The leads aren't going through the holes, but the ends are sitting on top of them. <S> The solder guarantees a connection and holds the part in place. <S> The part will be held much more weakly than if the leads were going through the holes, but for testing your circuit it should be good enough. <S> If you really need more mechanical strength in your prototype, glob a lot of hot glue around the pins extending all the way up to the bottom of the part. <S> Before you forget, go into Eagle now and fix the hole and pad sizes for that part in your library. <S> This can be easy to forget before the next revision when you're knee deep in changing other parts of the circuit. <A> If you want good reliability, you should wind one end of the thinner wire on the stub leads or a slightly oversize mandrel, as if you were winding a spring. <S> This will provide an order of magnitude larger stressed area for the solder, leading to a much more resilient joint. <A> If it is only a protoboard and doesn't need to look the best you can solder a 0.025 wire into the hole. <S> Then solder your leads to that wire. <S> I've done it when I had a similar situation <S> and it worked just fine, <S> just didn't look very good. <A> You have a few options: <S> File the leads down. <S> Drill the hole bigger. <S> A Hex shank drill bit works great by hand. <S> Or exacto or dremel. <S> Cut and bend the leads to surface mount. <S> Cut and solder thinner leads or a wire. <S> Depending on the part, it can be dead bug style somewhere else with wires going to the pcb. <S> Personally, making the hole bigger with a drill bit is the way to go. <S> Unless the size difference is enough that you loose the copper around the hole. <S> You could also combine making the hole bigger and the leads thinner. <A> One potential solution which does not seem to have been suggested is to mechanically "extrude" the lead ends by cutting the components to about correct length and then "squashing" the ends with pliers or vice grips. <S> This is slowish and annoying and not attractive if the number of leads is large BUT it does actually work and gives a result which is probably better and cosmetically nicer than most alternatives. <S> Compression usually requires at least two "crimps" at right angles and possibly more. <S> The tool used needs to be able to grip the thin lead well and apply force somewhat evenly. <S> The overall process may be rather slow. <S> This will almost certainly remove the plated PTH barrel. <S> In your case the difference from 0.025" to 0.040" is 0.0075" in each wall and probably a bit less if you drill them so the new leads are a tight fit - but probably still 0.005" per wall or about 125 micrometres. <S> Destroyed PTH continuity on 2 layer (double sided) <S> boards can be replaced by top and bottom soldering to pins going through drilled out holes. <S> This may be acceptable but great care is needed.
| You could trim the leads short, and solder thinner solid wire to the stub leads. Drilling a hole larger has been suggested. As PTH barrel plating thickness is usually in the 25 to 50 micrometre range, drilling out to size will remove all PTH barrel plating.
|
Buses in 8086 micro-processor What are the buses known as A, B, C in the following architecture of 8086? I cannot find any information about these. <Q> A-bus is the internal 16-bit ALU data bus . <S> C-Bus is the internal 20-bit address bus, 16-bit data bus, and possibly control lines of the BIU bus . <S> B-bus has no true name but the function of the adder ALU is to add the shifted 16-bits <S> (Starting Address of 64 Kbyte segment) CS (Code Segment) to the 16-bits IP (Instruction Pointer - Offset into CS for next instruction) to get the 20-bit Physical Address. <S> The right side of both diagrams allows the segment registers to be accessed. <S> I'd guess B-bus's name would be Offset bus . <S> From my explanation, it's clear why these names are not common. <S> They don't really correlate with the way the 8086 works. <S> Assuming A-bus means Address can be dangerous. <S> I'd read the page where you got the graphic. <S> It does explain the operation (as someone pointed out). <S> If there is no reference to something that is in a diagram, it's usually because it's a bit more involved than a straight correlation. <A> <A> According to this page , "A-Bus" is referring to "ALU Bus". <S> C-Bus is referring to "Control logic BUS". <S> The B-Bus looks like just a name..
| If memory serves, A stands for "arithmetic", B for "base" (e.g. array starting address) and C is the counter (e.g. array index/offset).
|
Is it possible to have voltage across an inductor without having current through it? Example : In certain cases in transformers we do assume so having zero current in the secondary but there is still a voltage across it due to mutual flux . Also we do similar things while calculating the thevenin equivalent of the secondary in the tranformer circuit . <Q> Instantaneously, yes. <S> But that voltage will cause the current to ramp up according to the standard equation: <S> \$V= <S> L\frac{dI}{dt}\$ <S> In other words, Voltage determines the rate-of-change of Current, which could easily pass through zero on its way to (theoretical) infinity. <S> (Theoretical because all inductors also have some resistance, which will ultimately limit the current to the standard resistive equation: <S> \$V=IR\$) <A> A coil of wire will have a voltage induced that is proportional to the rate of change of magnetic flux (and the number of turns). <S> Recall the Maxwell-Faraday equation . <S> This flux may be created internally or externally. <S> Many practical inductors are shielded so that the induced voltage from external flux is minimized, but it is not going to be zero unless you've got it stuck inside a superconducting cavity. <A> An (ideal) inductor cannot support a voltage without a changing current through it. <A> Since current is nothing more than the flow of charge, and since a magnetic field passing through a conductor will move electrons around in that conductor, that constitutes current. <S> Consequently, if there's an induced abundance of electrons on one end of the conductor and a paucity on the other, a voltage difference will exist between the ends of the conductor.
| If the secondary winding of a transformer is open-circuit there cannot be a current through it, but there is a voltage across it.
|
Why is the cost of microcontroller lesser than microprocessor I was learning today about 8051 and I encountered a point which said microntroller generally costs less than a microprocessor. I didn't understood why is it so since microcontrollers have RAM, ROM, internal oscillators, ADC convertors, comparators and so on on a single chip but microprocessors dont. I also know that microprocessors have a bigger ALU part compared to microcontrollers but can this only reason increase the cost of microprocessor? <Q> The pin count generally is higher (you need external memory buses), the internal complexity higher (since you'd generally want a fast CPU, hardware floating point, and relatively large fast cache memory to reduce the performance hit from relatively slow external memory). <S> It's not a hard and fast thing- <S> it's easy to find microcontrollers that are expensive and microprocessors that are cheaper. <S> One example that fits the context of your current reading about the Intel <S> MCS-51 series- <S> an 8031 is a microprocessor. <S> Add 4K bytes of mask-programmed memory to it <S> and it's a microcontroller (the 8051). <S> The 8031 was generally cheaper than the 8051, 8751, 87C51, 89C51 and similar parts for many years. <S> In fact, 8051s with mistakes in the mask ROM could be sold as 8031s since the internal ROM was disabled by hardware when used as an 8031 (the EA line). <A> The distinction between "microcontroller" and "microprocessor" is not a very helpful one. <S> The way things are generally marketed: Desktop/server CPUs: performance orientated. <S> Not capable of driving their own peripherals; this is usually done by an associated "chipset". <S> For this market, performance is most important, so new devices are developed every few months and fabricated on the latest factory lines. <S> This greatly increases the price. <S> There's not so much an "ALU" as a deep, broad pipeline of computing elements, and often quite a lot of the die is cache. <S> An Intel CPU will have more RAM on it in the form of cache than any "microcontroller". <S> Contain hundreds of millions to (NVIDIA GPUs) billions of transistors. <S> System-on-a-chip: moderate performance with most peripherals on board. <S> Possibly RAM stacked on top in the same package (not same die). <S> Target market is phones, tablets, mini-PCs, set top boxes. <S> Price/power/performance are balanced against each other. <S> Still fairly cutting-edge. <S> Microcontrollers: not required to do very much computation. <S> Will generally spend their entire life running one application. <S> Peripheral-orientated. <S> Very cost-sensitive and maybe power consumption as well. <S> The peripherals are usually not expensive, either in terms of design work or die area - they're pretty simple and don't develop over time. <S> Although some of the fancier ones may have effort spent on high-quality or high-speed ADCs. <S> Not manufactured on cutting-edge processes, which keeps cost down. <S> The product lifecycle is a lot longer - some customers won't buy unless they're guaranteed a supply for a decade or more. <S> Midrange "peripherals" like USB and Ethernet support are complex, but can be bought in by the designers. <S> Fancy high-temperature or radiation-hardened microcontrollers are available, at extreme cost. <A> A microcontroller that uses equivalent microprocessor would not be cheaper. <S> However normally microcontrollers are several generations behind. <S> A 8051 microcontroller is similar to a 8085 microprocessor (which is less than a 8086).
| Microprocessors are generally targeted at higher end systems (at any given point in technology) since they will be used with external memory and perhaps external peripherals. So there is no inherent reason why one is more expensive than the other, just a different set of choices that manufacturers make in order to maximize their market share and profits.
|
Do open source libraries exist for VHDL the way they do for C++ or python? When I'm approaching a problem in C++ or python, there are many libraries that exist which do the heavy lifting of my code. I'm thinking about GNU GSL , BOOST , or FFTW for C++, and NumPy or SciPy for python. In many ways, the fact that these resources exist make coding in these respective languages worthwhile, as the libraries prevent you from having to rewrite all the low level things from scratch. The IEEE standard libraries seem to cover only the very basics, such as data types (sort of akin to the C standard libs). It seems like in VHDL, you can buy/find some "IP Cores" that will solve a problem, rather than using an open source library. In python, if I want to talk to a serial device, I just import serial and I'm basically done. In VHDL I would either be stuck writing a serial protocol from scratch, or I would have to google around on the various repositories until I found someone who had produced something that sort of works. I would then be patching bits of code into my project, rather than just including something and calling that. In a similar way, if I want to perform an FFT, I can find examples of FFTs in VHDL via google, but there is not something simple like FFTW that I can find. Are there any comprehensive open source libraries available that I can import into my projects? Why does everyone seem to roll their own code for so many of the same things? <Q> I'm a developer and maintainer at ' The PoC Library '. <S> We try to provide such a library composed of packages (collection of new types and functions) and modules. <S> It comes with common fifos, arithmetics, cross-clock components, low-speed- <S> I/O components and a Ethernet/IP/UDP stack (next release). <S> As @crgrace described, it's quite complicated to design modules, which: <S> work on many platforms support most vendor tool chains <S> add no/less overhead <S> Our library has an internal configuration mechanismn (PoC.config) to distinguish vendors, devices and even device subfamilies to choose the right code or an optimized implementation. <S> It also distinguishes between synthesis and simulation code at some points. <S> For example PoC.fifo_cc_got is a FIFO with an 'common clock' (cc) interface and put/got signals to control the fifo. <S> The fifo is configurable in widths, depths, fill-state bits and implementation type. <S> It's possible to choose a LUT-based RAM or On-Chip-RAM (ocram) implementation type. <S> If this fifo is synthesized with ocram option for Altera, it uses altsyncram; if Xilinx is chosen, it uses a generic BlockRAM description and implements the pointer arithmetic by explicit carrychain instantiation <S> (Xilinx XST does not find the optimal solution, so it's done manually). <S> There are 2 other fifo types with 'dependent clock' (dc) and independent clock (ic) interface. <S> So if it's required to switch from an normal fifo to a cross-clock fifo (PoC.fifo_ic_got), change the entity name and add a clock and reset for the second clock domain, that's all. <S> I think this proves, it's possible to write common modules, which work on multiple platforms and compile in different tools (Spartan->Virtex, Cyclone -> Stratix; ISE, Vivado, Quartus). <S> VHDL GitHub repositories from Martin J Thompson noasic from Guy Escheman <S> open-vhdl general-purpose-fifo <S> vhdl-examples <S> vhdlbyexample vhdl-libs <S> -pro hdl4fpga <S> OpenCores <S> Aeroflex Gaisler <S> Stefan VHDL <S> ... <S> The "Discover Free and Open Source Silicon" <S> ( FOSSi ) projects on GitHub offers a browsable database of all GitHub projects that mainly use vhdl , verilog , systemverilog , or any other important hardware description language ( hdl ). <S> See also: Discover FOSSi FOSSI Foundation LibreCores <A> Open source libraries like you describe wouldn't be as nearly as useful for VHDL or Verilog as they are for a general purpose programming language. <S> This is because HOW you implement a given function can very a lot depending on what you're trying to do. <S> Code that is good for and <S> FPGA is probably not so good for an ASIC and vice versa. <S> Also, since we are describing hardware, a function that does a FFT would require such specifics as word width and clock and reset strategy that it would tie your hands and constrain your whole design. <S> If you made the function very flexible, it would have enormous overhead. <S> Lastly, look at the size of your executable when you include a lot of libraries in C, for instance. <S> There is a ton of bloat there. <S> That doesn't matter for software development (most of the time) but matters a lot for FPGA and especially ASIC development. <S> There is no sense synthesizing a bunch of overhead <S> you don't need. <S> So the bottom line is there are no such libraries, and your current approach is sound. <A> VHDL and Verilog are descriptive languages and they describe hardware blocks. <S> A serial driver in C++ might translate into a Serial IP in VHDL/Verilog. <S> opencores.org is the biggest open-source database to date. <S> To facilitate the process of searching, download and code browsing (via Github) you can use this modern interface: http://freerangefactory.org/cores.html <S> If, for instance, you search for serial you can end up here: <S> http://freerangefactory.org/cores/communication_controller/serial_uart_2/index.html and directly jump to the code in GitHub. <S> There you will see that you can quite easily instantiate the serial module and connect your own circuit to it and start sending and receiving data. <S> This is as simple as serial libs in C++. <S> I hope this helps. <A> The first site I go to for this kind of thing (as @MarkU mentioned) is opencores.org. <S> For example, there is a parameterized FFT engine , written in VHDL, released under the BSD license. <S> Status is "beta". <A> For Verification, there is Open Source VHDL Verification Methodology (OSVVM). <S> OSVVM is a comprehensive, advanced VHDL verification methodology that simplifies implementation of functional coverage, constrained random, and Intelligent Coverage Randomization (an intelligent testbench methodology). <S> It also facilitates implementation of shared transcript files, error reporting, logs (conditional printing), and memory modeling. <S> OSVVM's website and blog are at http://osvvm.org . <S> The packages are also available on github at: https://github.com/JimLewis/OSVVM
| Besides PoC, there are other open source libraries: VHDL-extras libc in VHDL PCK_FIO from easics
|
What is the analog bandwidth of general purpose ADCs? I am making use of the dsPIC33FJ64GP802 's ADC to do Undersampling and for that, I need to know the analog bandwidth of the ADC of this Microcontroller. My signal is around a few MHz. I have already contacted Microchip for the specs but no reply. So would anyone know about the typical analog bandwidth of this tier of ADCs? Note that I am using the 4 simultaneous channels option with the 10-bit ADC. I am making a circuit to measure the analog bandwidth anyway. I just wanted to know if anyone knows beforehand maybe there's no need to go through the trouble. Let me stress out again that I am Undersampling the few MHz signal which has a bandwidth that satisfies the Nyquist–Shannon sampling theorem. And yes, I am aware that the sampling rate is 1.1 MS/s so a max signal BW of 550 kHz. <Q> Disclaimer: the answer below is about definition of the analog input bandwidth (AIB) of an ADC; not the particular value of AIB of a general purpose ADC. <S> An input analog signal, before being digitized, on its way between input pins of the ADC chip and a digitizing unit (usually a comparator), is attenuated (due to intentional or parasitic RC circuits present or not enough current to charge capacitors). <S> For instance, signal attenuation may happen due to large input capacitance of sample and hold unit (assuming it is embedded into the ADC chip) or parasitic capacitances of comparators. <S> The frequency at which the input signal is attenuated by 3 dB is called analog input bandwidth. <S> If one sends an input sinewave at the AIB frequency, before being digitized it is attenuated by 30% (which is unlikely acceptable). <S> Thus, it’s preferable that maximum input frequency should be about 1/3 <S> – 1/5 of the AIB. <S> For instance, if AIB=500 MHz and input signal is 100 MHz, attenuation (measured by amplitude) is 2% (vs 30% for an input signal at 500 MHz). <S> Below is a chart from the datasheet of ADS54J40 showing how input circuitry attenuates the input signal (as seen from the picture, the AIB is about 1.2 GHz). <S> Also see the discussion on the topic (pages 23 and 24 of the datasheet). <S> PS: Drop of SNR by 3 dB (equivalent to 0.5 LSB decrease in ENOB) is a consequence of analog input bandwidth limitation, but not definition of it. <S> SNR (and ENOB) are driven by many factors, not only by AIB. <S> Useful <S> reading on the topic (paragraph “Bandwidth”). <A> A typical general-purpose ADC will have an input frequency response which is essentially flat up to frequencies at least up to the Nyquist rate, and in many cases significantly beyond [such frequency content, if present, will be aliased down to lower frequencies]. <S> Given a typical ADC that can process 100,000 samples/second, feeding in a 101,000Hz signal while the device is sampling at that rate would likely yield a 1,000Hz signal with an amplitude close to that of the original (when taking 100,000 samples/second of such a signal, each sample would be advanced 1% further along the input waveform than the previous one). <S> Most general-purpose ADCs capture the state of the input during a small but non-trivial fraction of the overall sampling period, but aren't particularly intended to be used with signals that will change significantly during a capture <S> , so one shouldn't rely upon the converter to have flat frequency response above Nyquist, but in most cases the capture time will be short enough that using the full range of frequencies up to Nyquist shouldn't be a problem. <A> Sorry for the pictures I'm from my phone: <S> See in Input Signal Bandwidth! <A> First, most people don't seem to understand the question. <S> For a typical ADC, the effective number of bits resolution, N = (SN - 1.72)/6.02, where SN is the signal to noise ratio in DB. <S> So, a drop in 3dB would be N = <S> (3 - 1.72)/6.02 = 0.2 bits... <S> You want it to be less than 0.5 bits. <S> At 4.73db, you'd get 0.5 bits and your ADC's LS bit would be flawed. <S> 3db is generally used as the point before which we'd be assured our LS bit would start to be inaccurate. <S> So, the analog input bandwidth is the frequency at which the SN ratio has fallen by 3db. <S> Anyway, I looked and couldn't find it in the specs, but I think that that could be because if you use the device as specified, there shouldn't be attenuation that high. <S> I did find a few app notes that might help you. <S> http://ww1.microchip.com/downloads/en/AppNotes/00546e.pdf and http://ww1.microchip.com/downloads/en/AppNotes/00546e.pdf <S> .... <S> Typically that really isn't a problem. <S> Is there a particular reason why you need that info? <S> The max sampling rate is in the spec (I'm assuming you already know that), and if you are under that there really shouldn't be a problem. <S> I've used the ADCs inside many processors (including PICs), and I've never had to worry about the analog bandwidth.... <S> Let us know what you find out.... <S> I'm curious :-) <S> Good hunting. <A> You will likely not find a direct specification for the analog bandwidth in the data sheet for an A/D input of a microprocessor. <S> Bandwidth to the analog input pin is dependent on the source impedance of your analog signal, capacitance of the connection circuitry and the input impedance of the MCU pin. <S> Beyond that it becomes far more important for you to look at the "Throughput Rate" that Microchip will show for various classes of input pins. <S> Throughput will be largely affected by the sample and hold characteristics of the part. <S> And as you can see the sample time is dependent on the source impedance and the selected ADC clock frequency. <S> This data taken from PIC32MZ family data sheet.
| The bandwidth of the ADC is described in the AC Electrical Specification section and it's different in 10 bit and 12 bit mode.
|
Are relays reliable for long time use? I am developing a home automation project in which I'm using relays to control appliances. I need to control devices with 220V and 6A rating. Should I use relays to control these appliances as a long term solution? Relay I'm using is mechanical and is rated 220V 7A. If I keep it ON to control e.g. a fan, for more than a few hours on a daily basis, will the relay cause any problems? If yes then, what are other possible solutions? <Q> Typically something like 50,000-100,000 operations at full rated load. <S> At lighter loads, the life will increase, generally up to many millions of operations with a negligible load (the so-called mechanical life). <S> All this information will be clearly given in any decent datasheet. <S> The markings on the relay are only limits for safety agencies and have little to do with the relay life. <S> Not all datasheets show the life vs. switched current, even for resistive loads, so you may have to test samples to determine that characteristic if you are say, using a 30A relay to switch 5A maximum. <S> Inductive loads, incandescent lamps, and motor loads will also shorten the life. <S> , however they can easily die suddenly due to voltage surges, current surges (including momentary shorts) and from thermal cycling. <S> They are also less resistant to heat, and tend to create a lot of it (a ballpark number is 1W per ampere of load current). <S> Most remotely switched outlets and similar consumer devices (where the consumer can plug anything into them) use relays. <S> If the load is relatively light and well defined (perhaps a lamp) then solid state may be a superior solution. <A> This is an old post <S> but I am a controls engineer who programs industrial machines <S> so I have 2 cents. <S> I have a machine that does 20,000 cycles a day <S> and I must use solid state relays even if they will fail in a short circuit situation and need to be replaced. <S> Typically mechanical relays are cheaper <S> so I choose them by default. <S> You must also account for failure of the solid state relay when it has a short to add to that rule of thumb. <S> Also, someone said mechanical relays live to be 50,000 to 100,000... <S> This is wrong <S> I am pretty sure most of the datasheets I have seen with my mechanical relays are 500,000 to 1,000,000. <S> The relays I use now are 2x10^7 in lifecycles <S> so I typically say 1 million life cycles but it depends on what you buy. <S> Mine are low end industrial relays. <A> My company uses relays in our HVAC products for several reasons. <S> 1) They are reliable. <S> Based on past and current experience, I expect them to last decades. <S> 2) <S> Relays tend to be significantly less expensive than triacs and their drivers. <S> 3) <S> They waste less energy as heat than solid-state devices such as triacs. <S> This is important for several reasons: 1) getting rid of excess heat is expensive. <S> 2) energy wasted in the controls degrades the allowable 'green' energy rating that the unit has. <S> In general, I've had far more triac failures than relay failures. <S> We use quality relays from reputable manufacturers. <A> Normally the relay will be specified by number of contact operations. <S> Apart from mechanical wear the contacts may become prematurely worn due to the nature of load (inductive, capacitive or resistive) that is being switched. <S> , then a period of low failure and then a rising failure rate due to wear, heat fatigue and so forth. <S> {see http://en.wikipedia.org/wiki/Bathtub_curve } <S> Failure of electronic devices tends to be sudden death (it works, then it doesn't). <S> Relays tend to get a bit 'sticky' before failure (a temporary cure being a 'tap' in the right place. <S> Its one of those questions along the line of "How long is a piece of string?" <S> so there isn't a precise answer <S> yes or no. <A> Relays are 'hard to beat' if proper attention is given to ratings. <S> Note that resistive versus reactive (L or C) <S> loads make a major difference and manufacturers specs must be carefully noted. <S> Note also (not applicable in this case) that DC is very demanding compared to AC. <S> Manufacturers specify DC voltage ratings that are much lower than for AC. <S> Do take good note of Dwayne's comment re using quality parts from a known reputable manufacturer. <S> In a serious application you MUST use a product of known quality. <S> Unknown brands and equipment whose "provenance" is uncertain (ie may be fakes or out of spec parts) MUST NOT be used. <S> Specifics: <S> A 7A rated relay at 6A load is probably OK, especially at low switching rates, but if possible I would use a higher current rated relay and/or look carefully at the specifications. <S> When they say it is 7A rated, do they specify resistive or inductive load or other conditions?
| Relays tend to be quite reliable in benign environments, however they have a limited lifetime. All I can say is that relays have been and are used quite successfully in equipment over a number of years. Advice overall is generally good. Solid-state alternatives to relays have no easily defined wear-out mechanism A general rule of thumb for me in my undergrad education many years ago is that if it turns on and off more than 100 times a day make it solid state. The mean time to failure (MTF) of most devices follows a 'bath tub' function - high failure rate at the beginning of life (due to faulty manufacture, poor assembly etc.)
|
Using a regulator or not? We have designed a board for mass production . This board has a few components on it, that works with 3v3 , such as MCU, Wi-Fi, and a few more sensors. We used to have a battery, 3.7v to power the board directly, and later on, we have decided that we must use a regulator, because its more safe .the regulator is AMS1117 After some research, we found out that this regulator(and others) must have 1V more in its input,relative to its output . So, using a battery pack of 3.7v lithium , will not work properly for such regulators(3.3v) , even when its charged with 4.2v . We found out that logically ,connecting the battery directly (no regulator) to the board is much clever, because you can "enjoy" the battery power as long as it is > 3.3v . Our only concern is that we are not using a regulator, and its not healthy . Is that a good thing to do- "professional" ? do you think of more options,such a zener diode instead of a regulator ? <Q> You need to look at the supply voltage range of everything, and then see if the range of your battery's voltage from full to flat will work. <S> If not, then you will likely need either a very-low-dropout linear regulator (hint: <S> the AMS1117 isn't), or a type of buck-boost switch-mode regulator that can provide a stable 3.3V supply from a source that can be either above or below the output (i.e. as the battery goes from full to flat). <S> For a linear regulator option, even if the battery voltage drops below the regulator's drop-out voltage (for a 3.3v LDO regulator's output, lets say it's 3.5V, 200mV above output), then you might be able to get away with that - the regulator won't really be in regulation, but depending on your load profile that may or may not matter much. <S> When you say a "3.7 lithium" battery, its range between full to flat will be ~4.2V full, to no less than 3.0V flat. <S> And you don't charge lithium with a constant voltage source. <S> Well, at least not at first - lithium battery charging is at least a 2-stage process, first constant-current, then constant-voltage, using a charge management chip specific to Lithium chemistry. <S> You are not ready for mass production, not even close. <A> If I were you I would use a regulator, and it is not too hard to find one that suits your requirements. <S> I found this in less than 10 minutes. <S> It has an excellent WEBENCH to help you make your design. <S> Here is the recommended schematic: As you can see it can take 3.5V - 4V input voltage while providing the stable 3.3V.I <S> do not know how much current does your application need, this one can supply up to 400mA. <A> Just off the top of my head, you may use some off-the-shelf DC-DC converter module like this one : 3.3V fixed output, 2.7-11.8V input range with nice efficiency especially with load currents <S> <500mA.
| As you have little difference between the V in and V out , you can go with an Low-Drop Out regulator, such as this . If you're asking questions like this, you're not ready for "mass production", whether you wish to be professional or not.
|
Why isn't maximum current forced upon a circuit by a power source? I asked a similar question here about this, but I still don't quite understand. Say I grab onto two wires from a standard 120V 20A wall socket. I would fry. I would have 20A at 120 forced on my body. But, when speaking in terms of circuits, as in my linked question, if I have a power supply outputting 100mA maximum at 5v, for some reason my device only gets exactly what it needs? Why is this? Most things flow from an area of high concentration to low concentration, taking the path of least resistence. If you connect two wires to a power supply, why don't the maximum number of electrons want to go through your circuit? If current behaves this way...why do you have to regulate voltage? <Q> The "120 V 20 A" rating of a wall outlet means it will supply 120 V and up to 20 A. <S> What is implicit in this spec, and most power supply specs, is that the power supply is considered a voltage source . <S> That means it will try to keep its output voltage constant. <S> It only has this single degree of freedom. <S> The load then decides how much current to draw at that voltage. <S> For example, let's say your overall resistance (mostly due to relatively dry skin where the current enters and leaves your body) is 10 kΩ. <S> You grab the two wires from the 120 V outlet and (120 V)/(10 kΩ) <S> = <S> 12 mA will flow thru you. <S> That's <S> way way less than 20 A, but still enough to kill you. <S> There are power supplies that regulate the current. <S> These are unusual, and will be clearly labeled as such. <S> A constant current supply might be labeled 1 A 50 V. <S> That means it will put out 1 A of current, but can only go up to 50 V. If it would take more than 50 V to get 1 A of current thru the load, the output will sit at 50 V and the current will be below 1 A. <A> Current does not behave this way "I would have 20A at 120 forced on my body." <S> You would have V = <S> I <S> * R(Resistance of your body). <S> Rearranging terms <S> I = <S> V / R. <S> Just for fun lest say the resistance of your body is 50k Ohms. <S> I = 120 / 50k = <S> 2.4 <S> mA. <S> Not 20 Amps. <A> "120V 20A" means "This power socket supplies 120V, and you can draw up to 20A from it". <S> The actual current drawn by any circuit connected depends on its resistance/impedance. <S> For a human, from hand to hand, that resistance varies from a few kohms to a few hundred kohms, depending on whether you just got out of the bath. <S> But that ohm range of a human body is still enough to kill you, because only a few tens of mA of current is needed to put your heart into fibrilation. <S> And yeah, if the voltage is high enough & you haven't dried off from the shower before engaging in the experience, you'll also start to cook, because there's amps going through you :) <A> Your reasoning is incorrect. <S> There are 2 factors that determine how much current flows in a circuit: the voltage of the source and the resistance of the circuit. <S> If you grasp onto a 120 VAC source, the current will be determined by how much resistance your body has. <S> This is a function of the dampness of your hands and the characteristics of your body. <S> Typically, your body resistance is low enough that enough current will flow to electrcute you, athough it is not going to be many amperes <S> but closer to many milliamperes. <S> Ohms law, in general, determines the current: <S> I = <S> V/R (I is current, V is voltage, and R is resistance). <S> Either your body or the circuit determines the value of R. Hence, given V, the current is determined and is not infinite. <A> Most things flow from an area of high concentration to low concentration, taking the path of least resistence. <S> Yes - at a particular rate . <S> Just because you have damp in your basement does not mean your house will instantly flood. <S> Punching a small hole in the bottom of a full bucket does not cause it to empty instantly. <S> Voltage does not correspond to number of electrons, rather it corresponds to the force that can be applied to electrons that are free in a conductor. <S> Metals have plenty of electrons that are attached to the crystal structure as a whole rather than a particular atom, so they conduct well.
| In an electrical circuit, when you connect the power supply to the circuit, the current is also limited by the equivalent resistance of the circuit.
|
Is the hfe of a transistor dependent on the resistance on the other parts of the circuit? I have a circuit using a NPN transistor with a motor before it and a pwm into the base. The motors draws a current of 600mA if I plug it directly into the power source, just under the maximum allowed by the transistor at 650mA. The minimum gain of the transistor is listed at 100, with my multimeter reading about 200. The voltage is at 3.7V. My question is, if I give a base current of lets say 20mA, even with the minimum gain, it is 2A, but will this current be limited by that the motor draws (600mA), or will it push 2A onto the motor? I have blown 2 of these transistors already, but connecting the base directly to 3.7V. The transistor in question is 2N2222A in the metal case. Another question is for a simple LED circuit switched by a transistor, is it Ok to depend on the hfe alone? For example, I only have a resistor connected to the base with the collector to HIGH and emitter to the LED? <Q> There are two possible causes of the blown transistors. <S> First, connecting the base directly to 3.7V will cause excessive base current : it makes sense to limit that with a resistor. <S> 20mA is cautious, 100 ohms would allow 30ma which should be safe. <S> The second in that - while you cannot "push" excessive current like 2A to the motor - if it draws 600mA when running normally, it may draw much higher currents when starting, or when stalled. <S> Connect the motor to the PSU again, and stall it with your fingers <S> (don't do this with a high power motor! <S> Use some other means of braking it!) <S> Observe the current it draws when stalled ... <S> I'm guessing somewhere over 3 Amps (you may need to fiddle with the current limit to observe this). <S> It will momentarily draw that current when starting, and that could be fatal to a 650mA rated transistor... <A> Since nobody else mentioned it yet, I will mention that there is a concept called forced beta which applies when you use a BJT as a switch (in other words when you want the transistor to be turned on to the max). <S> I think the easiest thing is to just go through an example. <S> If the circuit uses 600mA without the transistor, then you could use that as your maximum collector current. <S> If beta min is 100, then use a beta of 20 to calculate the base current. <S> In this case, the "forced beta" of the transistor is 20. <S> Now, select your base resistor so that the base current will be Ic/beta(forced). <S> In this case, it would be 600/20 = <S> 30 mA. <S> In order to calculate the base current resistor, we would need to know the driving voltage, and Vbe. <S> With this much current, Vbe will be high. <S> Maybe 0.8V or more. <S> There should be a chart, or you can just measure it. <S> It will decrease as the transistor gets hot. <S> I am not guaranteeing that this will solve your problem. <S> It sounds like the transistor you chose may not be able to handle this much current. <S> But this basic idea may help you in the future. <S> Note that this only applies to BJT's such as the transistor you are using. <S> FET's behave differently. <A> The transistor's Hfe isn't limited by other components, but it represents a maximum value: if it can't conduct enough current from collector to emitter because of other resistances in the circuit, it will simply be 'full on' and conduct as much as possible. <S> If this weren't the case, you could build a lightning generator with nothing other than a transistor and a 1.5 volt battery. <S> ;) <A> Never use components close to the maximum parameters; it is not ok to draw 600 ma from a transistor with Imax 650 ma. <S> Motors,for example, draw significant currents when they start. <S> Why would you connect the base to the power source without a resistor? <S> So you need 2 resistors - one in the base of the transistor and one between the collector and LED.
| No it is neither ok to depend on hFE, because it changes with the temperature and the age of he transistor, nor to connect an LED the way you described; LED should be driven (unless you exactly know why you should do otherwise) by the collector of the transistor, through a resistor.
|
Is it reasonable for a potentiometer to have a minimum of 1.3Ω? I purchased a 25Ω linear potentiometer , and found that the minimum resistance is 1.3Ω 0.9Ω. I expected that the minimum would be closer to 0Ω. Is this typical? Should I return the potentiometer as faulty? Is there a spec for this? EDIT: I originally said 1.3Ω, but several people correctly guessed that I did not account for the meter's resistance of 0.4Ω. <Q> It's not that unreasonable, but be sure that you're actually measuring the resistance through the rheostat. <S> Short the meter probes and subtract that reading from the minimum resistance reading. <S> The parameter is called "end resistance" or ER, which includes wiper resistance. <S> For example, this Indian made pot has a maximum ER of the greater of 0.1% or 2\$\Omega\$, so it would meet spec. <S> In the distant past, pots sold by Radio Shack were made by a major Taiwan-based company and were actually pretty decent quality-- <S> you might be able to find more detailed specs online. <A> The problem with pots like that is they're among the cheapest of the cheapest pot designs (and then sold by retailers like Ratshack at despicable mark-up), and tolerances are not good to begin with. <S> Also, at higher (and dare I say it, more typical full-range ohm values, i.e. 500, 1k, 10k, 100k), an ohm or two at the bottom end doesn't really make much difference. <S> If you tear one of those things apart, you might be able to appreciate what an... 'agricultural' approach they take to being a pot, compared to more moderns designs. <S> That Radioshack page has a "spec" (tho not a datasheet in the traditional sense), but even something like this ( http://www.bitechnologies.com/pdfs/p160.pdf ) doesn't make any claims about how closely it can get to 0-ohms, either. <S> You could go and waste time taking it back & hoping for the best that another will be better, but GTD says to go with something a little more modern in its construction technique, <S> IF that actually getting closer to 0-ohms is a necessity for your application. <A> Many meters will read 0.5 ohms or so with the leads shorted, so you have to subract this value from the reading to get the actual resistance of the device you are measuring.
| When measuring resistance under a few ohms, you must allow for the resistance of your meter leads and connection to the device you are measuring.
|
Why is a toroid most often used as the top load on a Tesla coil? For the Tesla coil that I've built, I'm using a hollow metal sphere as the top (capacitive) load for the secondary circuit. But more often you'll see a hollow metal toroid used. I'm getting streamers about 2 ft. in length from my coil now using the sphere. Could I expect to see better performance (even larger streamers) by using a toroid? And if so, why? <Q> It mainly has to do with curvature. <S> The electric field is more concentrated at places that have higher curvature. <S> A sphere has the same curvature everywhere, so there's no preferred place for a streamer or arc to start. <S> A torus has the greatest curvature at its outer rim, so streamers/arcs are more likely to start there. <A> Dave tweed's answer is correct, though only partial. <S> It does not explain why a toroid is used instead of a sphere. <S> This reason is very simple--To help prevent the arcs from striking the primary or secondary coil. <S> I have seen Tesla coils with spherical toploads where the streamers constantly strike near the primary, which could eventually damage your driver circuitry and the secondary itself. <S> The toroid helps direct the streamers away from the coils, while maintaining enough surface area to act as a capacitor between the topload and ground. <A> actually nickoli was trying to transmit wireless energy ,not make lightning. <S> a toroid ring is to suppress high voltage corona. <S> on a spark gap tesla coil it is good so that you can build up to a high voltage before it arcs. <S> on solid state, you want your streamers to make up most of the capactiance, but you still want the mininum toroid ring to suppress upper secondary arching.
| If you make the minor diameter of the torus smaller than the diameter of the secondary coil, it helps make sure that the arcs come from there and not directly from the coil itself, which could damage its insulation.
|
To what are transistor's "E, B, C" voltages relative to? I've seen \$V_{CE}\$ and \$V_{BE}\$ in context of transistors, where they clearly denote a voltage between two points. But then I also see things such as: From a table in Wikipedia: Applied voltages | B-E junction bias (NPN) | B-C junction bias (NPN) | Mode (NPN)E < B > C | Forward | Forward | Saturation Where do those voltages comes from in a circuit? "\$V_{E-to-what}\$ < \$V_{B-to-what}\$ > \$V_{C-to-what}\$" . To my understanding a voltage has to be relative to another point in a circuit, so what are these E, B and C relative to? I've been told I'm missing something. Any ideas? <Q> If you are just comparing the voltages it actually doesn't matter what reference potential you are using, as long as you use the same for each of the 3 voltages. <S> Using another reference potential would add a constant offset to all 3 voltages. <S> That woudln't affect the inequaltities. <A> It doesn't actually matter (since all electrovoltaic potentials are relative regardless), but the easiest way to interpret them is relative to each other. <S> When the relation described is true, the transistor is in the given state. <A> Yes you are correct. <S> If the reference node is not mentioned in the symbol, then it means that the reference node is ground. <S> So \$V_E\$ denotes the voltage at emitter with respect to the common reference, the voltage at ground node. <A> Transistors can be used in very simple circuits where there is clearly a 'ground' (e.g. a NPN's E is connected directly to 'ground'), but they can also be used deep within a complex circuit where 'ground' or even 'Vcc' is not directly connected (there's several other components inbetween). <S> This is why "Vce" (or "Vbc", etc), for example, means "the maximum permissible voltage between C & E ", reagardless of what the voltage of C & E is with respect to 'ground'. <S> If you do see a reference to 'Vc' or 'Vb' (for example), then it's implied that it's with respect to 'ground'. <S> Same perspective applies to MOSFETs' G, D & S. <A> Almost all modern equipment relates these single-point references to a supply rail which is regarded as the common or ground. <S> This is typically the negative on single supplies, or the mid point on dual +- supplies. <S> Note that this point is not necessarily at earth potential, in the sense of building earth. <S> It is simply a convenient reference point. <S> Thus, it should NOT be assumed that it is always OK to connect any earthed piece of test equipment (such as a 'scope) to this point. <A> E < B > <S> C can be interpreted as Potential of B is bigger than the others. <S> This means that if you connect B with any of the others with a resistor, current will flow towards "the others" through the resistor. <S> This means as well that V_{BE} <S> > 0 and V_{BC} <S> > 0 . <S> Voltage between B and any freely chosen reference point is bigger than the voltage between E or C and the same reference point.
| The voltage has to be relative to another point in the circuit.
|
Is it safe to clean contacts with an eraser? Today, while I was cleaning a RAM module, I was thinking about this. An eraser is really a easy way to clean gold/copper contacts in such modules. And it is really tempting to do so. I did it a few times with RAMs, network cards, graphic cards and other components. But, my question is: is it safe at all to clean contacts with an eraser? It at least works, since the module was perfectly working fine this time. <Q> It all depends on what you mean with safe . <S> As @Jodes said in a comment, the right thing to do is to use some specialty chemical made for the job. <S> If, however, you are doing some hobbyist work and you are going to take some risks then your approach may work, but keep in mind that the results may not be very repeatable . <S> There are at least two things that may go wrong with your approach: Electrostatic discharge (ESD) issues Mechanical stress <S> Anytime you rub two objects against each other you have the chance of generating static electric charges on them. <S> This phenomenon is called triboelectric effect . <S> A problem with ESD is that it may not kill your chips rightaway (many chips today have protection circuitry that will handle a small amount of ESD), but it may degrade the performance of your devices (e.g. leakage currents or offset voltages may become permanently worse because of microscopic damages inside the semiconductor device). <S> Therefore a RAM module, to take your example, may still work , but with intermittent failures or glitches (e.g. it may exhibit a higher error rate or it may work reliably only well below its rated maximum speed). <S> Whether your approach will work consistently in this respect will depend, besides sheer luck, on many parameters like ambient humidity, eraser and PCB materials, operator grounding, etc. <S> Mechanical stress is maybe a lesser concern, but it should be taken into account: if the eraser is hard, if you press too much while erasing, if the PCB tracks or pads are too thin, you may risk detaching one of these latter from the PCB and this will ruin your day most likely (repairing a multilayer PCB is not easy, is often expensive and sometimes is not even possible). <A> Short answer: no point. <S> Longer answer: <S> In the past many generic and certain purpose made erasers have been used to clean electrical contact (diamond coated plastic sheets were used on relay contacts at times). <S> That said the cleaning is intended to remove oxide layers and gold plated contacts should not have oxidation. <S> When the gold is no longer protecting the base metal beneath you will have oxides forming. <S> The binders of an eraser are no conductive, this is good and bad, good because the fine dust should not cause a short but bad because any residue left will form an insulating layer. <S> Any hard abrasive particles on the contact surface will prevent contact unless they are displaced when the contact is remade. <S> For gold contacts I would clean with solvent, 90+% ethyl or iso-propyl alcohol are safe for most electronic devices (careful with keyboards, switches and relays and other devices with exposed contacts that may get dirt washed in or displays and sensors that may use adhesives in construction). <S> The solvent cleaning is also a good idea after cleaning with an eraser to remove the binder residue. <S> Limit eraser cleaning of gold contacts to a very limited number of occasions and only if there is visible contamination that does not want to come off with the solvent. <S> There are aerosol contact cleaners that contain various solvents that are available for more money than they are worth. <S> Here are some mechanical contact cleaning aids http://www.eraser.com/fybrglass-brushes-and-erasers/ <A> @Lorenzo Donati alredy gave a good answer. <S> But also be aware that there are several types of erasers. <S> This soft, beige-colored erasers made of pure natural rubber only will not do any physical damage to your PCBs (except when you apply too much force) <S> But often, some abrasive material like pumice or quartz is added. <S> For example, this common type of eraser contains some abrasive material in the red part and a lot in the blue, used to remove Indian ink. <S> Also, the rubbers of pencils usually contain some abrasive material. <S> While a slight grinding effect may be intended to remove oxides, you can easily remove too much, e.g. from the gold plating of the contacts. <S> The contact will corrode very fast making it very unreliable. <A> I don't use erasers any more, unless cleaning battery acid residue off a terminal. <S> Common 70% or 90% rubbing alcohol and a soft cloth works so well <S> , why risk it? <S> See also Contact Cleaner VS Alcohol <S> Please note that rubbing alcohol is partly water. <S> Water, especially clean water, is meaningless to unpowered electronics. <S> In production the cleaning step of those boards (these days, given environmental regulations) was likely water based anyway. <S> Make sure it dries totally completely before powering back on. <A> I use an anti static solution if possible and available (or otherwise just keep touching the computer case I am working on), a clean white square flat rubber to rub the contacts, then 100% iso-propyl alcohol to clean the contacts further.
| Also the gold plating on modern contacts is as thin as they can make it and heavy mechanical abrasion will remove some of the gold. To cut it short: if what you are doing is some sort of professional work, the answer is not at all .
|
ATmega328p and USB conection to PC I posted the same question on StackOverflow and I was redirected here. For my project I need to be able to program the eeprom of an Atmega 328p via an USB to PC. I tried to incorporate an USBasp programmer in my circuit but I was unsuccessful. The PC does not recognise the programmer so I am unable to install the drivers. So my question is: Does anybody know how can I update the Atmega 328p eeprom via USB. Is there any basic communication I could use? I know there are boot loaders, but my programming skills are not adequate to make my own and I can not find an appropriate one. My code for the Atmega 328 is written in Atmel studio 6. Thank you for the help. EDIT:I already have a programator for atmel's chip, but I need some sort of programming option directly on USB. That is why I incorporated an USBASP on my board design.I would like to be able to open a simple program on a PC, set some parameters and than upload to the eeprom of my 328. All that without an additional programator (a simple plug and play device for any other user). <Q> I purchased a programmer made by Atmel AVRISP mkII and used Atmel Studio - you should be able to program all of the Atmel's 8 bit chips. <S> I do not think you can do real time debugging with it. <S> But programming is a finger snap. <A> WCH's CH340 to your design. <S> This will give you serial access to the ATmega328P <S> and your code is then able to update its EEPROM contents. <S> Or maybe just refactor your project into an Arduino shield and use the well-tested Arduino hardware platform (and since you are using Atmel Studio, you can safely disregard the Arduino IDE) <S> Or you can use a USB-enabled AVR like <S> ATmega32U4 . <S> This may or may not require you to roll your own drivers though. <S> Speaking of programming it, avrdude can read Atmel Studio's output hex or bin file, and allow you to use a very wide range of programmers, from AVRISP mkII to Arduino as ISP to bit banging using a Bus Pirate to raw Linux SPI access using spidev. <S> Just give it a try. <S> Speaking of EEPROM, it is accessible using special registers in your AVR. <A> Assuming you have a 6-pin ICSP header on your board for programming the '328p, then a device-programmer like USBasp, Atmel's AVRISP mkII, AVRtinyISP, etc, coupled with the AVR programming util 'avrdude' (& you'll need to dive deep into how to use it) will get you what you want. <A> It is possible to improvise a close enough approximation of a USB interface for the ATmega328p using two GPIO pins and external components. <S> However, "close enough" does not necessarily mean "in spec" and so much as you had trouble with the USBasp which is an implementation of the same idea, you may in rare cases be unable to get this to work with a particular host PC. <S> Proper component selection, proper clocking, correct and geometrically clean wiring, etc are all necessary - although this method uses the lowest speed form of USB, it is still high-rate signalling that does not appreciate signal corruption. <S> And yes, you will need software. <S> Likely you can create this by a combination of LUFA examples, bootloader examples, eeprom examples but expect to do some work and learn some things here <S> - it is not the role of the stack exchange sites to write your firmware for you, or to identify a site where a read-to-go implementation has been published. <S> You will probably have an easier time creating a robust design if you use a microcontroller with a USB interface instead, such as the ATMega32u4 already mentioned.
| If you are willing to add chips to your project you can add some kind of USB UART chip, like FTDI's FT232 , Prolific's PL2303 or
|
Applying load when testing battery voltage Why do we need to apply a load to a battery, when testing its voltage? I've been testing battery capacity so far using a multimeter and just connecting the probes to the positive and negative side of the battery, which seems not to be correct. But, why is this? Why do we need to test batteries with a load and why can't we just simply check voltage with no load? <Q> You need to put a load on the battery to see if it has any charge left. <S> So to see if a battery is really usable you must measure the voltage when the battery is connected to a load. <S> Like this: Dead Battery, no load, 1.4 Volts Dead Battery, load of 100 Ohms, 1.0 Volts Good Battery no load, 1.5 Volts Good Battery, load of 100 Ohms, 1.4 Volts <S> Those numbers are just representative - do NOT use them to actually measure your batteries. <S> Check the unloaded voltage of a good battery, then check the voltage of a good battery under a typical load. <S> Use that typical load to test other batteries. <S> That is to say, figure out the equivalent resistance for the load and use a resistor of that value in your test. <A> Quite a lot of battery chemistries will, if left alone, raise their terminal voltage. <S> But there may be no capacity behind it and it will drop as soon as you try to use it. <S> So a load is connected to the battery to verify that it is actually useful. <A> As typical Alkaline and other batteries go bad or get weak, they develop greater internal resistance. <S> With no load or very little load you could say that there is a voltage divider formed by the internal resistance and the high resistance external "load". <S> The high external resistance will show a high or full voltage drop. <S> With a good external load, low resistance, the internal resistance of the battery will experience a greater voltage drop, meaning you'll see lower voltage externally. <A> To add a practical example... <S> Have you ever found an old flashlight (especially incandescent), turned it on and thought the batteries were good only to see it dim and possibly turn off several seconds later? <S> Or possibly a motorized toy? <S> When the batteries aren't being asked to do any work, there may still be enough of the active chemicals to raise the voltage to nearly-new levels, but not enough to sustain that voltage under load. <S> Once you've stopped using them, the voltage will gradually climb back up again. <S> An ideal multimeter in Voltage test mode draws no current, so you're not testing the battery's ability to sustain the voltage when doing work. <S> No multimeter is ideal, but even a cheap one draws little current. <S> It doesn't work as well with LED's or other semiconductor-based objects because they have a relatively flat performance in the "good" voltage ranges and then just stop once they get below a certain threshold. <S> P.S. mA and mAh Current (measured in Amps, Milliamps, etc.) is the measure of how fast electrons are passing through a circuit. <S> Capacity (measured in "Amp hours", "Milliamp hours", etc) is the measure of how long a power storage device can supply a certain current. <S> It is roughly true to say that a 1000mAh battery could output 1000mA for 1 hour or 1mA for 1000 hours. <S> Reality is a bit more complicated, though. <S> Batteries are much happier outputting 1mA than 1000mA <S> (1 Amp). <S> You'd have a hard time getting a 1000mA battery to output 10 Amps for 6 minutes without exploding.
| Without a load, it may show an acceptable voltage, but when you actually try to use it the voltage drops because the battery is nearly dead.
|
How to change analog sensor signal to appropriate levels for microcontrollers? I have a FUTEK CSG110 amplifier, conditioning a signal provided from a load cell, providing a -3V to 3V signal. I can change this range to my liking, however I will be stuck with a +- voltage representing the compression and tension of the load cell. I want to use the ADC of the Teensy 3.1 to measure this voltage, by modulate the sensor signal accordingly to provide 0 - 3.3V, the operating range of the ADC. I was wondering how I can do this? I am sure there is a clever resistor configuration that will enable this. Thanks,Daniel <Q> Yes, you can do this with a resistor divider . <S> We usually think of a resistor divider as multiplying a voltage by some value less than 1, meaning scaling relative to ground. <S> However, a resistor divider can be set up to scale relative to any particular voltage. <S> In your case, you can scale the voltage about the 3.3 V supply instead of about ground. <S> Overall, you want to scale a 6 V range down to a 3 V range, so the divider scale factor needs to be 1/2, meaning the two resistors must be equal. <S> For example, one 10 kΩ resistor to the 3.3 V supply, another to the ±3 V signal, and the two other ends connected to the A/D input. <S> That will load the signal by the sum of the resistors (20 kΩ) and provide a output impedance for driving the A/D by the parallel combinations of the two resistors (5 kΩ). <S> If 5 kΩ is not low enough to drive your A/D, then lower the two resistor values so that each is twice the required impedance. <S> Note that this method requires that the 3.3 V supply is well regulated. <S> That would be the case, for example, if it is driven by a linear regulator from a higher voltage. <A> You can do this with two or three resistors- one to the reference for your ADC and one to the input, and perhaps one to ground. <S> However, it's important to realize that the result (and your ADC accuracy, both zero and span in this case) will depend on the accuracy and stability of that reference. <S> If the reference drifts a few percent you'll get a much different reading, even at 0V from the amplifier. <S> Since the Teensy 3.1 (based on a Kinetis processor) has a 16 bit SAR ADC <S> you need a pretty good reference to get full performance out of the system- using the power supply as a reference <S> may lead to disappointing results. <S> The internal regulator in the chip has a +/-10% tolerance and no drift spec. <S> If you supply an external reference of (say) <S> 2.500V <S> then you'd use resistor values 10K to Vref, 12K to input and 60K to ground. <S> That will give you mid scale for 0V. <A> No, there is not any clever resistor configuration to achieve your goal. <S> It seems to me the FUTEK piece you have is an industry standard strain gauge amplifier, I don't really understand why you would use it with a crappy ADC. <S> Your best option is to buy an external ADC that can handle negative voltages and hook it to the teensy. <S> If possible you should search for a wide input ADC: the wider the available signal swing the higer the precision you can get. <S> Alternatively you can shift your signal up as needed, I see from the datasheet you can sum up to 10%FS to your output with the FUTEK alone <S> but that's not enough. <S> Doing so will provide you with a 0..6V signal and you will need to attenuate it, and that might or might not be bad depending on your required resolution.
| You will probably need a nice INAMP (instrumentation amplifier) to shift your input. The simpler solution is to put a series capacitor and bias the following circuit but this can work if your signal band is far enough from DC, and that does not seem the case to me with strain gauges.
|
Mechanically damaged capacitor leaked liquid - is it toxic? I have mechanically damaged a capacitor on an old motherboard and it made a PFFFT sound like some gas went out of it and then some liquid leaked. What is that? Is it toxic? I hope that it was not mercury! The capacitor is of a cylindric shape with two wires at bottom, about 7mm in diameter. <Q> Yes it's toxic; No it's not mercury; Yes you'll live :) <S> If it was a solid, then perhaps manganese dioxide. <S> , take a bath in it, or move to a planet full of it. <S> But... one capacitor one time in your life will not make a difference in your overall health. <A> Whether it is toxic or not, you should treat it as though it is toxic ! <S> But there is no need to get paranoid about it. <S> For some reason you seem to be more paranoid about mercury than the one you should worry about - lead. <S> If you are going to repair the board, I recommend that you cut & remove the remainder of the capacitor, clean the board with q-tips and alcohol, and wash your hands, and place an equivalent capacitor in its place. <S> If a tech is going to do it, leave the board alone. <A> The capacitor people use a variety of electrolytes and some could be mildly toxic. <S> All are corrosive because they contain things like boric acid and salycilic (sp) acid. <S> None use strong acids or mercury. <S> Rinse the board with hot water and replace the capacitor.
| If it was a "wet" capacitor type, then most likely that was sulfuric acid or some organic or inorganic solvent. Whatever it was it isn't good for you so don't breath it
|
Function generator as a DC power supply I'm wanting to start my own lab at home so that I can learn things faster than uni teaches (we're not allowed into labs unless we're in our own lab). A friend said that I'd be better off getting a power supply than a function generator, since I'm a first/second year elec student because he thought they'd be cheaper, but there's only about $50 difference between the two. I'm actually wondering whether it would be a good idea to get the Rigol DG-1022, and to supply a dc source, I set the frequency as close to zero as possible. Of course, electricity is dangerous; while I'm cool with blowing an LED or op-amp, I'm not at all happy to assume that a mock dc supply is actually direct current, without first checking if this is safe. Wondering what you think? I'm not just asking about safety, if you've got other comments, I'm happy to hear them. <Q> No, that won't work. <S> One option is to make one of your first projects an adjustable PSU with current limiting (using an LM317 and a heatsink) powered by an AC adaptor, perhaps a 19V one from an old laptop. <S> It'll teach you about proper heatsinking! <S> So I'd still go for the function generator as a first purchase (assuming you already have a multimeter!) <S> but use other arrangements to supply power. <A> The function generator you are referring to is an arbitrary waveform generator. <S> You can actually punch in a DC signal and live with that. <S> The specs on the rigol site states that the maximum peak to peak output voltage for channel 1, that is the stiffest, is 10V on a load of 50\$\Omega\$. Assuming the output is ground referenced <S> you have some 5V on 50\$\Omega\$, i.e. 100mA. <S> That is a ridiculously low current for any project this side of turning on an LED. <S> For most projects you will need a dual power supply, sometimes you will need dual power supply plus another positive voltage for digital circuitry, and the signal generator can't help that. <S> 5V is also quite a low voltage if you want to make any decent audio circuit or anything more than some Watts powerful, maybe a stepper driver or whatever. <S> A signal generator as a power source is definitely a bad idea, you should really consider getting a decent bench power supply. <S> You could also use a wall wart or something like that, that is much cheaper, but I advise against it. <S> You will blow things up and having a current limited, nice stiff 'n steady supply is something you should not skip over. <S> Plus you can use your laptop as a signal generator through its audio output: it's a kinda hacked solution <S> but it's much better than using a signal generator as PSU <S> and I think it is also better to have a nice PSU and a hacked signal generator than the opposite thing. <A> If you are only powering low wattage circuits then a function generator can work. <S> I've used them to generate an AC output (like the low voltage output of a transformer) and fed that into a bridge rectifier and smoothing capacitor to power small circuits. <S> Most function generators will have at least 50 ohms in series with the output and might produce up to 10Vp-p (hand waving alert) <S> so for a moderate load they will work. <S> If you need more than a couple of watts then buy/build a power supply. <A> If you want simple and relatively good power supply, you could get yourself an old computer power supply, you will have 5 and 12 volts with good stability, and invest your money in a signal generator(or a scope..or both). <S> It is not hard to create a variable power supply with an lm317 circuit or something which is actually a good project for a novice :) <S> the rigol scope like a ds1054z is only 399 and you will learn a lot, you have cheap signal generators for about 20-25 $ on ebay, just be aware that they are CHEAP, and their signals are not that well <S> formed(which you could investigate with your scope), but it does get you started.
| You could use fixed voltage supplies (AC adapters, wall warts) for most power supply purposes - just understand that your circuits are living dangerously if the supplies aren't current limited, so be careful and double-check your connections - until you can afford an adjustable PSU.
|
How is byte addressable memory implemented? How is byte addressable memory implemented? If the max word size is 8 bytes (64 bits), does the memory always read 8 bytes and then use logic to select the bytes you actually need (1, 2, 4, 8 bytes)? Also, how are the writes implemented? <Q> Generally what happens is you lose the low order address lines and gain byte enable lines. <S> So if you have 4 GB of memory which would require 32 address bits for byte access, you might end up with 30 address bits, 4 byte enables (from the remaining 2 address bits), and 32 data lines for a 32 bit word size or 29 address bits, 8 byte enables, and 64 data lines for a 64 bit word size. <S> Inside the memory, logic will be used to mask which bytes are actually written back during write operations based on which byte enables are selected. <S> Generally the byte enables are only used during write operations, reads will almost always read out the complete word size and whatever is performing the read operation will simply ignore the extra data. <A> One thing is the physical memory chips you work with. <S> These always have fixed data width anywhere from 8 to 64 bits, in my experience. <S> As a side note, on DIMM slots often you have multiple chips with their data I/O "parallelized", so that the module, as a black box, delivers 64bits wide bus of data. <S> Then you have the CPU that wants its data to be transferred. <S> You are right, that with the PC, the entire word is the smallest piece of memory the hardware can access. <S> You are again right, that the CPU/Memory controller then picks the sub-bytes that each individual instruction needs. <S> I'd also like to relate this issue to alignment , even though the question doesn't mention it. <S> Many modern architectures expect certain instruction operands to be aligned. <S> This is mainly an issue with SIMD, where you'd normally want 16-byte alignment. <S> The C* language tools often don't make it too easy to achieve. <S> This comes to your point about the extra logic that's used to re-align the memory block (i.e. cache line <S> ) - aligned access is often faster, because this alignment logic is bypassed. <A> The number of bytes read at a time depends on the data path width. <S> A 64-bit system could read 8 bytes at a time, because 64-bits would show up in parallel. <S> For an 8-bit system, it would read 8 bytes sequentially. <S> \$ <S> _{Source} \$ <S> The maximum word size is not determined by the bus width, so if the maximum word is larger than the bus, the bytes are read sequentially. <S> If the bus is larger than the requested data, the requested bytes are returned in the LSBs of the data bus. <S> This is because in 64-bit systems, each byte of memory is addressable, so the LSB of the bus can start with any byte. <S> The writes work in exactly the opposite direction. <S> From one to how ever many bytes can fit in the data bus are written to a location specified by the address bus. <S> Except for certain processors, like the 8051, the only time you need to grab more than what you want is to get bits out of a byte. <S> The 8051 has some bit addressable memory, but for anything else you need to grab a whole byte and extract the bits you want. <A> For writes, there are "byte enable" (or data strobe, or whatever) signals which allow to modify bytes one by one. <S> This is more complex with EDC memory ( <S> 72bits or 96bits vs. 64bits) <S> as the error correction code is calculated over all the bits at once and can only correct a limited number of bits spread across the bus. <S> In that case, for modifying only one byte, the CPU need to do a read/modify/write operation. <S> Which would be very slow. <S> As most modern CPUs use large write back caches, most writes to RAM are actually copy-backs cycles, so reads are taken from the caches, <S> "real" 8, 16 or 32 bits writes to 64bits DRAM are very rare.
| When addressing 64bits wide RAM, a CPU will typically read 8 bytes at once and use multiplexers/selectors to pick bytes.
|
Puzzled by FET circuit simulate this circuit – Schematic created using CircuitLab At a coffee house recently, I saw a napkin drawn schematic at the table before the waitress cleaned up after the previous patron. I do not remember the part number for the P ch JFET, but the N CH was MPF102.I cannot figure out what the point of such a circuit would be.It looks to me like the JFETs are going to be biased off unless the voltage rises past the source drain breakdown voltage. Anything that high would damage the microcontroller input pin.What am I missing here? <Q> Look at the 0V connections - the series combination of J1 and J2 are shorted by 0V. <S> This effectively makes the circuit V1 in parallel with R3: - <A> Ignoring that spurious extra ground at the top right (presumably supposed to go to the microcontroller GPIO), the JFETs will present a low impedance near 0V and increase for (poorly controlled) higher voltages. <S> JFETs are depletion devices (normally 'on'). <S> I don't see much point to this circuit as drawn. <S> Sometimes JFETs are useful as low-leakage clamp diodes, but that's not what's happening here. <A> I believe steverinos' comment to the question : <S> I found this:lcbsystems.com/ <S> LambdaDiode.html – steverino <S> May 8 '15 at 18:30 was on the right track. <S> It appears to be a lambda diode arrangement as described in this article: A Dip Meter Using the Lambda Negative Resistance Circuitby Lloyd Butler VK5BR(Originally published in Amateur Radio, January 1997) here is an article from 1975 presenting the lambda diode and a couple applicaions. <S> while researching this a little bit I came across following articles of interest: <S> http://www.softrockradio.org/items-of-interest/lambda-diodes http://www.vk6fh.com/vk6fh/lambda_diode.htm <S> http://www.zen22142.zen.co.uk/Theory/neg_resistance/negres.htm <S> https://electronicprojectsforfun.wordpress.com/making-chaos/negative-resistance-amplification/ <S> Anyway, thought I may share my insights to the question I stumbled upon. <S> Cheers
| The circuit is wrong/useless.
|
Higher voltage or more amps? Im planning on building a E-Bike and have made some calculations and only need my 190rpm/V brushless motor to spin around 600 rpm to give me a good speed. So by this calculation I only need to supply 3.x V. As I understand it without load the motor will rev up to 600 rpm, but on a bike there will be a pretty big load and high current will be required. Now because many components doesnt like too much current is it better to have higher voltage so I get more W from V and not as much from A? <Q> First calculate the torque you require - say, to get you, bike and battery up a 10% grade at 20km/h. <S> Then plug in the torque constant for that motor to get the current you need. <S> (If you don't have the torque constant you can calculate it from the speed constant Kv). <S> Then compare that current with the motor's ratings, and your battery system etc. <S> And update the question with your findings. <S> Then, realise that motor speed doesn't have to be the same as wheel speed, and consider a gearing system such as toothed belt drive... <S> This would allow higher motor speeds and lower torque, for more reasonable voltages and currents. <A> Electric motors which need to have good torque from startup (0 RPM) through cruising speed require higher voltages to have high speed. <S> The electric motorcycle I'm riding has plenty of power in the battery pack, and the hub motor is great at initial acceleration, but it tops out around 55mph due to the 80V pack. <S> I could have put in twice as many batteries at half current, doubled the voltage, and had a higher top speed, but then I lose a lot of current at the low end and acceleration from 0 is poor. <S> I'm not terribly interested in adding a transmission, but that's essentially what needs to be done to have the best of both worlds. <S> Whether electrical (start off with, say, <S> 60V in two series packs, then switch to 120V in a single series pack), or mechanical, a transmission becomes necessary to manage the switchover. <S> If your bike isn't going to go fast, then put your power in lower voltage, higher current. <S> If you're going to be cruising at higher speeds regularly, and are willing to sacrifice acceleration, put your power in higher voltage, lower current. <S> Of course, a lot of this depends on the motor and controller, and given your statement "... <S> many components [don't] like too much current..." <S> it sounds like you would be more comfortable with a low current, high voltage setup. <S> There are drawbacks and advantages to both allocations, but if you look around the automotive industry, you'll find that they are focusing more heavily on higher voltages primarily for the reason you state - many active components are priced based on how much current they can handle, and how little they waste. <S> At lower currents, less is wasted, and components are cheaper. <S> Of course, modern electric cars still handle a huge amount of current even at their 300-400v rating. <A> It sounds like you still have a lot of research to do in building your e-bike, but you have to start somewhere. <S> Your question about volts versus amps probably is in reference to the fact that as you transfer the energy from your battery to your e-bike motor, there will be losses of that energy through various factors including losses in the wires that transmit that energy. <S> As the current through a wire increases, the losses due resistance of the wire resulting in heat, increase at a rate of the square of the current. <S> In other words if you double the current, you quadruple the losses. <S> Power loss, <S> \$P= <S> I^2*R\$. <S> If you take the above equation and substitute for current or I, you get power loss <S> = \$\frac{R}{V^2}\$. <S> Holding power constant, as voltage increases, losses decrease, and this is likely what you are asking about. <S> Also, if working at a higher voltage versus a higher current, you can use thinner wires which are easier to work with and much less expensive. <A> many components doesnt like too much current <S> is it better to have higher voltage <S> ALL electrical components WITHOUT EXCEPTION have maximum currents and voltages they can handle. <S> Sometimes you can trade off one against the other, but not always. <S> You should be able to find existing well-matched sets of motors, batteries, control electronics and cables. <S> (For example, dismantling a mobility scooter.) <S> If you use this all as-is, then you should be safe. <S> With respect though, I think your experience with electrics is low enough that experimenting with this would be a spectacularly bad idea. <S> As in significant risk of death to you and those around you. <S> The biggest problem isn't electrocution (although that's a real danger); most deaths from electrical problems come from fires, and not having sufficient clue on voltage/current ratings is virtually guaranteed to cause you problems. <S> I think your minimum entry requirement is a school-leaver-equivalent pass in physics. <S> If you don't have that <S> (or this was long enough ago that you don't have the information at your fingertips), then I STRONGLY suggest that as a prerequisite to your project. <S> Physics will also cover the theory behind forces which is highly relevant to your project as well. <S> With this theory, you can solve this yourself. <S> Without this theory, I suggest that any well-meaning people giving you advice are actually putting your life in danger by helping you go forward into situations where you can't tell how much danger you are in. <S> (My own experience: 20 years an engineer, 2 years on national grid stuff, 10+ years on automotive stuff)
| As voltage increases, the losses due to the resistance of the wire could actually drop if power remains the same and current drops relative to voltage increases.
|
Can I parallel multiple resettable fuses to achieve a higher current rating? I have an application wherein I spec'd a fuse , rated for 80VDC 500A. The customer is concerned about what happens if they have to replace the fuse, it being rather difficult to access. They suggested resettable fuses as an option. I'm not aware of any resettable fuses rated for those currents. However, since they have positive temperature coefficient, it occurs to me that I may be able to effectively parallel several smaller ones. Is this good practice? <Q> I assume you're talking about paralleling polyfuses- <S> this is likely not a viable idea since the breaking capacity will be insufficient to interrupt any reasonable fault current, even if the current were to share nicely. <S> When the last one in parallel opens it has to interrupt the entire fault current. <S> I can almost smell the arcing.. <S> You could consider a remotely resettable 500A DC circuit breaker, but I suspect once you get a price quote <S> the customer will promptly reconsider how difficult it is to access a fuse that shouldn't be blowing very often anyway. <S> Those are rather decent fuses- low voltage drop, good interrupting capacity (3000A) and fairly widely available. <A> Paralleling fuses is technically possible, but is generally considered an extremely bad idea. <S> Fuses, even those of the same rating, are just not identical. <S> Nor are the fuse-holders they might be mounted in, or the lug screwed to them. <S> All of that will affect the current sharing of an array of paralleled fuses. <S> Even different temperatures can cause different fuses to carry different loads. <S> Later on, another will blow, still leaving some. <S> Eventually all will open. <S> Why not just move your specified fuse somewhere more accessible? <A> The existing answers may be misleading; it is acceptable to use multiple PTC fuses in parallel, as long as the following considerations are made: <S> Each PTC fuse individually has an acceptable maximum current rating. <S> The parallel tripped resistance of all the parallel PTC fuses is high enough. <S> The conductors for any single fuse can handle the full load during the tripping period. <S> The PTC fuses are placed far enough from each other that they don't co-heat. <S> There is some variability in the PTC fuses' internal resistance, but as the array of parallel PTC fuses self-heats, their resistances will match. <S> When current exceeds the trip threshold, they will open in a cascade; manufacturing tolerance causes members of the array to trip earlier than others, and the remaining PTC fuses will quickly trip in succession.
| Generally, what happens with paralleled fuses, is that during one power cycle, inrush current will blow one, leaving the rest.
|
Is it possible to decrease the speed of a standard servo motor? I have TowerPro SG-5010 and its speed is 0.17 sec/60° at 4.8V and 0.14 sec/60° at 6V. Just to be sure, is it possible to further decrease the rotation speed? <Q> Instead of changing the angle straight from, say, 0° directly to 90°, change the angle in small increments at the speed you want. <S> Even better is to use a logarithmic or exponential acceleration / deceleration schema. <S> Say you want to to from 0° to 90°. <S> First go from 0° to 1°. <S> Then from 1° to 3°. <S> Then from 3° to 6°, then to 10° etc, until you reach a top desired speed - then reduce the distance you are changing with each "step". <S> So for each "tick" of your control clock you would step by (as an example) <S> 1°, 2°, 3°, 4°, 5°, 5°, ... 5°, 5°, 4°, 3°, 2°, 1°. <S> Another useful method is the "divide by 2" schema. <S> For that you simply move by half the target distance with each "tick". <S> So for a 90° rotation you first move to 45°. <S> That leaves 45° left to move, so you move 22.5°. <S> You then have 22.5° left to move, so you move half that at 11.25°, etc, until you have reached your destination. <S> It makes for a fast start to the movement, with a nice smooth deceleration to the target angle. <S> These methods are great for reducing the inertia and momentum induced stresses on the load of the servo motor. <A> Yes, the given speed would be "maximum" speed. <S> To decrease the speed of a regular motor you would use PWM to lower the voltage. <S> But servomotors (usually) work with a fixed width (20ms?) to indicate their rotation (1ms 0degrees, 4ms 360degrees?) <S> The illustration below shows the difference between PWM and servo control. <S> Image at the right is the servo signal, you should increase the ON time from 1ms to 4ms, the speed at which you do this will be your servomotor speed. <S> You should check the datasheet of your servo-motor to be sure. <A> Decrease the speed of a TowerPro SG-5010 servo motorlike this import RPi. <S> GPIO as GPIOimport timeGPIO.setwarnings(False)GPIO.setmode(GPIO.BOARD)GPIO.setup(12, <S> GPIO.OUT)p = GPIO.PWM(12, <S> 100)t = 0.2r <S> = 20 <S> p.start(r)while <S> True: for i in range(5,r): p.ChangeDutyCycle(i) <S> print(i) time.sleep(t) for i in range(r,5,-1): <S> p. <S> ChangeDutyCycle(i) <S> print(i) time.sleep(t)
| The way I reduce the rotation speed of a standard servo is to just not rotate the servo as fast.
|
sine wave in FPGA I am supposed to generate a sine wave in cyclone 2 altera? I get that I have to store the values in LUT or some memory. I think cyclone 2 uses a 4 input LUT. I am not sure how I should go on with the next step. How do I give or feed the values and Is there a way to store more values than a single LUT can hold? DAC interface? For example, SIN is often implemented as a table lookup. If 10 bit angles are good enough resolution, then the whole function can be implemented as a lookup table with 1024 entries. (Actually in the case of SIN, only 1/4 cycle is stored then negated or indexed backwards depending on the actual quadrant, but that is a aside specific to SIN). I got this from one of the older answers. But what is the 10 bit angle resolution? I guess they are using 1024 samples for 1/4 cycle. Is that right? <Q> There are three ways todo this (forth listed for completeness) and it comes downto <S> space-time tradeoffs: <S> Do you do the calculations ahead of time (storage space) or do you do the calculations on the fly (time tradeoff) <S> 1) Look up table. <S> Do the calculations ahead of time & store the information in a ROM/table. <S> By realising you only have to store 1/4 of the waveform can decrease the amount you need to store. <S> However... depending on the accuracy & the number of steps can lead to a very large table 2) Interpolated LUT. <S> A tradeoff between a lookup table and full calculations. <S> Take <S> advance of the change between entries might be well within accepted errors. <S> Sometimes only 3 points are required (NOTE: 3point example is for atan only) 3) <S> CORDIC. <S> (COordinate Rotation DIgital Computer). <S> Basically a hunting algorithm which can be reduced to simple add's and shifts. <S> The accuracy is pretty much governed by the number of computational steps 4) <S> Full taylor expansion. <S> If accuracy is paramount, speed is imporant but local storage isn't an option <S> My advice. <S> Look into a CORDIC. <S> There are plenty of example cordics in VHDL and an FPGA is perfect for a CORDIC. <S> A project I am working on at the moment heavily uses cordic's (12bit, 14 cycles to settle) <S> Example cordic in python <S> #http://code.activestate.com/recipes/576792-polar-to-rectangular-conversions-using-cordic/def to_polar(x, y): 'Rectangular to polar conversion using ints scaled by 100000. <S> Angle in degrees.' <S> theta = 0 <S> for i, adj in enumerate((4500000, 2656505, 1403624, 712502, 357633, 178991, 89517, 44761)): sign = 1 if y < 0 else -1 <S> x, y, theta = <S> x - sign*(y <S> > <S> > <S> i) , <S> y + sign*(x > <S> > <S> i), theta - sign*adj <S> return theta, <S> x <S> * 60726 <S> // 100000def <S> to_rect(r, theta): 'Polar to rectangular conversion using ints scaled by 100000. <S> Angle in degrees.' <S> x, y = 60726 <S> * r // 100000, 0 for i, adj in enumerate((4500000, 2656505, 1403624, 712502, 357633, 178991, 89517, 44761)): sign = 1 <S> if theta > 0 <S> else -1 <S> x, y, theta = <S> x - sign*(y <S> > <S> > <S> i) , <S> y + sign*(x > <S> > <S> i) <S> , theta - sign*adj return x, y#if __name__ == ' <S> __main__': <S> # print(to_rect(471700, 5799460)) <S> # r=4.71700 theta=57.99460 <S> # print(to_polar(250000, 400000)) <S> # x=2.50000 <S> y=4.00000 <S> Notes on CORDICS and FPGA's http://www.uio.no/studier/emner/matnat/ifi/INF5430/v12/undervisningsmateriale/dirk/Lecture_cordic.pdf <A> For example, you could use a 1024 entry table with 8-bit entries. <S> The entries would be calculated with sin or cos and stored in the RAM in an initial block. <S> Then you would use a phase accumulator to read the samples out of the RAM at the correct times and send them to the DAC. <S> If you need a very high resolution, then you need a table with a lot of entries and it can very quickly become too large to fit in FPGA block RAM. <S> In that case, it's possible to use a compressed lookup table. <S> A compressed table stores information that can be used to recreate samples from a much larger lookup table. <S> Here is an example of a quadrature sine/cosine lookup table that has 18 bit phase resolution and 16 bit amplitude resolution, but requires less than 2k lookup table entries across 3 lookup tables: https://github.com/alexforencich/verilog-dsp/blob/master/rtl/sine_dds_lut.v <A> I think you are confused about what a LUT (Look Up Table) is. <S> A LUT is just a memory initialized with fixed values that do not change during normal behaviour. <S> In a FPGA architecture <S> you have basically LUTs combined with registers. <S> These LUTs are initialized with the values of a truth table to define a combinational output logic of some inputs. <S> In the case of a Sine Wave you can initialize for example <S> a 1024 depth block memory (due to the high quantity of data) to store the discretized result of a angle input of 10 bit width. <S> That is, for the 360 degrees you calculate the sine result for 1024 divisions angle pieces and use this value to initialize her position. <S> These values must be rounded to the bit width output, so more precision you need more depth and output width and more block memories of the FPGA you have to consume. <S> That's the initial approach to the problem. <S> In addition you can take advantage of the nature of the sine wave, calculating only values for the first quadrant (0 to 90 degrees) and using some combinational logic to transform any angle to her equivalent value in the first quadrant. <S> You will have the same result but saving 3/4 of block memory. <S> To do this you can use a Core Wizard from your FPGA vendor or search a HDL template to define a initialized block memory that could be correctly interpreted by the synthesizer. <S> And as a final step you can use a DAC to pass a digital value from the LUT to a voltage. <S> Bigger the memory, bigger the resolution of this "analogical" sine wave. <S> That's all. <S> Good Luck
| Generally the way you do this is with a lookup table stored in a block RAM.
|
Measuring change in inductance I have a coil whose inductance will be changing continuously. I would like build a circuit to monitor the change in inductance continuously. Can I just use a RCL circuit and give it a sine wave of f Hz, and measure the voltage across the coil? <Q> It might be easier to build the inductor into a colpitts oscillator and measure the frequency variations with indutance change. <S> The circuit above is very easy to get working <S> and I have used it plenty of times in oscillators and VCOs. <S> Of course you can buy Ti's inductance to digital convertor: - <S> (source: electronicproducts.com ) <S> But where's the fun in that? <A> Yes, though that will (in general) lead to a nonlinear response. <S> You'll get a peak near: \$\omega_0 = \frac {1}{\sqrt{LC}}\$ (how near depends on the Q) <S> There are plenty of ways of measuring an inductance- making the inductor part of an LC oscillator (for example, resonating with a film or NP0 capacitor) and measuring the frequency is a common method for approximate measurements. <S> A circuit developed by AADE, which is LM311-based, is available in unauthorized knock-off form in many hobbyist inductance meters and kits. <S> Also widely used are RLC bridges (AC bridges are the standard way of making precision measurements). <S> With inductors there is often a need to measure the real portion of the impedance as well- core loss and/or series resistance loss. <S> That can be done by demodulating and low-pass filtering the quadrature components of the current through the (imperfect) inductor using the applied voltage as the reference. <S> An ideal inductor would have no in-phase component at all. <S> Whichever method you use (oscillator or bridge), you will have to keep the test frequency well above the rate at which the inductance changes if you expect it to follow accurately. <A> This will give you better sensitivity at the same noise level on the signals. <S> This oscillator method is how most metal detectors work.
| You can, but the usual way is to use the inductor as one of the frequency setting components in a oscillator, then measure the change in frequency.
|
Which way are heat sinks supposed to be mounted? Which way are heat sinks supposed to be mounted? With the fins around the component, or facing outside? <Q> Whichever way round provides better airflow. <S> inwards, outwards, upside-down, other side of a (metal) bulkhead. <S> If it's smooth on both sides of the mounting hole it's meant to be used both ways. <S> Don't forget the insulators (if needed) and the thermal goo. <A> The air can then naturally rise and these convection currents flow along the fins and provide better cooling. <S> As for inside the heatsink or outside the heatsink, personally I don't think it matters. <A> As paul said: both ways, whatever is more favourable because of thermal or mechanical reasons. <S> I just want to add <S> : Note the long hole in the heat sink. <S> It is there for mounting the regulator as shown in in your 2nd picture but rotated 180° around the axis of the screw. <S> Then the pins can be bent 90° backwards going through the heat sink. <S> That way the heat sink can be fixed at the PCB with the same screw that fixes the regulator to the heat sink and the pins can be soldered through-hole to the PCB (see picture below).
| For a non-forced-air cooling regime, the fins are best positioned so that they are vertical.
|
Can I program a 3.3V ATmega MCU with 5V programmer (USBasp)? short question: I have ATMega8A at 3.3V I have USBasp programmer at 5V (from USB port) Can I program this AVR with this programmer directly? Well, ATMega can stand 5V but it's powered with 3.3V so I don't know whether it will survive. I don't want any level shifters: I don't have one and don't have space for that and it should be simple. If I cannot connect that directly, then can I use a voltage divider (2 resistors) to divide 5V to 3.3? There's no need to do it from 3.3 to 5V because 3.3 is already high level for 5V... <Q> If the ATMega8A can operate at 5V (which it can, as its operating range is 2.7-5.5V), then you can program it (and run it) at whatever voltage your programmer is and it will run, as long as it is within 2.7-5.5V. <A> If you have an USBasp <S> like this one below: <S> You can select the supply voltage with the jumper in the red rectangle.5V and 3.3V <S> are available this way, as the label says. <A> If I have understood all the information through the comments, you have a design with AVR and ARM at 3.3 V powered from one supply and you want to know if you can let the programmer burn 5 V into the AVR's programming interface. <S> I wouldn't do that, since the AVR has ESD protection networks on the pins, which would clip the excessive voltage to the Vcc rail. <S> If it is a parallel regulator, it won't allow the supply rail to rise and the programmer probably won't like this too much (it is a short for its outputs). <S> If it is a series regulator, the voltage will rise any you are likely to damage the ARM. <S> The ESD diodes are quite robust (checked that for myself several times :D). <S> The divider on the outputs will be probably fine - don't make it too weak, you need to charge input capacitance of the MCU, the frequency will be probably quite high on the SCK line. <S> Level conversion IC would be even better, but surely is a pain in the ass. <S> If your programmer has an option to select voltage levels (BattleHamster's post), switch it to 3.3 V. <A> If you look at the data sheet for the ATmega328, for example, you will see that the maximum voltage that can be applied to a data pin will be Vcc + 0.5V if I remember correctly. <S> I have myself zapped AVR chips with overvoltage programming <S> so beware. <S> The AVRISP MKII on the other hand does switch both the Vcc and signal levels. <S> Do not rely only on supposed overvoltage protection and always use the correct signal voltage levels for the AVR and other devices in the system.
| The AVRasp programmer shown on this page has a 5V/3.3V link but that only affects the target Vcc voltage, not the signal voltage which remains at TTL levels. It depends on the voltage regulator used for powering the chips what will happen.
|
Can I use a 5% tolerance resistor instead of a 10% tolerance resistor? can I use a 5% tolerance resistor instead of a 10% tolerance resistor? It is for an organ from the 60's. All resistors stated in Schematics are 10% 1/2 watt. But I can't find a 6.8k 1/2watt 10% tolerance resistor anywhere. All the resistors in the organ are carbon based. <Q> "10% tolerance" on a component simply means that the actual value of the resistor must be within 10% of the specified value. <S> That is, if you measured the actual resistance of a 6.8kΩ ± 10% resistor with a high-precision ohmmeter, you would measure its value as being somewhere between 6.12kΩ and 7.48kΩ. <S> As such, a 5% tolerance component will also fit the 10% specification: if the value is within 5%, it will certainly be within 10% as well. <S> The lower tolerance just means that its value will be a more exact fit than the original design required! <A> Yes, you can, if that is the only difference. <S> Composition resistors are a bit different from more modern carbon film resistors- <S> they are more tolerant of surges, for example. <S> Carbon composition: <S> Carbon film: <S> Voltage rating is not usually an issue on a product like an organ unless the resistor is connected to the mains. <S> The same is true of surge capability (expand that to mains or power supply use). <S> Don't replace a large resistor with a much smaller resistor (physical size) if you don't know the power rating. <A> Nominally, assuming all other things equal, the answer is yes, as other folkshave pointed out. <S> It is worth noting that the distribution of discretes are 'notched' becauseof binning. <S> That is, the value ofa 10% resistor will lie in the range \$[-10,-5) \cup (5,10]\%\$ because the5% (and lower) will have been selected out after manufacturing. <S> Hence, while extremely unlikely in practice (and certainly if manufacturedin the '60s), it is possible that a design may not work to specificationif higher tolerance components are used.
| Yes, so long as all the other specifications match. If the resistors are of the same construction and of the same power rating (and of similar physical size- related to voltage and power rating) they will almost certainly work as well as the original.
|
Which household electronics contain or used to contain photo multiplier tubes? I would like to get my hands on one, but I am unsure where to find them (other than online). Are there any old household electronics that have them, used to have them? I am willing to go scavenge hunting for some. <Q> OPERATION: <S> With headlights turned on, and the pilot light indicating automatic control, light striking the photo-multiplier tube of the control assembly causes generation of a weak electrical current. <S> This current is electronically amplified and used to actuate relays in the switch assembly <S> Otherwise, I think you'll find them very, very rare on the ground. <A> They are expensive, they work at high voltages, and may need to be cooled to low temps. <S> Depending on what they are used for, they may need large amplification good to very high frequency. <S> These hefty obstacles preclude their use in consumer grade products. <A> Only thing I can think of is night vision equipment, which isn't exactly household but may be available from military surplus. <A> A film drum scanner might use a photomultiplier tube. <S> Not all that easy to find one in a junkyard though. <S> This page touches on them. <S> Any PMT will have a complex high voltage power supply, be sure to salvage that too.
| Sure, if you happen to have a 1955 Lincoln Continental with all the options kicking around.. they were used in the automatic headlight dimmer circuit. No, there are no household electronics that would include a photomultiplier tube.
|
How do residential analog and smart meters measure power? I'm building my own digital meter in order to upload the data to a SQL database; up until now I know that there are several parameters being measured into a digital watt-meter: volts, current, apparent power, instantaneous power, actual power, power factor However, I still have to understand which one of these is the real value used to increase the counter on both devices. To be more precise with my question, old analog meters couldn't do all these calculations , and still they worked out as intended. However with, no linear loads being more and more common, I'm guessing the power factor in a common house would be hanging around .7 or .8 so how does this change in the type of load would affect the measurement in a digital vs analog watt-meter? My first guess would be that analog meters measure REAL POWER, but I can't be so sure about digital smart meters. How do they work? <Q> Analogue meters measure the average value of the instantaneous values of current and voltage multiplied together: - power = <S> Average(v <S> x i) <S> energy = <S> integral(v <S> x i) <S> Power factor is irrelevant because there is only one way to measure power and that is how I have stated it. <S> Trying to "use" power factor, RMS voltage and RMS current in order to calculate power is a fruitless task given the number of harmonics present in many current waveforms. <S> A moving coil power measurement device (aka the dynamometer): - <S> These days microprocessors are used and they sample voltage and current waveforms and multiply the numbers. <S> Surprisingly high sample rates are used to avoid the harmonics in the current waveform aliasing the ADC. <S> If power factor is needed to be displayed it is done by taking real power and dividing numerically by the product of RMS voltage and RMS current. <S> The same samples that are used to calculate power can be used for calculating RMS voltage and RMS current. <S> A company that I used to work for (Landis and Gyr) pioneered the hall effect power meter - this was basically a solid state version of the two-coil dynamometer shown above. <S> Just in case there are any doubts that the power measurment method can cope with harmonics of current take a look at this: <S> - Here we have voltage at 50Hz and a common harmonic (3rd) of current at 150Hz <S> - see that the instantaneous waveform of power has zero average, just as it should do. <A> The analog meter is built around a motor. <S> The magnetic fields that produce the torque to drive the motor are proportional to the voltage and current at any instant. <S> So, in that sense, it is measuring instantaneous power. <S> Because it spins and turns a counter, it also measures the total energy consumed. <S> The digital meter measures voltage and current directly, and over the course of many samples can measure and accumulate voltage and current readings, as well as calculate the apparent power used. <S> Apparent power can be calculated by measuring the amplitudes of the voltage and current over the course of one or more cycles and multiplying the two results together. <S> An additional consideration is seeing what you are charged for. <S> Residential customers (at least in the U.S.) traditionally paid only for real power consumed. <S> This was probably due to the fact that originally most loads were predominately resistive, and also the fact that while analog meters that can measure power factor do exist, it wasn't cost effective to use them in residential neighborhoods. <S> Nowadays, our uses are quite different, and switching power supplies can really mess with the power being supplied to the grid. <S> This has resulted in regulations forcing power supply builders to get the power factor back closer to 1. <S> I'm still not aware on anyone other than industry paying for power factor, but if the smart meters can measure it, that situation could change. <A> I too have wondered about the precise functioning of my recently installed smart electricity meter. <S> However, I would expect to be billed for the real (kWh) energy I consume and this has to be accurately sensed and computed by the smart meter, which can presumably accommodate both low power-factor (eg of fridge motors) and/or harmonic-laden current waveforms (eg of electronic equipment). <S> I would expect this also to apply to the measured energy (kWh) consumption and and power (kW) levels viewable on the in-house display unit. <S> I can only conclude that true power and consumption figures are always determined and presented. <S> In this respect smart meters are far superior to earlier monitors which used a clamp-on current transformer but were unable to sense mains voltage and so could not determine true power or consumption.
| Real power is calculated by multiplying the voltage and current at any instant (one pair of samples).
|
I2C and SPI on the same bus I have already configured an I2C protocol between a master device (PIC) and two slave devices (sensor ICs). After obtaining the measurements from the sensors I want to store them on an SD card. For that I need to configure an SPI protocol instead. Would it be possible to use the same bus for both protocols. Open I2C, get the data, close I2C and then configure the SPI. Is that possible? Thank you EDIT: I2C uses the SDA and SCL pins on the chip. Can I use the same two lines for the SPI and connect the chip select and the data-in lines straight to the PIC? <Q> Some I2C slave devices use hardware handshaking, which entails having slave devices which are not immediately ready for a cycle holding SCK low until they are, and having master devices which release SCK <S> wait until the line actually rises before processing the next cycle. <S> Such devices will not coexist nicely with an SPI bus. <S> If the I2C device won't accept 00 or FF as an addressing byte, one may avoid any possibility of interference by either configuring the SPI bus so the data state will only change when the clock is high, or else by ensuring that the I2C device will see any falling clock edges as happening after any associated data change. <S> Depending upon what sort of SPI device one is connecting to, that may be the natural state of affairs or it may be somewhat awkward. <S> If one is bit-banging SPI, there will generally be no difficulty ensuring that the sequence of highs and lows on SCK/SDA will continually reset the I2C chip without it ever being able to say anything. <S> If one needs to use hardware SPI but can bit-bang I2C, wiring SCK to something other than the SPI clock may allow one to avoid trouble [e.g. if one wires SCK to MOSI and SDA to MCK, then it would be impossible for SCK to see more than two consecutive cycles without having a rising or falling edge on SDA occur while SCK was sitting high]. <S> An important caveat with this approach, however, is that many I2C devices do not specify their behavior if transitions on SCK or SDA happen above a certain speed, and SPI devices are often run far above the speeds that I2C devices can accommodate. <A> if your i2c device doesn't have an enable, or a cs when you try to talk spi on those pins it may confuse the internal i2c state machine. <S> Best case that would mean your next i2c transaction would be messed up, or it might pull the line low in the middle of a spi transaction. <S> Worst case it could lock the i2c bus. <S> You could probably unlock it <S> but it would have spi to check every read and write (checksum maybe). <S> Also you have to make sure if you are sharing lines like the output line from your spi device that it does not hold the pin either low or high when it's <S> cs is disabled. <S> Otherwise i2c won't be able to write or will be fighting hard against the driver. <S> All in all I wouldn't do it myself, maybe you could add a little mux or fet switch to isolate the i2c device in spi mode. <A> It could work, and what it would boil down to is: could any SPI bit stream potentially look like an I2C start condition followed by any of the slave addresses of the I2C devices you're using. <S> None of your I2C devices will attempt to do anything or interrupt the bus without this initial sequence. <S> The second part - not sending any valid I2C slave addresses - could be tricky, since you'll want to be abel to write whatever data you like to your SD card. <S> So you're left with the first part - not producing an I2C start condition during SPI comms. <S> Since an I2C start is produced when the SDA line changes from high to low while SCL is high, this is the thing you'll need to be aware of. <S> If you can configure your SPI master so that it only changes the state of SDO when SCK is low then you should have no trouble ....
| If practical, it may be good to either have I2C share one pin with SPI but not both, or add some hardware to ensure the I2C doesn't see fast signals on both SCL and SDA
|
PIC18 GPIO switch from input to output(dual mode) I have always wondered if it is possible to switch the port direction of the PIC GPIO during the course of the program execution. So, for instance I start with a particular port set as an input(digital level). I monitor that pin, and if the level changes, I change the direction of that pin and drive a signal to turn on a LED. Is this too far fetched or is it doable? If so, some pseudo-code to would be very helpful. <Q> In general on the PIC18 series you should read pins using the PORT register and write using the LAT register. <S> So suppose you had a pin like this: simulate this circuit – Schematic created using CircuitLab <S> You could periodically read RA0 as an input and drive the LED the rest of the time. <S> To read the switch state you would set bit 0 in the TRISA register high, wait a bit, then read the PORT pin (bit 0 of PORTA), and then clear bit 0 in the TRISA register. <S> To avoid contention, only set the pin to output if the LED is to be driven low. <S> The LED will always come on as long as the switch is pressed. <A> Of course it is. <S> Its just a write to the TRIS register for that port. <S> And since PIC ports default to inputs on power-up, any pins you want to use as outputs have to have their direction switched during program execution - usually in your startup/init code. <S> And there's nothing to stop you changing your mind later on and making some more changes whenever you feel like it ... <A> Think when you put the TRIS register as output, and you send a zero, if you hit the switch you are making a short circuit. <S> You need a resistor in the switch to limit current. <S> Try this instead: simulate this circuit – <S> Schematic created using CircuitLab
| Yes, it's completely possible you simply change the relevant bit in the associated TRIS register from 1 to 0 in order to change the pin from input to output.
|
Ambiguity with circuit symbols If I wanted to draw say a verical thermistor in a circuit diagram, it can look like any one of these four: Is there a convention for which one to pick, or are all of them valid in any situation where a vertical thermistor is drawn? Thanks <Q> None of those look like a thermistor symbol to me. <S> The usual schematic symbol looks like this: or this: Depending on whether the origin of the schematic is US/Asia or Europe respectively. <S> Edit: <S> Since it's an LDR- <S> no the direction the light is coming from does not normally make a difference to the understandability of the schematic. <S> It's a schematic, not a pictorial diagram. <S> However, in the case where there is a light source closely coupled to the LDR which is part of the same schematic, it's common to show them together as below: <S> The symbol shown in the above schematic is the one most commonly used in North America and Asia. <S> The European symbol appears to be more like yours. <A> You can draw any circuit symbol in any rotation or mirroring, but IME each symbol has a more-or-less standard orientation, that mostly coincides with 'information flows from left to right" and "current flows from top to bottom". <S> In the case of an LDR (that is waht you seem to mean) <S> the light is first so the most common convention (again, IME) is to have the arrows at the left side (your top two symbols). <S> Of these two, the left one looks more familiar to me (maybe because light is supposed to come from above?). <S> But again, it is not strictly wrong to use any of the other orientations (or to rotate them 90 degrees). <S> And IME I see LDRs more often without the circle/ellips around the resistor rectangle. <A> You have a light dependent resistor. <S> Resistance changes as light changes. <S> It just the rotation/mirroring of the symbol via different schematic packages. <S> It is common.
| There is no ambiguity in your symbols.
|
Through Hole Soldering- Minimum lead protrusion I am working on a bit of a strange design: all components, SMD and Through-Hole, are mounted on the top side of the PCB, except for some really beefy MOSFETs, which are mounted to the bottom side of the board. The idea is to have a flat heatsink (like the ones meant for BGAs, with push pins) cover the whole bottom of the board, making as direct a contact to the MOSFETS as possible. The MOSFETs use IR's DirectFET packaging, which is about 0.5mm thick, so the heatsink will sit quite close to the surface of the board. This leads to my problem: For obvious reasons I do not want leads from my through-hole components shorting to the metal surface of the heatsink, and I don't want to be drilling clearance holes in it. Is there anything preventing me from just cutting the leads flush before soldering? I notice NASA's guidelines require at least 0.5mm of protrusion, and from what I've heard IPC requires leads to be "visible". I imagine this makes wave soldering more reliable, but assuming I am hand soldering the components and am careful to allow the solder to wick all the way through the PTH, are there any other disadvantages to cutting the leads flush (things like reduced mechanical strength, etc)? EDIT: the thru-hole components are "can"-style caps, and terminal blocks, so they'll need to be soldered from the bottom. (Probably unimportant) details: The MOSFETs should only put out 15-20 watts of heat combined, at absolute most, plus a watt or two from some large thermal pads. So I want to leave it an option for the user to remove the heatsink and mount the board directly to a metal chassis, with some sort of thin thermal pad to avoid shorting. So that's another reason why I don't want to drill clearance holes in the heatsink, for user convenience. EDIT: board pics for clarity: (If you're wondering about missing traces, it's a 4-layer board) <Q> Other than the difficulty in manufacturing I don't see any problem with this. <S> From an electrical point of view, the lack of a conical section on the bottom side of the board won't have any appreciable effect on the connection resistance, and from a mechanical point of view, well there are so many other factors that determine if the lead/pad combination is strong enough that this is unlikely to be an issue. <S> If in doubt you can do some tests on it anyway or add some adhesive to the component body. <S> I would suggest you oversize the holes though so that you can visually verify that the solder has wicked all the way through and right around the lead. <A> So I would suggest to use SMD pads, push the leads onto the pads, and solder them there. <S> For large/heavy components this might give a mechanical reliability problem: a round wire soldered at both sides (or soldered at the bottom only but with a component immediately at the top) can't easily rip the copper from the PCB, but a lead soldered to an SMD pad <S> can! <S> PCB material is not optimized for conducting heat, so you might want to put lots of via's in the appropriate places to conduct the heat. <S> I read in your edit that you want to do this for trough-hole screw connector blocks. <S> My gut feeling is that this will seriously impact the mechanical reliability. <S> You could consider using those two-level connectors for screw terminals, which would free room so you could put your heatsink under only a part of your PCB, leaving the area of the screw terminal terminals to be soldered at the bottom. <A> Don't forget you may have thermal expansion issues to cope with, may not be a problem, but certainly think about it. <S> I guess you're wanting to solder the through-hole components on the top side of the board, assuming there's copper traces there? <S> You could do that for through-hole resistors and some types of capacitors, but some capacitors are cans with both leads protruding from one circular face, these are typically mounted right down on to the board <S> so it's going to be hard to solder these, unless the capacitor is raised above the board and leaving some lead showing, then solder, which would look a bit odd. <S> Then you can visually inspect the underside of the board to ensure the solder hasn't flowed entirely through the hole. <S> I recall doing something like this years ago. <S> One the hole has been plugged by soldering on the top side of the board and the lead is too short such that its end is firmly within the hole and doesn't protrude, then you might make it all work. <S> But seriously, think about some heat conducting, electrically isolating silcone washers over the holes which are at risk where a short can occur between top and bottom side of the PCB, similar to that used on power transistors between the tranny and its heatsink, to provide electrical isolation so that you don't end up with a short. <S> These washers are very thin, so shouldn't add to the thickness of the entire assembly, unlike using 5 mm long steel spacers and extra holes required for them. <A> There are few solutions for such problem, A super/ultra flush cutter can do wonders with TH leads. <S> A thermal pad will provide a flexible, soft thermal interface at the cost of an increased thermal resistance. <S> Thermally conductive epoxy can act as a filler, but as far as I know, it is also conductive. <A> Although I have not personally used one of these machines, some of the facilities that I have visited over the years have a rotary cutting system that trims the leads protruding from the bottom of the PCB to a very short length. <S> I saw one in use and it seemed pretty straight forward: there was a bed that the PCB mounts into (leads to be cut off pointing UP), then the protective shield was closed. <S> The rotary saw looked something like a pneumatic die grinder mounted in a sliding X-Y table - this was moved manually over the surface of the PCB. <S> The whole process took very little time - tens of seconds between successive boards.
| Sounds a bit risky, component leads pushed into holes which you don't want to protrude through the other side of the board in case they short out with a metal heatsink on the otherside. If you don't want the leads to protrude on the bottom side you essentially want to mount your TH components as SMDs.
|
What's the purpose of the diode in this selectable supply voltage circuit part I'm looking at the power supply part of the schematic of SparkFun's Pro Micro Arduino board, which has a jumper to enable or disable a voltage regulator to select between running the board at 3.3V or 5V: I have two questions about D2: What is its function in the circuit? Where can I read up on the motivation for adding it to the circuit? What would happen without it, and is it needed if I always want to run the board at 3.3V, i.e. if I omit the jumper? What kind of diode would I use if I build this board myself? <Q> D2 protects the MIC chip from a reverse (wrong polarity) input voltage. <S> It must be rated to block the expected input voltage, and to conduct the expected input current. <S> In this circuit which has a polyfuse I might have put the diode anti-parallel on the chip power, to avoid the voltage drop. <A> The schematic has a note right on it: <S> So the fuse and diode are intended for protection (overcurrent and reverse voltage respectively), as others have correctly noted. <S> Note also that the diode drops about 0.65V or about half of the 1.7V that is required to get from 5V to 3.3V. <S> At the maximum 500mA out, the power dissipation in the regulator will thus be split between the diode and the regulator at about 325mW each. <S> That might be significant in allowing more current or higher ambient temperature, depending on what package that Sparkfun used. <S> If you build the circuit yourself, the diode is optional if you don't want the protection and are okay with the increased power dissipation. <S> If you use a diode, a reasonable type to choose would be rated at 1A and 200V or more. <S> Very common and cheap- <S> a 1N4004 (1A/400V) would be a popular through-hole part. <A> It is bypassed when you use the circuit in direct 5V mode, since that mode is essentially there to let you have more control over the power supply used. <S> If you are sure you aren't going to reverse connect the power (e.g. keyed power connector etc) then you can leave it out. <S> Otherwise you should select a diode with sufficient current handling capacity for the load and a reverse blocking voltage higher than your highest expected supply voltage. <S> Also make sure the forward voltage drop still allows the regulator to have sufficient drop out voltage.
| The diode is for reverse polarity protection - so you don't blow up the board if you connect the power supply the wrong way around.
|
Anything bad to place a via on a pad? Once I mistakenly placed a via on 0603 pad and didn't have any problem on soldering. I am routing another board now and I could save some space by placing some vias (0.3mm) on a 0603 pad. I wonder if it is a used technique or is it a bad practice? Would it cause PCB or PCBA production, or performance problem? The via connections are low frequency (max 1.2 kHz) and related connections looks like this. <Q> The industry term for this is via in pad . <S> It's not a problem when you hand-solder components. <S> It can cause problems during automated SMT assembly. <S> Solder, which was applied to the pad as a solder paste, can drain through the via and there will be an insufficient amount of solder to hold the part. <S> (Image came from <S> this blog entry, which illustrates the issue.) <S> There are methods in which the via in the pad is filled with solder or epoxy. <S> That is done prior to SMT assembly. <S> That adds to cost of assembly, so the benefits from the via-in-pad need to justify that. <S> Related older thread: <S> Vias directly on SMD pads article: Via-in-pad guidelines for PCBs <A> Hand soldering <S> you'll be fine of course, also for small runs the manufacturer can just pre-fill the hole with solder by hand with an iron or a hot air pen. <S> This usually eliminates most of the aforementioned issues. <S> Doing it with a BGA can be funny, or sad depending on if it's your board or someone elses. <S> The vias like to wick all the solder from the balls right to the back of the board, or at the very least make just one critical ball have a bad or weak contact. <S> That's nice when that fails in the field 3 months later :) <S> For real production again, nothing wrong with via in pad, it's really useful in many cases. <S> All you have to do is have your pcb shop fill the holes. <S> I usually let them fill with non-conductive material and then plate flat <S> so we end up with a solid metal flat pad to solder to. <S> There's a little cost adder for this <S> but really it's not that bad. <A> Great answers from others but for completeness <S> I'd add two cases where via in pad can be used for good effect. <S> Mechanical strength in the z-axis of a pad. <S> You'd use it in surface-mount connectors where you want to add some robustness. <S> It acts a little bit like a rivet and helps prevent the connector from lifting. <S> I used this many times, particularly on SMD USB connectors that get quite a bit of hammering and torque from the cable head. <S> You don't have to put a pad underneath, but sometimes I'll do that too if I have the space. <S> EDIT: found this question about this very technique! <S> Syphoning solder in large pads, like those under the large ICs. <S> This helps against the chip 'floating' on a melted solder blob -- not soldering the pins! -- <S> in case your stencil or dispenser allowed for excessive amounts of solder on the pad. <A> I did this once thinking I was being smart, and <S> what happened is that all the solder wicked off the pad and through the via onto a test point on the other side during reflow soldering. <S> Had to hand solder all the connections until I re-did the board. <S> If you are soldering the boards by hand then there should be no problem, and you can probably get away with it if the via is very small and there is no pad on the other side, but otherwise I would advise you to avoid doing this. <A> Placing a via on or very near to a pad can result in a weak connection or even tombstoning due to the solder being pulled away during reflow. <S> It is recommended to have a small amount of solder mask between the pad and the via in order to prevent this from happening.
| As other people have noted an open via in pad can lead to soldering issues as the solder is sucked down the via hole. There's nothing wrong with via in pad per say. Just another trade off you have to make to see if you can afford the extra cost. Just make sure that the amount of bolting vias per pad is the same.
|
Detecting electrons as they tunnel through the band gap of a P-N junction As a learning exercise I'd like to try creating a random number generator using reverse-biased BJTs. As I understand it, if the emitter is saturated in reverse bias, occasionally electrons will tunnel through the band gap to the base pin. Can this be done with common BJTs or are special parts required? What sort of amplification will be required to actually detect this tunneling? I.e. at what voltage will the signal be on the base pin when an electron tunnels through? <Q> It's easily done. <S> Reverse-biasing <S> the emitter-base junction of an NPN transistor is well-known as a cheap and fairly good noise generator. <S> See http://holdenc.altervista.org/avalanche/ as an example, but if you Google reverse bias noise generator you'll get lots of hits. <S> And the problem is not so much amplifying the random electrons as it is reducing the number to a level where counting single electrons is possible. <S> Actually, this isn't done. <S> Instead, the standard approach is to AC-couple the noise voltage and look for zero crossings of the detected signal. <A> What you're describing is called a Zener Diode . <S> You probably can't get appreciable tunneling current out of a common BJT though, because the doping levels are so low the depletion regions will be large, giving low tunneling current. <S> Whatever tunneling you do get will be swamped out by thermal noise. <S> To really get the tunneling current to be significant you need to increase the reverse bias and enter a region called "Zener Breakdown". <S> A standard BJT will enter Avalanche Breakdown (the energy of free electrons becomes high enough to liberate more electrons) before it gets close to Zener Breakdown. <S> Here is a link to someone who made a random number generator using Avalanche Breakdown: <S> Avalanche Breakdown RNG <S> The design for Zener Breakdown would be similar (but you would need a Zener diode). <S> Good Luck! <A> Tunnelling isn't to do with electrons passing across the bandgap. <S> That's electron excitation. <S> Let's take Silicon (because that's one material I can remember the figures for): bandgap is 1.1ev. <S> The bandgap is the difference in energy levels between the bottom of the conduction band and the top of the valence band. <S> So to move the electron from valence band into the conduction band requres the electron receive a minimum extra energy of 1.1 eV. Tunnelling is to do with left-right movement (not vertically) which is based on probability and probability wave functions, which define the position of the electron.
| People have made random number generators out of Zener diodes.
|
Why is inductor completely canceling out current? I used this calculator to determine that my hand-turned inductor has an inductance of approx. .5 uH. simulate this circuit – Schematic created using CircuitLab When I measure this circuit on a multi-meter every node on the circuit is measured in mV. How is this possible? When I use Ohm's Law to get the inductor's resistance it is measured it is measured in thousandths of an ohm. Why aren't I getting around 9v with a realistic voltage level? <Q> "I'm tempted to say that I'm not pulling any current <S> " That is your error. <S> When you measure the voltage, your system is in steady state, where the inductance does not count, only the ohmic resistance of your coil, which is very low. <S> A 9V battery has a rather high internal resistance, so you in effect have a voltage divider, and you are measuring the voltage over the leg of the divider that has a very low resistance = <S> > <S> you emasure a very low voltage. <A> My apologies for the hand-drawn sketch... <S> This is the equivalent circuit (neglecting the small resistance in the wire and inductor) for the steady-state circuit. <S> The green box is the battery with its internal resistance. <S> As has already been pointed out, the inductor "disappears" in the steady state, so I've drawn it in ghostly grey :). <S> Now you can see why you see no (or very small) voltage gradients along the wire/inductor. <S> I'm guessing that your 9V battery is getting very warm as a relatively large current will be flowing through your circuit. <A> The equation of an (ideal) inductor is. <S> $$V= <S> L\frac{dI}{dt}$$ <S> So lets say at t=0 we connect an ideal 500nH inductor to an ideal 9V source. <S> $$9=500 <S> *10^{-9}\frac{dI}{dt}$$ <S> $$9=0.5* <S> 10^{-6}\frac{dI}{dt}$$ <S> $$\frac{dI}{dt}=18*10 <S> ^ <S> 6$$ <S> $$I = <S> \int18 <S> *10 <S> ^6dt = 18 <S> *10 <S> ^ <S> 6t+c$$ <S> At \$t = 0\$, \$c=0\$ <S> therefore $$I = <S> \int18 <S> *10 <S> ^6dt = 18 <S> *10 <S> ^ <S> 6t$$ <S> So one second after connecting the inductor to the battery you should have a current of 18MA. <S> (no that capital M is not a typo) <S> Back in the real world you don't have an ideal 9V source and you don't have an ideal inductor and for that matter you don't have ideal wires to connect the inductor to the voltage source. <S> In reality very soon after you connect the inductor to the battery the behaviour will be dominated not by the inductance but by the resistance of the coil and the battery.
| The coil likely has a much lower resistance than the battery leading to very small voltages being measured.
|
Is it possible to "crack" an ASIC? Could someone break an ASIC? If an ASIC is a fully customized, app-specific CPU, is possible to reverse engineer it? I'd imagine the answer in general is no , since to me the only way to do this would be to keep firing inputs at the ASIC and see what it outputs. And if you don't have clear documentation as to what the ASIC expects as valid input, and what its various outputs imply, the ASIC is essentially a mysterious black box. Are there advanced methods, tools, etc. that can be used to " crack " an ASIC? <Q> Basically the main way you do it is physically by removing each layer of the ASIC and using a specialized computer program to recover the schematic. <S> It is very difficult to understand all the functions of the ASIC and you can obfuscate it in various ways <S> but there isn't anything you can really do to prevent it. <S> Randomly sending inputs and seeing what would happen would not be very fruitful (although it can be done effectively in limited circumstances, such as Compaq's reverse engineering of IBM's BIOS chip). <S> One of the leading companies that does this type work is called Chipworks . <S> Reverse engineering a chip is one of the main ways a company can tell (and get evidence) that a competitor has violated their patented IP. <A> There are a bunch of companies specializing in reverse engineering ICs, such as Chipworks and Intelligent Services in Ottawa Canada, UBM TechInsights, also in the Ottawa area, Zeptobars in the Russian Federation etc. <S> so yes it is possible. <S> There are a number in Canada, partly because one of the earliest pioneers Mosaid (now called Conversant) was located there. <S> I'm sure China and other countries have them, not all necessarily aimed at patent protection and ethical reverse engineering. <S> Some of the techniques are public, and I'm sure others are carefully guarded trade secrets. <S> Here is a useful paper from Chipworks entitled <S> The State-of-the-Art in IC Reverse Engineering . <A> There are methods to crack everything . <S> Security is making your opponents job more difficult, you can never make it impossible. <S> The art is to make it too costly for your opponent compared to the profit he can get from it. <S> " It seems more important to me, as a developer, to defend the ASICs designs" Of course that is important. ' <S> your' chip wouldn't be the first for which mysterious Chinese copies appear on the (black) market. <S> You could compare that to reverse-engineering the source code of Windows from a windows installation.
| Any chip can be reverse-engineerd with suitabble instrumentation and enough time and money by decoposing it layer for layer. It is quite possible to reverse engineer an ASIC and there really isn't much you can do about it.
|
PIC16F676 - Is it possible to add a dimmer circuit to the seven segment displays I am attempting to build a PIC16F676 based voltmeter using 3 multiplexed common-anode seven segment displays. Is it possible to add a light activated dimmer to control brightness of the displays through the PIC or control the current externally against the displays them selves? It would result in a bright display in bright conditions and dimmer in dark conditions to not be blindingly bright or distracting. Most standard seven segment displays are not usually that bright but this is a large display using bright leds. Edit: I am adding the schematic that I'm working off of. Guess I should have added in the beginning. Sorry folks. Original site: http://www.circuitvalley.com/2012/02/30-volts-panel-volt-meter-pic.html In the display, each segment contains 5x leds in parallel. As a result, the BC557's will need to be changed to something larger as 5x parallel leds may draw >100ma. The problem of the leds is that I'm using 01005 SMD leds in a small form factor but I am only finding them in stoopid bright instead of standard bright. :( When I thought of posing this question, I had difficulty figuring how to title it and I'm trying not to draw the question in that direction. <Q> This should be done with a light dependent resistor and an analog input of the PIC. <S> Adjust the brightness of the display. <S> The simplest way I can think of is to reduce the duty cycle, the fraction of the time that the LEDs are on. <S> You are already be switching quickly between the separate digits, so it should be a simple matter to turn them each on for an even shorter period of time. <S> This will make them appear less bright. <S> Then you can link the two with a formula or algorithm, which you can develop by experiment. <S> A note on multiplexing: You can generally get away with flickering an LED at perhaps 50 or 100 Hz, if it's for a normal range of brightness. <S> But for very short duty cycles (and you will need to go very short to get a dim display, perhaps 1/256) <S> , even 100 Hz starts to look strange, the lights leave dotted streaks as you look around the room. <S> So aim for something more like 1 kHz, to be sure it looks smooth even at low brightness. <A> You should read the resistor connected to RA4 with an ADC. <S> With the voltage value you set the duty cycle to PWMs created on RA0/1/2. <S> If you have hardware PWMs on those pins, you may use them and disable when the multiplex shouldn't be enabled on each digit. <S> Remember that when multiplexing your digits will already lose around 2/3 of their brighness since it will be around 2/3 of the time disabled. <S> If you need to dim more, you should disable the common anode for a longer period in each multiplex cycle. <A> You have two approaches to controlling the brightness of the LED's:1 <S> ) Control the current through the common anode of the displays, perhaps using transistors to select various resistor values (or digtal switchable resistor device) 2) <S> Pulse width modulate the LED segments.
| Use an interrupt routine, timers, and flash the LED segments on and off and control the ratio of on to off time of the LEDs. You need to do two separate things: Measure the light level.
|
Why does this not short circuit? I recently built this circuit, but didn't understand why these resistors connect voltage-out to ground. My logic would say the path would either go like... or <Q> I REALLY, REALLY hate that "electricity follows the path of least resistance" expression, since so many beginners seem to see an "only" in there somewhere. <S> In fact, electricity follows all possible paths, with the current in each path determined by that path's resistance. <S> The highest current will flow in the path having least resistance, but current will flow in any other available path as well. <S> Current follows both paths you show. <S> R1 and R2 form a voltage divider that determines the output voltage of the LM317. <S> The LM317 attempts to maintain about 1.25 volts between its output and adjust terminals (pin 2 and pin 1). <A> If there is no load, as pictured, it only flows through the resistors. <S> The resistors, R1 and R2, create a voltage divider which serves as an input to the regulator. <S> The regulator uses that input to, well, regulate the output voltage. <S> It doesn't short circuit because there is no short between the supply and ground. <S> , that load can be viewed as another resistor. <A> First all, your formula is wrong, it should be as stated below. <S> Usually the resistor from the output to terminal 1 is labeled R1, and the variable one is R2, which would match your equation. <S> I had to turn it around to match the figure. <S> Let's take a practical example. <S> The LM317 provides an internal reference voltage of 1.25 V between the output and adjustments terminals. <S> This is used to set a constant current flow across an external resistor divider (see Figure 6), giving an output voltage V\$_{0}\$ of: $$V_0 = V_{REF} <S> \times (1 + R1/R2) <S> + I_{ADJ} <S> \times R1$$ <S> In your case. <S> , let's assume the pot is sent right in the middle. <S> According to the datasheet , I\$_{ADJ}\$ is approximately 100 µA. <S> so we have: $$V_{0} <S> = V_{REF} <S> * (1 + 2500 / 240) + 0.0001 * 2500 <S> = 1.25v \times (1 + 10.417) + 0.25 <S> = 14.52v$$ <S> This is the output voltage coming out of the LM317. <S> Let's say the load is 100 Ω. <S> By Ohms Law, we have: $$I = <S> V / R = <S> 14.52 / 100 = 0.1452 <S> A$$ or 145.2 mA going through the load. <S> The voltage across the voltage divider is 14.52 and the current is: $$I = <S> V / R = 14.52 / (240 + 2500) = <S> 14.52 / 2740 = 0.00530 <S> A$$ or 5.30 mA. <S> The voltage across R1 is: $$V = <S> I <S> \times R = 0.00530 <S> \times 2500 <S> = 13.24v$$ <S> This is the voltage at terminal 1, which is the feedback voltage that controls the output voltage. <S> The total current coming out of the output of the LM317 is: $$145.2 mA + <S> 5.3 mA = 150.5 mA$$
| Assuming you've added a load between the Vout terminals, it follows both paths. The Vout terminals are not connected together and no current will flow until a load is connected there
|
Making a LM1458 work as a Unity Gain buffer with an input of 0 to 12v output to a digital voltmeter Making a LM1458 work as a Unity Gain buffer with an input of 0 to 12v output to a digital voltmeter. When I connect this cct to the injector timer (voltage) & a Voltmeter to the output the voltage stays at about 2.0V until the input exceeds that. I tried to bias the input but it made little difference. I swapped ic's with the same result. The source resistance is about 190k, the Voltmeter input impedance is about 125k Ohms. The reason for the buffer is because the Voltmeter sinks the source voltage too much. How do I get the input Sensitivity to start at least as low as 0.1V up to 12V, output to follow suit.? <Q> The answer to your question is very simple, and it comes in 3 parts: <S> 1) you can't do it with that op amp, 2) <S> you need an op amp with rail-to-rail inputs and rail-to-rail outputs, and 3) don't believe everything you read on the internet. <S> Take a look at the data sheet http://www.ti.com/lit/ds/symlink/lm1458.pdf <S> At the bottom of page 2 you'll see "Output Voltage Swing". <S> For a power supply of +/- <S> 15 volts, you can't count on getting better than +/- <S> 12 volts. <S> In other words, the output will only drive to within about 3 volts of the negative supply. <S> Does that sound familiar? <A> Previous answer is correct. <S> However, there may be a solution to this. <S> Your V+ is connected to +15V. <S> Your V- is connected to 0V. <S> Hence your output voltage swing can't go as low as 0V. <S> If you apply a negative voltage to V- (pin 8) of -3V <S> or below, then you should be able to get your output voltage to drop down to 0 volts. <S> You can do this with a couple of resistors acting as a potential divider. <S> Use two reistors in series. <S> ---V15V - <S> > .. <S> pin 8.. <S> V+ of LM1458 | R <S> |------- <S> > <S> OV point (GND) R |----- <S> V0V -> <S> .. <S> pin 4... <S> V- of LM1458 <S> Make R a fairly large value <S> so you're not draining too much current from the supply. <S> Make the 100K resistor connect to the GND in the diagram above. <S> The opamp is still being fed with a difference of 15V between V+ and V-, but V0V is now 7.5 voltages below GND. <S> Something like this ought to work. <S> I did something similar with a 741 op amp configured as a wien bridge oscillator fed from a 9 volt battery. <S> The key is recognising that the battery is 9 volts potential difference between the terminals, but you can share that 9 volts across two equal sized resistors to give 4.5volts difference across each. <S> And then make your centre point of the resistors your 0V (a 0V common). <A> Here is a circuit suggestion to create the necessary input offset to get the Output data I want. <S> The Output has also been referenced to the offset to effectively subtract the input jump. <A> @WhatRoughBeast, @Dean <S> The blue circuit above works, the only amendment was to replace Zd with a yellow LED & link its 2.1V ref back to the summing input instead of the separate voltage divider. <S> However in the end I decided to use a LM358 which is designed for a single sided power supply. <S> Needs almost no additional components as per the 1st post circuit. <S> For anybody ending up here for reasons as I did it would benefit to read Application Note 116 (AN-116) from TI or National Semiconductor available from http://docslide.us/documents/lm358.htm . <S> The best answer is the LM358. <S> Thanks guys.
| Voltages are relative, they're all differences between two points.
|
PNP/NPN - Why do we not just use one of the two types? Using PNP instead of NPN merely requires one to make circuit upside down and reverse current direction, if this is true then why don't we just do everything with NPN transistors? Are there any applications where we can only use one of the two types? Why? <Q> There have been times when transistors with specific characteristics were feasible in NPN, or PNP, but not vice-versa. <S> Two examples : <S> The 2N3055 power transistor was NPN, at a time when PNP transistors of the same power were simply not available (115W I think, later pushed to 150W). <S> That led to the "output triple" - a combination of 3 transistors that could replace either NPN or PNP output transistors, with the power handled in either case by the 2N3055. <S> This was used in the famous Quad 303 amplifier of the early 1970s. <S> Another example : the BC214 PNP transistor could achieve lower noise in a microphone amplifier or audio input stage than contemporary NPN transistors. <S> With further developments in process technology, these considerations are less important than they were. <A> For many years, we did use only NPN transistors. <S> Well actually, they weren't called transistors but <S> "vacuum tubes". <S> It would have often been convenient to have the complement of NPN or N-channel vacuum tubes, but those didn't exist. <S> So yes, it's possible. <S> You could do similar things today by designing a audio power amplifier, for example, using only NPN or only PNP transistors. <S> However, having complementary parts can be very useful and allows for circuit topologies not possible using just one polarity. <S> Think of something like a audio power amplifier that needs to drive its output equally above and below ground. <S> Individual transistors pull in one direction, and the rest of the circuit has to pull in the other direction if you want the signal to go that way. <S> It shouldn't be hard to imagine that you can use one polarity transistor to pull high and the opposite polarity to pull low. <S> The tops and bottom halves of such circuits are then mirror images of each other about ground, which requires flipping the polarity of the transistors. <S> The output stages of most transistor audio power amplifiers exploit this NPN/PNP symmetry and really do work this way. <A> Having both pnp and npn transistors gives designers more flexability .Remember that all valves were N channel or npn .The <S> filament dont emit positrons. <S> Electrons are more mobile than holes so one would expect npn to give better performance .For <S> Si BJTs the differences are very noticable at the high power area .Small <S> signal GP transistors perform the same regardless of pnp or npn .Ge <S> transistors are mainly pnp due to fabrication issues .In <S> fact the npn types were worse . <A> If you go back to the early 1960's we only had Germanium transistors and they were all PNP; circuit diagrams were drawn with the -ve supply at the top. <S> To provide enough power for a speaker the standard six transistor radio used transformer coupling to provide a push-pull output. <S> Germanium was very prone to thermal runaway so transistor power amps didn't come into their own until the silicon 2N3055. <S> Having PNP and NPN with matched characteristics makes symmetrical design so much easier. <A> One application where you can only use one type is when you implement the BJT as a "parasitic" PNP in a standard CMOS process. <S> For more detail see pg. 3 of the following: <S> notes on IC biasing <S> This is extremely useful in the implementation of temperature-insensitive bias circuits, most notably the bandgap reference. <S> Bandgap references . <S> Note that a CMOS implementation using substrate PNPs must have the collector at ground, but the circuit in the link can be recast.
| In a typical CMOS process NPNs are impossible to implement but a useful PNP can be made in which the collector is implemented in the substrate, the base is an n-well, and the collector is a p diffusion within that n-well.
|
How many 115ah wet lead acid batteries are safe to charge in the same space? We are using about 10 115ah wet lead acid batteries to provide electricity for our business in the field. At night, we charge them all in the same space. The space does have a bit of airflow, but it's not like we are leaving a window open. Is charging this many batteries together in close proximity safe? I am asking due to the gases that are given off by them all while charging. Thank you for your help! <Q> Is it an enclosed space? <S> Of what size? <S> How much is "a bit of airflow? <S> " <S> Is there a vent or two? <S> How big? <S> Is there anything nearby which could spark and ignite it? <S> (Light switch, faulty wire, sparks from grinder, etc.) <S> They also get warm, so need some convective airflow to stay cool. <S> Excessive heat shortens their usable service life greatly. <S> Essentially, if these are all crammed into a tiny space with no ventilation, then it's asking for trouble. <S> Like this: https://www.youtube.com/watch?v=d_TnsHu2u4c <A> I strongly recommend you find out what applies in your location & situation. <S> Forced air extraction <S> AT <S> THE ROOF LEVEL is highly recommended, as lead-acid batteries WILL vent significant amounts of H2 (qty depends on many factors), and it will pool at ceiling level & work downwards, displacing ordinary air. <S> Concentrations of as little as a few percent become explosive. <S> As @rtdsc said, how much H2 depends on many variables, including charge profile, battery types, temperature, etc. <S> Also an acid-resistant 'drip tray' for all the batteries to sit in would be a good idea. <S> The proximity of the batteries to each other isn't so much of an issue from a H2 gas perspective, but it can be in terms of cooling - lead-acid doesn't like heat, & giving them as much space between them (i.e. a few inches) <S> is ideal. <A> Normal safe handling rules are more important for the situation as described: Charging Lead-Acid batteries . <S> If you require mechanical ventilation, you should also install a hydrogen level alarm . <S> Typical standards require hydrogen concentration less than 1-2%: On the description you've given, that would require a complete air change every week or so, and you probably have a complete air change several times an hour. <S> ventilation requirment guesser <S> Note: <S> Hydrogen is flammable, but difficult to ignite, at 4%. <S> Explosive at 18% safety sheet
| Lead-acid cells give off hydrogen gas when charging, which can be very explosive and even dangerous to breathe. The regulations that apply to this scenario will vary from one country to another, and from one scenario to another (domestic, commercial, industrial).
|
Does a USB mouse have memory that could be used to store malware? I worry that this might get flagged as too broad, but here it goes: Lately I've been thinking about the possibility of loading data on peripheral devices. One of the most used peripherals is the mouse. I realize that there are 101 ways to build a mouse. To refine my question into several, I ask these questions: Is it possible to build a mouse without memory? If so, is it typically seen not have memory on a mouse? Suppose the mouse did have memory (if this is not an realistic assumption, please point that out), is it typical to see ROM types of memory only? Can the memory be flashed like CMOS memory? Has any one seen an computer attack/malware attack from the memory of a mouse? I ask number three because what I've been thinking of lately is the generalization of the attacks performed by various advanced persistent threats. <Q> Many USB peripherals include flash-based microcontrollers. <S> Although mask-ROM-based microcontrollers are cheaper, use of a flash-based microcontroller may enable a manufacturer to have one board which can go in a variety of OEM products, each of which reports the name under which it is sold. <S> Some peripherals include firmware that allows them to be reprogrammed from the USB port; having them configured that way would allow a manufacturer to pre-program parts in a way suitable for its highest-volume customer and re-program them on demand for other customrs. <S> Because most mice aren't likely to use particularly big microcontrollers, there may not be any room for malware if the mouse is required to be usable as a mouse. <S> On the other hand, it might be possible for some malware to identify a vulnerable mouse and reprogram it in such a way that it would no longer work as a mouse, but would act as an agent of evil when plugged into a non-infected machine [on the theory that someone whose mouse stops working might test it on another computer]. <S> It would in general not be difficult to design a USB peripheral in such a way that once final firmware was loaded it could not be reloaded from the USB port, but there is no general way to distinguish devices which are immune from reprogramming from devices which aren't. <S> It would also be possible to design a "smart USB hub" with a display and some buttons which would, when a device was plugged in, indicate what the device is claiming to be, asking for confirmation before the computer could see the device, and restricting the device's communications to those that were approved for its type, but I don't know if any such smart-hub devices are available. <A> USB keyboards can be used to do interesting things on a PC/Mac. <S> And you could combine an USB keyboard with a mouse into one HID, using a microcontroller for example. <S> Cheap USB mice should still use ASICs that are not reprogrammable IMHO, because masked ROM costs less than flash. <A> Yes, it is definitely possible to use mice (and USB devices in general) in cyber attacks. <S> Whatever type of memory cheap mice have, it's usually impossible to modify it via the USB interface, so the attacker will need to physically access the mouse which will be used for the attack. <S> As a result, it is usually easier to make a custom device which mimics a mouse and has lots of memory (and perhaps some wireless transcievers) rather than reuse a real mouse which will have little memory, small processing power and no wireless interfaces. <S> There are devices which are much more suitable for such purposes. <S> For example, most SD cards have quite powerful controllers and the firmware is usually upgradable, protected by a passcode of some sort. <S> Such passcodes are widely known by the dev&testing teams and are not meant to be cryptographically secure. <S> Often leetspeak phrases like DEADBEEF or 600DCOFFEE are used. <S> And once you have control over an SD card, there is no extra effort to get sensitive data, all you have to do is filter it. <S> Similarly, USB keyboards are natural candidates for password stealing. <S> Convincing the computer to send a file or a password to the mouse is much more difficult. <A> It's definitely possible with mice that store configuration data on their own hardware. <S> Consider somewhat expensive gamer mice − they often come with a piece of software that lets you edit on-board configurations so you could switch them with a special button somewhere on the mouse. <S> Some mice conveniently have auto-installing capability, like you see on mobile internet USB sticks. <S> From then on it depends on security parameters of the target computer. <S> If it has autorun enabled, a compromised mouse could install malicious software silently, and so on.
| If a mouse happens to include a flash microcontroller, it may be possible for a malicious person to reprogram it to behave as a malware-infection device.
|
Nature of Electromagnetic Waves We know that light is an electromagnetic wave. So is a radio frequency wave. From what I understand, the 50 Hz power frequency wave in our 230 V supply at home (60Hz and a lesser voltage in countries other than India) is also an electromagnetic wave. But this power frequency wave requires a medium to travelIt does not travel in free space. But light and radio waves can travel in free space.Why is this? Or, is my assumption that the the power frequency 50 Hz/60 Hz wave is electromagnetic,incorrect? Please Help.... <Q> You are mixing up two (related) phenomena: EM waves and currents in a conductor, I guess because they both "have a frequency". <S> That's the relationship between the two phenomena. <S> The frequency of the generated EM wave is the same as the current's and vice versa. <S> This is the general picture, in qualitative terms. <S> Whether or not, in a given case, the generation of EM waves is negligible it depends on the specific problem at hand, and the same is true for whether or not a non-negligible current is induced in a conductor hit by an EM wave. <S> As a very broad rule of thumb, the radiated emission by a conducting wire becomes relevant when its length is near the wavelength of the wave that would be radiated, which depends on the frequency of the electric signal. <S> The relationship between wavelength \$\lambda\$ <S> and frequency f in vacuum is: \begin{align <S> *} <S> \lambda=\dfrac{c}{f} \end{align*} where c is the speed of light \$\approx 3\times 10^ <S> 8 m <S> /s\$. <S> Therefore <S> a \$f=50\$Hz current would produce an EM wave having a wavelength <S> \$\lambda=\dfrac{3\times10 <S> ^8\, m/s}{50\, Hz} = <S> 6\times 10 <S> ^6 <S> m = 6000\, <S> km\$. <S> Hence you would need a wire of about that size (6000 km!) <S> to make the radiation of EM waves at that frequency non-negligible. <A> Electromagnetic waves are generated by oscillating currents and voltages and they can induce oscillating currents and voltages. <S> The wavelength plays a very important role in how an electromagnetic wave behaves. <S> Light is extremely high frequency (many THz) and as a result has an extremely short wavelength (around 1 um). <S> Generally light will interact more with electrons in atoms and molecules than electrons in wires due to the short wavelength. <S> Radio waves are a more reasonable wavelength of a few meters to a few cm or even mm. <S> Antennas to transmit and receive these frequencies are around the same size as the wavelength. <S> Oscillating electromagnetic waves will drag electrons around and produce oscillating currents in any conductors that they encounter, and this is most effective when the conductor is around the same size as the wavelength. <S> Very low frequencies (sub 100 Hz) have extremely long wavelengths, on the order of km. <S> You need a really, really long wire to act as an antenna at these frequencies. <S> However, it is still possible to utilize electromagnetic energy with such a long wavelength, you just can't really transmit it wirelessly. <S> When your wires are much shorter than the wavelength, you still get oscillating electric and magnetic fields, however they cannot really radiate as they cancel each other out at long range. <A> There's an EM field around any electrical circuit, even a DC circuit. <S> The electric field points from high voltages to low voltages, and the magnetic field circles around currents. <S> They don't radiate at low frequencies without a large antenna, but they do transfer power. <S> This web page has some good pictures. <S> Here's one that shows the electric and magnetic fields: <S> Here's another explanation with a side view. <S> The arrows show the direction of energy flow. <S> (The direction is given by the cross product of the electric and magnetic fields, if that helps.) <S> So why doesn't this circuit radiate well at low frequencies? <S> Because the wires are too close together! <S> Let's look at the magnetic field around a DC circuit. <S> Here's <S> another image showing the direction of the field around current-carrying wires. <S> Our wires have currents flowing in opposite directions, like the pair on the right. <S> Here's a top-down view: <S> The wires produce magnetic fields that circle in opposite directions. <S> Between the wires, the fields point the same way. <S> Outside of the wires, the fields point in opposite ways. <S> Thus, outside of the wires, the fields (almost) cancel out! <S> This happens because the current is constant everywhere in the circuit. <S> At low frequencies (long wavelengths), this is approximately correct. <S> At higher frequencies (shorter wavelengths), different parts of the circuit have different currents! <S> This is because changes in voltage and current travel at the speed of light. <S> If the circuit is large enough or the wavelength is small enough, both wires can have current flowing in the same direction, which means they no longer cancel out. <S> The wavelength of an electrical signal is given by: $$\lambda = <S> \frac <S> c f$$ <S> where \$c\$ is the speed of light and \$f\$ is the frequency of the signal. <S> For a 60 Hz sine wave, the wavelength is: $$\lambda_{60 Hz} = \frac {3 \times 10^8 \mathrm{\frac <S> m s}} {60 \mathrm{Hz}} \approx 5000 \mathrm km$$ <S> So unless you have a very large current or a very large antenna, you're not going to radiate much power at 60 Hz. <A> A propagating EM wave has the magnetic field (H field) in "time" phase with its E field and the ratio of E to H has to broadly match the impedance of free space (approximately 377 ohms). <S> The magnetic field is also mechancially at right angles to the electric field. <S> This arrangement of E and H field naturally propagates thru free space and is called a radio wave. <S> An antenna creates both an electric field and magnetic field and although the near-field E and H components do not correspond with the above description of an EM wave, at some distance (usually about 1 wavelength), those fields combine to make a proper EM wave as per above. <S> This doesn't happen with power transmission cables. <A> The 50 Hz power supplied to your home is an electric current (in a wire), and is not an electromagnetic wave. <S> There are electromagnetic waves surrounding the power lines because electric currents generate a magnetic field, but these are merely an artifact of the power transmission. <S> These waves are quite weak and don't have anything to do with the transmission of electric currents through the wires to your house.
| EM waves (i.e. perturbations of EM fields that can travel in space) can be generated by time-varying currents flowing in conductors, whereas EM waves hitting conductors can induce currents in them.
|
I didn't tin my solder bit...now what? In my haste to get soldering with my new iron (first time soldering in more than a decade...) I completely forgot to tin my bit. Subsequently I've managed to part-tin it, but it's a bit of a mess. Other than buying a new bit for the iron, do I have any other options? <Q> It depends on whether the untinned tip coating is just covered with a layer of crud, like flux residue, or is now all oxidized. <S> If the former, you can probably carefully clean it off (with the iron cold, of course), then power it up and tin it properly. <S> If the latter, this is a unrecoverable error and the part of the tip you didn't tin is now useless. <A> Don't worry, those things happen sometimes. <S> It's worth it to buy a soldering tip refresher if you use that quite often. <S> For a fast home solution, you can use solder wick / flux/ solder to solve this: Put enough flux on the solder wick. <S> You may need someone to help you hold the solder wick. <S> Make sure it doesn't move. <S> Heat the tip and scratch the solder tip on the solder wick while you apply solder. <S> Soon you will find your tip is back to life! <A> How long has it been turned off? <S> I think you'll be fine. <S> I will sometimes use some of the tip tinner & cleaner from radio shack. <S> It will partially renew the tip. <A> If it's a solid copper tip, let then iron cool down, file new faces on it, turn it on, and then tin it as it heats up.
| If it's plated, what works for me is to flood the tip with flux-cored solder while the iron is hot, and then to use the edge of a flat-bladed screwdriver to lightly scrape the damaged area while the iron is hot, while applying fresh solder.
|
Why do we need to remove flux from circuit boards? My manager at work told me that the liquid flux we use when reworking SMD circuit boards is electrically conductive,and that is why he INSISTS that we clean every board we work on.Is he right,or is he pulling my leg? <Q> If your boards contain high-impedance analog circuits, then the conductivity of the flux is a real concern. <S> Leakage current through flux is a common source of error in high-gain high-impedance analog circuits. <S> For other types of circuits, reliability is a bigger concern. <S> There are "no clean" fluxes that are meant to minimize this issue, but even these might not be appropriate for high-value circuits with high reliability requirements. <A> It depends on the flux. <S> RMA/RA fluxes are pretty benign, though some recommend cleaning. <S> Water soluble fluxes should be cleaned. <S> My favorite SnPb solder flux is Kester 44 (RA flux), and the datasheet says: Cleaning: Kester 44 possesses excellent fluxing ability, the flux residue is non-corrosive and non-conductive under normal conditions of use. <S> When exposed to an elevated temperature and humidity environment (38°C, 94% RH) for 72 hours, there is no evidence of corrosion caused by the flux residue. <S> Throughout its many years of wide usage, 44 Rosin Flux has produced many billions of soldered connections. <S> In all these billions of solder joints, involving the most delicate and critical of electrical and electronic components, there has never been an authentic instance of corrosion by the flux residue under normal conditions of use. <S> This mild property of the residue permits leaving the flux on the assembly for many applications. <S> I think cleaning is more important for inspection and cosmetic reasons with Kester 44, but if a part or two is added by hand soldering after the cleaning operation (perhaps parts that cannot be washed) I don't think there is any reason to remove the flux for most applications. <S> Sometimes it's easier to have a rule (such as always wear an ESD strap, even when handling resistors) rather than worry about people making the wrong decision. <S> 'No-clean' fluxes have been found to be electrically conductive and are not easy to clean (requiring strong solvents and scrubbing). <A> In my experience, he is correct. <S> I've had some circuit boards behave erratically until I cleaned off the Flux.
| Fluxes are reactive chemicals, and if left on the board they can cause corrosion and lead to circuit failures in the field. No-clean fluxes should be thrown into the garbage (or perhaps disposed of in an environmentally responsible manner).
|
Identifying windings of a single phase induction motor How can I identify the main and auxiliary windings of a single phase induction motor which has only three terminals (1.Red, 2. Yellow & 3. Black) out of the device? How to connect capacitor and power supply to it? <Q> Tricky solution: <S> Measure the winding resistances. <S> Auxiliary windings are often thinner and therefore have a higher resistance (even if it's just a little bit higher). <S> Once you know which terminals are used for each of the two windings, youcan connect them to the power supply and the capacitor as shown in the following picture: <S> The picture was taken from the book "R. Fischer: <S> Elektrische Maschinen, 15.Auflage, Hanser Verlag München" <S> Cleaner solution Apply a (small) DC voltage step to a test circuit, consisting of a resistor and one of the windings in serial combination. <S> Capture the current with an oscilloscope. <S> Measure the time constant of the system and calculate the inductance L of the winding. <S> Repeat this process for the second winding. <S> The winding with the higher inductance value should be the main winding. <A> If the direction of rotaion of motor is shown or known then ther is a solution except exact value of capactitor ( however the norms says.. <S> loking at shaft end motor should generally rotate in clock-wise direction. <S> I am not sure of your motor). <S> connect a capacitor as suggested by Simon and connect supply between common terminal and capacitor ( winding) termnal and if motor runs in opposite direction then the shift the connection to other treminal of capacitor . <S> Now the motor will rotate in the specified direction. <S> winding.vtingole <A> first of all identify common terminal by checking resistance. <S> and connect the capacitor b/w main and aux terminal. and connect the terminal of common and main or aux as per required direction of rotation. <A> This is achieved by using thinner wire or alternately resistance wire.
| the motor terminal which is connected directly to supply is main winding and the one connected through capacitor is aux. The aux winding should have the greatest resistance as this is what puts it out of phase with main winding to give an apparent rotating magnetic field.
|
Dipole antenna VS. coil for RF transmission or recieving Correct me if I am wrong, but all RF light waves are created via a changing electric and magnetic field. But when looking at all kinds of radios and RF circuits, this light wave is always made with a simple wire antenna. Why are coils not used instead? Wouldn't a coil of the same length create a stronger magnetic field thereby creating a more efficient 'antenna' that produces RF waves? I know that there has to be a reason why coils are not used, but I cannot find an explanation. It makes more sense to me to have a coil creating a fluxuating electric/ magnetic field rather than a piece of wire. Thanks in advance! <Q> Take a look at this picture of a dipole antenna: - Both electric AND magnetic fields are produced by the antenna. <S> Magnetic fields are produced by straight wires with current flowing in them i.e. the wire doesn't need to be wound into a coil to produce magnetism. <S> Now, the physics (well, a bit of it): - Space has an impedance of approximately 377 ohms and an antenna has to produce an E field in the right proportion to the H (magnetic) field to maximize convsersion of electrical energy flowing to the antenna into EM power. <S> The ratio of E field to H field is 377 ohms so trying to produce a bigger H field than is necessary is a waste of time because the impedance will be wrong. <S> See this wiki article for extra reading. <A> Note that the strength of the magnetic field is not an indicator of efficiency. <S> An efficient antenna radiates most of the energy fed to it. <S> A wire antenna, if it is long compared to a wavelength, is an efficient radiator of electromagnetic energy. <S> By the way, it is incorrect to refer to RF light waves. <S> RF stands for radio frequency and generally refers to frequencies measured in MHz and wavelengths in meters. <S> Light waves are electromagnetic waves but have much higher frequencies (greater than teraHertz) and much shorter wavelengths (measured in millionths of meters). <A> E-M waves are very different from a simple magnetic field. <S> In an antenna both electric and magnetic fields are generated. <S> They are inseperable and interact with each other constantly. <S> They form a wave that is radiated, not just a simple field. <S> Yes, coils have been used as antennas in certain cases and, with the exception of a single winding (which acts more like a regular antenna), almost always for reception, not transmitting. <S> The efficiency of the antenna is much higher than a multiple turn coil would be. <S> The multiple turn coils have other properties that make them useful sometimes, but almost always a regular antenna is a better alternative. <S> For transmitting you want the energy to radiate, not stay contained in a small area. <S> For reception you want a big "capture area". <S> It is also easier to tune it in practical situations. <S> The receiver needs a transfer of power to be able to received signals. <S> How much power will a magnetic (only) field from a coil transfer at distances of several thousand miles? <S> None? <S> An antenna can transfer a surprising amount. <S> That leads to good signal to noise ratios and good, comprehensible reception.
| While a coil will create a stronger magnetic field, that field is mainly contained within the coil so that a coil does not make a strong radiator so it doesn't make a good antenna.
|
Is this true: "At over 700 Hz, current simply flows over your body"? I have heard this in a movie clip. I was just curious to know, is this really true? Because the one thing that I do know, is that at a high voltage, the current decreases, so that it doesn't harm a human body. <Q> Skin Depth <S> Electric currents are confined to the outside of a conducting body, but humans are not very conductive, so the fields penetrate quite deep. <S> The best example that comes to mind is 2.45 GHz - we all know that a microwave oven cooks about 2 or 3 cm into a piece of meat - <S> this penetration depth is closely related to the skin depth. <S> The primary reason that you don't feel high frequency current is that the nerves and cells can't respond to anything above ? <S> about? <S> 1 kHz. <S> I've discussed this in a previous answer , more about the safety aspects than the skin effect itself, but it might help. <S> Nerve effects are the primary cause of injury due to electricity, mainly the heart of course. <S> If the frequency is high enough that it can't influence the nerves, then all you have to worry about is the heating effect. <S> So at high frequencies you can carry a much higher current than would be lethal at low frequencies, possibly without pain or injury. <S> High voltage and lower current <S> It's not true that the current is lower at high voltage. <S> In fact, a higher voltage will usually cause a larger current to flow, than a low voltage. <S> High voltage overhead transmission lines might be 400 kV <S> but they also carry hundreds of amps. <S> When it comes to human safety, higher voltage are almost always more dangerous. <A> It's perpetuated by a misunderstanding of a real phenomenon called skin effect : Skin effect is the tendency of an alternating electric current (AC) to become distributed within a conductor such that the current density is largest near the surface of the conductor, and decreases with greater depths in the conductor. <S> The electric current flows mainly at the "skin" of the conductor, between the outer surface and a level called the skin depth. <S> The skin effect causes the effective resistance of the conductor to increase at higher frequencies where the skin depth is smaller, thus reducing the effective cross-section of the conductor. <S> The skin effect is due to opposing eddy currents induced by the changing magnetic field resulting from the alternating current. <S> At 60 Hz in copper, the skin depth is about 8.5 mm. <S> At high frequencies the skin depth becomes much smaller. <S> Increased AC resistance due to the skin effect can be mitigated by using specially woven litz wire. <S> Because the interior of a large conductor carries so little of the current, tubular conductors such as pipe can be used to save weight and cost. <S> That is, for a uniform conductor, an increase in frequency will result in a diminished component of the current flowing through the middle of the conductor - higher concentration towards the circumference, the "skin". <S> Skin does not transpose to skin, be it human skin or another membrane over another conductor. <S> If a conductor of akin to the skin's epidermis was constructed, higher frequency still wouldn't concentrate to the outer surface. <S> There is a field within biology called bioelectrical impedance analysis <S> (BIA) which relies on the varying frequency response of cells and other biological matter. <A> This is not true, in fact it is possible to "cut" flesh with a high frequency electric current. <S> http://en.wikipedia.org/wiki/Electrosurgery <S> An alternative name is "RF knife" because (as pointed out by tomnexus) at high frequencies the electric current has no effect on the nerve cells. <S> One advantage of using this kind of "knife" is a lack of bleeding, because the "knife" burns through the flesh rather than actually cutting it. <S> From personal experience: I had a small benign tumour removed using this method. <S> They placed a return electrode of large area on my thigh and cut the tumour from the surface of my abdomen with a small pointed tool. <S> There was a faint whiff of burning flesh (and of course no pain during the operation due to the local anasthetic, though there was some afterwards.) <A> Datapoint: Radio Frequency, at 10's of MHz will produce "electric shock" and burns. <S> Well covered by others the following is true despite reading like a movie makeup. <S> I have seen it happen in practice where somebody held the disconnected aerial lead of a transmitter while calling out that they had found why it was not transmitting. <S> The transmitter was voice operated. <S> It operated. <S> There was no doubt about his having felt the shock. <S> The transmitter was probably on either the 80 metre band (~= 3.6 MHz) or the 20 metre band (~= 14 Mhz). <A> Even if the skin effect did kick in at 700 Hz for the human body, the current will then be passing through the outer layer of the body,ie. <S> the skin. <S> At high enough currents you are still going to cook like a sausage on a barbeque! <S> Not recommended to rely on the principle!! <A> For definitive answers to this question look at IEEE Transactions on Biomedical Engineering or any biomed engineering journals.
| The human body does have a "skin effect" but it's not as thin as you might think. For a potentially lethal 100 V at 20 mA, only 2 W is dissipated in the body, which is insignificant compared to the 200 W of normal body heat (though it will be concentrated at the entry and exit points). This isn't true.
|
Estimating power usage of idle motor I would like to calculate the power usage of an idle motor. The motor drives state a power usage of approx 8-10% of full load. Would it simply be the case of taking 8-10% of the motor's power rating (in kW) and multiplying by the number of hours to obtain the kWh usage? Also, I've been told that the 8-10% power usage at idle allows the motor to start up much faster? I've tried researching but haven't found anything stating this.. <Q> Motors generally consume a large current for a short time to spin up. <S> Since most larger AC motors are typically 85-92% efficient at converting electricity into mechanical work, 8-10% loss seems reasonable, including bearing friction and windage. <S> Start-up speed depends on load and motor type (AC induction, capacitor-start, synchronous, DC, etc.) <S> While they do generally start faster with no load, synchronous AC motors feature very fast start-up time (but generally lower efficiencies.) <S> High-inertia loads can be problematic for some motors, as they use a special "start-winding" which is designed to work for only a split second. <A> Think you better takes the total KWh from your facilitie wattmeter ,and DIVIDES it by the total hours of measure. <S> The total KWh consumed is given generally by a multiplier in the wattmeter itself,and is obtaining easily from internet .This <S> is the neat KW of your motor at your given load,or even ANY mechanical load ,include completely idle. <S> thanksfrom <S> Brazil <A> In motors power is mostly matter of definitions. <S> In modern servo drives the power wasted by the drive itself <S> is function of current, <S> because it's switching output stage that only wastes Rdson I I or Vf*I. <S> So it's not directly related to motor power, more to motor torque. <S> Normally when they talk about efficiency, they mean percents of rated power. <S> And they can only calculate or measure power of the drive, because losses on motors may vary.
| I would assume "power usage of idle motor" would be if it were running full-speed, no-load.
|
best way to rectify 30kv flyback output? i have made a flyback transformer for some HV experiments and am hoping to get around 35kv from it, which i want to use to charge a capacitor, so i will need to rectify the output... i think perhaps some kind of asimetrical spark gap might be able to do the trick but was hoping and wondering if I would be able to string together a load of diodes in series to do the job? I have some 1n4007 diodes with a max reverse voltage of 1k... if I put 40 in series will it work, or will they all just melt? something I read suggested that I would need resistors somehow involved with the diodes to make it function? how would that work? if the answer is no, does anyone have any suggestions about ways to do this? <Q> 1N4007 are not really suitable for such a high frequency circuit due to their slow recovery time (microseconds). <S> At mains frequency you could use series string. <S> You can buy packaged 80kV 200mA 100ns rectifier stacks for about $30 if you look around. <A> to get higher voltage I used voltage multiplier circuits to generate 60kv 1 <S> mA supply where diodes are inbuilt in each stage. <S> I used 20KV selenium diode used for black & white TV HV supply. <S> one can use silicon HV diodes used in colr monitor of computer.series connections of 1N4007 to suit such HV may require equilising circuit and may become combursome.vtingole <A> Something like this <S> : just ensure you use appropriately rated diodes and capacitors. <S> You can place multiple diodes in series in order to handle higher rated voltages. <S> Might not be a bad idea to place a resistor in series so that if a diode does break down and go short circuit, it will limit the current and not cause too much damage. <S> But again, calculate the voltages carefully and ensure you don't exceed the working voltage for any individual component.
| I have seen many years ago EHT circuits inside the old CRT televisions which employed voltage multiplier (doubler/tripler) circuits using diodes and capacitors. You could try a series string of UF4007 diodes (75ns recovery time).
|
Batteries for solar application, why C10 only? Some Solar PV system integrators in India are insisting on using C10 batteries only, which they have named solar batteries. In my view the selection of battery depends on charging source , environmental condition and discharge requirement. That is why I have posed the question as why we need C10 batteries for Solar, or is it mandatory? <Q> The C-Rating has to do with how fast you can discharge the battery. <S> C10 means that you will get the rated Ampere hour capacity if you discharge the battery completely in 10 hours. <S> This site has an explanation of the C-rating system and what it means. <S> In short, the faster you discharge a battery (the higher the load is that you put on it) <S> the less energy you will get out of it. <S> Take a battery rated for 100Ah C10. <S> If you put a load on it such that is discharged to its limit in 10 hours (10 Amps for 10 hours,) you will get the rated 100Ah out of it. <S> If you put a smaller load on it (say, 5 Amperes,) then you will get more energy out of it (perhaps 120Ah.) <S> The exact relationship between C rating and actual discharged energy depends on the battery chemistry and structure. <S> You use the C-Rating to match your battery to your expected load. <S> A 100Ah battery rated C40 wouldn't be much good if you need to draw 10 Amps for 10 hours <S> - it won't deliver that much energy that fast. <S> - it is better for heavy loads. <A> From what I've seen Cx refers to the capacity of a battery. <S> You can use any capacity of battery you wish for a solar application. <S> You have a number of things to think about including: maximum charging current, environment - the temperature. <S> If it's a solar application does that mean the battery will be situated outside and subject to low temperatures? <S> Often the charging current or voltage needs to be reduced for low temperatures (temperature compensation). <S> And if you're dealing with lead-acid batteries then you need to understand the difference between a leisure battery and car battery. <S> Both are lead acid and differ in design. <S> A car battery is designed to give a very high current (hundreds of amps) for a few seconds and is not particularly well suited to being used (having a current drain) for a long period of time. <S> A leisure battery is designed to be charged fully, current drawn from it for days continously, drained and then recharged fully. <S> Its plates inside are thicker and designed for this kind of use. <S> So if you wanted to charge a battery up, and use that battery for powering a television in say a caravan, mobile home, then you would go for a leisure battery or solar battery. <S> Keep the car batteries for driving the starter motor in the car only. <S> I'm not going to write a definitive article on batteries and how you charge them. <S> But this should give you a starting point. <S> But it sounds as if you need to do some research into the capacity (ah) of a battery and what it means? <A> If a battery has a capacity, \$ C \$, of 100 ampere-hours at a discharge rate of \$\frac{C}{10}\$, that means that if you take \$\frac{C}{10H} = \frac{100AH}{10H} = <S> 10A\$ out of the battery continuously <S> , its voltage will remain above the charge point for \$ t = \frac{100AH}{10A} = <S> 10\$ hours. <S> If you took more than 10A from the battery its capacity would decrease to less than 100AH, while if you took less than 10A, its capacity would increase to more than 100AH. <S> If you had a battery with a capacity of 100AH at a discharge rate of \$\frac{C}{20}\$, then the battery's capacity would allow its charge to last for 20 hours with 5A out of it continuously. <S> It seems to me that what your boss wants to do is to make sure he gets the maximum discharge time from the battery, which will happen - for the same load current and capacity - if the rate of discharge is \$\frac{C}{10}\$ instead of \$\frac{C}{20}\$.
| Presumably you would want to use C10 instead of a C20 because it can deliver more of its energy in a short time There are also a type of lead acid battery often better suited to solar applications called a solar battery" which can be discharged to a lower level than conventional lead acid batteries.
|
What is the difference between operational, differential, and instrumentation amplifiers? RS Components lists three categories of similar amplifiers: Operational Amplifiers , Differential Amplifiers , and Instrumentation Amplifiers . I think that there should be a single section called Operational Amplifiers. Why do these three separate sections exist? What is the significance of this difference? <Q> An operational amplifier is an integrated circuit, and somewhat of a building block. <S> The inputs (V+ and V-) of an op amp are very high impedance, and very little current goes into these inputs because of that. <S> The general formula for the performance of an op amp is Vout=A*(V+ - V-), and A is a very large number. <S> When wired up in feedback modes, the op amp can have many different configurations (even though the "open loop" gain is a very big number. <S> A differential amplifier, by definition, also functions with the relationship Vout=A*(V+ - V-), but A can be a much smaller number than in an op amp operating in open loop, and the currents into the inputs are not necessarily zero. <S> The input impedance can be relatively low, and the input impedance to each input does not need to be the same. <S> A differential amplifier can be built out of one or more operational amplifiers and some resistors, or it can be made out of more basic parts, like transistors. <S> An instrumentation amplifier is a special kind of differential amplifier. <S> In general, it is a differential amplifier, but the input impedances on the two inputs are very high (meaning very small input currents), and the same for each input. <S> There is usually a way to change the gain with one resistor. <S> Very often, the instrumentation amplifier has a three op amp configuration (or the equivalent), with two op amps serving as an input stage, and the output stage is a simple one op amp difference amplifier with a reference point that can be used to move the baseline around. <S> Because the resistors on the difference amplifier are usually laser trimmed inside the integrated circuit, common mode rejection is very high. <S> There are also two op amp instrumentation amplifier configurations, but you lose some of the benefits (like setting the gain with one resistor). <A> An operational amplifier will generally be designed so that when used in a suitable feedback system the inputs will always be within some specified tolerance of being equal; most op amps are designed with high-impedance input, though how high is "high" may vary. <S> A differential amplifier will generally be designed to measure the difference in voltage between two inputs; differential amplifiers often have balanced but finite input resistance, and many of them can operate with input voltages significantly beyond the rails. <S> One of the biggest problems with such amplifiers is that if the inputs are connected to things which have different resistances, the current flowing into or out of the inputs will affect them by different amounts. <S> Unlike many other differential amplifiers, however, an instrumentation amplifier will feed both inputs directly into a high-impedance non-inverting amplifier stage with no other resistive loading. <S> This means both inputs must be within the supply rails, but the lack of resistive loading means that no significant current needs to flow into or out of the inputs; this in turn means that even if the inputs are connected to things with different resistances, such differences will not interfere with measurement accuracy. <A> Operational amplifiers are general purpose devices which can be used in many applications. <S> If the requirements are not too stringent, they can be used to make both differential and instrumentation amplifiers. <S> Differential amplifiers are specifically designed to amplify the difference between 2 input signals. <S> They may include specially matched resistors to help optimize this function. <S> Instrumentation amplifiers are specifically designed for applications that require excellent DC characteristics, high input impedance, low noise and drift. <S> They also may include on-board resistors to enable gain selection without using external components. <S> Since differential and instrumentation amplifiers are not general purpose operational amplifiers, they are usually listed in separate categories. <S> Although not as versatile as an operational amplifier, they provide increased performance in applications for which they were designed. <A> Op amps have two inputs and one output. <S> Instrumentation amps usually have three inputs (ref is an input) and a gain control facility, and one output. <S> Differential amps usually have two outputs and usually two inputs. <S> None are directly electrically interchangeable and this is a performance and usually functional thing. <S> All are aimed at solving different solutions.
| An instrumentation amplifier, like other kinds of differential amplifier, is designed to measure the difference between input voltages.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.