text
stringlengths
83
79.5k
H: Smart Card (SIM) clocking requirements I'm trying to implement a SIM card interface using TI TM4C123XL. I have a question about a clock. TI MCU seems to provide possibility to interface smart cards but don't let me multiply clock without multiplying baud rate. So it seems to me I will have to generate the clock using timer myself. So, how precise should a clock be? Should clock be synchronised with data? If so, how? What is its purpose? AI: First, everything is specified in ISO7816-3. You should really read it (I won't provide any links because the standard is not free, but you can still easily find it on the web). Now, regarding your specific questions: Yes, you need to generate the clock that will be applied to the CLK pin. This clock does not need to be accurate. There is, however, a maximum and minimum value specified in the standard (1MHz min and 5MHz max - see chapter 5.2.3). Yes, the clock needs to be synchronized with the data. At startup, there should be a ratio of 372 between the CLK frequency and the baud rate. Then, you can negociate higher speeds using the PPS protocol (this allows you to change this ratio, and also eventually use clock frequencies above 5MHz). The original purpose of this clock was, basically, to be used as the main clock for the MCU. Smart cards were invented at a time when it was impractical to embed an internal oscillator within such a small MCU, so there had to be an external clock source. Now, most smart cards chips embed their own oscillator, because they can work at much higher speeds than the provided 1~5MHz clock, but the external clock is still used for synchronization of the communication (just because the standard requires it).
H: Circuit analysis on op-amp with no negative feedback In this diagram, there's an op-amp with no negative feedback. What is V+ (voltage at positive end of op-amp)? I'm self-learning circuits, and a resource I'm using says V+ = V3 / 2R. However, I don't understand why it's V3 / 2R. I know V3 is the voltage source thus there's the V3 there, but why isn't it V3 / 2 for example? AI: The source you are using is wrong. You know because the units are wrong -- a voltage divided by a resistance is a current, not a voltage. The correct expression is yielded using voltage division: \$\frac{V_3 \cdot R}{R+R}\$, which reduces to \$\frac{V_3}{2}\$. Notice now that the units are \$\frac{Volt \cdot Ohms}{Ohms}\$, or volts, and everything is consistent. Good catch.
H: direction of a VQFN pinout IC I want to use the TCA9548A in QFN format, I have diffuclties understanding the direction of pins, is it here really in clockwise ? as shown in page 33 of the datasheet ? AI: Page 33 is a dimensional drawing. ICs with a proper datasheet will contain a "Pin Configuration" section that describes the various packages. For this particular datasheet this section is on page 3 and it explicitly states "Top View" for the VQFN package, with the pins arranged counter-clockwise.
H: Op-amp symmetrical triangular wave Im using op amps to generate a triangular wave, my ultimate goal will be to power motors using pulse width modulation. The problem is that the triangle wave is saw toothed instead of symmetrical. Why is this? what mistake have i made in my circuit? AI: The problem is that the triangle wave is saw toothed instead of symmetrical. Why is this? what mistake have i made in my circuit? You have chosen values for R1 and R2 that are not identical. You are also assuming that the output of the LM324 can drive equally up to the positive supply as it can to 0V (I'm thinking of the comparator section of the circuit here). Read the data sheet and note the typical full scale output voltage levels that the LM324 can drive - it can drive down to the negative rail (earth in your example) but it won't get to within maybe a couple of volts of the positive rail. This will delver a very asymmetrical charging current to the integrator. Having said all of that, maybe it isn't that important if you are only using the asymmetrical triangle wave just for PWM creation.
H: Is it safe to control a DC motor's RPM with rapidly turning on/off? Would it safe (no overheating or equipment damage) to control a DC motor (gear head in particular) by rapidly turning it on and off? For example, if I have a 500 RPM motor and I was 250 RPM, could I turn it on for 1 ms then off for 1 ms, repeat? If possible, this would be a cheaper alternative to roughly controlling non-stepping motor RPMs than controlling voltage. AI: First, yes it is possible and it "can" be designed to be safe. This method is called pulse width modulation (PWM). This kind of modulation is used in moderns drives to control AC and DC motors. This modulation works by being way faster than the mechanical response of the motor. You are pulsating the voltage in the miliseconds range while the mechanical time constant of the motor is usually in the order of the second. This result in a low-pass filtering of the signal you send to the motor and the mean voltage applied to the motor will be determine solely by the duty cycle of the pulsation. In your exemple of one milisecond on and one milisecond off, this will results in a 50 % duty cycle at 500 Hz. So if the total voltage you can apply to the motor is 12 V by leaving the switch always on, you will now apply 6 V to it. However, as you ask for, this method may pose a threat to the electronic switch driving the motor. Any type of motor store a lot of magnetic energy because of the motor winding large inductance. This energy must be dissipated when you turn off the motor winding by your electrical switch. This cause an overvoltage which may destroy your electrical switch if you have no way of supressing that voltage spike. Unsually, this function is accomplished by an anti-parellel diode across the electrical switch. Also, care must be taken to verify that the electrical switch can take the current and voltage stress accros itself or an overheating condition may arise. To advise this problem, many circuits topologies have been developped. The differents topologies are usually suited for a particular power rating of the motor. I would recommend you to check the half-bridge circuit and the full-bridge circuit to control your motor as they are the most popular. You can easily find litterature on this subject around the Web and in many power electronics books.
H: LiPo battery low voltage alert I have a microcontroller (ATmega328) powered by a single cell lipo battery. I would like to make the microcontroller know when the battery voltage gets under a given level (someting around 3.5V) to output some kind of "low battery" alert. Can I do that without using another battery? Does the internal analog reference remains stable if the power supply voltage changes? If so, can I simply connect the battery positive terminal to an ADC pin and output the alert when the reading gets under a certain number? AI: The Atmega328 has both Power on reset and Brown-out detection build in. You don't need to add any components. Read the datasheet: http://www.atmel.com/Images/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Read Section 15.2 and you will understand exactly what voltages will stop the microprocessor from running by activating reset. If you want an early voltage level detection with an indicator (while you processor can still run code), simply use the onboard A/D to provide the measurement.
H: How to determine point of failure in photodiode circuit I have a photodiode circuit which uses a fiberoptic pigtail photodiode as shown in the picture below: The photodiode is connected to an opamp as in the circuit below: The supply rails for the opamp are +2V and -38V. The situation I am having is that sometimes I have no voltage on the output of the opamp. I saturate the photodiode using a laser pointer and typically measure around the -25V region when the circuit is functioning correctly. If I replace the photodiode, the circuit works as expected. However the "faulty" photodiode I remove, I check using a multimeter in diode mode and measure a 0.57V drop, the same as usual. Besides measuring the voltage drop using a multimeter, how else can I verify if a photodiode is good or not? The circuit is assembled by an external manufacturer so there is a possibility for fiber breakages during shipping, how is it possible to determine a break along the fiber? Edit: The datasheet for the photodiode: Datasheet AI: Since you are doing a lot of these, your best bet is to devote one amplifier board to testing photodiodes, and put a socket on the PD location. Now you can simply plug your diode leads into the socket and look at the output. You might do well to increase your feedback resistor to 10 pF or so just to be sure the increased input capacitance doesn't give you stability problems. With that said, I need to ask about your op amp. You list it as an ISL2812, but I cannot find any such part number with a quick Google. What I do find is an Intersil ISL28127, which I presume is what you're using. If so, you are violating power supply specs by putting 40 volts across it - max is 36. Furthermore, you should get rid of your + input components. They are not needed for DC levels (offset currents are 10 na or less, typically 1 nA,) so your offset induced by 2.2 M is no more than 2.2 mV, and typically 100 uV. Furthermore, you are risking stability issues by using this configuration.
H: CCFL wire polarity; any considerations? Are there any considerations for the polarity of wires on a CCFL tube? I am converting a monitor from 120vAC to 12vDC using a generic inverter (AVT4029; also have AVT4168 not pictured) and LCD driver board. The CCFL tubes are encased in the assembled display (Samsung LTM230HT01) and I would like to avoid further disassembly for risk of damage. The CCFL wiring harness is similar to the standard small CCFL connector found in laptops, except the connector has 4 pins on each harness (connector: YEON-HO 35001HS-04L), 2x harnesses on the display so 4 lamps. Pairs are red/white and blue/gray. I cut the connector in half so it fits into the generic inverter. The wires are all of the same gauge. Edited to add: the spec sheet for the panel is here http://www.spectrah.com/product/lcd_panel/samsung_lcd_panel/Samsung-LTM230HT01.pdf AI: CCFL's like NEON tubes, enjoy AC current with light emanation in each polarity. Each tube is rated in mA and power rating. ( keep it on dim to extend life of CCFL and your eyes)
H: Why am I getting signs of high RF radiation, while the desktop computer turns off? The desktop computer doesn't have any Wi-Fi accessories. The keyboard and the mouse are wired. But even when the computer and the LCD monitor are turned off (while the power plugs are still connected), I get a high frequency signal from several accessories. When I am moving a RF detector (which suppose to detect RF signals at frequencies between 100Mhz-2500Mhz), I get high frequency signals from the wired keyboard, the wired mouse, in front and behind the wired monitor (even when it turns off) and around the desktop case (whenever it turns on or off). Why do I get those high frequency results? AI: As long as your desktop PC is plugged into AC outlet, the internal power supply (PSU) is in standby mode providing +5VSB standby power to mainboard, so the computer can wake up from power buttons and/or keyboard and mouse resume signals. This +5VSB voltage is always on. To produce this voltage, the PSU must be operating, and therefore continuously switching at primary amplitudes of 200V-300V (DC rectified from AC mains). PSU switching generates noise on all rails and return grounds, switching amplitudes of this scale are difficult to contain. More, when in standby mode, the consumed power is much smaller than the nominal power, so at low load the PSU switchers and inductors/transformers usually operate under very unfavorable conditions, and ripples and ringing from PSU switchers can be even higher than under normal operations. As result, this "noise" propagates along every conductor, including shields of cables that connect mice and keyboards, which acts as antennas. The same happens in LCD monitor, its PSU is still in standby mode, and still switching and emitting noise.
H: Why do I get constant voltage across load of single phase inverter even with increasing input voltage? I built a single phase inverter, as shown below. However, for PWM gate control signal of maximum 9V peak, I noticed that the output PWM voltage across the a 10k resistive load does not increase above 6V no matter how much I increase the Vdc, above . I suspect the MOSFET is in saturation, but it does not make sense as according to the datasheet states that the saturation current at 9V Vgs is above 10A. Can someone explain to me why the peak load voltage is constant and how may I increase it with increasing Vdc? For your information, I am using STP75NF75 N channel MOSFET. I get similar results even if I change the switch to IRF740 N channel MOSFET. AI: The information you give is conflicting. You show IGBTs, but then say you are using N channel MOSFETs. However, the reason seems to be that you are using NPN or N channel devices for the high side switch, but not driving their gates/bases high. NPN or N channel devices will always have their emitter/source below the base/gate when on. Either you need to use a special high side driver intended for N channel devices on the high side, or P-type high side switches. The inputs of the P-type devices will still need high voltage, but can be easier to drive. At least you won't need a voltage above the positive power rail to drive them.
H: Battery Holder for 3.7V 3000mAh 18650 Li-ion AAA? I am interested in using 3.7V 3000mAh 18650 Li-ion AAA batteries (e.g. EBL). However, users indicate (reading the reviews) that those batteries are not the same size as traditional AAA. I was going to purchase a standard AAA holder (e.g. 4 X AAA Holder), but now I am starting to doubt if these batteries will fit the holder. Does anyone have any experience with 1850 batteries + holders? I am trying to externally power an Arduino project with them. AI: They're much bigger than an AA let alone an AAA battery. Check the dimensions. You can buy 18650 holders (the batteries themselves are actually a bit more difficult to get ahold of from reputable sources). AAA: 44mm long x 10mm\$\phi\$ 18650: 64.8mm long (or longer) x 18.3mm\$\phi\$ There is an additional complication- the 18650s are made with or without protection PCBs which add something like a couple mm to the length.
H: Does the PID Controller (LOVE 16C-3) Need an External SSR? My PID controller LOVE 16C-3 has a output of "relay". Do I connect the output of the PID controller to the inputs of an external SSR? Or is the relay already built in into the PID controller? AI: The relay output is SPST rated at 5A: You cannot use this output to directly control a typical DC-input SSR without an external DC power supply of some type. It's just a normally-open contact. You should not switch anything like 5A with it either, unless you want it to last a very short time. Typically life at full rated current is only perhaps 100,000 operations, which might be weeks or months 24/7. They should repeat the datasheet specs within the manual, but I imagine this is just some rebranded no-name Asian product anyway. I doubt Love makes this kind of control these days (they did, many years ago).
H: Understanding Working of LC Meter I am trying to understand working principle of the circuit given in the link below : http://kripton2035.free.fr/Resources/lcmetersch.pdf I realized that the circuit is basically relaxation oscillator with LC tank circuit attached to its non-inverting input. I know that when the output of the comparator becomes HIGH (5V) capacitor in the negative feedback path charges and and after reaching some point, voltage on the inverting input of the comparator becomes higher than the non-inverting input and the output of the comparator becomes LOW. And then the capacitor in the negative feedback path discharges and the voltage on the inverting input becomes smaller than the voltage on the non-inverting input, causing the output to go HIGH again. It goes on like that. But the thing is I am not able to understand the effect of LC tank circuit here. I don't know how come the output frequency is equal to LC tank resonance frequency. And I am not able to understand the function of the resistance between output and non-inverting input of the comparator. A comprehensive explanation of the circuit is the given in the link below : http://www.vk6fh.com/vk6fh/lc_meter_vk6fh.htm Thanks in advance! AI: Basically the "classic" relaxation oscillator only works as a kick off to start the LC oscillator. The little damped ringing on non inverting input triggers the output to swing full supplies and increases itself. In the frequency domain you may think that parallel resonating LC tank gives zero phase and hence positive feedback at its resonance frequency only. Now the "slow" RC network on inverting input simply sets the threshold at the average output value to ensure proper operations even with non symmetric (both in level and time) output
H: Steps to hand draw Bode magnitude plot for a particular transfer function Can anyone guide me through how to hand draw a correct Bode magnitude plot for $$G(s) = \dfrac{48000}{s(s+0.1)(s+100)}$$ Don't even need phase plot, just need correct magnitude plot As few calculation needed as possible, in other words, just use rules for poles and zeros (pole -> -20dB/Dec, zero -> +20dB/Dec) instead of calculating raw numbers The MATLAB produced Bode plot can be seen here: AI: First check the transfer function for poles and zeros. In this case the numerator is a constant, so there are no zeros. The poles are the zeros of the denominator. By inspection we see that they are at s=0, s=-0.1, s=-100. For each pole we get additional -20dB/dec and additional -90 degrees phase shift. The gain starts to change at the corresponding positive value of the pole. E.g. for s=-100 we will see a change at w=100. The phase changes from about one decade before this frequency to about one decade above this frequency by -90 degrees. Exactly at the corresponding frequency the change because of this pole is -45 degrees. Before we can draw the diagram we need to find a starting point. This is a little bit tricky because of the 1/s term. We can rewrite the equation and deal with the parts separately $$ G(s) = \dfrac{48000}{s(s+0.1)(s+100)} = \frac 1s \cdot \dfrac{48000}{(s+0.1)(s+100)} $$ Now we have a 1/s-term that is infinity at zero and 1 at w=1. It will decrease by 20dB per decade. Now we look at the other part $$ \dfrac{48000}{(s+0.1)(s+100)} $$ For s=0 the gain is 48000/(0.1*100) = 4800. At w=0.1 it will start to decrease by 20dB/dec, at w=100 it will start to decrease by 40dB/dec. Now we know everything about the components and can construct the Bode plot. The result looks as shown below. The 1/s term is red. The other term is blue and the sum of these two is yellow. Starting at w=1, we have 0dB for the 1/s term. The other term has 20*log10(4800) ~ 73dB left to the corner frequency and at w=1 it is 20dB below that value, so we have 53dB. This is our first point! At this point we have a slope of -40dB/dec. This slope will extend one decade to the left (so we have 93dB there) and then continue with -20dB/dec. To the right it will extend up to w=100 and then continue with -60dB/decade. At w=100 the magnitude is 53dB - 2decades*40dB/dec = -27dB.
H: 3.3V/5V Linear Regulator Voltage to Ground Jumper I received this 3.3V or 5V power supply. It's neat because it fits on my breadboard and can provide two separate voltages (chosen using jumpers) on it's two outputs. I originally thought that this was a Step-Down Converter, however, it's been pointed out to be a Linear Regulator. Here, I have the left-hand side providing 5V, while the right-hand side provides 3.3V. I've used my multimeter to verify it working from a 9V battery. I am curious what the jumpers in the middle of the board will do. There are two 5V->GND, and two 3.3V->GND. I've made attempts to find information about this specific device, but I haven't found any identifying information, nor have I found any information about it online. I'm afraid to use this for longer than looking at the voltage on either side because I am unsure the purpose of these jumpers, or if/when they should be bridged for safe/normal operation. Any help identifying and understanding the purpose of these jumpers in the middle of this device would be greatly appreciated. AI: The 4x2 header in the middle is there for you to access the voltage rails and Ground with female jumper wire or test clips or whatever. It's for your convenience. And no, that board does not function as a step up regulator. It's not even a step down switching regulator. It is just two linear regulators.
H: How to interpret packaging information in Datasheet I'm trying to create a part for Fritzing and I am struggling to interpret the packaging size in the datasheet. In the notes it is said that the sizes are in mm, ok with that, but how should these numbers be interpreted? A division or max/min does not make sense. AI: As Nick says, it's the maximum and minimum value that dimension can be. In your example the width of the chip can be between 2.9mm and 3.1mm. Some datasheets would instead put "3mm ±0.1mm" which amounts to the same thing. To get the nominal value you can subtract the lowest from the highest, divide by two, then subtract the result from the highest value. 3.1mm - 2.9mm = 0.2mm 0.2mm ÷ 2 = 0.1mm 3.1mm - 0.1mm = 3mm No manufacturing system is perfect, and you have to allow certain tolerances in your design to allow for these inaccuracies.
H: How does voltage progress during discharge of a battery? The build: I'm building a portable bluetooth boombox. It's a very simple build. The components I'm using are: Bluetooth amplifier board (TDA7492P) 2x50W speakers Rechargeable battery The amplifier needs to receive 12V. So the battery I will get will be able to deliver this voltage. My questions: Now before I buy the battery I have 2 questions that come to my mind. Will the voltage at the terminals of the Amp be 12V for the entire discharge of the battery or do I need some kind of a voltage regulator? My other concern is the autonomy of the boombox. I want to be able to combine 2 batteries to double the battery life of the device. Is there a way I can put together 2x12V batteries and obtain double the autonomy? But keep the voltage to 12V. Do I need to connect them in series or in parallel? As you can guess i'm new to electronics, and any help would be very much appreciated. AI: Battery discharge curves and you Batteries indeed vary in voltage as they are discharged. This is a function of the chemistry of the battery, and specified by the battery maker as a discharge curve, characteristic of the chemistry of the battery but also varying with the discharge rate and a few other parameters (such as temperature). For instance, a 12V sealed-lead-acid battery's discharge curve is shown below (this is one of the most common types of small-ish 12V batteries): As you can see, the battery starts off at around 13V and discharges to 9V before not having much life left in it. The good news, though, is that power amplifier ICs like yours don't care much as they are designed to work over a range of voltages; for instance, your TDA7492P can run on anywhere from 8V (a single, rather flat, 12V lead-acid battery) to 26V (almost enough to run on 2 12V lead-acids in series). The volume may go down as the battery drains, but that's OK. I want more runtime! You can connect batteries in series to boost the voltage (a 9V alkaline battery is really 6 1.5V alkalines in series, in a neat package), or in parallel to boost the available current capacity without changing the voltage. Since the TDA7492P can't quite take 2 12V lead-acids in series (especially during charging), you'll have to connect your 12V batteries in parallel. (This does introduce complications when you go to charge them, but lead-acid batteries are tolerant of this. Lithium-ions, on the other hand...)
H: Different square waves from one microcontroller I'm doing a project and I need the microcontroller (ATmega328) to do these two things: Generate a rectangular wave to be filtered and obtain a DC voltage (that varies linearly with the duty cycle) Generate a square wave (50% duty cycle) with a certain period The micro will be reading its input pins constantly because the DC voltage and the period needed can change at any moment. I had thought of doing the first one with PWM and the second one manually setting an output pin or clearing it, counting the period with a timer. However, my question is: can these two things be done together? I'm thinking that in the code, the microcontroller will be able to follow a routine at a time. So how could I generate these two waves simultaneously (if possible)? If it can be done, could two different PWMs output be used to generate two different signals instead of using a timer and generating the second one manually? AI: Each OCnx pin of the ATmega328 can output its own independent PWM waveform. Additionally, each timer ("n") can have its own frequency and/or phase. Additionally, the ATmega328PB has a pin that can output a waveform that is a modulation of two waveforms generated from separate timers. Since you say "the DC voltage and the period needed can change at any moment", read the datasheet carefully to find out when you can safely change the values that are used to generate the waveforms. If the values are changed at the wrong time then the waveform can glitch, giving you a signal that does not have a 50% DC.
H: Max input current of DC DC converter I'm not sure if this is the right place to ask this kind of question(mine seems practical as opposed to academic) but here it goes. The embedded board I am using(Jetson TX1) can be powered using: 4S LiPO(4 cell / 14.8V nominal / 16.8V charged) with 1-2A (or 15W) of continuous current or 3S LiPO (11.1V nominal / 12.6 charged / 9V discharged) with 1-2A (or 15W) of continuous current (from https://devtalk.nvidia.com/default/topic/914529/jetson-tx1/battery-for-jetson-tx1/1) I'm trying to mount Jetson TX1 on my quadrocopter which has XT30/XT60 ports with the following spec: Output Voltage: 20 - 26.1 V Max Continuous Output Current: 10 A (from http://wiki.dji.com/en/index.php/Matrice_100-Reserved_Ports_Description) Now I'm trying to buy a DC-DC step down converter and I'm currently looking at DROK 200143 DC-DC Buck Converter 3.5-30V to 0.8-29V 10A Step-down Volt Adjustable Output Regulator Module Power Supply which has 3.5-30V input 0.8-29V output output 10A Max output current My concern is the input current. The output current only needs to be 2A but it should take 10A input current. Is the max input current same as the max output current? AI: That means this converter is capable of giving you max 10A, not that it will use all 10A from the power source, as @JRE stated. So you can use this DC-DC converter. Moreover, you will only need 2A max, so you maybe can find a smaller or cheaper DC-DC converter.
H: Common Source JFET Amplifier I am trying to build a simple JFET common source amplifier to get about 5-10 times gain for a signal I have coming from a microphone with an amplifier already in it, from ADA Fruit, here I am working with a circuit just like below, but with the capacitor on the output removed. I have tried various values, but currently I have RD at 10 KΩ, RS at 1 KΩ, Cs and Cin are are .1 μF, and RG is 1 MΩ. VDD is 5 volts. I tried two different transistors FQP30N06L here and J310 here. From what I understand, this should give a gain of 10x. I can generate a signal by whistling, and the preamp on my circuit gives about 100-500 mV sine wave output. However, my output signal from the drain is always smaller than my input signal. I am not sure what is wrong here, any advice would be appreciated :) AI: If you leave Cs out then you are correctly expecting a gain of 10 in the Common Source configuration you show. But the resistor values and devices you have selected will prevent a successful result. The FQP30N06L is an enhancement mode device and won't work at all in this bias configuration. The J310 is enhancement mode (the right type of device), but the VGs(off) and 0-VGS(IDSS) is too high to work in this configuration with this supply voltage and resistor values. You should read this to help your understanding: http://www.vishay.com/docs/70595/70595.pdf Your biasing is this type: In this configuration Rs is part of both the bias and gain setting which creates some compromises in setting the operating current. In your case the device (J310) has: VGS(off) of -2 to -6.5 V. Zero volt VGS(ID) of 24 to 60 mA. (this is usually called IDSS, the zero VGS saturation current) Note: This device is really designed as an RF amplifier where Rs would be zero. Let's work through the design and see where the problems are when using a J310. Ignoring Rd for the moment (assume it is shorted out while we bias the device operating current) if you look at Figure 1 in the datasheet, you can see the VGS curve (RHS of graph) for the device. If VGS(off) is -2.0 V (the best of the J310 devices) the voltage across Rs can set the operating point (ID) somewhere under 2.0 V measured on the Source pin. Here is the Figure 1 with our extra information added: Notice that with a 1K Ohm Rs the Source voltage will be about 1.8 V and the operating current about 2 mA. If we now tried to add back the RD value of 10K Ohm we have a real problem....to draw 2mA through 10k you need 20 V across it!!! The end result is that the JFET simply saturates, so you get no signal out. You should be able to confirm this by measuring VD and VS. We'd typically expect that the quiescent point of VD (the Drain) should be about 2/3 of the supply voltage....or about3.3 V in this case. That means the value of RD would be about 750 Ohms. That would limit the gain to less than 1. We just made an active attenuator...not very useful. Let's select a device that might be more appropriate. We can try a J113: https://www.fairchildsemi.com/datasheets/J1/J111.pdf This is a relatively common small signal JFET. There is still a range of VGS(off) and IDSS and the graphs are a little less helpful this time, but we can use Figure 6 and get an idea of where the operating point might be. If we use the VGS(off) value as -1.1 V there is a graph for it (but all the devices will vary of course). We now have an ID of about 520 uA and a VS of about 520 mV. At this current the voltage drop across a 10k load resistor would be about 5.2 V ....closer to working, but it still won't work. We have some choices to make if we want to keep the 1K in the Source side. We could drop the value of RD to set the voltage on the Drain to about 3.3 V, that would require RD=(5-3.3)/0.00052 --> approximately 3.3K Ohms. However this would limit our gain to 3.3. Or we could get creative and make RS up of two resistors that total 1K Ohm and bypass one to ac signals. To get a gain of 10 we need a 3.3K and 330 OHM RD and RS, leaving us 680 Ohms to be bypassed. The circuit would then look this way: simulate this circuit – Schematic created using CircuitLab
H: How the MOSFETs driven by a six winding transformer I have a 6 winding transformer of 1:1:1:1:1:1 as shown in figure. And connected to V1 and V2 MOSFETs. DRV and DRVGND are fed from a HCPL 3120 driver. My questions are 1) Is it acting like a 1:2 transformer for mosfets? 2) Why do we fed from one terminal of primary and one terminal of secondary? (Actually I asked a question on 6 winding transformer previously just for information.But I am not understanding why this one is for mosfets. Sorry for asking again on this transformer) AI: OK, you have 6 windings and it is probably best to forget about such concepts as "primary" and "secondary" and regard all windings as equal to each other. Now, if you took the time to draw it out sensibly you would find that, in effect, you have three windings and all of them are 1:1:1: - simulate this circuit – Schematic created using CircuitLab As for the context in which the transformer is used, that is up to you to decide. However, now that the transformer wiring is simplified, it's clear to me that DRV and DRVGND receive a signal to drive two isolated MOSFETs (connected to their respective gate/source connections on the other windings). The signals that feed the two MOSFETs are inverted with respect to each other.
H: SIM900 not getting powered on I have a circuit where I am using a SIM900 GSM/GPRS module. As per the datasheet it needs 3.4 V - 4.8 V and upto 2 A of current. I am using LM2576. The input to the regulator is 12 V & 4.2 A and output (which is going to SIM900) is 4.175 V. I have connected leds for NETLIGHT and STATUS LIGHT. I have connected a switch between PWRKEY and GND to start the SIM900. Following is the schematic of regulator: SIM900: The problem I am facing is as soon as I press the switch S1 to turn on the SIM900, its netlight led starts blinking and status light led is always off. What does this means? Is the module faulty? How can I debug it? Datasheet AI: From the document "SIM900 hardware design:" Seems that you might be up and running! Time to connect the serial port... If all else fails, some users report reflashing the firmware worked.
H: Energy calculation for a short circuit of a battery I have a battery cell with the given datasheet: WB-LYP100AHA So I can calculate the short circuit current with the internal resistance as: $$ \frac{3.5V}{0.00045Ohm} = 7777.78A $$ So the internal power generated is: $$7777.78A^2*0.00045Ohm = 27222.23W$$ Energy it takes to heat up a cell by 35 kelvin. Cell weight: $3.3kg$ With a heat capacity of \$4 \frac {kJ}{kg * K}\$ I get: $$4000 \frac{Ws}{kg*K} * 3.3kg * 35K = 462000Ws$$ Time it takes the cell to heat up by \$35\$ kelvin: $$ \frac{462000Ws}{27222.23W} = 16.97sec$$ Are these steps ok for a rough calculation or is there a mistake / better way? AI: From the datasheet, the operating discharge current is given by the opertaing discharge voltage and internal resistance which is: $$I_d=V_d/R_i$$ From the datasheet your discharge voltage is 2.8V @25°C and the internal resistance is 0,45 mOhm which gives you a discharge current of 6223 A. But, the maximum discharge voltage is when the battery is charged at 100% if your battery is fully charged at 3.5V, then your calculations are good. Note that a 3CA means that the discharge current will discharge the entire battery at the rate of 300A in 1 hour.
H: Splitting Power Tracks/Planes into Different Layers I'm just wondering that, in terms of EMC/EMI, what the effect of splitting a power track/plane into different layers can be. Assume a power track/plane/pour area (with enough thickness and/or total area for, say, 5A DC) is split into two tracks/planes/pour areas (equally or not) and each track/plane/pour area is drawn on different (i.e. bottom and top) layers then connected with enough amount of vias and/or through-hole components' terminal pads (filtering caps, parallel diodes etc). Doing so is good or bad for EMI/EMC? Sorry for my English. AI: This is certainly a good idea for a ground plane (also called a power plane). With sufficient stitching vias, two parallel ground planes results in lower volt drops at high frequencies and imporved performance especially with sensitive analogue circuits in the presence of digital circuits. Having said that, when you have mixed signals it will probably be better to keep a digital ground plane separated from the analogue ground plane to avoid circulating digital currents in the analogue ground plane. Stitching the digital and analogue planes at just one main area is also something to be recommended. For non-ground power planes the benefits are less obvious. My general philosophy is that I make non-ground power planes sufficient for the current that are passing and use the "extra space" for more true ground plane. Using tracks (rather than planes) to feed individual chips can be regarded as a good idea because the track's self inductance (along with the chip's decoupler) make a nice power supply filter and you end up with a fair amount of filtering when this is extended to a multi-chip PCB design. On the other hand, for low voltage MCU's (circa 1 V logic levels), it probably makes sense to keep a true Vcc power plane and having two (with stitching vias) probably is a good idea. So many of these decisions are based on the target design and therefore generalizations are fraught with subtle dangers. Doing so is good or bad for EMI/EMC? Well, before you consider EMI or EMC, the PCB has to be fit for purpose and perform to the required expectations and that, is the motive to my previous paragraphs.When it comes to EMI or EMC it's ground all the way rather than a non-ground power plane.
H: How to find cutoff frequency with more than one resistor I have the above circuit and I want to find the cutoff frequency. Z_eff,in is my load. I have created a transfer function: How is it possible to find the cutoff frequency? Let me know if more information is needed. AI: You can find the cut-off frequency even without the transfer function. Simply find the time constant T realized by C and the total resistance Rtot connected to C. Then, the frequency is wo=1/T.
H: Free Electron in Current An electric current is a flow of free electrons. Are these free electrons totally free from the orbits of metal atom or they moving by jumping from one orbit to another orbit of the atoms? If they are totally free, what does enforce them to keep staying in (or on the sufrace of) the metal Thanks AI: I'm pretty thankful for Jack's answer – because it explains that you might not want to stick to a model with "separate atoms" and "bouncing" electrons for a metal. So here goes what I'd like you to get the idea of regarding electron movement in a metal: The moment you realize that these electrons aren't free to move anywhere, you must admit that the word "free electron" isn't 100% accurate. So far, so good. Hold on, this will hurt just a bit. The orbits you know are just a model. They don't exist as things with a shape where a "point-shaped" electron circles around. The moment you need to describe electron movement in a metal, that model breaks down, as you've noticed. Instead, we have to understand that an electron bound to a nucleus only is bound because "fleeing" would require an external impulse, as well as "crashing" into the nucleus. For now, imagine the electron in circular motion (just like a satellite around a planet), and if no external force is applied, it'll stay at that path. Now, take a step back. You might have heard of Heisenberg's Uncertainty principle – you can't know the exact location of something and its exact impulse at the same time. That's exactly what's happening here – we know the rotational impulse of the electron pretty exactly (because we can calculate how much impulse it needs not to crash nor to flee), and thus, the knowledge of its position must be uncertain to a specific degree. Hence, an electron like that doesn't actually have a place on the orbit – it has a place probability distribution. It turns out that the probability is an effect (or, rather, an operator applied to) Schrödinger's Equation (for a non-near-speed-of-light single particle), which is $$i \hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \left [ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right ] \Psi(\mathbf{r},t)$$ (I swear, I'm not trying to scare you – the formula will look far less threatening when you've studied electrical engineering for one and a half years – you'd typically have a course called "solid-state physics / electronics", where this is explained in much more depth and with background, and a lot of mandatory math courses that explain how to deal with this kind of equation, especially with the differential Laplacian operator \$\nabla^2\$. I just need the formula below.) So, now back from the single electron to the metal: A metal is composed of an electron lattice – that is, the atoms are arranged in a repetitive pattern. Now, looking at Schrödinger's equation, you'll see a \$V\$ there – that's Potential, and potential is practically "distance to positive charges" for an electron – and since we know the positive charges are in a nice periodic pattern in the metal, \$V\$ is periodic! Now, what's this \$\Psi\$? It's what we call the position-space wave function. It's the solution for Schrödinger's Equation – the function that makes the "\$=\$" above true! Now, for a specific, periodic \$V\$, only a specific set of wave functions can exist; we can apply a different operator to the wave function \$\Psi\$ (the Hamiltonian) and get these states; they are the so-called Bloch states. Within these, an electron actually doesn't have a specific "identity" or "place" – it just contributes to the fact that things are periodic. That's what you mean when you talk of "conduction bands" in metals – states that electrons are a) able to exist and b) are free to move around in. Now, if you apply an electrical field, which is what you do to, macroscopically, make charges (electrons) flow, you change \$V\$; it's now a sum of a periodic function and a linear function. That leads to a change in the solution for \$\Psi\$ – and macroscopically, this means that electrons move to one end.
H: Instanciating blocks in VHDL, asignment of clock and reset signals I am trying to connect 5 stacks together using VHDL below. The main problem I am facing is that that I don't know how to deal with the signals clk which stands for clock and rst which is asynchronous reset and the SOp stack operation signal-vector which used in its entirety by each of the stack instances. TS stands for top of stack. library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity stack is port( D : in std_logic_vector(4 downto 0); TS : out std_logic_vector(4 downto 0); clk, rst : in std_logic; SOp : in std_logic_vector(1 downto 0) ); end entity; architecture structural of stack is begin stack1: entity stack port map( D => D(0), TS => Tos(0), SOp => -- here ); stack2: entity stack port map( D => D(1), TS => TS(1), SOp => -- here ); stack3: entity stack port map( D => D(2), TS => TS(2), SOp => -- here ); stack4: entity stack port map( D => D(3), TS => TS(3), SOp => -- here ); stack5: entity stack port map( D => D(4), TS => TS(4), SOp => -- here ); end architecture; Should I basically type something like this or can I just skip SOp, clk, rst as they are used completely by each stack? stack1: entity stack port map( D => D(0), TS => TS(0), SOp => SOp, clk => clk, rst => rst ); AI: First of all you need to differentiate entities definitions and entities instantiations. What you try to do here is defining an entity and instantiate it in the same file. Your architecture of your entity can't use your entity ... So I advise you to create a TOP level, that you can call top, stack_top or whatever you want and an entity stack separately. Your main entity called stack will look like this : library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity stack is port( D : in std_logic; TS : out std_logic; clk, rst : in std_logic; SOp : in std_logic_vector(1 downto 0) ); end entity; architecture structural of stack is begin ... -- do whatever you need to do end architecture; This is you stack function. Now the top level will instantiate as many instances of you stack entity you need. library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity top is port( D : in std_logic_vector(4 downto 0); TS : out std_logic_vector(4 downto 0); clk, rst : in std_logic; SOp : in std_logic_vector(1 downto 0) ); end entity; architecture X of top is -- call you entity component stack is port( D : in std_logic; TS : out std_logic; clk, rst : in std_logic; SOp : in std_logic_vector(1 downto 0) ); end component; begin -- instantiate your entity stack0 : stack port map (D => D(0), TS => TS(0), clk => clk, rst => rst, SOp => SOp); stack1 : stack port map (D => D(1), TS => TS(1), clk => clk, rst => rst, SOp => SOp); ... end architecture; (I assumed that you wanted to map one bit of each of your vector to each stack, that's why I'm using std_logic ports for each stack)
H: Convert 12V 200mA to 5V 450mA I am making a transformer-less AC to Dc power supply and the best design that I have got till now is this:- For better understanding you can download this PDF:- www.nxp.com/documents/user_manual/UM10522.pdf This circuit uses a TEA1721 ic to convert AC Mains voltage to DC voltage. This design claims to have a 77% efficiency without a transformer and is non-isolated, both of which are fine by me. The output of this converter is 12V 200mA and I desire 5V 450mA (or greater amperage). Please suggest any changes that I can make in this circuit to get a 5V 450mA output. If there is a better circuit (without any transformer) which has a better efficiency and an output of 5V 500mA (or greater amperage), then please do suggest me that as well. AI: You would do well to go to the TI web site and utilize their WebBench design evaluation tool to enter your requirements and see an optimized circuit (or selection of circuits) pop up. For sure you can achieve 80% efficiency or better with todays components. Hacking an existing design that: You do not seem to understand how it works You have not read the data sheet inside out You fail to understand the functions of R2 and R3 ...is not a way of going about designing switching power supplies. Also make damn sure you understand the implications of usage and safety when designing non-isolated off line power supplies.
H: Unable to understand the details of step-down voltage regulator I have currently purchased a 'Pololu 5V, 2.5A Step-Down Voltage Regulator D24V22F5' to regulate my 12v into 5v. This so far works fine! The thing I'm wondering about it, and looking at the diagram and schematics of the device: I need some help figuring out the PG and EN. From their website: The regulator is enabled by default: a 270 kΩ pull-up resistor on the board connects the EN pin to reverse-protected VIN. The EN pin can be driven low (under 1 V) to put the board into a low-power state. The quiescent current draw in this sleep mode is dominated by the current in the pull-up resistor from EN to VIN and by the reverse-voltage protection circuit, which altogether will draw between 5 µA and 10 µA per volt on VIN when EN is held low. If you do not need this feature, you should leave the EN pin disconnected. The “power good” indicator, PG, is an open-drain output that goes low when the regulator’s output voltage falls below around 85% of the nominal voltage and becomes high-impedance when the output voltage rises above around 90%. An external pull-up resistor is required to use this pin. Ideally, and what I believe they are used for, I would like to attach 2 LED's onto the board (a green and a red) to light up if everything is OK or not. From what I can understand, can I just attach a red LED onto the EN and GND and it will light up when the voltage isn't sufficient, and can I attach an LED to PG and GND when so it will light up when the voltage is sufficient? AI: To light a LED when the regulator output is "good", you don't do anything to the EN pin. When the output is good, the PG pin is high impedance, and when not good, it is pulled low. This needs to be inverted if you want the LED to light when power is good. The simplest solution, although hard on the PG output, is to connect a resistor between the PG output and 5 V, and the LED between the PG output and ground. For a green LED that drops 2.1 V and 10 mA LED current, the resistor would need to be 300 Ω. When the PG output goes low, it sinks the current instead of the LED, so the LED shuts off. In this example, the PG output would need to be able to sink 17 mA. Here is a more sophisticated solution: It still runs the LED at 10 mA when power is good, but puts much less of a load on the PG pin. It's possible that the PG pin can't sink 17 mA, as required by just the resistor and LED circuit described earlier. This circuit puts less than 1 mA load on the PG pin, which it almost certainly can do. It also draws less current from the 5 V supply when the LED is off. The first circuit actually draws more when the LED is off.
H: How do I link two components from different files in VHDL? Sorry for the amount of code in advance (I added the code since I was unsure whether it is needed here to resolve my issue). My main goal is to link two components which are in two separate .vhd files together in a block in a third file. Lets say that I have got the following code in my file chooser.vhd: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library work; use work.all; entity chooser is port( clk, rst : in std_logic; DATA : in std_logic_vector(4 downto 0); A : out std_logic_vector(4 downto 0); Src : in std_logic_vector(1 downto 0); SOp : in std_logic_vector(1 downto 0); debug : out std_logic_vector(4 downto 0) ); end entity; architecture structural of chooser is -- here begin end architecture; And that I have two components in another two files called registry.vhd and MUX3x5.vhd MUX3x5.vhd library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity MUX3x5 is port( IN0 : in std_logic_vector(4 downto 0); IN1 : in std_logic_vector(4 downto 0); IN2 : in std_logic_vector(4 downto 0); SEL : in std_logic_vector(1 downto 0); O : out std_logic_vector(4 downto 0) ); end entity; architecture behaviour of MUX3x5 is ... end architecture; registry.vhd has an output of 5 bits I want to connect them like follows inside chooser.vhd registry --> MUX3x5 (on the second input). How do I do that in my chooser architecture above? Should I declare them as components with their ports as seen in the entity declaration in the original files for the components in the architecture and then route them in the port map? Like so: Attempt architecture structural of chooser is signal -- signals here -- copy of the inputs/outputs in the entity declaration in the file above component MUX3x5 is port( IN0 : in std_logic_vector(4 downto 0); IN1 : in std_logic_vector(4 downto 0); IN2 : in std_logic_vector(4 downto 0); SEL : in std_logic_vector(1 downto 0); O : out std_logic_vector(4 downto 0) ); end component; component registry is port( -- some signals here TS : out std_logic_vector(4 downto 0) ); begin -- port map here port map( TS => IN1; -- other maps ); end architecture; AI: You already have the solution. Just add the name of the entity as A.Kieffer said in his comment and make sure that the maps are separated by a , and not ; architecture structural of chooser is signal -- signals here signal mux_IN0 : std_logic_vector(4 downto 0); signal mux_IN1 : std_logic_vector(4 downto 0); signal mux_IN2 : std_logic_vector(4 downto 0); signal mux_SEL : std_logic_vector(1 downto 0); signal mux_O : std_logic_vector(4 downto 0); -- copy of the inputs/outputs in the entity declaration in the file above component MUX3x5 is port( IN0 : in std_logic_vector(4 downto 0); IN1 : in std_logic_vector(4 downto 0); IN2 : in std_logic_vector(4 downto 0); SEL : in std_logic_vector(1 downto 0); O : out std_logic_vector(4 downto 0) ); end component; component registry is port( -- some signals here TS : out std_logic_vector(4 downto 0) ); begin some_name: registry port map( TS => mux_in1, -- use , and not ; -- other maps ); mux: MUX3x5 port map( IN0 => mux_in0, IN1 => mux_in1, IN2 => mux_in2, SEL => mux_sel, O => mux_o ); end architecture;
H: hamonics and sidebands in dc-dc converter The lecture (page 8) shows output voltage spectrum with sinusoidal modulation of duty cycle of a dc-dc converter. I am wondering where the hamonics and sidebands come from. For hamonics, I read somewhere that because converter power stage is non-linear so it generates hamonics. I can see it from the nonlinear static control-to-output characteristic of buck-boost converter below. However, I don't see where switching hamonics and sidebands come from. Could anyone explain why these hamonics and sidebands exist here. AI: First of all, an unmodulated switching waveform is rectangular in nature and, as per any basic analysis of a square wave, it contains harmonics of the fundamental switching frequency: - So, a square wave contains a series of sinewave harmonics starting at the fundamental switching frequency and extending, theoretically to infinity. Next, look at the top picture in the image below. This is the general case for a rectangular wave with the duty cycle as a variable: - It tells us that harmonics can arise at all integer multiples of the fundamental switching frequency. As a side note, the special symmetrical case of a square wave happens to only contain odd numbered harmonics. The question shows a sinusoidal base frequency altering (modulating) the PWM duty cycle in order to generate a PWM sinewave. This will produce sidebands either side of every generated harmonic. The distance in Hz from the centre of the harmonic to the centre of either sideband is twice the modulating frequency. Analysing the sidebands is the real tricky bit to understand; you have to start by considering the formula for the n\$_{th}\$ harmonic: - a\$_n\$ is proportional to \$\dfrac{2}{n} sin(n\pi d)\$ And, if d (the duty cycle) approaches zero (or unity) the "sin" term becomes zero i.e. the harmonics greatly reduces in amplitude. This happens at twice the modulating frequency i.e. all the harmonics are amplitude modulated at twice the frequency of the modulating waveform. Because there are DC terms involved, this boils down to exactly the same analysis as a regular AM broadcast: - The wiki link above shows the full math behind AM and sidebands but it basically boils down to any one of the following trig identities: - So, sum and difference frequencies are produced and it is these sum and difference frequencies that create the sidebands. New section that hopefully demonstrates that a simple PWM circuit (based around an AD8605 op-amp, a 100 kHz triangle wave and a 1 kHz sine wave) produces sidebands at +/- 2 kHz from the harmonics of the basic PWM switching waveform: - There are wider sidebands too and these are also at intervals of +/- 2 kHz. These are most likely due to my circuit being an imperfect modulator. So, using a much faster op-amp and, band pass filtering the resultant PWM at 100 kHz, it can be clearly seen that it is a classic case of amplitude modulation at twice the modulation frequency: -
H: Multisim - how to view Op-Amp Voltage Saturation multisim-print Hello! I am learning electronics in university and need to get the Voltage Saturation for this Amp-Op circuit (it might be easy but I don't know how to do it...), the print above also has the DC Sweep graph. If you need more info I'll give it, sorry if the question is not very good, it's my first electronics question! Thanks for the help! AI: Did you want to duplicate this spec?
H: Danger from NOT connecting cables We have a new LED roof-lamp at our home and I ordered a matching dimmer-switch to replace one switch in a 3-way-switching. To have matching wall-elements, I also ordered a replacement for a normal toggle-switch (for another roof-lamp) and a normal power-outlet in the same "wall-group". I was able to replace the topmost toggle-switch without any problems, but when I wanted to replace the 3-way-switching switch in the middle with the dimmer, I got stuck because there were four cables instead of three as indicated in the dimmer instructions circuit-diagram. I know when to better stop, so I will not temper around with the installation and let the rest be a job for the electrician. However, since I turnred off electricity for the room circuit, I wanted to at least connect the old switches again and have everything work as usual in the meantime. I failed (and I honestly don't know where), since the GFCI kicked in. My question now is: Until an electrician installes everyhing correctly it might take some days or weeks - is it okay to have all cables loose and unconnected (with the ends protected against touching, off course) in the meantime? Or is there any danger from NOT connecting cables? I would like to use the other wall-outlets and lights in the room that are not directly related to this wall-group. Thanks in advance for your support! AI: "Until an electrician installes everyhing correctly it might take some days or weeks - is it okay to have all cables loose and unconnected (with the ends protected against touching, off course) in the meantime?" "Or is there any danger from NOT connecting cables?" At least one of the four wires you describe will be "live" and (literally) have the potential cause injury or death through shock and/or fire. Please make sure that you do indeed insulate each end away from others and anything conductive that may come into the box. Otherwise, as long as the wires are as you describe, they should be electrically safe until the electrician gets there. One thing, not safety related, household fixture LED's usually come as "dimmable" and "non-dimmable. You may want to double check to make sure this is a dimmable LED, as they use a duty cycle to quickly flash short or long durations to give the appearance of dim or bright light.
H: Why does a buffer op-amp need two feedback paths? I am designing a linear voltage source. I have a precision volatge reference (REF5050 by TI), and before I do anything with its output I buffer it. However, the datasheet of the amplifier I use (OPA197) suggests the following: This brings up the question - why are there 2 feedback paths and why is the isolation resistance needed? A unity gain opamp should have only 1 feedback path, as I understand. Thanks in advance! AI: The op-amp is a real op-amp with output resistance, so heavily loading the output with a capacitor will add phase shift which will reduce the phase margin. Most op-amps will oscillate like a banshee with much, much less than 10uF on the output (sometimes less than 1nF is enough). The isolation resistance allows the AC feedback to be separated from the DC feedback so you get a voltage across the capacitor that is eventually very close to the input voltage, despite loading, whilst the circuit remains stable. If you don't care about small slow changes due to loading, you can eliminate the DC feedback path and just put the resistor in series with the capacitor on a voltage follower. With many op-amps, especially low power types, the resistor will have to be higher than 37 ohms, maybe 100 ohms to 1000 ohms.
H: Calculating Fuse Size A time lapse camera rig I'm, working on needs an appropriate fuse. The camera will be powered by a 12 volt deep cycle marine battery. The instructables that I'm using to build this rig is found here. The camera I'm using is the same as in the instrutables: 8 V, with an unknown wattage. I bought a dumby battery that had a 120 V AC to 7.5 V DC converter inline. I swapped the AC to DC converter out for a Drok 12V DC to 7.5V DC/ 3A Max converter rated at 22.5 watts. In the inscrutables, they call for a 20 A fuse. Without knowing how to do the mathematics, this number feels way to high and would likely not blow before it wreck electronics within the camera. I'm I correct in thinking this? If someone could show me the calculations for an appropriate fuse size, and/or tell me why this rig would need a fuse in the first place, that would be awesome. AI: A first-order approximation would be: \${22.5\text{W} \over 0.7} \approx 32\text{W}\$ \${32\text{W} \over 12\text{V}} \approx 2.67\text{A}\$ So a 3A fuse should suffice. ... would likely not blow before it wreck electronics within the camera. That's not actually what the fuse is for. The fuse breaks the circuit in case something is already wrong with the camera or converter in order to prevent more damage from occurring. In all honesty you could probably get away with an even lower fuse value, but you would need to use a logging (or at least high-refresh-rate) ammeter in order to find out how much current is actually being used by the converter and camera during normal use.
H: How do I get the PIR sensor to output more than 3.3v? I have a setup where I have a 12V source and a PIR sensor like the one pictured (below) and some LED strips that are rated at 12V that I've mounted under the stair railings. The problem I've hit is that the pir sensor only outputs 3.3V when triggered. In extreme simplicity (and horror) here's the setup I have: The sensor - Here's the details page about it. The infrared sensor operates on a voltage range from 5-20v, but only outputs 3.3V when triggered. The LED strips I have are rated at 12V (though I have tested them to work as low as 7.6V). By searching around I've gathered that I need to turn up the voltage somehow or get more voltage running through the sensor. I've tried various step-up modules (this is one of them), but most require at least 3.5V and above to work correctly. Is there a way to have the sensor output more than 3.3V when triggered or some other way to make this setup work? PS: I'm not an electrician, so I appreciate layman terms. I do understand logic though. PS2: I've read this question, but didn't quite get what the accepted answer suggested. AI: The PIR sensor output is a signal. It is not intended to drive LEDs directly. Fortunately we have such things as transistors that can switch LEDs on and off in response to a signal like what the PIR sensor puts out. This simplest is to use a N channel MOSFET as a low side switch. At the low voltage of 12 V, these are available that can be turned on/off quite nicely from either 0 V or 3.3 V. The IRLML2502 is one example. Drive the gate of the transistor directly from the 0-3.3 V digital output, the source to ground, and the LED string goes between the drain and the 12 V supply.
H: Clock termination considerations, single clock driving multiple loads In the following example, a single clock is driving two loads. The traces to the loads have different lengths (10mm and 30mm). It is not feasible to make the individual routing lengths equal. Clock specification: Frequency: 25Mhz, Output: HCMOS, Current: +/-24mA, Load: 15pF, Rise/Fall Time: 3ns What would be the best approach for the clock termination in this case? option 1. series termination simulate this circuit – Schematic created using CircuitLab option 2. parallel termination simulate this circuit AI: The best way is to run one long trace and locate each of the loads as close to the trace as possible: simulate this circuit – Schematic created using CircuitLab Keep the stubs to the intermediate loads as short as possible. HCMOS isn't really designed for resistive termination, so you could even possibly leave the termination off altogether. In that case it might be helpful to add a series resistance to the driver to limit the signal rise and fall times. If you do need far end termination, then for HCMOS you'll prefer a split termination like I've shown. It would be even better to design the trace for higher characteristic impedance (85 or 100 ohms are common choices) and increase the termination resistance to match. You do not want to use matched source series termination for this case, because this method relies on the reflected wave to bring the voltage on the line to the full logic level. This means that the intermediate loads along the line will potentially see an initial edge transition about halfway up or down, then "the rest of the edge" appear a few nanoseconds later. This can cause some dramatic jitter when the first part of the edge gets to an indeterminate logic level. 10 ohms or so in series with the driver output, though, may be helpful for reducing edge rate, and thus reducing high harmonic content in the signal.
H: Selecting Voltage Divider Resistor and OpAmp For Temp Sensing With NTC Thermistor I've been doing some reading on here about measuring temperature with NTC thermistors and using the Steinhart-Hart Equation. However I am still a bit confused about the selection of a resistor to put in a voltage divider with the thermistor. Should I select a resistor value that is the same as the thermistor's resistance at the centre of my range of interest (200F) to maximise the sensitivity? Also do I need an opamp or inamp to remove any noise common to both thermistor leads as the thermistor probe will be in an espresso machine boiler, so I expect some mains and switching noise ? If I use a precision voltage reference for the thermistor, my current understanding is that I must use that same voltage for the ADC, is this correct? AI: Probably you should use the mid-range-interest resistance. The exception might be if you were willing to give up some actual performance to make the temperature display look better at room temperature, with a low-resolution ADC. Noise can be mitigated with a simple RC filter - temperature is a slow variable. Reference voltage is preferably the same as the ADC but really a thermistor typically changes around -5%/degree C so any "reasonably stable" reference will give you acceptable performance for your particular application.
H: Designing Switching Circuit for Raspberry Pi 3 Project I'm working on a simple RPi project wherein I can control my garage door with my phone via Tasker. I am using an RPi to connect to my wifi network and power on a remote garage door opener. My current setup is to short out the button on the remote and use the RPi's GPIO pins to supply power to the remote (wired up to the battery terminals) when I want to activate the remote signal. This generally works, but after not being used for a short while (overnight or less) it takes two activations to operate properly, making me suspect that the capacitors are losing charge when the device is unpowered. So I need to make it more complex and traditional, continuously powering the remote via a 3.3 VDC pin from the RPi, and using a switching circuit to make the button connection. I can easily purchase purpose-built switches for the RPi, but I would like for this to be a fun learning experience, not just a functional final product. Also, I would like to purchase my parts locally from a specific store (in links below). The remote switch has ~2.85 VDC around it when active. I would have needed to desolder it to see what the current through it would be when active, so I don't know exactly how to spec out a relay. For what it's worth, the current through the battery is 3.2 mA when active. I does not seem that I can operate a relay directly from the RPi's 3.3 V GPIO pins, since I cannot find any relays with 3.3 V (or lower) coil voltages, so I need to use a 5 V relay. I found a cheap relay that seems appropriate, but I cannot find a datasheet for it, so I'm thinking about this relay instead, even though it is probably overkill. The datasheet I found isn't for the exact model number, but I think it's basically the same. It seems to have a ~140 Ohm coil resistance, so at 5 V it would require 36 mA of current. Of course, I will now need a transistor, so I think an NPN would be best to make sure my system is not "active" during boot. But I'm not sure what specs to look for. This transistor [(PREVIOUSDOMAIN)/commerce/catalog/product.jsp?product_id=13754&czuid=1481073107852] has the lowest rated current, so I'm guessing that's the current needed at the base? Not sure about the gain or if the voltages matter, or if I need a resistor in line with it. The relay will push 36 mA of current between the collector and emitter, and the RPi will push 5 mA (assuming I'm looking at it right), so does that make it ok? V_CE will be less than V_BE, so I don't know if that's an issue... And I know I should include a flyback diode, so I'll try to figure out that part once I know the rest makes sense. Thank you to anyone who can help me evaluate my project! AI: Few points. A switch is a short between two points. To measure current through a switch, just place the multimeter in parallel. The multimeter will act like the switch making it active. In most cases. No need to desolder the switch. Plenty of 3.3V relays out there. But you never want to power a relay directly from a GPIO anyway. You know the ICE that you need (35mA), and the max current of the RPI (16mA). So any transistor with a IBE * hFE that is equal or higher to your ICE will work. In this case, any common "jellybean" transistor like the 2n3904 or 2n2222 will work. Don't forget the base resistor. But it's pointless. You can just as easily use the transistor to directly control the switch. Place the C-E across the switch and your done. No relay needed. If the button is active high, a PNP would work instead, with reversed logic (gpio low enables the transistor).
H: Why is root mean square used when calculating average power, and not simply the average of voltage/current? $$P = I_{\text{eff}}^2 \times R$$ where \$I_{\text{eff}}\$ is the effective current. For power to be average \$I\$ must be average current, so I am surmising that the effective current is the average current. In that case, why is \$I_{\text{eff}}\$ not simply $$I_{\text{eff}} = \frac{1}{t}\int_{0}^{t} |i|dt$$ Instead it is defined like so: $$I_{\text{eff}} = \sqrt{\frac{1}{t}\int_{0}^{t} i^2dt}$$ Thus, using these two expressions to calculate \$P\$ results in different answers. Why is this so? It makes no sense to me. I can only guess that I am misinterpreting the effective current is the average current. If this is not the case, however, I do not see how \$P\$ can be the average power when \$I_{\text{eff}}\$ is not the average current. AI: Take a simple example where the sums are trivial. I have a voltage that is on 50% of the time and off 50% of the time. It is 10V when it is on. The average voltage is thus 5V. If I connect a resistor of 1 ohm across it, it will dissipate 100W when it is on and 0W when it is off. The average power is thus 50W. Now leave the voltage on all the time but make it 5V. Average voltage is still 5V, but the average power is only 25W. Oops. Or suppose I have the voltage only on 10% of the time, but it is 50V. The average voltage is 5V again, but the power is 2500W when on, and 0W when off, so 250W average. In reality to calculate power in general you have to integrate (instantaneous voltage) * (instantaneous current) over a period of the waveform to get the average (or from 0 to some time t as in your example to find the power over some interval). If (and it's a big if) the load is a fixed resistor R you can say that v= i*R, so instantaneous power is i^2 * R and so then you can integrate i^2 over the period to get the "RMS current", and multiply by R later (since it's fixed it doesn't enter into the integral). RMS current is not particularly useful if the load is something nonlinear like a diode. It can be useful in analyzing losses in something like a capacitor with a given ESR. The losses (and resulting heating effect which shortens the capacitor life) will be proportional to the RMS current, not the average.
H: How to convert mm to xy coordiantes in pcb xy files i have few pcb gerber projects which come along xy files in txt/xlsx format , these xy files have x y values in mm/inches/mils for every element on the board. am developing gerber editor for gerber files which will search for elements on that baord. what i have done. -> Gerber layer files are loaded by user -> Gerber layer files are rendered to 600 DPI image. -> User load xy file like: :: http://pastebin.com/nLpDBbES or http://pastebin.com/XMXS0gxg -> then with Jquery user can goto any xy coordinates on that image. so problem is am unable to convert correctly these xy values which are in mm/mils format to xy coordinates for windows web browsers although for one project which have xy file : http://pastebin.com/nLpDBbES i setuped some alogo to convert is xy value from mm to coordinates worked however its not working on other projects, so what i did is take mm x y values and multiply 12 with it and then would just flip value because xy coordinate system in web browsers would start from top left corner however in real life positive xy occur in first Quadrant which will be left bottom corner. ... the project final rendering dimension was 1350x1107 : https://i.stack.imgur.com/qIwcg.png so any PCB industry expert have worked with it , help will be appreciated . thanks AI: The positive axes of an image coordinate system point right and down, while they point right and up in gerber, as you already wrote. And an image has its origin in the upper left, while gerber also allows negative coordinates. I.e. the origin can be everywhere. Even worse, you typically know the width and height of an image, while a gerber file does not contain any information about the lowest and highest values in x and y. For example, this is a gerber file of two rectangles drawn in EAGLE, one right and above the origin, the other left and below: G01* X000000Y000000D02* D10* X000500Y001000D02* ### draw first rectangle ### X000500Y002000D01* X001500Y002000D01* X001500Y001000D01* X000500Y001000D01* X-001000Y-001000D02* ### draw second rectangle with negative coords ### X-001000Y-002000D01* X-002000Y-002000D01* X-002000Y-001000D01* X-001000Y-001000D01* X000000Y000000D02* M02* Your very first step is to find out the gerber coordinate range displayed in your image, or at least the lowest values for x and y. This can be tricky, since for example coordinates can be given relative to the last coordinate. Once you have the lowest values \$x_{low}\$ and \$y_{low}\$, you can convert given xy-coodinates to pixel coordinates: $$x_{pix}=(x-x_{low})\cdot U\cdot 600dpi$$ $$y_{pix}=ImageHeight - (y-y_{low})\cdot U\cdot 600dpi$$ \$U\$ is the unit conversion factor to inch, i.e. 0.001 if the gerber file uses mills, and 0.0393701 if it uses mm. This of course assumes that the xy-values in your table are given in the gerber file coordinate system. EDIT, after looking at your gerber files from the comments: Here is a screenshot of your "game controller" PCB, drawn with gerbv: The lower left corner of the boundary is somewhere at 1951/2900, far away from the origin! The coordinates displayed at the bottom are the coordinates of my mouse, pointing to the center of C18. They match well with the coordinates 2865/4040 from the pick'n'place file. It's obvious that you have to adjust the coordinates of the parts to the offset. You also have added an image of the board, which is not 600 dpi (at 1.25" board size, it must be about 750px wide). Your image is rotated by 180°, which makes sense for the readability of the labels. But that's not what's in the file, and my formula have to be altered for this. And the picture reveals that there are some pixels extra margin around the entire PCB, so the yellow lines don't touch the border. This has to be taken into account, too. You added an other board, the "Nyx PCB". This one has the same orientation as my gerbv, making sense again. This board also has offsets in x and y, though they're quite tiny. And the image also has a border.
H: Can closed metal box work as a wave-guide for wireless transmitter? I am using NRF24L01 and ZigBee modules for wireless communication. I kept the modules in the tapered closed aluminum cylinder for sensor data transmission. The signal was being received when the module was placed at some specific positions (closed to the center). It stopped/slowed down the transmission when it was at other locations. Does this mean it is working as a waveguide? AI: It at least means it's working as a cavity. There are three easy to describe regimes that a closed metal box may work in, when there's an RF field inside (and a few more that aren't so simple). a) Waveguide, or single mode The two small dimensions of a tube are comparable to half the wavelength. EM waves will propagate with low loss along the long dimension. Commercial waveguides are designed with sizes to be used for specific frequencies so that only one mode propagates. This is important, as different modes travel at different speeds. (You can use multi-mode waveguide, but it's a specialist application and tricky to use.) b) Large cavity, or multimode At least two box dimensions are larger than half a wavelength. Many modes are possible, and you can't easily predict which mode most energy is going to be in, especially if there are things in the box disturbing the field. This is the microwave oven regime, where food hot-spots and cold-spots are more or less unpredictable with food position. Note that industrial RF heating usually uses a single mode cavity, where the heating occurs in a predictable position. c) Small cavity, or evanescent The two small dimensions are less than a small fraction of a wavelength. Energy does not propagate as EM fields, but can couple as electric fields with strong attenuation. This is the regime used for the shield round a high gain IF amplifier for instance, where the isolation from the high gain output back to the input must be strongly attenuated to avoid it picking up its own output. It sounds like you're in the multimode regime, where detailed changes to positions move you in and out of signal nulls.
H: strange symbol on a green capacitor!! what's it? I have plenty amount of capacitor with a strange symbol on them. I tried google but I could not decode those capacitors. that symbol looks chinese but like english alphabet "H". I need help AI: Judging by the size of the capacitor and the markings I'm willing to bet it's a 0.1uF, 100V capacitor. The K is a tolerance code designating +/-10%. I expect the funky character on the left is a manufacturer logo, probably from some Chinese factory.
H: led lights resistor I recently installed an H7 Led Headlight kit 12V/25W in place of a standard halogen 55w bulb. Lights are great, but they flash periodically during can-bus Cold/Warm checks to see if a bulb is out. I was advised to install a 55Watt 6Ω Resistor that will prevent the LEDs from flickering during checks, but work normally when switched on. Now from my basic electronic knowledge I calculated using Ohm's-law the resistor needed as: for the halo I1 = 55W / 12V = 4.58A and and the LEDs I2 = 25W / 12V = 2.08A so the difference of 30W is 2.5Amps that translates into: R = V/I = 12 / 2.5 = 4.8 Ω My question is (provided my calculations are correct :P) will the 6 Ω resistance cut off light output from the LEDs or was it indeed correctly recommended or I should look for a ~5 Ohm ? AI: The LED light has some electronics in it and that confuses the headlight-OK-current detector. The resistor sets a certain minimum current to fool that detector. That 6 ohm resistor will actually conduct 12 V/6 ohm = 2 A and dissipate 12 V * 2 A = 24 W, so not 55 W ! It depends on your car's headlight-OK-detection-current if that 6 ohm will do the job. It could be that 1 A through a resistor is already enough, then you could use a 12 ohm resistor. But it can also be that it needs that suggested 6 ohm. I doubt if going as low as 4.8 ohm is really needed, that also wastes a lot of power. The thing to do is to try it out and see what works.
H: TVS diode before or behind resistor The best way to protect AVR pin for me is RC filter and TVS diode but I don't know one thing. I've seen schematics where TVS diode was before RC filter like in first schematics. simulate this circuit – Schematic created using CircuitLab But before resistor it is larger current so TVS diode will blow faster than in situation that TVS diode would be behind RC like in second schematics. simulate this circuit Question is: Which way of protecting AVR input is better, first or second? AI: You have three components there that are all there for protecting the AVR, but all are doing a different job. The resistor is there to stop steady state high voltages. The capacitor is to remove ripple/RF/slow transients. The TVS is to suppress fast transients. In order to get the best out of your protection, you need to have the shortest (lowest inductance) path back for the fast transient impulses (such as ESD). To do this, you fit the TVS (the fastest responding device) as close to the input to the board as possible. The capacitor would then be a bit further in (depending on the layout and design) and the resistor (which only deals with very slow, or steady state situations) can pretty much be on the pin of the AVR EDIT: As some of the other answeres have added, you can use diodes (mainly Zener diodes) to clamp the voltage of the signal rail. The important difference between Zener diodes and TVS diodes is the speed of reaction and power dissipation: a Zener will clamp the voltage at steady states, but will not catch the quick spikes from ESD or similar events. A TVS will react quickly and catch the spike, but is not designed to handle a continued over voltage event.
H: Switching power between LEDs with common ground For light our light filter we need to have RGB LEDs that are controlled via 50% duty cycle 1kHz square wave from arduino micro controller. Since there are 4 RGB LEDs connected in parallel they draw a lot of current that is given by an external source. We decided to try controlling switching on and off with a mosfet to have 0 current from controller. The issue is that all of the 3 colors share same ground, so whenever one of the mosfets "opens" they all turn on, while we would want only, for example, RED to light up on all 4 RGB LEDs. If we try to position mosfet before the LED then we are able to select which LED to light up, however the current is significanly smaller (from 20mA drop to 3mA). And also flunctuating Vgs. For the circuit on the picture Vcc is connected to resistors and is 5V or 7.4V (we can power it from 2 different batteries), Voltage at gate is 5V, Source connected to ground. There are 3 Mosfets corresponding to each color. Voltage drop across RED is 1.9V, Green and blue 3.3V The question is what would you suggest as the most elegant and simple way of being able to controll LEDs independently and is it possible at all if the LED shares the same ground. AI: If excessive current waste isn't an issue then using an N channel MOSFET to shunt away current from it's respective LED is fine. It's easier to drive this way rather than use a P channel MOSFET and (say) a bipolar transistor to control current into the LED. It's also more effective than using an N channel MOSFET as a source follower because you won't get full brightness unless you could raise the gate voltage a lot higher.
H: RS Flipflop Truthtable for Q=1 and Q* = 0 I am studying Computer Science and I am very confused. Let us say our Q is 1 and our Q* (Negation of Q) is 0. So when we go for R = 1 and S = 0, why isn't the value of Q* = 0? I mean the NOR Gate for Q gives us Q = 0, which makes sense for me. But why is this value taken for the input of the NOR Gate for Q* instead of the earlier saved one (which was our 1). How is it accomplished? Shouldn't be the NOR Gate for Q as fast as the NOR Gate for Q*? AI: So when we go for R = 1 and S = 0, why isn't the value of Q* = 0? I just don't get it. When R = 1, it forces Q to be 0 (iirespective of nQ) and that puts a zero as an input on the other NOR gate. With S being zero on the other NOR gate input, nQ has to be 1. That's how it works.
H: Voltage Supply Circuit I am trying to supply my circuit from this part. I have two different supplies which are VUSB_5V and VORG_5V. My aim is when one of two comes to circuit, this supply does not go to other one or effect it to prevent a dangerous situation. If both supplies are available, the bigger one should become to VCC_5V. For this reason, i put tho didodes. However, when i supply one of these only with 5V, i am measuring approximately 5V at the other's while there is a diode before it. For example, if there is only VUSB_5V is supplying, i measure voltage of C17 is 4.9V. I observed another interesting thing that when i am measuring voltage with multimeter, voltage is increasing at TP9 until 4.9V. Voltage on D1 is approximately 0.2V. I am thinking to change diodes and adding pull down before didodes. What can be the reason of this situation and how can i solve this? AI: I don't actually see a question, but all diodes have leakage current. If there's nothing connected to one of the supply inputs the leakage current will slowly charge the caps until they reach a steady state voltage close to the other supply voltage. If that's a problem, you could add some resistance before each diode. If you were to connect your other supply it's likely there would be enough impedance even when it's off so that the voltage wouldn't rise.
H: Assigning values to multiple outputs syntax problem - `,` or `;` I want to assign multiple values to signals as shown in example below. Do I separate values there by ; or ,? Example: opcode : process (OP) begin case OP is when CALL => AOp <= "000", -- am I separating right? ALS <= "0", OE <= "0", RE <= "0"; -- should the last one be a ;? .... CALL is a constant AI: They should all be semicolons: opcode : process (OP) begin case state is when CALL => AOp <= "000"; ALS <= "0"; OE <= "0"; RE <= "0"; when .... Each one is a complete assignment statement. Any number of statements can follow a when clause.
H: 4-Pin programming interface Could anybody give me a hint on how to wire a proprietary device, that uses a Nordic NRF51822 chip and only provides the following pins: {3.3V, GND, RST, CLK} to a programmer. I am pretty sure it is using SWD, but I don't know where to attach the DIO pin to. AI: nRF51822 for sure uses SWD. You can debug it with OCD + libSWD from CEDROM repo. PIN23(SWDIO/nRST) <- reset is shared with Data pin. PIN24 (SWDCLK) You need to also attach GDN and VDD. Look at the pinout in page 11 in below document. Datasheet can be found here
H: Why can I use P = I²R but not P=V²/R when calculating energy lost in a circuit? I am working through a book of problems and am confused by the answer to this one: A 12 V battery supplies 60 A for 2 seconds. The total resistance of the wires in the circuit is 0.01 Ohm. Q1. What is the total power supplied? Q2. What is the energy lost as heat in the wires? A1: Total power output = 12 * 60 * 2 = 1440 Joules. All good so far. A2: This is the answer in the book: P = I²R * t = 3600 * 0.01 * 2 = 72 Joules That's fine with me. However, if I use the equivalent equation P=V²/R ... P = V²/ R * t = 12² / 0.01 * 2 = 28,800 Joules Both of these equations are for P, so how are they giving me different answers? AI: 60A through a 0.01ohm resistance gives a 600mV drop. That is the voltage you need to use in the equation.
H: How does a PC sound card be able to detect 433 MHz signals? I have developed a radio driver that can detect sensor RF packets for a particular protocol, in 433 MHz band using a 433 MHz receiver module like this one and also similar to this one. Before I started with the software implementation, I was given a sound card to which the receiver module was connected. I connected this sound card + receiver module to my PC- USB and was able to capture and visualize the RF packets using an audio editing software known as GoldWave-Link. My question is: How is it possible for a sound card to detect 433 MHz RF signals, whats the principle behind it? Another question is, on a PC sound card hardware, how do I figure out which points is the Vcc, GND and data input?. For a sound card like this one here AI: How is it possible for a sound card to detect 433 MHz RF signals? A PC sound card CANNOT detect much above 20KHz. It most certainly cannot detect anything at 100s of MHz. whats the principle behind it? A "receiver" is a device that detects the Radio Frequency signals and converts it into an audio signal that your sound card can detect. on a PC sound card hardware, how do I figure out which points is the Vcc, GND and data input? You linked to a USB audio "card". The gadget uses standard USB for power, ground, and serial data in both directions. How USB works is well documented and you should have no problem learning about USB.
H: How to calculate the time that a piece of wire can last before it melts when constant current is applied How to calculate the time that a piece of wire can last before it melts when constant current is applied? Assume it has a fixed cross-sectional area, I know longer the wire quicker it will melt, but whats the math to calculate the exact time based on different wire length? Thanks. AI: It's a complicated problem. An exact solution needs lots of details. Approximate solutions can be done by making some sweeping assumptions. Wikipedia (AWG) has tables for rated 'current carrying' and 'fusing' for various wire sizes. Of course, they are very approximate and depend on the details. The first is whether heating is fast, slow or intermediate With Fast heating, no heat is lost from the wire during heating. We assume there's no cooling by convection, no conduction along the wire to the terminals, no loss to radiation. As the heating period becomes shorter, this becomes a better approximation. This is the adiabatic regime. Only heat capacity is relevant, not the length of wire. In the adiabatic case, the \$I^2t\$ to fusing stays constant, see if you can demonstrate why. The fast fusing current is estimated with this approximation. With Slow heating, the wire comes to equilibrium between heat input and conduction to the terminals, convection to the air, and radiation cooling. Only thermal losses are relevant, you can simply equate heat input to losses, and then work out what heat input is required at the temperature of melting point. Assumptions have to be made about the length of wire and the heat-sinking ability of the terminals, and its environment. The slow fusing current is estimated with this approximation. Obviously with intermediate rate heating, you have to take account of both thermal capacity and losses. With constant current, the amount of heat going into the wire varies as the wire resistance. For copper, at room temperature, the resistance increases 10% for 25C increase. I don't have in my head how much the resistance increases between room temperature and melting point, it's not just a linear extrapolation of the room temperature behaviour, but it does continue to increase. It's fairly easy to obtain, from Kaye and Laby online for instance, tables of melting points, thermal capacities, thermal conductivities and resistances at various temperatures. In the fully detailed case, you would take a timestep, work out the heat depositied, and the heat lost, work out the temperature rise, and with the new resistance do the next time step. The most difficult factors to obtain accurately would be the convection. A good simple one to compute first is therefore the adiabatic case. As a first approximate cut, assume constant resistance and constant heat capacity, take some average for both at some intermediate temperature, which is simple enough to be written down on the back of an envelope. Compare that result with the wikipedia figures to make sure you have the right powers of 10. Then do a simulation letting resistance, thermal capacity, or both, vary with temperature. Compare that result with your back of envelope, to make sure you're in the right ballpark. Thus practiced, you can try more realistic simulations. Once you've done a few simulations with varying details, I suspect you'll just use the wikipedia figures, with the knowledge that they are very approximate, but close enough.
H: Strange op-amp circuit using LM324 I built a simple op-amp circuit using LM324 (SO-14 package). The structure of the circuit is shown below and Vout = 1.65 + 3.3*Vi. I first used 3.3V single power supply as Vcc and applied a signal 0.125+0.125*sin(t) to Vi. The Vout was suppose to be 2.0625 + 0.4125*sin(t). However, the actual output was capped at about 2.0V and only the lower half of sin(t) was correct. Assuming VCC might not be high enough, I changed VCC to 5V and this time, Vout was correct as full sin wave with offset at about 2.0V. Since the LM324 datasheet says it supports single power supply from 3V to 30V, how come the Vout was capped at about 2.0V when VCC was 3.3V? All resistors are in kilo ohms and I think there shouldn't be any current driving capability issue. AI: The output of your opamp is not rail to rail. Checkout the datasheet, first page: Large Output Voltage Swing 0 V to V+ − 1.5 V If you have a look at the schematic you see a darlington high side output stage, Q5 and Q6, in series with a short circuit protection resistor, Rsc. Since the base of Q5 can't be higher than 3V, if the transistors are in the linear region you get two Vbe drops to the top of Rsc, which is about 1.4V, then the drop on Rsc, depending on the load current. You were lucky to get up to 2V, actually, and the transistors were barely on.The minimum output current is 20mA, try to add a 100Ohm resistor as load and see what happens.
H: How do loose connections cause overheating, arcing and start a fires? I am confused as to how a conductor can became overheated when it's connection to the circuit is unintentionally loosened. A loose connection will cause the resistance to increase and decrease the current. Why does the temperature increase if the current decreases? Is my understanding wrong? I have a hypothesis that is it because of the reduction in the contacting surface area that causes a potential difference at the surface. Since there is a voltage drop across the contacting surface it will seem like a load to the power source and will consume power. Which means that it will transform electrical energy to heat energy. Am I right? I understand why an arc is produced at the moment when a connection is opened. It is because of the ionization of air particle by the large electric-field when the resistance is not high enough to break the circuit. My question is whether this arc will produce heat or not? If yes, then why? Is it because of the ionization process itself? How does this process take place? I am weak in atomic theory, can anyone explain to me the energy flow when ionization occurs? AI: A loose connection causes a local increase in resistance. While the current will decrease, don't assume it will decrease much. For instance if you have 240v driving 12A through a 20ohm kettle, then one extra ohm in series will result in a new current that is still more than 11 amps. The local heating will be given by \$I^2R\$, or 11*11*1 = 121 watts. Where the previous 2880 watts was being dissipated in the nicely water-cooled bulk of the kettle element, this shift of 121 watts into the loose contact is being dissipated in the tiny 1mm3 region of the loose contact surfaces, and will cause rapid and catastrophic heating. An arc is basically a resistor, as far as power dissipation is concerned. It's the collisions between ions and free electrons, and their impacts into the contacts, that lose energy.
H: Voltage divider types question I have been studying different schematics ive found online to try to get a better understandment on the subject. Recently I came a voltage divider across that consisted of a transistor and a resistor, it looked something like this. I am only familiar with a voltage divider that consists of two resistors where you can apply the voltage divider formula to know the output voltage. I'm really curious to know whats's the difference in functionality between these two options? Why would you use one type and not the other one? What effect does the transistor have? Thanks! AI: Basically, the transistor here makes a regulator out of your usual voltage divider. The problem with voltage dividers is that, if you draw current from them, their voltage output drops down (because the load will act as if there was another resistor in parallel with the bottom resistor of the divider). And their output voltage value will therefore largely depend on the load current, which can fluctuate. Now, with the transistor here, the voltage at the output will be about the voltage at the transistor base minus VBE (about 0.6V). Moreover, the current flowing through the base (so the current flowing out of the divider) will be much less (beta ratio) than the current flowing through the load. Which means that the current drawn from the divider will be much less dependent on the current through the load, so the voltage at the base will be more or less constant. So, overall, the voltage output will be much more stable. It still doesn't make a very good regulator, however. There will still be some voltage drop depending on the load current, and, if the input voltage changes, the output will change too. But it can be sufficient in some applications.
H: BGA decoupling capacitors placement I am trying to figure something apparently basic and I hope somebody might give me an advice. The IC I am working with is XC6SLX25. It has 6 different power regions -- Vccint, Vccaux and Vcc for each of the four banks. Xilinx provides a PCB design guide (UG393) where they specify the number and type of decoupling capacitors per each power region but still I am not sure how to connect them to all the pins. For example the guide states that one 100 uF, one 4.7 uF and two 0.47uF capacitors should be connected to the power pins of Bank 1. According to this guide 100 uF capacitor could be placed almost anywhere near the IC, 4.7 uF should be placed within 2 inches of the outer edge and 0.47 uF should be preferably placed on PCB backside. As it can be seen on the attached pictures there are 6 power pins and 6 GND pins located on Bank 1. My questing is this -- what is the correct way to connect these four capacitors to the six pairs of pins? Should each type of a capacitor be connected to each pair of pins and if so how should the capacitors be interconnected? AI: All the ground balls go down to the ground plane by means of local vias, and all the power pins on any given rail go down to a power plane region on the appropriate rail, then you place the caps as per the note and connect them to the appropriate places. Probably the small caps go on the back under the appropriate power plane region and just via thru to the plane and ground (Two vias per cap terminal are better then one when you can fit them).
H: How is this small drone able to transmit video to such long distances? And that too an HD video? I am an amateur enthusiast and a novice, thus please bear with me. I was having the look at the http://www.proxdynamics.com/products/pd-100-black-hornet-prs drone. It weighs 18 grams and is able to transmit HD quality videos for up to 25 minutes. From the looks of it the maximum size batter it can contain is 500mAh. With such a small battery, even if we ignore the energy requirements of other sub-systems, how can it capture, encode (in 720p, H.264 format), and transmit the video even theoretically. What sort of physical encoders can encode such a video, and the transmitters can transmit such a high quality digital video over such a long range (requiring so much bandwidth). I cannot make any sense of it (even theoretically) of such components with such energy requirements. Could someone please be kind enough to point out, what might be going on that i am missing? AI: I don't see why not. First find a suitable low power encoder IC: https://www.fujitsu.com/downloads/EDG/binary/pdf/find/27-2e/2.pdf will do Full HD at 500mW, so assume 1/4 that for 720p/30. Squash the bitrate down to 1.5Mbps then there are all sorts of radio systems which will do that easily at low power. The distance is higher than normal but may be achieved with a directional antenna or (because this is military) use of other bands and the 2.4GHz everyone else is squashed into. 1.6km (or "a mile") is easily achievable by a mobile phone to its base station. I am still unsure why a pair would cost $40,000. That's a separate issue. Probably because they're made to military standards, including reliability and traceability, and in small quantities. There are lots of toy drone + video systems that are much cheaper.
H: How to correctly configure deepsleep for STM32L0xx I'm trying to configure my Nucleo Board with a STM32L073RZ in deepsleep mode to get the lowest power consumption. To do that I use the mbed librairies with the deepsleep() function (This function use Stop mode with RTC). On the application note given by STMicroelectronics the consumption is around 1µA in Stop mode with RTC but on my board I have 4,2µA. This is my script int main() { User_Setup(); RTCHandle.Instance = RTC; //Create and launch the RTC date (08:30:00 08/12/16) RTC_DATE_TIME(0x16, RTC_MONTH_FEBRUARY, 0x8, RTC_WEEKDAY_TUESDAY, 0x9, 0x50, 0x00, RTC_HOURFORMAT12_AM); RTC_AlarmConfig(); while(1) { deepsleep(); //Display the time after a wakeup RTC_TimeShow(); wait(1); } } How can I correctly configure my STM32 to get the lowest consumption ? Thank you for your attention Simon NOWAK AI: In addition to dim's answer, which would indicate that you might try manually turning off peripherals before going into deep sleep (I don't know if this is handled by deep sleep all by itself) to see if this reduces your sleep current, you need to absolutely pore through the schematics for the Nucleo Board to see if there might be pull-ups, LED's, etc, that might be sucking up current. I haven't used the Nucleo, but on some ST boards, there are jumpers (solder and otherwise) that you might need to deal with. A dev board can be very useful, but it probably isn't your best platform to test low-current systems. You should also configure all your I/O's to be high-Z before sleep.
H: How to calculate baud rate and determine the number of stop bits in asynchronous serial Below is the given question: For my understanding, 1/baud_rate = 104.16 However, when I tried to do reverse division, the result is so different than expected. My calculation to find baud rate: 1/104.16 =9.6006 * 10^-3 Is my calculation of baud rate wrong? 2.How do I determine the number of stop bits in this case? AI: Baud rate is \$\dfrac{1}{104.16\times 10^{-6}}\$ = 9600.6 bits per second. How do I determine the number of stop bits in this case? It looks like 2 stop bits on the example you give but it could also be regarded as 1 stop bit and an indeterminate idling period.
H: How to creat a clock for a flip flop I have a project in Discrete Math and we have to apply some switching theory with it. I've had studied different type of flip flops (JK, SR, and D) and still confused about the clock component. I know flip-flops are edge triggered. But the problem is applying this to my circuit. My project is a game (Dots and Boxes specifically) which involves 12 buttons for the main game and a single button for starting a new game. The problem is I dunno how to implement this using flip flops. I do know how to implement it using latches. So, how do I make that clock component if each of the 12 buttons have a JK flip flop and the new game button as K. Should I just connect a button and the new game button to an XNOR then to a clock. Clocks isn't straightforward for me. Please link some references I can study for me to understand this stuff better. AI: Just because the input is called clock it doesn't have to be a regular clock. Do your flipflops also have an asynchronous reset input? If so the simplest solution for your situation is to tie J high and K low and use the buttons as the clocks. The reset button then connects to the reset input of all the flipflops. Failing that you need an oscillator, a crystal and an inverter, or something like a 555 to generate a constant clock pulse.
H: RJ45 jack to PCB Everyone, hello! So I'm building a PCB in my head right now, and I just wanted to quickly eliminate a thought I had in my mind. When I add a RJ45 jack connector to my PCB board, there are (depending on how the connector is build, of course (with LED or not, etc)) normally 8 PINs for the 8 wires in the cat5/6 cable. I put together this quick picture: Is this correct? Do the numbers on the RJ45 jack connector correspond with those on my cat wire? AI: Is this correct? Do the numbers on the RJ45 jack connector correspond with those on my cat wire? Not necessarily. You have to use datasheet for the connector, and create device in your EDA tool as per datasheet with proper symbol and package.
H: How would I connect very fine wire (0.005") to a PCB? Let's say I have very fine gauge wire of 0.005" (0.127 mm) diameter. This wire is completely exposed (i.e. no insulation). What are available methods for terminating this to a PCB? Searching through Digikey and Mouser, the smallest gauge terminal blocks I could find were only 30AWG. I'm thinking that there must be some type of PCB 'post' in which I could wrap the wire around to make the termination. I'm thinking something like this exists, but my searches yield no results. Any thoughts? AI: No reason you can't use a standard header pin, or a wire wrap pin, wrap it around then solder. Alternatively, a copper landing/square/point can be used. Often small gauge wire is soldered to test points for debugging or hacking purposes, and that's essentially what you'd be doing.
H: How to get LiPo battery protection circuit's function and schematic I have three single cell 500-730 mAh LiPo batteries at home. I would like to know if they have an on-cell protection circuit (I can see it in one of them, and I think the others also have it) and what this circuit exactly does. If possible I would also like a schematic of their circuits (with the name and value of each component). I tried to find that on Google, but since I was't able to find a specific datasheet and I haven't any idea of what the circuit in my batteries looks like it's really hard for me to find something useful. Where could I find the schematics of those circuits? (This is not essential for me, but I'd like to have them...) And, more important and useful, what does this kind of protection circuit do? Here is a picture of my cells, I don't have any other information about them (I bought them quite a long time ago and I don't have any receipt or something like that). AI: Obviously, these specific batteries have no public schematics, because old-style companies, specially the Conrads of the world, don't generally publicise them. In the specific case of Conrad I can easily imagine it being from fear of people finding out the design quality before purchase. Or more likely because the Chinese guy they bought it off on a street corner doesn't do datasheets. However, batteries like these are one in a billion and if something is widespread, the chips that make it possible are as well. Chips, as opposed to random LiPo's, often come with quite extensive datasheets with all kinds of examples. Here's the first link I found, happens to be TI, could have been any number of different manufacturers. Start by reading that, understanding that and trying a few others maybe and it is possible (though not guaranteed) you'll be able to look at a PCB inside a battery and determine which type of chip they used, from the components around them. Even if they are unknown controllers or their Asian knock-offs. As for knowing if it's in there, I have always been in favour of a standard marking for that, identifying both situations, but if it's not a reliable brand and it doesn't say "Protected!!!" on the wrapper/in the datasheet, you simply don't know for sure without actually looking. Side Note: Be careful when looking, knicking/damaging a cell may be harmful to you, your equipment and/or surroundings in several ways. EDIT: When editing your post a tiny bit I noticed you specifically asked for singel celled protection, these are often simpler, so I quickly found a brother-device for single cells. I'll also shortly explain in that specific case what they are normally for: Preventing over-charging of the cell. Over charging a Lithium Ion cell often causes large amounts of heating and possibly fire. Preventing under-voltage of the cell. When you take a Lithium Ion type battery below a certain voltage (the most well known types around 2.5V~2.7V) they break, so the protection turns them off around that voltage. Preventing too large a current from flowing. Many battery types don't like currents that are too high for them. Lithium Ion batteries can provide a very large amount of current, even if they really don't want to. Because Lithium is a very reactive metal it'd be extra dangerous to over-heat a Lithium battery. So they add a bit of function that measures the current in and/or out of the cell and turn off the cell for a small amount of time (between a few and a few hundred miliseconds usually) if it goes much too high. It's a sort of a smart, self-resitting fuse.
H: Average power across a resistor I am solving a problem here that asks for average power across a resistor.... the resistor is 3k and V(s) = 1.897sin(500t - 71.6)... I found 0.8 mW ....but the answer book says that it is 0.6mW ... isnt it ... (Vrms)^2 over 3k ? Vrms = 1.897/sqrt(2)? ***if A = 1.987 ... the power comes out to be 0.6mW ....I do not know if I am right or the booklet is AI: Your reasoning is correct - maybe just a calculating mistake? Pave = VRMS^2/R, and VRMS=1.897/sqrt(2) (1.897/sqrt(2))^2/3000 ans = 5.9977e-04
H: Looking for elliptical display or modular display to approximate ellipse I'm not very fluent in electrical engineering so please bear with my imagination. Requirements: Photo realistic display, touch screen, approx 7x3 feet (2.1 m x 0.9 m). Option 1: Do elliptical displays exist? Whether it be a tv or monitor or whatever. I feel that it may be possible to build such a display but there being no demand they simply are not built. Is there a company I could approach that could custom build such a display? Option 2: are there rectangular modular displays that I could interface together to approximate an ellipse? Preferably with as little separation between each display as possible to mimic a larger display. And so that the images on the 1 display can flow smoothly between all the displays? Sketch below: Inner ellipse is desired display area. Rectangle represents a normal retangular display. The 4 corners of the rectangular display can be seen sticking out from a 4 inch bezel shown here. The bezel would have to be about twice as wide to hide the corners. Which is an option but becomes a fairly large bezel. AI: The simplest and lowest cost way to get touch displays this size is to use rear projection. With curved optics and mirrors the projector depth can be quite small (1 -2 feet). There are many examples such as from Draper: http://www.draperinc.com/projectionscreens/rearscreens.aspx Microsoft's Perceptive Pixel also make rear projection touch screens this size. With the availability of 4k projectors now, you could implement a quite high resolution large touch systems. You could also build a large display of multiple edgeless touch enabled LCD monitors, but you can never quite do it without some gaps in the display. It also needs much more graphic compute power as the number of displays rises.
H: Deciphering Thin Copper and Fabric Wires in Cable I'm planning on connecting a Nintendo Wii Classic controller directly to IC2 input on a RP2 board. The controller I'd like to use is a Black Wii Classic Controller. Here's some photos of the Controller cable. I need to figure out which of the smaller cables will need to be connected. https://i.stack.imgur.com/oJjdj.jpg https://i.stack.imgur.com/q104a.jpg Which of the above cables will need to be utilized? I'm not sure what the thin (copper?) wires surrounding the coloured cables are for, or the central copper wire. My guess is it's a ground connection and the thin wires are for protection. Also not sure about the fabric wire (it's either nylon or polyester). I'll probably have to open up the controller to see what the Red, White, Yellow, and Green cable control. I don't have the controller in front of me ATM but I don't recall if it has screws on the body so I'll have to try to pry it open carefully. If anyone can give me a hand in identifying these wires that would be a big help.When I connect the colored cables can I just cut off the thin copper wires? What about the central copper wire and the fabric? AI: The fine copper wires are the shield which is spirally wrapped around the inner conductors. The pinout reference posted by @pjc50 says that the outer shield is not connected. So that apparently means you can cut the wires off. The white fibrous stuff is not conductive. It is partly for physical strength, and partly to fill in the space so that the overall profile of the wire is nice and round. Just cut it off completely. Of course be very careful not to cut any of the wires. This is not referring to the actual wire with a white insulation.
H: Convert 3.3V PWM of Beaglbone black to 5V PWM I have a Beaglebone Black revC. I want to use a brushless motor (EMAX XA2212/1400KV) with ESC (hobbywing skywalker 20) . Beaglebones Vpp voltage is 3.3V and ESC gives ( gives beep about 2 sec interval) "Throttle signal is irregular" trouble signal. I think this ESC accepts only 5V Vpp. How can fix this? How can i change 3.3V PWM to 5V PWM AI: There's lots and lots of ways to do this but will depend upon your constraints, such as switching speed, acceptable losses, etc. Something like this would work. When the GPIO is high, Q1 is on, bringing the gate of M1 low and therefore turning it on: simulate this circuit – Schematic created using CircuitLab
H: What does an ideal phase response look like for a single port SAW resonator? I've been struggling to find an example of an ideal phase response for a single port SAW resonator. In particular, I'm looking for a graph similar to this one: which shows the admittance/conductance and phase response of a BAW resonator, but for a SAW resonator. Can I expect the same type of response out of a SAW resonator as that shown in the graph above, or will it be different? Forgive me if this is a basic question, I have a textbook on SAW devices in front of me but can't for the life of me find anything about the phase response in it (or in my extensive Google searches for that matter). Any help would be greatly appreciated! AI: It seems that single-port devices like quartz crystals, ceramic resonators (including ultrasonic devices), BAW & SAW resonators all have an equivalent circuit of the same type: simulate this circuit – Schematic created using CircuitLab Co dominates at low frequency. Cm resonates with Lm at the series-resonant frequency, where Rm dominates. In your BAW graph, series-resonant frequency is approx. 6.263 MHz. Above series-resonant frequency, reactance is inductive for a small span. In your BAW graph, this inductive region spans from 6.263 - 6.272 MHz. At a frequency slightly higher than series-resonance, Cm combines with Co to yield anti-resonance (sometimes called parallel resonance). In your BAW graph, this is around 6.272 MHz. Above the anti-resonant frequency, reactance becomes capacitive, and Co dominates. So yes (to answer your question), a SAW likely has a similar progression as your BAW example. Quartz crystals have numerous spurious resonances which are often not characterized - only one dominant resonance (shown by the equivalent circuit above) is spec'd. Harmonic resonances are often not spec'd either. Some high frequency crystals are made to select 3rd, 5th, or even 7th harmonic - only the most active is spec'd. I'd expect that any piezo devices have similar spurious resonances. It is sometimes possible that spurs can dominate in some circuits, but this is quite uncommon.
H: Soldering generic AC/DC to 4 pin plug So, long story short: I'll soon have a PCB which accepts 24v 5a power input and has a 4 pin power plug of this type: And is wired like this: My question is: assuming I have a generic AC/DC adapter with the correct voltage and amperage and I cut its plug, if I were to solder its wires on the 4 pin input of the PCB, would it be fine if I soldered the positive wire to both the positive pins and the negative one to both the negative pins? If not, what would be the correct approach? AI: Yes, that is exactly how it is done. As long as you meet the required specs and properly solder on to the wires, it should work.
H: Problems with IRF520 Transistor This is the schematic for the project. I'm using an IRF520 transistor (http://www.futurlec.com/Transistors/IRF520.shtml) which goes from left to right Gate->Drain->Source. So the problem is that when gate is connected to a pin on the arduino the transistor will always be open regardless of what that pins state is but if I pull it out the transistor closes. Any help would be appreciated. imgur.com/a/dYliz EDIT: Added Schematic link AI: Based on the newest schematic, Your pull-down resistor is too strong for the Arduino's output to overcome. A 220Ω resistor pretty much guarantees issues. Try bumping it to 2.2kΩ or 22kΩ. See the two answers in Calculating the pulldown resistance for a given MOSFET's gate for more info, one math heavy, the other one more plain terms.
H: CR2450 Battery at 2.95 Volts If the open circuit voltage of a 3V CR2450 Battery is at 2.95 Volts: is it at end of life? I have a CR2032 3V that could fit in the device and I could use a nickel to compensate to fill the gap in the device: is there any foreseeable problem in doing this? Update: installed a CR2032 as a temporary measure until a CR2450 can be shipped. Seems to work well. CR2032 are 2 for $1 at the dollar store vs $7 for a CR2450 at CVS AI: For CR2450 with a capacity of >600mAh at a 0.4mA rate; If ESR is < 20 Ohms then you have at least 50% capacity left. If ESR is > 50 Ohms then there is not much life left (20%?) Use a 1K load and measure voltage before after and compute voltage drop in % and multiply percent of 1K as your ESR. Capacity drops with a load < 100*ESR and rapidly with < 50*ESR Capacity increases with load resistance up to ~1000* ESR Based on Voc=2.95V or -0.05V from 3.0V, I estimate it is at 90% SoC Using a Nickel spacer will work but obviously it will not last as long as a thicker CR2477 Lithium cell with up 1000mAh.
H: Waveform to (5V) rectangle I've found some interesting electronic projects which I wanna build, but I'll need a frequency meter for at least 1MHz. Sadly, I don't own one, but I found on the web that an Arduino UNO could do it. My problem is that AVR's and other microcontrollers like 0V-5V logic levels as inputs, so it would be nice to create an 5V rectangular wave from the input wave. I found that a simple Schmitt-trigger could do it, but sadly, I could not get one, and I'd like to use a wider voltage range than 5V. That's what I've got so far(as a plan): An opamp in peak value detector configuration, then use a voltage divider to divide it by 2. (I don't know that I can or can't use a voltage divider with opamp output. If not, use another opamp to divide it by 2) Then another opamp in comparator config, compare the original signal to (peak value)/2. I think that if I feed 5V to the comparator's Vcc, then I should have a nice 5V rectangular wave as output. Am I right? AI: Providing you want to do this as a learning exercise, then you have absolutely everything you need in the Arduino to build a frequency counter. The AtMega328 (and in fact most of the other AVR variants that include A/D capability) have an Analog Comparator built in. The comparator has two inputs (+,-), and a propagation delay of about 500 nS so it is usable out to 1 MHz. The + input can be routed (programmed) to either a 1 V reference or to the AIN0 Analog input pin. The - input can be routed to AIN1 (or any other) Analog input pin. From the ATMega328 datasheet The Analog comparator signal can be routed to an Interrupt vector, or to the T/C1 so you can implement a frequency counter with fixed (1 V) or variable (set your own voltage with a divider on AIN0 or AIN1) input threshold. If you are just starting to learn how to program the Arduino you will need to do lot's of reading to learn to program these advanced features. Its quite a task, but there is lots of reference code and help online. You should start here. Then perhaps a slow speed frequency counter as an exercise: The code here is straightforward, outputs results to the serial line and is very easy to follow and modify. If you look for code on the Arduino site about timing tasks you will find this in contributed code that answers your original question about an invertor/Schmitt trigger frontend and provides a library to use.
H: What does the radiation from an antenna look like? Just out of curiosity, I searched for antenna on Google Images, and what usually shows is something like this. So I really thought that an antenna radiates in a circular and equal pattern. But as I read the specs of an antenna and understand terms like DBI and Polarization I got more confused. So my question is, what does the signal radiating from an antenna really look like? Update For example, how can we draw this linear polarization inside this? AI: This image: Is just a drawing, it has no meaning. It does not represent the radiation pattern of an antenna in any way ! Basically all antennas radiate (and receive) the EM waves in all directions. However, depending on the design it might not radiate and receive in some direction very well but it might do so in a different direction very well. Those are the red parts in the radiation patterns below. Real Antenna radiation patterns look like this: For an isotropic radiator in this case. Or this one for a dish antenna: There are as many radiation patterns as there are antenna types. Antenna designers generally use an EM simulator, for example CST, to calculate/simulate the antenna radiation pattern of a certain antenna structure. How can we draw this linear polarization in the radiation pattern ? These radiation patterns do not show the polarization. Since the polarization is usually in the direction of the length of the antenna it also depends on how you place the antenna. Of course, the radiation pattern changes with that placement also.
H: 3-state buffer mechanism I read about the 3-state buffer. I do not precisely understand the working mechanism. It allows essentially to obtain a third state, that corresponding to the disconnection of the output from the circuit (eg. a bus). This disconnection of what exactly it consists? In what sense the corresponding Z high impedance state differs from the standard state 0 of ordinary output? Can we get a complete absence of current, when the buffer is active? If this is the case, how can that result be reached? AI: A typical output stage uses a totem-pole or push-pull configuration. For a logic 0 the lower transistor is on for a logic 1 the upper one. Now it is possible to turn off both transistors which neither drives the output high or low. The circuit is basically disconnected (high impedance, high-Z). A circuit that accomplishes that is shown below. When enabled the signal QP12 and QN12 are on the inverter formed by QP11 and QN11 can drive the output. In the disabled state QP12 and QN12 disconnect the inverter from the supply and the output is in a high impedance state regardless of the input signal.
H: Do any microcontrollers allow steering of inputs to outputs? Are there any MCUs which allow input signals to be connected (by software) to outputs? The main requirement is that should not involve sampling (either by MCU code or SCTimers) as this limits the speed of the steered signal to that of the MCU. The signals I'm looking at steering are 480Mbit USB2, which is faster than common MCUs. I suppose I'm looking for a sort of MCU with built in buffers, as such a circuit could be made from a common MCU and a couple of buffers. AI: For this purpose I would recommend the use of a USB 2.0 Multiplexer IC. Many are available, a typical one that supports 480MBit USB is the Analog Devices ADG772... http://www.mouser.com/ds/2/609/ADG772-878543.pdf Or the Texas Instruments TPS65981 http://www.ti.com/lit/gpn/tps65981 There are many others though and the price range reflects the number of features available. If you require Host or Device functionality will dictate some of the design requirements as will "OTG" and "dedicated charging". Follow the datasheets' PCB layout recommendations for whichever chip you choose.
H: Boost converter help First, the problem I am trying to solve: My objective is to create a device that will generate a constant current to a load that varies in resistance from approximately 1Kohm-40Kohm. I will be using two 6V batteries in series as my main source to create a 12V source. For the sake of this question, the current I am trying to generate is 5mA. Now, on to the boost converter: I've done a bit of reading over the last few days and the concept of a boost converter in its simplest form is rather straightforward. Most searches on the internet will yield the following image (or some variant): I thought that was simple enough. I could just input my 12V, provide the switching signal for the MOSFET and vary the duty cycle to get the desired output voltage over the load. To ensure that I maintain the correct current, I could use a set resistor in series with my load to read the voltage drop across the resistor. Then, using a simple Ohm's Law calculation, I could find out what current I'm supplying and vary the duty cycle accordingly. My next thought was to go and see if an IC existed for such a device, surely they must... This led me to a 513-NJM2360D switching regulator from Mouser. Just what I needed, a 12V input should be able to get me a 1.25-40V output. Fantastic. It looks like this thing can output up to 1.5A. Yikes, way more than I need. Oh well, surely we can reduce that for our load. I ordered 4. As it turns out, I did not do nearly enough research. Apparently that's not at all how the NJM2360D operates. Consulting the datasheet shows that a "typical application" of the device would look as follows: Of course, I was a bit bummed. I thought I was going to be able to hook this thing up and have it pumping volts out in no time. Fortunately, I was in close proximity to a supply closet. I went and grabbed the components that I could locate that matched exact values. I didn't have a 180uH inductor but I did have a 200uH so I figured that should suffice. It measured 189uH at 1kHz, close enough. After some careful breadboarding, I was able to stand back and confirm that it was all wired up. I hooked it up to a power supply and turned the knob to 14V. Then, I grabbed my multimeter and checked the output voltage. -30mV. Whaaaat? Surely there's a mistake somewhere. I couldn't find one. I tried tweaking the input voltage from 5V-20V and couldn't get much different results. Now I'm a bit back to square one, I suppose. I don't know how to go about designing and choosing the values as they did to come up with their application circuit. Likewise, that approach doesn't allow me to perform any sort of digital logic to maintain a constant output current. It seems like the fancy internal gadgetry takes care of the switching signal by itself. Any advice or tips would be greatly appreciated. I am looking for similar ways to achieve a constant current given different loads. Applications in which a microprocessor can be used are helpful because I can choose different output currents with ease (say, 6mA instead of 5mA). - Note: I attempted to link the datasheet and the device page from Mouser but was unable to do so since I don't have enough reputation. A quick google search should get you there. AI: My objective is to create a device that will generate a constant current to a load that varies in resistance from approximately 1Kohm-40Kohm OK, so far so good. For the sake of this question, the current I am trying to generate is 5mA. 5 mA through a 1 kohm load means the circuit has to supply 5 volts to the load. 5 mA through 40 kohm means 200 volts applied to the load. I've done a bit of reading over the last few days and the concept of a boost converter in its simplest form is rather straightforward. Here's where the first hurdle is arising because a boost converter can only produce an output voltage that is greater than the input supply voltage (you specified 12 volts). If your supply is 12 volts and you want a current of 5 mA through a load that can vary between 1 kohm and 40 kohm then you need a buck-boost converter; a booster won't do what you want. You could use a buck regulator to set a voltage at (say) 4 volts then use a booster to deliver 5 volts to 200 volts but that is pushing technology too far. I would strongly consider generating (say) 210 volts using a "booster" then using some form of linear regulation to deliver the required voltage for the correct current to the load. Any advice or tips would be greatly appreciated. I am looking for similar ways to achieve a constant current given different loads. The type of "booster" I would use would be a step-up flyback converter like either of these two: - So, you get a high voltage regulated DC supply and use a linear current regulator to control the current to the load. If you generate 210 volts and you need to supply 5 mA the worst case power dissipation is going to be just over 1 watt into a short circuit so you will need a small heatsink. If you can allow your load to be floating then a fairly simple constant current sink will do what you want providing you choose an output transistor that is rated at overs 210 volts (300 volts recommended): - Applications in which a microprocessor can be used are helpful because I can choose different output currents with ease (say, 6mA instead of 5mA) If you want it microprocessor controlled then you could generate a PWM output and use a low pass filter to create an analogue voltage that feeds Vset.
H: Oscilloscope to monitor AVR I'm at the point where I'm stuck on communication issue and thinking on finally getting an oscilloscope. To my beginner surprise, wasn't expecting them to be so extremely expensive, so I was looking around and found old school oscilloscope for super cheap. The guy who is selling the scope is claiming it can be used for 'Arduino' projects, but I'm a bit skeptical about monitoring binary data with this. Only thing I'm confused about is CPU MHZ vs BUS MHZ. The oscilator datasheet says The amount of CRT rays: Single beam Range of measured voltages: 20 mV - 200 The range of measured time intervals: 8 ms - 0.5 sec Bandwidth: 0 - 5.5 MHz Input channel resistance: 1 Mom Input channel capacity: 50 pF The minimum duration of the sweep: 0.2 ms / div Maximum scan duration: 10 ms / div Calibration voltage signal: 50 mV I'm worried about '5.5 MHz'. For my current problem, I need to use it to detect TWI communication problem, since the BUS runs at 100khz or 400khz, then as far as I understood I can perfectly do this. Now I don't understand what will happen if I try to measure output of the AVR pins directly (without TWI, just random blinking pins with few ms interval). Am I gonna face the following issues: If my AVR is running at 8Mhz and doesn't have any sleep between the pin outputs, this oscilloscope won't be able to pick it up? Basically I can't use this oscilloscope to monitor ports if my AVR is running at higher than 4Mhz? Thank you! EDIT: Another alternative I thought I could do is to take another ATMEGA328, enable ADC, and send the result over WIFI/Bluetooth, technically I could make a very simple oscilloscope myself, correct? The only issue 'displaying' the data, measuring it shouldn't give me any trouble, if I'm looking to measure AVR's? Thanks! AI: The bandwidth of a scope is the frequency at which the displayed signal starts to decrease relative to the actual input voltage (at a guess it's the 3dB point where the signal is halved but I've never double checked that). So if you put a 1V peak to peak signal in at 10Hz the scope will show 1V peak to peak exactly as you'd expect since you are no where near the limit. If you put in the same amplitude at 5.5MHz you'd see 0.5V. If you put in 1V peak to peak at 100MHz (way above the limit) you'd see a constant 0V (the average voltage). When looking at signals from the AVR you'd see the correct DC levels and unless they were switching very fast you would see the correct patterns however the corners would show up as being far more rounded than they really are, a 5.5MHz square wave would show up as a sine wave. Even something at 8 MHz would show up to a certain extent but I wouldn't trust the accuracy of any measurements at that point. Generally you want the scope to have a lot more bandwidth than the frequency you are working with so that you can see glitches and noise spikes but how vital that is depends on the problems you are trying to track down. However keep in mind that that scope is an old school analog system, it will be useless for picking up one off transitions or anything that isn't a constant pattern. For digital work on a budget a USB based software oscilloscope running on a PC is the best trade off of price and performance these days. Still no substitute for a good quality standalone scope but a LOT cheaper.
H: Double CMOS inverter time constant The problem involves finding the time constant for the circuit that arises when the switch is flipped to the U position. What excactly is happening here? I am having trouble visualizing what is going on with the capacitors once the flip happens. (And what about flipping it to the D position? Will the time constant change?) Thank you AI: The 5V source on the right side can be ignored. The capacitor Cp will be charged to a voltage that equals the difference between vc and the 5V source. Therefore its easier to set this voltage to zero. For this reason Cn and Cp are effectively in parallel. When the switch is moved to the U position the time constant is Rp (Cp+Cn). When the switch is flipped to the D position the time constant is Rn (Cp+Cn). Including the 5V source we can visualize the behavior as follows. Assuming vc is initially zero, the charge on Cn is zero and Cp is charged to 5V. Now the switch is moved into to U position. Cn gets charged to 5V, a current is flowing into Cn. Cp needs to be discharged to zero volts, a current is flowing into Cp. The capacitors are in parallel, since the current is flowing into both capacitors.
H: Do packages have to be centered in eagle to export valid pick and place data? I am working on a PCB featuring this SD card connector http://media.digikey.com/pdf/Data%20Sheets/Amphenol%20PDFs/101-00313.pdf In the technical drawing, it seems that the origin of the part is the intersection of the axis of the component with a line through the middle of the pads for the signal pins. For example, the dimension for the topmost hole (24.31mm) is measured from the center of those pads. I created the component in Eagle and I've used the same center as in the technical drawing. However, I can imagine the pick and place machine won't be able to pick up the connector using that center. My question: do I have to make sure to manually calculate the center of the part body (without pins) and then use that as the new center for the package, when I'm done designing the package? So basically, I move the package so it centers around the origin when I'm done? When I called my SMT subcontractor they said the software automatically calculates centroids when you export pick and place data (e.g. using mount-smd.ulp) but I'm thinking that it's up to the machine operator to decide how to pick up the part and place it correctly on the footprint? I'm just not 100% clear on whether eagle uses the centers of the packages when exporting centroid data or if it just determines the centroids of the parts automatically (such that where you put the origin originally in the library editor won't matter). AI: Looking into the script I see printf("%s %5.2f %5.2f %3.0f %s %s\n", E.name, u2mm((xmin + xmax)/2), u2mm((ymin + ymax)/2), E.angle, E.value, E.package.name); thus it must output center of component by X axis and center of component by Y axis. Further, if you look into description #usage "<b>Data generation for mounting machines</b>\n" "<p>" "Generates files for smds on the top and bottom layers " "wich can be used with mounting machines. " "The x and y coordinates (units: mm) of the SMD elements are calculated " "as mean of maximum and mimimum value of the smds origin points. " "The calculated value does not necessarily fit with the origin " "point of the part in the layout." "All SMD elements populated in currently set assembly variant are considered." "<p>" "The syntax of the output data looks like this:" "<p>" "<tt>name x-coord y-coord rotation value package</tt>" "<p>" "<author>Author: [email protected]</author>" It actually slightly confusing, but I tried this script on one of my projects, and SMD device with origin out of its physical center was output to the placement file with physical center of the component. Conclusion: origin position of the component does not matter. You do not need to rework your device.
H: Which ARM Cortex M chips allow for execution from RAM? I've been playing around with writing operating system-like software, mostly as a self learning experience. I've been doing this on the Atmel AVR processor, since it's simple enough for me to understand and get a program going quickly. I now want to move into an architecture in which the user stores programs that are run in RAM. I know that some Cortex-M chips can run from RAM, but I've heard that this is not universal. I've checked out the datasheets for a number of them from a few different manufacturers, but I can't find any reference to execution from RAM. For what it's worth, I have one of these: http://www.nxp.com/assets/documents/data/en/data-sheets/KL27P64M48SF2.pdf I also have an Atmel SAMD-10, but I hate the ASF like rats so I'd rather avoid using it. Can the chips I have execute from RAM? Is there anything I should be looking for in a datasheet that indicates whether or not this is possible? AI: I know that some Cortex-M chips can run from RAM, but I've heard that this is not universal. You heard wrong. All Cortex-M chips can execute code from RAM addresses and from off-chip external ram should they support an external memory controller. Only the interrupt vector table has a few more restrictions, which require you to put that table into on-chip ram or flash - see VTOR register description. Note: Memory maps which describe where code is executable can be found in the coresponding ARM Architexture Reference Manual.
H: Why do 1 pF capacitors exist? What kind of uses do engineers find for 1 pF or lower-value capacitors? This is the kind of value one gets with two bits of wire close to each other or two tracks. AI: The smallest capacitor I've used recently, in a filter in a 6 GHz receiver, was 0.5 pF. There were some 2 nH inductors there as well, and you could argue that those could be made with a few mm of track. However, both were smaller than the equivalent way of implementing them in copper. Perhaps more importantly than the size, is that they were discrete components. When I wanted to change the capacitor from 0.4 pF to 0.5 pF, to retune the filter, I didn't need to respin the board; I just changed the bill of materials.
H: Best circuit to play music in car, using ISO 10487 instead of using a radio, I want to install a Raspberry Pi 3 with my own features in the 2Din Slot, so I have to make my own circuit to play audio. I tried with the following modules based in LM386 pic: It doesn't work bad at all, but neither good enough, the max volume is not as high as I would like it to be, the sound is not clear, starts to crackle if I increase it, and the bass level is so bad. Should I try with my own LM386 circuit where I select my own resistor and capacitors till I get the sound I want? should I look for another circuit? another device? maybe something like an equalizer? I would like it to be small enough and as customizable as possible. Also, high bass is one of my priorities. Voltage is 12.6v Speakers resistance is 4ohms AI: LM386 power amplifiers are just too puny to overcome high ambient noise level inside a car. The cracking you describe could have two causes: power amplifier clipping, or speaker overload. Considering the weak driver (LM386), amplifier clipping likely causes distortion, and limits power output. You certainly need a more powerful amplifier. Some considerations for you before choosing a solution: What net speaker resistance will the amplifier drive? (8 ohms? 4 ohms?...) From what DC voltage source will the amplifier be powered? (12.6v? custom?) Your open-ended sound-level spec ("not as high as I would like it to be", "high bass is one of my priorities") is too subjective. It is possible that a bridged amplifier powered from the 12.6v car source will satisfy, if it drives a 4-ohm speaker load. At maximum volume (where clipping begins), conversation with an adjacent companion will be very difficult. If you need more volume, a higher DC supply voltage than 12.6v would be required. I am assuming old-school Class AB linear amplifier technology, similar to the low-power LM386.
H: Can a standard computer function as a radio receiver without additional hardware, and how? Can a standard computer function as a radio receiver without additional hardware, and how? Thanks, and happy holidays. AI: Short answer: No. You can often however get it to transmit radio, even if you don't want it to. Long answer: This is going to depend on your definition of standard. Just as every bit of wire is potentially a transmitter, so is every wire a receiver. I used to have a set of those cheap computer stereo speakers that would "pick up" GSM transmissions (google "TDMA noise"). Every time I received a text message I got a few seconds of "bip" noises from the speakers beforehand. The general way of doing it is software defined radio, as mentioned above, which can now be done with $10 devices designed as TV receivers but capable of broader tuning. More sensibly, stick to existing RF modules: bluetooth, wifi, ISM band (433 or 969MHz), or the rather nice ones from Nordic Semiconductor.
H: Why is there a non-zero phase error in a second-order PLL? Why is there a non-zero phase error in a second order PLL even though there is an integrator in the loop (type-1 system)? The same transfer function is applicable whether frequency or phase is considered as the input. Why then, under locked condition,steady state error for a step-change in frequency is zero but is non-zero for phase? AI: A frequency step is identical with a ramping phase (phase is the time integral over frequency). Therefore, speaking about phase errror (for a frequency step) we do NOT speak about a "static" but about the "dynamic" error (or phase "tracking" error). Applying the "Final Value Theorem", we find that (a) for a simple lag-filter we have a finite (tracking) phase error, but for a PI filter the dynamic phase error is zero. Explanation (Loop gain): LG(s)=H(PI)*H(VCO)=K1(1+1/sT1)*K2/s. Because of Delta(phi)=Delta(w)/s the "s" in the denominator of LG(s) cancels and the "Final Value Theorem" for the phase-transfer function (with s=0) gives a finite (correction: infinite !)value for the loop gain LG in case of a PI controller).
H: Generate Short negative pulse from an open collector output? Ive been teaching myself as I go so please forgive me for any errors. I need the output of an open collector output (goes to ground when active) to henerate a short negative pulse to reset the counter at 6 so it counts 0-5. I am using a 2 74142 nixie drivers http://chronix.pl/download/74142.pdf (datasheet) For the seconds and 10 seconds digits. I use a 1Hz clock signal into the first, clear pin is set high and strobe is set low, no problems, the nixie counts from 0-9. I have the Q output cascaded to the 10 seconds digit 74142 which basically makes a 00-99 counter. I want the second counter to reset when the open collector output for digit 6 is active, thus resetting the count. I think I could do this with a second IC such as a monostable vibrator but is there a simpler way? Note that the output to digit 6 will remain active for 10 seconds. The reset pulse needs to be at least 25 ns long per the data sheet. After it resets from 5 to 0 the reset should go high again to start the counting over, meaning I want a short pulse as opposed to the reset pin being low for the whole 10 seconds. I came up with the circuit below modified from an online post. The left represents the open collector output, the spst switch activates or deactivates it. The negative pulse will be taken from the resistor on the far right. Changing C values or R values of the bottom resistors all modify the pulse width and shape. I had to add an inverter. I got the original circuit from another stack exchange post. The only other help I found was a forum that stated the Clear pin on the 74142 should have a 2.2kOhm resistor from 5V and a 0.1 uF cap bypass to ground, and if the cap is left out it counts from 0-5. I tried this and sometimes it counts 0-5 and other times 0-6 so it is not a reliable solution. Thanks in advance for your help. AI: This is asychronous logic- when you activate the reset input the counter resets. If you decode the count of 6 then you will get a short pulse from the propagation delay of the decoding logic. The pulse will be over once the counter resets, but you need to also ensure that the counter really resets fully. It is recommended that the reset pulse be longer than 25ns, according to the datasheet. A typical 74xx gate has a delay of around 10ns, so if the decoding logic has at least 3 gate delays you should be okay. If there are not enough gate delays you can add a couple inverters (one fed by the other) to get another 20ns. If you are mixing logic types (74AS types or whatever) be cognizant of the various propagation delays. If you would prefer a nice fat pulse that is easily visible on an oscilloscope, then I would suggest using a one-shot multivibrator such as 74123. In this case the output is a relatively high voltage sort-of open collector output that is <2.5V when sinking 7mA. So you can do something like this: simulate this circuit – Schematic created using CircuitLab
H: Why higher frequency processors use more power? Why higher frequency processors use more power? A higher frequency processor would solve the task in less time, thus increasing idle time and thus reducing power consumption. This would compensate the fact that it uses more power. What's wrong in my reasoning? AI: If you have a processor which can operate at two frequencies when it isn't idling, say f1 and f2, then there will be a different power consumption per frequency, as explained in other answers here. The power consumption depends on the frequency in a non-linear fashion, so you might have: f1 100MHz 1W f2 200MHz 2.5W If you have to execute 100 million instructions and the processor can do one instruction per clock cycle, you can do it at f1 or f2: energy used at f1 = 100M instructions/100MHz / 1 (instruction/cycle) * 1W = 1J energy used at f2 = 100M instructions/200MHz / 1 (instruction/cycle) * 2.5W = 1.25J So at f2 the execution is completed in 0.5s instead of the 1s at f1, but it took more energy. However, there are other considerations in a computer system: for example, if you can get a disk drive into an idle state sooner because the processing has finished then the savings from the disk drive power consumption may be greater than the extra energy used in the processing. Another example: if the user can finish their work in half the time, they can shut down the computer and save on energy used to run the monitor.
H: How can I get rid of this spike in my overvoltage protection circuit? simulate this circuit – Schematic created using CircuitLab I am trying to design an overvoltage protection circuit. And this is the circuit above, and this is the LtSpice circuit below: This circuit somehow manages to function correctly. Meaning, it accepts input only for voltage level between 2V -3.6V, when higher voltage is applied, it closes the PMOS (M4 in CircuitLab and M1 in LtSpice). But the problem is ripple and the spikes! I know spike is formed because M1 can not open fast enough to compansate fast rise of Vin to gate of M2. But I can't think anything for getting rid of ripples. spike occurs at both circuitlab and ltSpice. But in circuit lab, ripples not seen. Thanks in advance. AI: Solved. I added shunt capacitor between M1's gate and source. So this way VSG voltage of M1 increases faster than before also, when M3 also triggered, \$\frac{C_1 // R_6}{C_{SG} // R_{DS3} + C_1 // R_6}\$ stays small since \$C_1\$ is much more bigger than \$C_{SG}\$ so M1 remains closed.
H: What happens if you add a voltage source to the output of an op-amp? I'm trying to self-learn EE and have a question: What happens if you add an external voltage source to the output of an op-amp? Say as in this picture: I know that WITHOUT the Va, Vout would just be Vin (is this a correct assumption? I'm assuming here that V+ = V- = Vin). However, we're adding a Va source, so would Vout just be Vin + Va? EDIT: to answer mga's question, I made up the circuit but it comes from thinking about The op-amp that I'm confused about is the bottom left one; the Vout of that op-amp is equal the voltage at the red A and I understand this mathematically but I don't understand it intuitively. Why wouldn't it be Vin + Va? AI: I think you're mixing up a few different concepts. Let's tackle them one at a time. First, the output voltage of an op amp is indeed \$V_{out} = A_v \cdot (V_+ - V_-)\$. That's the definition of a differential amplifier. But in an op amp, \$A_v\$ is huge -- a million or more in some cases. Because of that, any negative feedback causes the op amp inputs to be very close to each other. This is the only condition that gives you a non-huge output voltage. As for your complex circuit, there's no voltage source driving an op amp output. The middle op amp is acting as a non-inverting amplifier. The input is \$V_C\$ (the output of the bottom op amp) and the output is \$V_D\$. The relationship between them is: $$V_D = V_C(1 + \frac {R_1}{R_2})$$ \$R_1\$ and \$R_2\$ form a voltage divider between \$V_D\$ and ground, with \$V_A\$ in the middle. The relationship is: $$V_A = V_D \frac {R_2}{R_2 + R_1}$$ We know that \$V_D = V_{in}\$ and \$V_C = V_A\$. So what does that get us? $$V_A = V_{in} \frac {R_2}{R_2 + R_1}$$ The bottom two op amps form a non-inverting attenuator -- an amplifier with a gain less than one. The output is \$V_A\$. This feeds into the top op amp, which acts as a non-inverting amplifier. To answer your first question -- if you connect an ideal voltage source to an ideal op amp output, you break the rules of circuit theory and don't get a meaningful answer. In real life, what happens depends on how the voltage source and op amp are built. Probably it will be something like this: simulate this circuit – Schematic created using CircuitLab The output resistances of the op amp and voltage source will form a voltage divider between the two. These resistances will be small (and unpredictable), so lots of current will flow and you won't know what the voltage will be until you try it. Obviously, this is bad, so don't do it. :-) UPDATE: Why is \$V_C\$ affected by \$V_D\$? Because \$V_D\$ is one of the inputs to the bottom op amp. Maybe you're confused because this seems like circular reasoning -- \$V_C\$ controls \$V_D\$, but \$V_D\$ also controls \$V_C\$. So how does \$V_C\$ "know" where to go if it doesn't know what \$V_D\$ is yet? To improve your intuition, it might help to start with some simpler examples. Consider the basic voltage follower: simulate this circuit Imagine this circuit with \$V_{in}\$ powered off. \$V_{in}\$ and \$V_C\$ are both 0V. Now we turn on \$V_{in}\$. The non-inverting input's voltage becomes greater than the inverting input's voltage (\$V_+ > V_-\$). Because of the op amp's huge gain, the output shoots up. But the output is connected to the inverting input, so when it rises above \$V_{in}\$, you get \$V_- > V_+\$. This causes the output go to down again. So when the output is greater than the input voltage, it drops. When the output is less than the input voltage, it rises. The only stable state is when the output is (almost) equal to the input voltage. Now let's add some resistors: simulate this circuit This is a non-inverting amplifier. It works the same way as the voltage follower, but now the output has to be higher than \$V_{in}\$ to stabilize. (The stable state is really when \$V_- = V_{in}\$.) But adding resistors doesn't change the basic principle, right? Now try this. Here's a really dumb voltage follower: simulate this circuit This looks complicated, but it really doesn't change anything. The bottom op amp's output rises, which causes the top op amp's output to rise. When the top op amp's output goes above \$V_{in}\$, the bottom op amp's output starts to fall, which makes the top op amp's output fall. The only stable state is where both op amp's outputs equal \$V_{in}\$. Your circuit is like that, only the top op amp forms a non-inverting amplifier instead of a voltage follower: simulate this circuit This is the same as the previous circuit, except now the bottom op amp's output has to be less than \$V_{in}\$ for the circuit to stabilize. For example, if both resistors are 1k, then: $$V_D = V_{in}$$ $$V_A = V_C = \frac 1 2 V_{in}$$ Try changing any of those voltages and you'll have a voltage difference between the op amp inputs. For example, if the bottom op amp's output (\$V_C\$) goes up, the top op amp's output has to rise, because \$V_C > V_A\$. But that would make \$V_D > V_{in}\$, which means the bottom op amp's output has to fall again. This concept of connecting an output back to an input is called negative feedback. It's widely used in electronics and mechanical control systems (among other things). There's a whole subfield of engineering called Control Systems that studies how to use negative feedback to improve the performance of a system and how to guarantee that it doesn't become unstable. I found the ideal op amp rules very confusing when I first learned them. Hopefully these examples of transient behavior will help you make sense of things.
H: Convert ps/2 to usb using ttl to usb converter I have an old keyboard that has ps/2 interface. I have a ttl(V G tx rx) to usb converter too. Can i use this converter to connecting my keyboard to USB port? What about RS232/RS485 to USB converter? Can i use that to this convertion and connection? AI: I have a ttl(V G tx rx) to usb converter too. Can i use this converter to connecting my keyboard to USB port? No. What about RS232/RS485 to USB converter? Can i use that to this convertion and connection? No. The PS/2 keyboard interface is different to those on the converters / adapters you mentioned. However there are commercially-available PS/2 to USB converters available, if that is what you want to do. Here is an example of one of those commercially-available converters from a randomly-picked supplier's website, to give you an idea of what they can look like: Source Or, if you wanted to start a project, you could design your own converter using an MCU with a USB interface. This will be much easier if you choose an MCU where there are USB HID-class examples already available.
H: How to prevent eagle from attempting a specific route? I'm using the eagle autorouter to route my PCB because it makes cleaner tracks than if I did it myself. One problem I have is that sometimes it insists on attempting to make the same connection over and over again even though in the end the connection is not optimal (and I know this because on some routing attempts, I scored 100%). I'd rather block these bad attempts so that routing can complete faster. Could I somehow block it by drawing a line to act as a "fence" so that routed tracks can't go through it? If so, what line and what layer? or is this even possible? AI: To actually answer your question... In the board editor, go to layers 'tRestrict' and 'bRestrict'. With these layers selected, you can draw polygons that restrict traces from certain areas on the top and bottom layers respectively. The auto-router will then not place traces in the areas you specify.
H: Finding an unknown resistance with superposition I've been given a problem in which I need to calculate the resistance of an unknown resister \$R_2\$ by using the superposition method. The only other info which I have is that \$R_2\$ needs to be such so that \$I_1=I_2\$ and \$I_3=20\text{ mA}\$. I hope the image is readable: I've set up the three superpositon cases, but at the start of trying to calculate the solution I realised that I had no idea how to proceed with an unkown resistor. A sort of idea I had was to solve for \$R_2\$ in the first two cases, but then I don't know what to do with the third case. AI: With superposition just write three components of I1 (say I1.1(R2), I1.2(R2) and I1.3(R2) ) each with one single source activated. Each expression will be function of unknown R2. Then you sum them up and finally solve this to be 10mA. I2 will automatically be 10mA too for a simple KCL at center node. Alternatively Ohm's law would solve this right away: Given I1=10mA Ux at center node will be \$U_\text{x}=U_1-R_1I_1=6.53\,\text{V}-458\,\Omega\times10\,\text{mA}=1.95\,\text{V}\$ On the other hand $$I_2=\frac{U_2-U_\text{x}}{R_2+R_\text{i}} \quad\Rightarrow\quad R_2=\frac{U_2-U_\text{x}}{I_2}-R_\text{i}=\frac{8.5\,\text{V}-1.95\,\text{V}}{10\,\text{mA}}-0.4\,\Omega\approx 655\,\Omega$$
H: Driver for a 2 digit 7 segment display I have two 7-segment displays (datasheet here). They are common cathode. The forward voltage for each segment is 2.0 V. The continuous forward current is 25 mA. What I'm looking for is a relatively inexpensive ($3-$4 or less) IC that can drive both of these, using a microcontroller to command it over SPI, or something else that uses few I/O pins. (I've tried looking on digikey.com for a good solution, but I'm not sure what key words to search exactly, and it's difficult to understand the lingo of the datasheets to find out what a particular IC actually does. does anyone know of a good display driver or even a shift register that will work well with this display? If not, do you know what keywords or search terms are best to find what I'm looking for? In summary, the IC I need has to: Have at least 14 outputs (or can multiplex the 2 7-segment digits) be able to source 25 mA on each output able to be controlled with SPI or something else that takes few pins available in DIP, so I can test it easily on breadboard Since I am new to sourcing electronics parts for my own projects, I would appreciate any tips on how to read datasheets for relevant information, how to find the exact part I need, or what are some good websites to look for parts on. AI: By far the best and cheapest way to drive seven segment displays such as this is to use multiplexed drivers like the AMS AS1108 4 digit or the Maxim MAX7219 8 digit constant current drivers even if you only need a couple of displays. If you have other indicator needs then of course they will also drive lots of LEDs in the other digit positions. Both use a single resistor to set the segment currents. Both drive Common Cathode displays. Both support a simple serial drive from something like an Arduino. By the way, these things are really ridiculously cheap as made up units on Ebay and Amazon where you get an 8 digit MAX7219 module for less than $2 ...that's less than the price of the chip alone on Mouser or Digikey. I've bought dozens of these and really like the TOOGOO unit which has about the best build quality I've seen. The AMS chip is SOIC only, but the MAX7219 is available in DIP packaging, though if you buy a complete 8 digit solution you get it all on an easy to use PCB.
H: What component can transfer heat from cold to hot? I'm sure I've read about this somewhere but I can't remember where and my Google search all seems to be too genetic to find what I'm looking for. I'm looking for a component that uses electricity to move heat from one face to another (with the possibility of cold face to hot). I have a feeling it's piezo electric in nature but I'm not sure. I don't think it has any moving parts (ie. Not a fan), it's also not a heat pipe. Just a generic name for the type of device would be great. Thanks! AI: You are describing the "Thermoelectric Effect" popularly called the "Peltier Effect" and sometimes the "Seebeck effect". You can buy small arrays of diodes made up into a "Peltier Element" for reasonable prices.
H: Possibility of using 5A 5-220VDC Solid State Relay for switching 120VAC String Lights I have purchased this Relay Board http://www.sainsmart.com/sainsmart-8-ch-ssr-5a-dc-dc-5v-220v-solid-state-relay.html This board uses a mager GJ-5FA-L relay with input ranging from 3-32VDC and a coil switching range of 5-220VDC at 5A. I have done some research and have found relay power ratings - AC vs DC stating: ...relays are allowed to switch only a fraction of the AC power if DC. It's not uncommon to see 250V AC relays only rated for 30V DC.... This would seem to reason that since this relay can handle a maximum load of 220VDC that it would easily handle 120VAC. But what concerns me is a comment on the product page on amazon https://www.amazon.com/SainSmart-DC-DC-5V-220V-Solid-State/dp/B00TEUEW0G stating: Note that the load is only switched in one direction. If you reverse the + and - on the load connection, current will flow even with no voltage applied to the input circuit. I know that AC is alternating current and flows in both directions, does this mean that if this relay is applied a 120VAC current that it will fail? My application is using raspberryPi GPIO pins to switch on and off Christmas Lights that are string 120VAC. Reference Materials: https://forum.arduino.cc/index.php?topic=231045.0 Arduino SSR 5V DC (Mager GJ-3FA-L) AI: The SSR you refer to does not appear to have an English-language datasheet. I answered a question about this part earlier in 2016. It is stated to be a DC output SSR but no specification is given as to the type of solid-state switch used internally. I might make a guess that it's probably an IGBT based on the voltage rating and relatively high voltage drop when 'on'. IGBTs are typically co-packaged with an internal antiparallel diode to conduct reverse current, but it's not an inherent part of the structure as it would be with a MOSFET. The link you referenced refers to mechanical relay contacts and has no relevance whatsoever to solid-state relays. The question is further complicated by the fact that LED Christmas light strings may or may not use unidirectional current. If you try to use it to switch 120VAC, a given LED light string may or may not switch fully on or fully off. Or it might work perfectly when plugged in one way, and not the reverse. If you plug something other than an LED string into that switched outlet there is a fair chance whatever it is will be destroyed before the SSR gets a chance to turn on since many 120VAC devices will be damaged if fed half-wave DC. I suggest you get the proper AC-output SSR for your application.
H: LED strip negative wire connected from the end Recently I ordered some christmas led ligths from China, and I wanted to mess with it a bit (dimming, cutting it to parts), and i noticed that it is wired differently than I expected. It seems that the negative wire is carried all the way to the last LED and only then it is connected to each one of them one by one, while the positive, is connected from the source side. Is there any advantage, on the electrical side, to do this instead of just going straight like this: Or maybe the only benefit is in toughness. AI: If you redraw your LED diagram to show the resistance of the wires (forget about the exact values, or the fact that the diodes shown are not LEDs, that's not important) simulate this circuit – Schematic created using CircuitLab then you will see that for a long string, if you powered them with both terminals at the D1 end, D1 would be bright, and the rest would get progressively dimmer. If you power the string at opposite ends, the voltage drops across the sections of wire are equalised, and the LEDs get the same voltage. Each LED sees the same length of wire, the same resistance.
H: Can the 741's offset null pins be grounded? ... Or should I leave them not connected if I'm not going to trim them? I think I fried an LM741 when it's output was only connected to a single MOSFET's gate (and the single supply was <12V). The only thing I can figure is it's bad to ground those offset null pins, but I can't tell from its datasheet. AI: This is what a 741 looks like internally: - Bottom left are the trim pins and, as can be seen, they connect to the -Ve rail of the op-amp via 1 kohm resistors so don't mess with them, leave them open circuit if not being used or you will upset the balance of the current sources feeding the input transistor emitters. Normally, the trim pins are used like this: - As you can see, their recommended connection adds resistance in parallel with the two 1 kohm resistors shown in the top picture. Taking one or both to ground (normally regarded as mid-rail) will bias off those current sources.
H: Can I overvolt a motor when the current stays within the limits? I have a 12V 0.24A computer fan. When I supply it with the 12V, it drains something like 0.17A. Can I increase the voltage until the current reaches 0.24A or will it destroy the motor? AI: A well designed 12V BLDC fan ought to be able to run 6~16V. This is the absolute max for the Cap voltage if you do not exceed the current spec then conduction losses and self heating will not increase and motor increases efficiency. but then bearings wear out faster. It may fail locked rotor test at this 16V voltage with no air flow. for ideal cooling, force turbulent flow at max surface velocity over hotspot with vent design, but use duct for laminar flow of heat removal and avoid grid block at blade surface for eddy current noise and flow restriction.
H: Doesn't GHDL support infinite clock generation in testbench? I'm having a problem with a clock generation in GHDL. I'm trying to simulate an infinite (in terms of simulation time) clock, but the command in GHDL to analyze (-a) the VHD got stucked. Here is the code: library IEEE; use IEEE.std_logic_1164.ALL; --entity-- entity clock_ex is -- nothing inside because is only an example of clock process VS clock event end clock_ex; -- Architecture -- architecture CLKEX of clock_ex is signal clk_p: std_logic :='0'; -- clock for process 2ns semiperiod signal clk_e: std_logic :='0'; -- clock for event 1 ns begin clk_e <= not clk_e after 1 ns; -- change in the clock trough event process begin clk_p <= not clk_p; -- change in the clock trough process wait for 2 ns; end process; end; As you can see, I'm trying to generate 2 clocks, with semiperiods 1 and 2 nanosecond respecetively, one in a concurrent way (activated by event) one in a sequential way (inside a process). In that way, the analyze got stucked. But if I modify the process in this way: process variable stop_s: integer :=100; -- to stop the process variable count_s: integer :=0; -- counter integer begin if(count_s < stop_s) then clk_p <= not clk_p; -- change in the clock trough process count_s:= count_s+1; -- change in the clock trough event wait for 2 ns; end if; end process; GHDL is able to analyze (-a) and elaborate (-e) the file. When I run it (with -r), with the option to add the CVD, the shell got stucked too, but this time the CVD is generated, and I can anlyze it with GTKWave, and the bheavior is correct according to the variable stop, the execution is stopped at 200 ns. I would like to know if the first example has problem itself or if GHDL doesn't support the infinite clock generation. Thank you AI: If it's really stopping at the analyze, ghdl -a stage, then I have to ask what version of ghdl you are using. Using GHDL 0.34dev, it compiles (analyzes and elaborates) fine, and sticks at the ghdl -r stage. If your ghdl version is earlier than 0.33, upgrade it from Sourceforge or Github. If it sticks at ghdl -r, it sounds like ghdl is doing exactly what you ask, the executable is running forever. You have written a test with an infinite runtime and that's exactly what you get. Try ghdl -r clock_ex --help to see further runtime options, and ghdl -r clock_ex --stop-time=1us to stop the simulation after 1 us simulation time.
H: How to plot the phase response of a transfer function I am trying to plot the phase response of a box with an unknown transfer function by by measuring the phase difference between the input and output at different frequencies but I am not exactly sure of how to plot the phase response with the data obtained. So I have added a table below with the data that shows the phase shift at different frequencies and whether it is the output or input that is leading. If anybody knows how to plot the phase response using this information their help will be very much appreciated. AI: I assumed inverted phase above breakpoint. But this entire plot could be inverted. Note the Log f scale, inserted major grid and lighter minor grid, manual scale min:max for both axis.. using XY scatter plot scalc.exe from free Open Office. This takes 10 minutes to create this format, then you can save template so next time only takes 1 minute.