text
stringlengths
83
79.5k
H: AVR-GCC initialization code Consider the following asm.S .global main main: rjmp main Compile and dump it with these commands: avr-gcc -mmcu=atmega32u4 -g -o asm.elf asm.S avr-objdump -S asm.elf In initialization code, among other, there is this command: ae: 1f be out 0x3f, r1 ; 63 Why there is this command? AI: The full initialiation sequence I see is: __ctors_end: eor r1, r1 out 0x3f, r1 ldi r28, 0xFF ldi r29, 0x0A out 0x3e, r29 out 0x3d, r28 call main jmp _exit Breaking it down: eor r1, r1 out 0x3f, r1 Register 0x3f is SREG -- the status register, which contains status bits like N, Z, and C, as well as the interrupt enable bit. This code clears the register. The register should already be cleared at reset, but a bootloader or a partial software reset may have left it in an inconsistent state. ldi r28, 0xFF ldi r29, 0x0A out 0x3e, r29 out 0x3d, r28 Ports 0x3d and 0x3e are the high and low portions of the stack pointer. This code initializes the stack pointer to 0x0AFF, at the top of RAM. This is, again, identical to the reset state of the processor, so this is more of a precaution than a necessity. call main jmp _exit This calls your main function, then jumps to _exit (an infinite loop) in case main returns.
H: Powering 12V / 5W device at minimum cost and steady life duration I want to power one particular device that feeds of 12V (5W) electricity. However this device is intended to be highly portable and as such, I am quite tight on space, which means 12V accumulators are too big for this purpose. Also they are in fact, way too durable (and quite costly). The power source must be rechargeable, so that I can take advantage of my charger. It is enough if it lats at least 1 hour and I cannot afford more than 10$ for it. What would be the most cost-effective, small, disposable 12VDC power source that lasts at least 1 hour on a 5W power consumption? As a side note, I already have x4 LG HG2, they are hi-drain (20A) and quite durable (3000mAh). Maybe I can use some boost converter to make 12V out of it. It may last 4 times less (decrease to about 6A), but that would still be very long-lasting I think. AI: You need a 5W 12V load supplied for at least 1h or 5Wh Each “holy grail” LG battery has V=3.6V nom. with a 1C dropout of 3.0V @3Ah or 3.3Vavg*3Ah=10Wh which will support a 2h load with a DC-DC boost converter with 90~95% efficiency from TI WebBench designs or off-the-web purchase. You will also need a matched charger and undervoltage protection (UVP) on the boost regulator.
H: I2S TDM channels maximum bandwidth Does I2S support sending multiple mic (around 20) channel data? If no, what is the limiting factor in supporting multiple mics? Also, is there any way to send multiple channel data from different MICs in any other format other than TDM, if TDM on I2S doesn't allow more than certain number of channels? It is a generic question and any hardware can be sited as an example. All I am after is that given any hardware what limits the maximum mic supported? Mic stands for microphone. AI: I2S is sometimes used to carry multiple channels, particularly between ADC/DAC and CODEC devices. The standard is for two channels, as mentioned by colin in his answer, however you can send multiple datastreams with extra lines. For example the Cirrus Logic CS42448 (datasheet) CODEC uses a single bit clock (SCLK) and LR select (LRCLK), and multiple data lines (SDIN/SDOUT). Each data line carries 2 channels, and their assignment (left, right, front, back etc) is entirely arbitrary. So yes, I2S can carry multiple channels (sort of abuse of the standard though). However, would you want to use I2S to carry 30 channels? If its between audio processing ICs on the same board, maybe. More depends on what the devices expect (I2S, TDM, PCM etc). If you are carry these audio signals along cables, then almost certainly I2S would be a mistake. It isn't designed for distances, and you'll have issues with signal integrity and phasing between clock and data lines.
H: Is a MOSFET's body diode different than an ordinary silicon diode at audio frequencies? So a friend of mine asked me to evaluate how hard would be to build a guitar effect like the ones described in this thread. The pedal in question is a customization of the Ibanez Tube Screamer. The central part of this effect is providing overdrive (and, with more gain, heavy distortion) by clipping the audio signal with two antiparallel diodes in the feedback path: MA150 are the diodes in question, ordinary silicon small-signal diodes. The thread emphasises on the immense improvement of the effect's tonal qualities by replacing the diodes with MOSFETs (presumably by turning the MOSFETs into diodes, gate and source are shorted together). As it could well be pure audiophilia (you know, the thread contains passages like If you're into overdrive pedals, you'll know that MOSFET-based OD's are all the rage, for their natural, tube-like response. )... still you never know, and I'm not 100% how to answer my friend. Can a MOSFET's body diode be all that different from a small-signal silicon discrete one? For completeness, here are the V-I curves of the devices in question: MA150 diode: BS170 MOSFET's body diode: AI: I believe you are not a sound subjectivist - a person who insists he can hear essential, but unmeasurable sound quality quantities, for example "warmth" or "depth" as soon as he sees a vacuum tube which actually has only the filament connected, a couple of extra zeros in the price label, etc... Of course the distortion characteristics of that clipping circuit depends on the diodes. The static If/Vf curve differences are not the whole truth. I believe (haven't measured) that longer storage time (see NOTE 1) causes treble loss when compared to a fast diode. It can be good in some cases and something untolerable in other cases. Very radical clipping characteristics change is possible by adding one resistor in series with parallel diodes. That can be even worth a new potentiometer. Adding a resistor in series with only one diode makes the clipping non-symmetric and turns the device to a fuzz effect. I do not know the storage times of the suggested diodes nor mosfet diodes and definitely cannot tell the differences as sound description words. You must build a test circuit. A signal generator and an oscilloscope will help much in analyzing, but a proper musician is needed to judge the value for music. Get the musician after you have found clearly measurable differences. NOTE1: Minority carriers around a P-N junction can live in semiconductor materials a long time after the forward voltage has been reversed. This is the essence of the slowness of a diode. Some diode datasheets call it "storage time" There is also "reverse recovery time" which is the time needed to build the depletion region, but that is generally shorter in PN diodes. Diodes which are intended to be used as 50 or 60 Hz high current AC rectifiers in power supplies are often useless in high frequency circuits because they seem to conduct as well to both directions pulse circuits because every time the voltage is turned to reversed, a hefty current pulse is conducted to the unwanted direction BTW there seems to be no easy to find datasheet available for diode MA 150.
H: Passive Low Pass Filter What I want to do is make a low pass filter using a simple RC circuit (first order), or possibly an LC circuit (which would be second order). Right now, I am in the process of determining the values for the resistance of the resistor and capacitance of the capacitor (I'm currently going with the RC circuit idea). As the equation is f=1/(2*piRC), I understand that if I want a crossover frequency of 200Hz, I will have theoretically infinite choices or R and C. Which values are better to choose? I've heard I should choose C first, because capacitors are more difficult to find in the right denomination. Still I am left with a few hundred possibilities. Also, is there a best choice of type of capacitor? (electrolytic, etc) My application, if needed, is that I want to filter out high frequencies of sound from entering my car sub woofer (powered by a 70 W amp), so I'm going to put the low pass filter between the amp and sub woofer (I would put it upstream of the amp, but in this case, the amp and head unit are one in the same device). Thoughts? AI: I understand that if I want a crossover frequency of 200Hz, I will have theoretically infinite choices or R and C. Which values are better to choose? Think about what the input impedance will be to the RC low pass filter when the input signal frequency is much, much higher than 200 Hz - the capacitor can be regarded as a short circuit and this means that the input impedance is simply "R" and, if you decide that you cannot live with an R value lower than (say) 50 ohms, your capacitor has to be no greater than 16 uF. Next think about what the output impedance will be at frequencies much lower than 200 Hz - clearly, the capacitor is not part of this analysis so, if you chose 50 ohms for "R" previously, the output impedance becomes 50 ohms. Can you live with this impedance? Maybe you could live with an output impedance of 1 kohm? In which case the capacitor value is no greater than 80 nF. So, decide on input and output impedances and constrain your design to these requirements. I'm going to put the low pass filter between the amp and sub woofer It's likely that a simple RC will not do the job because your sub-woofer will have a loading effect of maybe 8 ohms and this means the resistor value will need to be at least one-tenth of this value. With R at 0.8 ohms, you will have problems when the input frequencies are high because the input impedance becomes 0.8 ohms. Using an LC circuit is what you need because as input frequencies rise, the inductor impedance rises with them and doesn't create a stupidly low input impedance that your amplifier has to try and drive into. Try this type of circuit: - With R at 8 ohms (your sub woofer impedance), L at 8.2 mH and C at 82 uF you get this response: - Source of inter-active tool. The cut-off frequency (3 dB point) is 216 Hz and has values that are not too far from specific calculators for cross-over units you can find on-line like this one: -
H: Verowire woes - how to reliably solder it? I'm using Verowire (wiring pencil, Road Runner, you name it) quite often to contact test points on my board to make them accessible for measurements (oscilloscope probe, multimeter clamp ...) Image source: Not a number. Every now and then it happens, that the insulation will not melt away and make soldering the verowire almost impossible. I usually have to cut off a piece and start again - which seems odd as some people are creating artworks with Verowire. What I usually do: Temperature 350-400 °C Blob of solder on the iron Insert the end of the Verowire into the blob (usually melts the insulation and tins the wire) Solder wire to test point Any points which I'm doing blatantly wrong in that approach? AI: Drag a scalpel blade along the bit you want to tin, making a bright copper spot, and dip into flux, before inserting into solder blob. The insulation is self-fluxing once it gets up to temperature, but this trick gets copper into contact with hot solder immediately, speeding up the process. Also, arrange a fan to remove the smoke; it contain isocyanates which aren't very nice to breathe.
H: Oscilloscope ground-probe causing test circuit to malfunction Today I was trying to measure the rectified SMPS incoming power supply ( 315VDC) using a tektronix TDS 3932C oscilloscope with P6139A probe. Every time the ground-probe touches the ground of the supply, the power supply rectifier diode is getting damaged. I assumed it may be related to earth fault current, but both equipment supplies are properly earthed. I need some advice here. Eqpt :Tektronix TDS 3932C Digital Phosphor Oscilloscope 300 MHz Probe used: P6139A , 500MHz, 8 pF ,10 MOhms, 10x Edited I want to check the pwm controller IC O/p waveform with the oscilloscope, the Vcc of the IC itself is tapped from the rectifier supply, and I am unable to use the oscilloscope. AI: I assumed it may be related to earth fault current, but both equipment supplies are properly earthed. You cannot connect oscilloscope ground to anything that is not at mains earth potential. You will get the following short circuit through your oscilloscope: simulate this circuit – Schematic created using CircuitLab I recommend this EEVblog episode: EEVblog #279 - How NOT To Blow Up Your Oscilloscope! (since you are lucky the diode failed first) I must add that measuring on these live circuits is dangerous. You are supposed to use an active high voltage differential probe. A Tektronix P5200A for example. There are also many other solutions to evade this problem, but since there are many safety caveats on these methods, I will not list them.
H: Avoiding turn-off of zero-crossing optotriac I'm designing a circuit that switches a load using a regular TRIAC (say, a BT-137) being fed by a MOC3063 - an optotriac with zero crossing detection. The circuit being fed by the TRIAC can be either a resistive load or a diode bridge, so there may be no current at the moment the TRIAC turns on. Here's the topology I'm thinking of: My question is: can I be sure the MOC3063, which has a zero crossing detection circuit, won't turn off? I'm assuming that it can't ever turn off while there is current in the input side, no matter how messed up the load current is - even if it goes below the holding current of the optotriac. Is this a safe assumption? AI: The zero crossing detector in the MOC3063 only inhibits triggering if the voltage across the main terminals (pin 4 and pin 6) is greater than typically 5 volts. So, should the device be previously triggered, the main terminal voltage will be no more than 3 volt (page 6 of data sheet) and therefore the zero-crossing detector cannot inhibit that situation and cause the internal triac to open circuit. Is this a safe assumption? Yes.
H: Protective diode across dump load I have a rectified DC Voltage and I will switch in a dump load resistor. I have a 25PV045 Schottky diode connected across it as a flyback to deal with the inductive properties of the load when the switch is turned off. I also have an LED which goes on when the switch is on and this has a protective 1N4148 diode. My question is when the Schottky is in flyback mode will any of the current go through the small diode and perhaps damage it or will resistor R68 prevent this? Thanks. AI: The 25PV045 Schottky diode will die as soon as you apply an input voltage greater than 45 volts and the relay/MOSFET switches on. This is because its maximum voltage rating is only 45 volts and according to your schematic you may have 600 volts at the input. My question is when the Schottky is in flyback mode will any of the current go through the small diode and perhaps damage it or will resistor R68 prevent this? Given that the main diode is likely dead, any inductive kick-back current will force its way through the 1N4148 and the 200 k resistor and probably damage the resistor. Now your LED circuit is fairly functionally dead.
H: Understanding power system lines and their capacity First of all, I am no engineer so forgive me if I confuse concepts (or show lack thereof). When constructing the power grid, I was wondering about the following: Do engineers use 'standard lines' (with a fixed capacity per distance) or do we have a variety of lines to choose between (with different capacity) How is the need for line capacity in general determined? Do we estimate the maximum load and increase capacity to be slightly above this? If two power grids are coupled by a DC power line, do they influence eachother in terms of stability? Why/why not? These are some of my thoughts that I haven't been able to answer yet AI: I am not experienced in this area, but I will tell you what I think I know. Do engineers use 'standard lines' (with a fixed capacity per distance) or do we have a variety of lines to choose between (with different capacity) There are several standard voltage levels and conductor sizes used for transmission lines. In addition, more than one set of three-phase conductors can occupy one overhead support structure or underground conduit. The voltage levels of overhead lines can be identified by the insulators and spacing used. Larger diameter sizes of conductors have higher current capacity for a given operating temperature and lower voltage drop for a given distance, so the current carried by a given size may be less for longer distance lines. How is the need for line capacity in general determined? Do we estimate the maximum load and increase capacity to be slightly above this? The capacity determination is done in the same general way that the capacity for a manufacturing plant is determined. A study is undertaken to determine the current power demand for the region to be served and estimate the expected growth in demand for some period of time into the future. Consideration is given to the possible use of alternative energy sources. Possibilities for future transmission level expansion are considered. Those and other factors are weighed against the cost of building various levels of transmission capacity. If two power grids are coupled by a DC power line, do they influence eachother in terms of stability? Why/why not? When two power grids are coupled, each appears to the other as a large load or supply. The connection would not be made without the two grids being under the control of one operator or under an agreement between two operators in constant communication with each other. The DC interconnection facility would isolate the two from one another from phase and frequency variations, but load variations in one section would influence the other. The interconnection facility would probably reduce the influence between the two in terms of stability compared to an AC tie, but not eliminate it.
H: Is there a small (6-pin) DIP I can use to generate multi-MHz squarewave clocks with an external crystal? I'm building a circuit that I'd like to run at 8 MHz to begin with, but I want to be able to try it out at 10, 12, 16, 20, and, maybe, 25 MHz. I know that many microcontrollers have the ability to just plug a passive crystal into two pins and the µC will generate a square wave and pass it on to anything else it's connected to which needs a clock. What I'm wondering is if that functionality exists on its own in a nice, small package which will run at 5V. (I know I can build it using Schottky fast inverters and some capacitors and resistors, but I'd rather avoid all that external stuff if at all possible). Alternatively, is there an easy way to generate a continuous range of frequencies of this magnitude (similar to what you can do with a 555 timer at lower frequencies)? I'm not too fussed about the frequency being particularly accurate, I'm pretty sure a 1% variability would be acceptable (2% seems like it's pushing it, but I'd certainly be willing to try it out) Additionally, I've seen a suggestion to use a higher-frequency crystal and use a frequency divider to divide it by four. Is a T Flip-flop the best way to do that at these frequencies? (or, rather, two since one flip-flop is only going to halve the frequency). Does this advice make any sense given that I'm running this on a breadboard? (yes, I know, parasitic capacitance and all that, that's actually part of the reason I'm doing this experiment, I want to see the effect of this parasitic capacitance at the various frequencies and to see whether mounting the breadboard on a grounded copper plate makes any difference) AI: The LTC1799 can be programmed by a resistor and a link to produce a vast array of frequencies. Is there a small (6-pin) DIP I can use to generate multi-MHz squarewave clocks with an external crystal? It's certainly small It's 5 pins not 6 It's not DIP but you want "small" and DIPs are not small in comparison to SM devices. It doesn't use a crystal
H: Capacitors, ground between connection, Colpitts oscillator For the Colpitts oscillator circuit shown (from a YouTube video), the video author said that the capacitors C1 and C2 are in series, which makes sense since there is a common connection point for C1 and C2 at the bottom, while the inductor is between the other ends of the capacitors. What is puzzling me is the ground between the capacitors’ common connection point. Since current will flow into or out of the ground, how does the ground’s presence affect the “series capacitor” notion, for lack of a better way of saying it? AI: In terms of oscillation frequency analysis you can just concentrate on the oscillating AC current entering ground from one capacitor and leaving ground and entering the other capacitor. The fact that it uses ground is of no importance. For instance, that common net could connect to ground via a large value capacitor and that would not make any difference to the result; the AC current from one capacitor will still be largely the AC current of the other capacitor. The oscillation frequency will still be this: - $$\omega = \sqrt{\dfrac{C_1+C_2}{L\cdot C_1\cdot C_2}}$$ And if you analyse the formula you will see that the effective capacitance is the series combination of C1 and C2. However, I believe that many authors miss the whole point of how the colpitts oscillator works and are too quick to state that the two capacitors are in series (basing this conclusion on the formula for the oscillating frequency). It's subtler than that. My personal choice (should I have written an article on the colpitts oscillator) is to not confuse the issue but just derive the oscillation frequency on the basis that there are two phase shifting networks in series. The first phase shift comes from R1 and C1 and the 2nd phase shift comes from L1 and C2. Here's an extract of the derivation and note that this derivation just regards ground as ground: - And, in the final analysis, the oscillation frequency happens to have a formula that can be re-written to imply C1 is in series with C2 (but that is somewhat missing the point because it's the phase shift that matters and it's a 0 deg phase shift that dictates the oscillation frequency). That final oscillation frequency formula also disguises the fact that R1 plays a significant role in determining the phase shift BUT, its value happens to get cancelled out in the algebra. It doesn't mean that a colpitts oscillator can work with R1 = 0, it means that R1 can be a range of values.
H: Simple circuit, mesh method, can't resolve I'm trying to resolve this for 3 hours now, I think I made some errors around the last part but can't figure out where. I'm a beginner and I'm still learning. If you want to try here is the circuit: simulate this circuit – Schematic created using CircuitLab I start by making 3 equations, put them in matrix form, make the inverse of the R matrix. So in the start I had: $$R * I = V$$ With the inverse matrix I'll have: $$I = V * R^-1$$ In order to find \$R^-1\$ I'm using the formula: $$1/detR * (R^a)^T$$ Where \$R^a\$ is the matrix formed by "algebraic complements" and \$(R^a)^T\$ is the transposed one. The exercise requires to find the \$Vx\$ in \$R5\$ and basically to find everything... So: \$Pg1 = ?\$ \$Pg2 = ?\$ \$I1, I2, I3 = ?\$ \$Vx = ?\$ (Vx as I said is the Voltage in R5 and Pg1, Pg2 is the Power delivered/absorbed by the generators) AI: Your schematic and the current directions I chose to take in my own head: simulate this circuit – Schematic created using CircuitLab I get the same equations you do. My work is on the left, and yours (or closer to yours) is on the right: $$\small\begin{align*} -I_1\:R_1 - \left(I_1-I_3\right)R_2+V_1-V_2 &=0\:\text{V} & I_1\:R_1 + \left(I_1-I_3\right)R_2 &=V_1-V_2\\\\ V_2-\left(I_2-I_3\right)R_4-I_2\left(R_5+R_6\right) &= 0\:\text{V} &\left(I_2-I_3\right)R_4+I_2\left(R_5+R_6\right)&=V_2\\\\ -V_1-\left(I_3-I_1\right)R_2-I_3\:R_3 -\left(I_3-I_2\right)R_4&=0\:\text{V} & \left(I_3-I_1\right)R_2+I_3\:R_3 +\left(I_3-I_2\right)R_4&=-V_1 \end{align*}$$ These result in the same matrix you formed: $$\left[\begin{array}{ccc} R_1+R_2 & 0 & -R_2\\\\ 0 & R_4+R_5+R_6 & -R_4\\\\ -R_2 & -R_4 & R_2+R_3+R_4 \end{array}\right]\left[\begin{array}{c}I_1\\\\I_2\\\\I_3\end{array}\right]=\left[\begin{array}{c}V_1-V_2\\\\V_2\\\\-V_1\end{array}\right]$$ If you want to solve this by hand, Cramer's rule is often taught. Here: $$\tiny\begin{align*} I_1 &= \frac{\text{det}\left[\begin{array}{ccc}V_1-V_2 & 0 & -R_2\\ V_2 & R_4+R_5+R_6 & -R_4\\ -V_1 & -R_4 & R_2+R_3+R_4\end{array}\right]}{\text{det}\left[\begin{array}{ccc}R_1+R_2 & 0 & -R_2\\ 0 & R_4+R_5+R_6 & -R_4\\ -R_2 & -R_4 & R_2+R_3+R_4\end{array}\right]}& I_2 &= \frac{\text{det}\left[\begin{array}{ccc}R_1+R_2 & V_1-V_2 & -R_2\\ 0 & V_2 & -R_4\\ -R_2 & -V_1 & R_2+R_3+R_4\end{array}\right]}{\text{det}\left[\begin{array}{ccc}R_1+R_2 & 0 & -R_2\\ 0 & R_4+R_5+R_6 & -R_4\\ -R_2 & -R_4 & R_2+R_3+R_4\end{array}\right]}& I_3 &= \frac{\text{det}\left[\begin{array}{ccc}R_1+R_2 & 0 & V_1-V_2\\ 0 & R_4+R_5+R_6 & V_2\\ -R_2 & -R_4 & -V_1\end{array}\right]}{\text{det}\left[\begin{array}{ccc}R_1+R_2 & 0 & -R_2\\ 0 & R_4+R_5+R_6 & -R_4\\ -R_2 & -R_4 & R_2+R_3+R_4\end{array}\right]} \end{align*}$$ So have you tried this approach? A recent paper, A condensation-based application of Cramer’s rule for solving large-scale linear systems, Habgood & Arel, Journal of Discrete Algorithms 10, 2012, pp. 98–109, demonstrates that Cramer's rule can perform on the same computational order as other methods, such as LU decomposition. Nice to read about that. Assuming you've worked out the three currents above, you can now easily work out the magnitude of the voltage across \$R_5\$ (if I understood your use of \$V_x\$, correctly) and you can work out its polarity with respect to the presumed current, \$I_2\$, as well. I think you know how to calculate the current in \$V_1\$ as the sum of two of the three currents you worked out above. And similarly, for \$V_2\$. From those currents and the known voltages of each, you should have no trouble working out the power they contribute (the sign telling you if they are generating (-) or dissipating (+) power.) These last details shouldn't be difficult, once you have the three currents worked out.
H: CMOS frequency of oscillation How to find the frequency of oscillations in this circuit CMOS circuit: simulate this circuit – Schematic created using CircuitLab Assuming the ideal CMOS gate with the threshold at 0.5Vdd. And the output and the input waveform if an inverter. R = 10kΩ; C = 1nF; IC = CD4069; Vdd = 5V How would you approach it? AI: I'll just throw this in here. Given ideal inverters, ie. they work like ideal comparators, with infinite gain and low output impedance. Note that this is not the case judging from your simulated waveforms. You can observe the following: The RC-filter will generate a waveform that is symmetrical over \$V_{DD}/2\$ in steady-state. If we call the minimum value \$V_m\$, then the maximum value is \$V_{DD}-V_m\$ When applying an ideal square wave to an RC-filter, the exponential will follow the equation (t=0 at the start of the period): $$v_{out}(t) = V_m + (V_{DD}-V_m) \left(1 - e^{-\frac{t}{RC}}\right)$$ Calling the period \$T\$, then the waveform will reach it's maximum value \$V_{DD}-V_m\$ at \$t=T/2\$, or $$V_m + (V_{DD}-V_m)\left(1 - e^{-\frac{T/2}{RC}}\right) = V_{DD} - V_m \\ $$ Also, since the input switches after the output has passed through all 3 stages, the exponential should reach \$V_{DD}/2\$ at \$t=T/6\$. $$V_m + (V_{DD}-V_m)\left(1 - e^{-\frac{T/6}{RC}}\right) = \frac{V_{DD}}{2}$$ You can solve these equations to finally get $$T = -6RC \ln\left(\frac{-1 + \sqrt{5}}{2}\right)$$ Plugging in your values would result in $$T = -6\cdot 10k\Omega\cdot 1nF\cdot \ln\left(\frac{-1 + \sqrt{5}}{2}\right) \approx 28.9\mu s$$ (this is around 35kHz) From your measurements, it looks like your inverters are switching slower, so a longer period is to be expected. I guess this formula will in any case indicate a maximum frequency. Appendix Steps for working out the formula: From point 3: $$\left(1 - e^{-\frac{T/2}{RC}}\right) = \frac{V_{DD} - 2V_m}{V_{DD} - V_m}$$ From point 4: $$2\left(1 - e^{-\frac{T/6}{RC}}\right) = \frac{V_{DD} - 2V_m}{V_{DD} - V_m}$$ This allows us to eliminate \$V_m\$: $$\begin{align} 1 - e^{-\frac{T/2}{RC}} &= 2\left(1 - e^{-\frac{T/6}{RC}}\right) \\ &\Downarrow (y = e^{-\frac{T}{6RC}}) \\ 1 - y^3 &= 2(1 - y) \\ &\Downarrow \\ y^2 + y - 1 &= 0 \\ &\Downarrow (y > 0) \\ y = e^{-\frac{T}{6RC}} &= \frac{-1 + \sqrt{5}}{2} \\ &\Downarrow \\ T &= -6RC\cdot \ln\left(\frac{-1+\sqrt{5}}{2}\right) \end{align}$$
H: Verilog - connecting multiple bidirectional buses I've been designing a retro computer in verilog as an exercise and so far have a simple 8-bit CPU that communicates directly with a single RAM chip via a bidirectional data port. This works great in my testing, however the need has arisen to include a second RAM on a different bus, as video RAM that both the CPU and a graphics processor can interact with. To achieve this, I implemented a memory controller module. This module connects directly to both RAM chips on separate buses, and reads/writes to/from the CPU now have to go through this module. Simplified module connections: module memcontroller(inout[7:0] CPUdataBus, inout[7:0] RAMdataBUS, inout[7:0] VRAMdataBus) When connecting the CPU directly with the RAM, I would just set the data bus to Hi-Z to use it as an input and read data from RAM. However, now I do this on the "RAMdataBUS" port and need a way to "connect" the input to the CPUdataBus port, which I can't figure out. Perhaps naively, I thought something like this would work: assign CPUdataBus = write ? CPUdataBus : RAMdataBUS; assign RAMdataBUS = write ? CPUdataBus : 8'hZZ; Which produces during synthesis: RAMdataBus[7]" has multiple drivers due to the always-enabled I/O buffer "CPUdataBus[7]" for each bit There's likely a really obvious reason why this is invalid, but nonetheless I can't find a solution to the problem or fully understand the error. AI: Think of this in terms of hardware. RAMdataBUS outputs data or is tri-stated. But CPUdataBus is a mux. You can't connect a tristate to a mux. You can connect a tri-sate bus to anther tri-state bus. Assuming write is the CPU write the CPU bus should be driven when writing, but tri-state when reading: assign CPUdataBus = write ? CPUdataOut : 8'hZZ; The memory bus should be driven (by the memory) when reading, but tri-state when writing: assign RAMdataBUS = !write ? memory_data_out : 8'hZZ; But that is not correct if you have multiple memories. Then it becomes: assign RAMdataBUS = !write && this_mem_selected ? memory_data_out : 8'hZZ;
H: Weird behavior using Transistor I am trying to switch 12V using a Transistor and an Arduino, which outputs 5V. When I connect the Arduino to the Transistor base and 12V to the collector, I get 4.2V on the Emitter, and I don't understand, why. The Transistor is a C9014. Why is the output 4.2V and not 12V, as I expected? simulate this circuit – Schematic created using CircuitLab AI: When you connect the base to 5-V output and the collector to 12 V with a load between the emitter and ground, this would be called "emitter follower". The voltage on emitter will be "following" the base voltage minus about 0.7 V, which you perfectly determined. To switch your load to full 12-V, you need to connect the emitter to ground, and your load between the collector and +12v power rail. An get some limiting resistor (100-200 Ohms) between the MCU output and the transistor base.
H: Power green LED from microbial fuel cell (MFC) I am looking for a way to power green LED (like GNL-3012GD) from MFC which provides 0.2mA @ 0.6V for about 1hr (there should be some drop off period then; 2..3hrs to restore). I understand that the amount of power is too small but what about the energy storage to drive the LED for a while (from a few seconds)? Any hints or schematics are highly welcomed. AI: Okay, here are some considerations. Your source has the energy storage of 0.6V* 0.2 mA * 1hr = 120 uW-h. If you get some newer LEDs, say LTST-C193TGKT-5A chip LED from Lite-ON, it has a fairly high efficiency, about 100 mcd at 5 mA., not the miserable 7 mcd @ 20 mA as for GNL-3012GD, or 50 times more efficient. I just run a test, so the light is pretty visible at 16 uA (micro Amp !!!), with forward voltage about 2.3V. This equates to power consumption at just 37 uW, while you can see the light with no mistake. If I take a proportion of 100 mcd and 16/5000, this is about 0.32 mcd of light, and there are many LEDs with 0.1 - 0.3 mcd light output. So the 0.32 mcd is pretty visible. Now, if you find some "energy-harvesting" IC operating at 500-600 mV, with output boost to 2.3-2.5 V, something like the module from Advanced Linear Devices, or LTC3108, the LTST-C193TG LED will be glowing (at 0.32 mcd) for up to 3 hours. The hints here are (1) high-efficient LED, and (2) energy-harvesting IC. Would it fit your requirements?
H: Why is the magnetic field around a bar magnet represented by iron filings? Why would we use iron filings to display a magnetic field interaction and then teach this as the unaffected field of a magnet? Iron affects the field itself. This is analogous to an observer affecting a quantum event through observation. Magnetic mappers that contain iron anywhere near the proximity of the target to be measured are inherently outputting false field information. Where are the true examples of unaffected fields? Could they really be different than what we have been taught? AI: There's a general problem in physics that you can't measure anything without changing it. Any attempt to introduce a measuring instrument into an experiment changes the experimental setup, and so alters the results. So the aim is to choose a measuring instrument that changes the results as little as possible. For example, a voltmeter is designed to have as high a resistance as possible, so it doesn't add any significant load to the circuit it's measuring. In the case of iron filings, they are small and either not magnetised, or are only weakly magnetised. The bar magnet, on the other hand, is much bigger and strongly magnetised. So we assume that the iron filings have only a small effect on the field that they are measuring. You can make any effect smaller, by limiting how many filings you use. Just sprinkle a few around, and they will have little effect. Dump a whole jar full of them on top of the magnet, and you probably have completely changed the field you were measuring.
H: How a Computer Represents a Number Electronically I understand how computers represent decimal numbers using binary. I have yet to absorb this video on how computers add numbers, which looks helpful. Before understanding that though, I would like to understand at a deep level how a computer stores and represents a number (8 bit, 16 bit, 32, 64, 128, 256, not sure if they can store above that). There are multiple aspects of this: How it is stored on disk. How it is stored in memory. How it is stored in the CPU / ALU / etc. to actually use to manipulate / perform calculations. I don't need to know all the details of it, just something to point me in the right direction / an overview. I understand a little about flip flops, which store 1 bit in main memory. I am only interested in here in how numbers are stored in memory and in the CPU / ALU, not the disk. But if the disk is simple enough would be nice to know about that. In terms of main memory, maybe there is somehow 8/16/32/etc. connections of flip-flops, or perhaps no, main-memory is just bits and you point to locations in these bits. I am thinking in terms of the x86 mov instruction, e.g. mov edx, [ebp + 8], which might move bits between memory or between memory and registers. In terms of the CPU / ALU, it seems to just boil down to registers, so the numbers would be in the registers. But here they do make the distinction between 8/16/32/etc. bit integers, so maybe there is some electronics structure that implements this. So this question is about knowing how the following works, at a high level / overview: How integers are stored / represented in main memory electronically. How integers are stored / represented in the CPU / ALU electronically. AI: An 8-bit integer is just stored in 8 flip flops. A 16-bit one in 16 flip flops, and so on. Most modern computers are 32 or 64 bit, so use banks of 32 or 64 flip flops for each register. For speed, these are wired to other parts of the processor via parallel data buses. So entire "words" of memory can be transferred in one go. There's no problem storing fewer bits. If you run a 16-bit add on a 32-bit computer, it will just use 16 of the 32 bits it has in each register, and ignore the rest. In a sense, it's the machine code instructions that define the meaning of the data. The only difference between an 8-bit integer and an ASCII character is the way in which you choose to interpret the 8 bits. Most computers use DRAM for their main memory. That works in a different way, as a flip flip requires too many transistors. A DRAM cell is essentially a tiny capacitor connected to a MOSFET. The capacitor stores one bit (charged of discharged) and the transistor is used to read or write it. Over time, the charge on the capacitor leaks away, so the memory has to be "refreshed" periodically, by reading each cell, then writing it back again to recharge the capacitor. Hard disks store data in magnetic domains on the disk. Magnetise a domain one way and it's a 0; magnetise it the other and it's a 1. The data bits will be stored sequentially around the disk in tracks. They are read or written as the disk spins round under the read/write head.
H: What to call the cells of memory in a computer or a microcontroller? I don't know if this is the right forum to post this question, but I thought so because this forum is for educators and I'm a trainer and my question is related to education. I want to do an introduction for a technical manual about basics of microcontroller, and got to the memory chapter. I started with a definition for the three main memory types in a microcontroller, which are: Program memory (ROM): Which is basically a flash memory for storing the program HEX file for execution. Data memory (RAM): Which is for processing data during operation of the microcontroller, but the data is lost after resetting the microcontroller. EEPROM: Which has the advantage of reading and writing data during the operation of the microcontroller and also keep the data after resetting the device. Then, I posted a picture of microcontroller's block diagram and how it's connected to the internal units as a subtitle of the memory chapter. The next subtitle is the term "registers" as they are the building block of any type of MEMORY in computer, whether it's ROM, RAM or EEPROM. Because I found this information in a website, and want to be sure. This is the link to the website: Link Section 5.1: Registers. As the previous section is 4. Program Memory. Then in section 5. Data memory, the author explain the sub-parts of Data memory which are: 5.1 Registers 5.2 Bits and bytes So, my question here, is: Registers are memory cells to every memory type, and the difference is that ROM memory are non-volatile registers, RAM are volatile registers and EEPROM is also non-volatile registers? So they all are basically register. ===================================================== Add1: I want to add this picture I found in an eBook: So, the only memory called registers is the CPU registers other memories called just memory. But how about the arrangement in microcontroller sector? ===================================================== My updated question is how registers differ from other memory cells in other types of memories? Like, Flash and EEPROM memories. AI: In my mind, a register is a storage location that is within the CPU, or directly addressable by the CPU - things like the Accumulator, index registers, and similar things. I would not say that EPROM, FLASH and RAM have registers. If you look at the assembly-language instruction set for a microprocessor or microcontroller, you will see that some instructions deal with registers, while others deal with RAM, EPROM or FLASH memory access, so the processor sees a register as something different than a memory location.
H: Low power local area radio controller chipset I have a project where I need to remotely control up to 128 individual relay boards within a maximum 30 meter radius. I need each of these wireless relay controllers to be uniquely addressable to ensure the correct relays are opened and closed. Ideally, quiescent power consumption for the relay remote controller circuit when not in use will be a few microamps and just a few milliamps when receiving or transmitting. I only require the ability to remotely open/close each relay based on its unique ID and to read back the overall status of each unit periodically. There is no need for a full blown MCU at each relay node (which usually means higher cost and power). I’d like to find a low-power wireless modem with the ability to interchange just a few bits of status and control information no more often than once every few seconds to conserve power. I need an integrated circuit that implements the radio, modem and digital I/Os, ideally for a few dollars per unit in volume. I’d like to use an Arduino compatible board to supervise the array of relay controllers as a central management point. Can anyone suggest a chipset or module that I can use for this purpose? AI: 433 MHz seems to be perfect fit for this application. There are tons of modules available on the web. I suggest doing your own research and then editing question, because right now it looks like shopping question that is OT on this site. Here are some configuration options to help you narrow your search: Not a "full blown MCU" but tiny MCU + Rx module + Tx module; Tiny MCU + transceiver module; MCU with built in transceiver module (e.g. BC48R2020); Transciever module + some shift registers and logic chips to detect 7 bit address and execute 1 bit command; Note that cost-wise the second solution is probably the best, despite your aversion to using MCU.
H: How does glass create an electric field? I'm reading from Microchip's data sheet regarding their MAXTouch microchip, which details on how to create a touchscreen compatible with their chip, and in discussing the "mechanical stackup" of a touchscreen it is noted that Front panel dielectric material has a direct bearing on sensitivity. Plastic front panels are usually suitable up to about 3 mm, and glass up to about 4 mm (dependent upon the screen size and layout). The thicker the front panel, the lower the signal-to-noise ratio of the measured capacitive changes and hence the lower the resolution of the touchscreen. In general, glass front panels are near optimal because they conduct electric fields almost twice as easily as plastic panels. I'm unsure what this means that glass or plastic conducts electric fields. A typical mutual capacitive touchscreen consists of a set of x transmission lines underneath a set of y transmission lines (with space between them). I thought that that space and the transmission lines is what causes the electric fields, not the glass which is on top of it all. There's also a note which says Care should be taken using ultra-thin glass panels as retransmission effects can occur, which can significantly degrade performance So I guess this means that you wouldn't want to try and use a touch screen with no glass/plastic overlay at all? AI: In general, glass front panels are near optimal because they conduct electric fields almost twice as easily as plastic panels. This means is Glass (\$\epsilon _R =4.7\$) has twice the relative permittivity of plastic ( \$\epsilon _R =2.3\$ ) in the materials preferred here. This applies to both mutual and direct capacitance. What is free space permittivity ? - about 9 picofarads per meter ( ~ 9 pF /m means means 9 pF would be the capacitance of two hands with a gap of \$1/9^{th}\$ of the hand width. Why it is relative? all insulators are dielectric but glass is still twice as much as plastic and more than 4 times air or a vacuum. ultra-thin glass panels as retransmission effects can occur This means a partial discharge (PD) can occur and the charge buildup can create false sensing, which also may damage cells from the E field breakdown as breakdown threshold for example >10kV/mm or 10V/um is approached with ultrathin glass < 1mm
H: What defines the sign of transistor rating values? Here for example I have attached excerpts from two general purpose PNP transistor datasheets. One of them has negative values, other one positive. I would like to understand what defines these values to be positive or negative. P.S. Second one is for 2n3906. AI: The - (or +) sign indicates polarity (voltage) or direction (current). For voltages you choose a - (negative or reference) and a + (positive) node. For current you choose a direction. Either polarity or direction is fine but you must be consistent, so stick with that choice. Here the two manufacturers chose opposite polarities and current directions. That's fine (makes no difference) as long as they're clear about it. For NPN transistors I have never seen negative voltage ratings like for some manufacturers do for PNPs. That makes sense because an NPN needs a positive Vbe voltage (Vbase > Vemitter) to make it work in active mode. For a PNP it is the reverse, all polarities are reversed. To make a PNP work (in active mode) Vbe needs to be negative (Vbase < Vemitter). We could call a PNP's Vbe not Vbe but Veb but that would complicate things in comparison to the NPN. It is much easier to just make Vbe negative and all other voltages (Vce_max etc..) negative as well. So in my opinion using negative voltage ratings for a PNP is "more correct". However some people may get confused about these negative values and then there is nothing wrong with using positive values and just changing the polarities.
H: AVR(or PIC) vs ARM for LoRaWAN nodes Well, you can say that the title is a little bit misunderstanding. I do not want to compare these architectures, it's worthless. I am trying to understand why an engineer could ever pick for his LoRaWAN node an ARM MCU. In my opinion, if someone trying to design a LoRaWAN gateway then an ARM MCU is a good/safe option. But if you want to design an ultrasonic sensor, an air quality sensor or a magnetic sensor, i can not find any benefits on using ARM MCU. In my designs, i have done tests using 8-bit PIC (pic18lf46k22) and AVR (atmega328p) and i can say that on the above applications these MCUs are overspec! So, the only thing left was the cost of the MCUs for making the "right" choice. Let's say at 100 pieces you can get an atmega328p at $0.98 per piece and for STM32F411RCT6 you need about $3.98. My company is buying competitors products so we can check what they are using etc. I have NEVER seen any other MCU architecture than ARM. So this is really bad for me because i am thinking that i am missing something. I really need advices/opinions from more experienced engineers than me. *Reminder: * I consider as simple applications for me is to get data for one or two sensors and send them to the gateway. P.S. We have a waste management project (40 sensors) running for 7 months and nothing "weird" happened. We are using atmega328p. AI: If you product is working, then what is the problem? AVRs are very competent chips, with decent peripheral sets, low power consumption and generally good longevity. The main area they fall down against ARM is in raw processing power, but as you note, this isn't that important in your application. If it is working for you then I wouldn't bother changing it. However, one point you are not correct about is cost. There are many manufacturers of ARM chips, and typically not much between them, so the market is very competitive. For example, you can get an STM32F030 for around 50c. It has a lot more power than your ATmega328p and if you need more processing power/peripherals/memory there is an entire drop in upgrade tree that you can swap in. The ATmega328p is not comparable to an STM32F411. The latter has 8x the flash memory and something like 10x the processing power. That it only costs 4x as much is actually quite a bargain. As to why your competitors use ARM chips? More than likely because there is no reason to not use them and they have become industry standard in recent years. Processing power is cheap these days, and embedded programmers who can carefully optimise code are expensive. Especially if they are a startup, not being too constrained on resources is a good way to accelerate development.
H: Tail biting convolution encoder I understand how encoders and decoders work, but what are theses values? AI: Maybe this will help your understanding: - Octal to decimal converter.
H: Decoupling feedback for testing of PWM controller IC for SMPS I am trying to test an SMPS controller IC (like KA3882) by isolating the controller from the PWM FET circuit and de-coupling the SMPS output (to optocoupler and the feedback pin of the controller). By applying the required feedback voltage to the Vfb pin (2.5v in my case), I expect to get the square wave pulses on the output pin. Is this procedure good enough? I also felt that I-sense pin must be for protection against shorting of SMPS output power supply. Hence , I skip applying a current to this pin, but I am not sure and need advice. What is the purpose of I-Sense current in a PWM controller IC? AI: The documentation surrounding the KA3882 is pretty poor compared to devices such as the UC3843 made again by Fairchild, ON semi and TI. So make a comparison: - Make that comparison against the TI UC3843: - You can also note that the pin numbers are the same and you can pretty much assume that functionally they are the same: - What is the purpose of I-Sense current in a PWM controller IC? It's protection against too much current being fed through the inductor and it saturating excessively: - So, to get more information functionally about the Fairchild KA3882 I'd look into the TI UC3842/3843 range of devices. I skip applying a current to this pin, but I am not sure and need advice. Don't apply a current input - it requires a voltage that represents current BUT, you can connect it to 0 volts for just a bench test.
H: bidirectional buck/boost converter vs separate buck and boost converters I have recently leared about bidirectional buck/boost converters. They can be used in hybrid vehicles for optionally charging a 12v battery from a higher voltage battery or vice versa. How would one of these perform differently than separate buck and boost circuits with switches to determine which one is active at any given time? AI: Well you could make a bi-directional buck/boost controller from seperate buck and boost circuits: - Or you could just omit the components marked in red boxes and get an improvement in efficiency: -
H: why is the feedback or gate resistance RG necessary? Here the large feedback resistance RG interposed between gate and drain of the NMOS (usually in the megohm range) forces the dc voltage at the gate to be equal to that at the drain (because IG = 0). Also, it says that RG works just like the RS which is to stabilize the bias current ID in the event of changing VGS. my question is why is the RG necessary, isn't "the dc voltage at the gate = the dc voltage at the drain" regardless of the RG? thank you folks AI: The gate of a MOSFET is floating. There will be a bit of leakage (typically nA or less level at room temperature), and there is capacitance between the gate and drain and gate and source. So applying a voltage to the circuit without Rg will result in the gate taking on some intermediate voltage and slowly drifting up or down as the leakage current charges the capacitance (and the Miller capacitance affects the gate voltage once the drain voltage starts to move). To bias the MOSFET into the active region so it will work as an amplifier, in this case, you want the gate to follow the drain (at low frequencies approaching DC) and the gate to follow the input voltage for higher frequencies, which is accomplished by using a coupling capacitor. So a high value of Rg does not affect the input voltage too much but allows the bias to settle out in a reasonable length of time. For this we want the maximum leakage current multiplied by Rg to be a low voltage, and we want the coupling capacitor plus MOSFET capacitance including Miller capacitance multiplied by Rg to be a reasonable length of time for start-up. For example, if Rg is 1uF and the coupling capacitor is 1uF it would take a few seconds for the amplifier to settle down.
H: STM32F1 -bootpin resistors The STM32F1xx "Getting Started" app note shows the BOOT0 and BOOT1 pins connected to ground/VCC via a \$10k\Omega\$ resistor, and so that's what I've always done and everything works fine. However, now I'd need to switch the internal serial bootloader on/off depending on whether another board (a kind of debugger) is connected, i.e. if the board is connected, BOOT0 is high (boot into internal bootloader), otherwise low (boot from internal flash). In this case, as I will anyway have a debugger detect pin, I could simply pull BOOT0 pin low with a 10k resistor, and connect the (active high) debugger detect directly to the BOOT0 -pin (apologies for the insanely large schematic, I don't know how to adjust it's size): simulate this circuit – Schematic created using CircuitLab Now the question: when the debugger is connected, BOOT0 is connected directly to VDD instead of through a resistor, unlike in all the app notes etc. Is there some danger here? AI: It is completely safe to connect the way you have planned. Boot 0 is input pin of the micro controller. It can be connected to 3.3V directly. When 3.3 V is not available then BOOT0 pin will see low via 10kOhms..when connected BOOT0 pin will sure see a digital high input. Optional: Place a 300 ohms series resistor to the input of Boot0 pin. Edit 1: Removed wrong reference Edit 2: from Nucleo-F429ZI Similar one..just for reference.
H: Including and extra product term on same chip in a PAL implemntaion To implement a circuit we have a PAL requirement 4-input,4-output,(2,2,2,2) product terms.We are using a chip with 8 inputs,8 outputs(4 reg, 4non reg)(2,2,2,2,2,2,2,2). But it happened that we made a calculation error earlier and now find out that 1 of the output requires 3 product terms.Can it be possible to still implement the circuit using same chip by using leftover input and output pins. AI: If the timing doesn't matter you could connect one outputs to inputs. Say output 2 needs 3 product terms. You put term 1 and term 2 on output 5 and connect it to input 5. Then output 2 becomes input 5 or term 3.
H: What this NPN transistor circuit do? I need some help to figure out what this NPN transistor circuit do, how it works and why it's needed in order to make the CSR64215 bluetooth chip work. Here's the schematic: And here's what MFB stands for in CSR64215 chip (took it from the datasheet): I'm asking all these questions because I'm about to use this bluetooth chip in my car and the problem I'm facing right now is that when I'm cranking the engine it turns off and back on quickly, but after that it unables to connect to my phone automatically and it's very frustrating as you have to do it manually after all. So basically I'm looking for a fix for this issue. AI: The circuit, even with the diode is a piece of junk. The 11ms time constant without the diode was pretty short. Either regulate the supply so it doesn't drop during cranking or use a proper reset chip that provides a timed reset pulse of appropriate duration for a complete reset for any brownout of the supply.
H: How to replace a relay with a MOSFET? I currently use the circuit below to power the OUT output when the signal is high (5V). I have a problem related to the size of the circuit, using a relay takes up a huge space. With this I would like to know if anyone has any idea of circuit with the same logic however using MOSFET or BJT. The current OUT consumes is 3A. Signal when it is high has 5V and when it is low it has 0V. simulate this circuit – Schematic created using CircuitLab AI: Try this: - You need to find a P channel MOSFET with suitably low on-resistance that can be activated acceptably with logic level voltages. For instance the NDT25P03L is logic level driven and has an on-resistance of below 0.1 ohms. R3 in the top schematic can be about 10 kohm if you are not too bothered about switching speeds.
H: Confusion regarding this Op-Amp circuit So I have started learning about Operational Amplifiers. In case of idea Op-Amps, Vd=0 as amplification is very large and Vo is limited by Vcc(the supply voltage). Here in this inverting Op-Amp configuration , Vout= - (Rf/Rin) * Vin which I understand perfectly. But I have 2 doubts : 1.What happens physically if we remove Rin i.e Rin tends to zero ? By the formula , Vout should become infinite . Does it happen really? 2.In an ideal op-amp , voltage at positive terminal=voltage at negative terminal but if we remove Rin , voltage at + terminal=Vin and voltage at negative is 0 which is kind of paradoxical. What is the explanation here? AI: When you replace the resistor with a short you will eliminate the feedback. So you effectively have the situation of the input voltage directly across the amplifier input terminals with a 10K load on the amplifier output. The output will saturate near one of the supply rails unless the input voltage is very near to zero. Here's an LTspice simulation: X-axis is the input voltage, Y axis is the output voltage.
H: What USB-2 cabling hardware do I need to connect two Windows 10 computers together? I want to run a .NET app in each of the two computers, so that they send and receive data through USB-2. What kind of cable adapter will do this? BACKGROUND: I need to build a GUI on Windows that communicates through USB-2 with an embedded EFM32 ARM on our embedded board, which is not available yet. so, I want to simulate the embedded with a .NET app running on my Windows 10 laptop and communicating through USB-2 to my .NET app GUI running on my Windows 10 desktop. AI: This is a commendable desire to emulate your device in development to proceed ahead with software development before the hardware is ready. It is a challenging problem. But you can't simulate a USB device on a regular Windows host. USB host has special functions of "hosting" the bus, which are incompatible with USB slave device functions. No "cabling hardware" can help here. The host functions are hardware-based, usually adhere to strict hardware specifications (Intel EHCI or xHCI), and cannot be turned around. Some tablets/laptops may have an USB OTG (or dual-role-data function), and act as USB devices if connected to another USB host with correct OTG cable. To make this happen, the system must have an alternative USB device controller, another piece of hardware. However, these OTG Device controllers usually have hardware-predefined structure of endpoints (usually implementing MTP or Mass-Storage Class), and it is very unlikely that the built-in configuration will match your proprietary "embedded EFM32 ARM" enpoint structure, or can be re-programmed. If your team is designing some proprietary "embedded EFM32 ARM" USB interface, which doesn't follow any predefined USB class, you are out of luck regarding software development in advance. While there are environments that allow virtualization of the system, you will still need to develop a transaction-based model of your "embedded EFM32 ARM" device, which will likely take time, be inaccurate, and can't be trusted. The more natural way would be to get a EFM32 development platform from Silicon Labs, and modify their existing codes to mimic your "embedded EFM32 ARM" device where possible.
H: How to measure switch bounce on a CRO? I want to measure switch bounce, but all I have is access to an old CRO. Based on inputs from this forum post, I tried the HOLDOFF knobs and other buttons too. Nothing worked. In the case of modern DSO's people have suggested using the trigger and I think that may be of use here, but I don't know if it's possible and how. Btw even though I'd come across this wonderful guide on debouncing, I'd love to run my own tests with the switch I have. AI: I've done exactly what you're trying, back in the day. It's possible. First, learn to use the single sweep function. Let's say your setup looks like simulate this circuit – Schematic created using CircuitLab Set your scope to trigger at 2 - 3 volts, negative edge. Set the time base for about 2 - 5 msec/div. Set the brightness fairly high. Now turn off the lights. Leave only enough light to see the scope and switch, and using a keychain flashlight is a perfectly good approach. Arm the scope, turn off the flashlight, and hit the switch. You should be able to get a pretty good idea of bounce. In the old days, you'd use a polaroid camera set up with the shutter held open, then develop the film. That's not likely to be a useful approach these days. However, if you have access to a good digital camera with a B setting, you can use this on a tripod to do the same thing.
H: What is the proper way to dim LED pods? I am trying to properly wire and then dim Cree LED tri-pods (3 LEDs on a disk). The spec sheet appears to read that the way to connect 2 * tri-LED pods (6 individual LEDs in total) would be in series, incremented at 2.6v per pod (maybe LED). It is not clear about the pods at all. Bench top test result only produce any light at all above 4v per tri-LED pod, with optimum at 7.8-10v in 'parallel' for two pods LED info Also, you would think that dimming these LEDs would be via PWM but my benchtop potentiometer demonstrates that lowering voltage is the way you dimm these units. 1) Can someone explain these LEDs pods to me, their optimum voltage and proper dimming? I think my benchtop results tell the story, but I am very unsure. 2) With 7.8v being the calculated max, how bad is it to run them at 9v? There is a difference. I am sure there is some resistance in this circuit I am not factoring in. AI: Can someone explain these LEDs pods to me, their optimum voltage and proper dimming? I think my benchtop results tell the story, but I am very unsure. The current is what controls the brightness of an LED. You need to control the current (somehow). One way to do this is to use a benchtop power supply with a constant current mode. This will allow you to vary the current and set it to a level at which the LED's will turn on. There is one gotcha, the LED will not turn on unless it meets a voltage threshold. If the current goes beyond what the LED is rated for, it will overheat, and damage the LED. Find the color of you LED module, then look it up on the table, you need at minimum that voltage. For a blue module, you need at least 3.1V at which it will draw 350mA. If you have a constant current supply, you could just set it to 350mA and it would find the voltage (which will be around 3.1V). With 7.8v being the calculated max, how bad is it to run them at 9v? There is a difference. I am sure there is some resistance in this circuit I am not factoring in. You need to limit the current, if you set it to 9V the LED's could draw a lot of current, even amps of current which may be too much (you can find out how much current is max for the LED in the datasheet for the color you have). That means you need to calculate both voltage and current if you have a resistor. There are plenty of circuits to limit current or these besides a resistor You cal also use PWM to dim the LED's, the rules still apply, you can't go over the maximum current limit.
H: BJT Constant Current, Resistor Equations I am looking to design a simple constant current circuit to draw a precise load from a variable voltage rail. The voltage rail (V+) should be 10V-20V in normal conditions, but it is possible for V+ to be floating. The control signal (CTRL) is to be driven from an MCU on 5V rail. I am looking for 150mA from V+. Note that I am sizing resistors such that R1 and R3 will drop majority of power when V+ is 10V. The transistor would then handle the additional power as V+ goes to 20V. (So T1 will be rated for >1.65W to handle up to 11V at 150mA). I understand that normally, R2=0ohms so I'd have a constant 4.3V at the emitter (assuming Vbe of 0.7V). That provides the easy formula of R1 = 4.3V / 0.15A. My concern with R2=0 is that if V+ is ground or floating, there's nothing to limit the base current except for the MCU's output driver. When I add R2 to solve this concern, I'm not sure how to set the current in the circuit as it will be dependent upon base current, which I assume is going to be based on transitor's Beta. Is there a way to create a constant current while protecting the base in my situation? AI: Is there a way to create a constant current while protecting the base in my situation? Yes. First of all R3 need not exist, as it serves no useful purpose other than to get hot at high currents and waste power. R2 only needs to be 1 K to 3 K, depending on how much bias current you want to drive the transistor with. Think in terms of 1 to 10 mA of base current. Constant current with a bjt simply means that the base to ground voltage is rigidly fixed by a TL431 or 2 1N4148 diodes in series to ground. Two diodes would lock the base to ground voltage at ~1.25 VDC. Now subtract the Vbe drop of 0.65 volts. This means the emitter voltage is fixed at 0.65 volts. Now your constant current becomes 0.65/R. If R1 is 1.00 K then current is fixed at 650 uA. If R1 is 650 ohm then current is 1.00 mA. If R1 is 6.5 ohm the current is 100 mA. Yep, that simple. If R1 is rated 1 watt or so then it is mostly the wattage rating of T1 to be concerned about. It will dissipate the Vce drop * current as heat. NOTES: 1) If the drive voltage through R2 is fixed and stable then a voltage clamp is not needed, so you would adjust R1 to match the emitter voltage. 2) The constant current will be enforced unless V+ exceeds the voltage rating of the transistor or if V+ has no voltage greater than the Vce + Vbe of the transistor. 3) I prefer the diode clamps because it keeps the emitter voltage low so R1 can be low ohms to get 100 mA or more of current with little energy wasted as heat. Also R2 can have a 3.3 volt or 5 volt source and still maintain the same current. If you can keep V+ at 10 volts that will help keep T1 from getting hot. 4) R1 CANNOT be zero ohms or infinite current would flow and damage T1. Keep R1 no lower than 3.3 to 4.7 ohms.
H: LF356 integrator simulation using LTspice I used the LTpsice to simulate the feedback performance of a integrator circuit with op amp LF356 which is a JFET input op amp but I go strange results (see the image below). The model of the LF356 was the Pspice model downloaded from the TI website (http://www.ti.com/product/LF356/toolssoftware). For this circuit, if I understand correctly, the gain at the low frequency should be as high as the open loop gain of the op amp which is ~100 dB according to the datasheet while at the high frequency (before the secondary pole frequency) should be 20 dB. However, from the simulation results, I only got something like 19 dB gain at low frequency and 15 dB at high frequency. Just to verify that I didn't make any mistake when importing the op amp model, I did the same simulation with another op amp (OPA627) and the simulation results were reasonable (see image below). All of this makes me wonder if there is anything wrong with the spice model of LF356 downloaded from the TI website (which seems not likely) or if there is something about this JFET input op amp I didn't understand (not suitable to use for integrator circuit). I would appreciate if anybody could clarify this. AI: I have seen similar issues in the past with LTspice and from my experience it comes down to the dc operating point. Let's take a look. This is your circuit: Look at the dc operating point of the output (~13V) (red box in the picture), essentially saturating and not in the linear region anymore. Even though, your input source has 0 Vdc, you still amplify some dc signal—that is the offset voltage. For the LF356 this is spec'd at 10mV and this is being amplified by the huge dc gain of the circuit. This messes up the dc operating point and you no longer have meaningful results. To have meaningful results, you want the dc operating point of both the input and output to be about the same—after all, the bode plot never shows an exact 0 Hz frequency. So if you have 0 Vdc at the input plus the ac signal, you should have 0 Vdc at the output plus the ac signal times whatever gain you have. I think in the model, they use a value of 3mV for the offset voltage. Go in there and change it to, say, 100uV—you'll see what the effect of the offset voltage is, a real limitation. They call it EOS in the model file. For example, I set EOS= 40uV (which is what the model for the OPA627 uses) and look at the response: Why did you get good results for the other opamp (OPA627) on the first try? Its offset voltage is listed at 100uV max on the datasheet (they use about 40uV in the LTSpice model) and it does not saturate your output in simulation: Since the offset voltage is so low compared to the LF356, you see that even though the circuit still amplifies the offset voltage, it doesn't get to the point of saturating the output and you get results as expected in the linear region. The opamp is still providing a gain of 500mV/40uV = 12,500V/V to the dc offset, but since the offset is small, it causes no problem in simulation. You could ideally resolve the issue by adding a large resistor to the feedback impedance formed by \$R_F\$ and \$C\$. The problem, however, is that you already have a large resistor there (100k), that forces you to pick a value much greater so that at high frequencies the orginal feedback impedance still dominates. Also, the greater the value of this parallel resistor, the greater the dc gain to the offset and risk of saturation. I tried a few values, and the highest I could go was 40Meg (just on the brink of saturation): It shows improved behavior but still really close to saturation (~11.7Vdc at the output). Now, this is a method a use sometimes, because it forces the dc operating point to be the same at the input and output (this is similar to find the loop gain for stability analysis). Look at the location of the ac source now: That arrangement makes both the input and output be at the same dc level and keeps the opamp in the linear region. I am 'injecting' a voltage and measure the gain around the loop. You can look at this answer(towards the end of it) or this video, it explains a bit more why this works. And this is finally the ac response for this setup: Hope this helps.
H: Symmetric vs Asymmetric PWM I am working on Control of Power Converters, I was reading TI's piccolo DSP ePWM guide and came across symmetric vs asymmetric PWM, I have a good basic understanding about converters, DSP and all. My question : According to ti's note http://www.ti.com/lit/an/spra278/spra278.pdf [page 10] symmetric PWM generates less harmonics, Can anyone please explain How? Thanks AI: My question : According to ti's note http://www.ti.com/lit/an/spra278/spra278.pdf [page 10] symmetric PWM generates less harmonics ... It depends on what other assumptions are being made, and there several to unpick. Symmetric PWM (SPWM) uses a control number n to turn a pulse on n counts before a datum time, and off n counts after. The resulting pulse has a width of 2n, but is centred on the datum time, regardless of pulse width. Assymetric PWM (APWM) generates a pulse of n counts wide, usually turning on at the datum time and off n counts later. The centre of the pulse is located n/2 pulses after the datum time, so moves about with respect to the datum as n changes. Other things being equal, as the pulse width can change by 1 count rather than 2 as in SPWM, it has twice the resolution. When PWM is being used to generate a static voltage level, this does not matter, other than the difference in resolution. When PWM is being used to generate a dynamic waveform, for instance in an inverter generating AC to a motor drive, or in a power amplifier generating an audio output, then any difference between the digital model of the waveform that the controller is manipulating, and the actual analogue waveform that's output, will generate distortion. The simplest, most useful digital model is a uniform sampling rate, which implies equally spaced pulses. If a request of M is sent to the PWM unit, then that's counted as an output weight of M at the datum time. In the dynamic case, this timing matters. If we use APWM, then the pulse is not centred on the datum time, there's a delay which varies with the M request, and the pulses become unequally spaced. As this delay is not part of the model, it introduces waveform distortion into the output, pulses that are closer together have a higher 'weight' when averaged by the output filter. If we use SPWM, then each pulse is centred, and they stay equally spaced. Why not use a more complicated model to represent the unequal pulse spacing of APWM? It makes it a lot more complicated. Most of the time, the distortion introduced by this variation is not much more than a niggle, especially when the clock rate is high and the waveform frequency is low, like for motor-drive. Changing to SPWM instead of APWM can win you a significant data sheet improvement on distortion, even at the cost of one bit of resolution, without changing the model at all. For more demanding applications, like audio generation, this distortion is a deal-breaker. Even going to SPWM will not work sufficiently well, as there are other mechanisms whereby the audio output can be different to the modelled input, which include amplifier rail voltage, and output voltage dependent switching times. These are so unmodellable that the forward model, while retained for stability, is replaced by feedback for fidelity, which automatically takes account of all the small differences between request and output. This is the basis of class D amplifiers, aka noise shaped or sigma delta
H: Why does the MRI machine does not rip off its own electronic components Maybe it's a lame question but it came up to my mind recently. Usually, Electronic equipment or metallic materials are forbidden in MRI rooms. Also, there are no electric sockets present in that room. How is the machine designed so that it does not rip off itself!! AI: TL;DR Magnet is made from nonmagnetic materials where there is high field. Anything sensitive, is positioned where the coil design results in a net magnetic field of zero, where it cancels out. If something is very very sensitive to the field, you can put it in a can, which effectively "pushes" the magnetic field out. Where a magnetic field is zero, components cannot be ripped off. I know that, a very similar construction, a superconducting lab magnet, is made out from nonmagnetic metals,copper, gold are few. But, more importantly, you wind a magnet such that its field is confined within the donut, but cancels out outside. this is made from the same current, so it is only a geometric problem, how to wind. I am sure that all electronics are out in the safe zone. If something should absolutely be shielded from a DC magnetic field, one can use a mumetal can to do so. A special condition, which is called a magnet quench (shivers down the spine) might make protective winding ineffective for an instant. If the concern is the magnet itself, then I can say that a lot of mechanical engineering goes into some of the strongest magnets in the world such that they don't collapse onto themselves.
H: Astable multivibrator diode improvement The output voltage of an astable multivibrator is not a perfect square wave; the voltage when viewed from an oscilloscope tends to resemble a curve. I'm told that this is because the voltage across the capacitors cannot change immediately and therefore the R1 capacitor current somehow disrupts the voltage waveform at the transistor collector. Apparently this can be fixed by isolating the capacitor from the collector using a diode: Now C1 charges through its own resistor, R2. But I don't understand how the R1 current in the first picture disrupts the collector voltage. When Q1 turns off it's off and therefore above ground. How does the capacitor alter this? And when the diodes are included, how is the situation different? To me it seems that the collector is simply around 0.7 volts lower than the capacitors R2 plate. AI: The point of the diodes is that they stop conducting when the voltage on the collector rises when the transistor switches off. In the first schematic, when Q1 opens the voltage on the collector of Q1 cannot rise immediately to V+ as C1 is charged to about -0.6 V when Q1 was conducting. So when Q1 switches off C1 wants to keep the collector of Q1 low. A current needs to flow through R1 to charge C1. This charge current causes a voltage drop across R1 and that prevents the voltage on the collector of Q1 to rise immediately to V+. In the second schematic this works differently. As soon as TR1 switches off R1 can pull the collector to +9V. Now D1 prevents a charge current flowing through R1, instead all the charge current will need to come through R2. As no current will flow through R1 the voltage on the collector of TR1 can rise to +9V immediately.
H: Measurement of total AC resistance (including radiation resistance) of a coil using LCR meter If we measure AC resistance of a coil using an LCR meter (or impedance analyser), does it include both ohmic resistance and radiation resistance? I understand that the radiation resistance is negligibly small for coil at low frequencies, however, for example, if we submerge a coil underwater, radiation resistance can be comparable to ohmic resistance. I am measuring resistance of a coil underwater and I noticed a significant increase in resistance compared to the air surrounding. I wanted to confirm that the increase is due to the increase of radiation resistance. Maximum frequency is 1 MHz, and coil self resonance is way above the measurement range - we can safely neglect the effect of parasitic capacitance. AI: I am measuring resistance of a coil underwater and I noticed a significant increase in resistance compared to the air surrounding. I wanted to confirm that the increase is due to the increase of radiation resistance. Water conducts quite well and of course sea water conducts a lot better. What you are seeing is the effect of induced eddy currents (electrical) in the water. Literally, your coil creates a changing magnetic field and this induces an electric field in the water and the water acts as a resistor and electrical currents are produced. It has nothing to do with radiation resistance - radiation resistance is a phenomena associated with the transmission of EM power through a medium. What you are seeing is a resistance due to near-field effects and eddy currents in the water.
H: Capacitor allowing DC through? LM833N sorry for spamming about questions today, but I am riddled here. SOMEHOW there's 2.2V at the output is that even possible?! LM833N Datasheet simulate this circuit – Schematic created using CircuitLab AI: If it's really 1 mF ( 1000 uF) it's an electrolytic capacitor, which WILL leak ( a few microamps, depending on age, temperature, and bias voltage). To minimise the leakage it needs to be properly biased (about half its rated voltage) so that the electric field builds up the insulating layer by ... electrolysis. The clue is in its name... If the resulting DC bias is a problem, there are 2 options: A load resistance of a few kilohms will reduce the DC output to a few millivolts Or replace the capacitor with a lower leakage type (film cap or ceramic). See also this Q&A for more details. Note there is no need for such a large value : you have 0.22 uF into 0.5 kilohms on the input which will severely limit the LF response. 1000 uF would only be appropriate with a load resistance of a few ohms or less, and the LM833 cannot drive such a low load anyway. Your last comment implies it has trouble even driving 100 ohms, which is not very surprising.
H: Connecting Difference Amplifier to High Impedence Sensor I have a high impedance differential sensor (stable 600k impedance Rth, 10mV signal, Fout=1kHz). I need to amplify this signal to about 1V (40dB gain). Due to layout/system constraints only the TLV9061 OpAmp stage can be used. Any suggestions on what topology would enable this? The problem I run into is that any difference amplifier or transimpedence amplifier needs feedback resistors that are unreasonably high (10s or 100s of Megohm) for a real world implementation. I was looking into T-Network solutions as in this thread but it seems they suffer from high current noise. Looking for any advice on other topologies to explore or methods to consider. Thanks! AI: Why not just use the op-amp in non-inverting mode: - The impedance it presents to the transducer is giga ohms and the feedback resistors are isolated from the transducer hence don't need to be mega ohms; they just need to have the correct ratio i.e. 99:1 to give 100x amplification. For the TLV9061, be aware that if used in single supply rail applications the output won't quite get down to 0 volts.
H: Controlling 1000W LED strips with Arduino using PWM and MOSFETs I'm doing a large photostudio automated lighting setup and I'll need a lot of light so it will be 1000W of LED strips and I need them to be controlled by Arduino. The strips are gonna be on about 20% of power most of the time and then for a photo capture (about 2sec) they gonna light up to 80-100%. I have some electrical skills and I've done this before in smaller scales but I'm worried about controlling 1000W with PWM. So please can anyone confirm if following setup will work? Power supply: 1000W 24V Mean Well (RSP-1000-24) Arduino Uno with 6 PWM outputs MOSFET modules from Ebay: https://www.ebay.com/itm/MOSFET-Switch-Module-Four-Channel-4-Route-MOSFET-Button-IRF540-V2-0-For-Arduino/122680439778 https://www.ebay.com/itm/3D-Printer-hotbed-MOSFET-expansion-module-inc-2pin-lead-Anet-A8-A6-A2-Black-H5M9/253328731753 I need to drive 5 channels. 4 of them with 3Amps each and one channel with up to 30Amps. This channel can be split into multiple channels driven by single Arduino pin. So I would use that 4 channel module for those 3A channels and then use two of those 3D printer powerful MOSFETs to drive that 30A channel split to two 15A channels. Question 1: Will it work? :) Question 2: Will the power supply be OK with driving the whole load with PWM? Are the PWM outputs from Arduino synchronized? Because if they are the power supply will be switching between 40A and 0A constantly. If I could offset phase-shift the PWM outputs the load for the power supply would be more spread. This is what I mean: Question 3: The MOSFETs - will that 3D printer MOSFET switch at 5V from Arduino? Do I need some extra cooling? I think I should be OK, because the PWM load should be at 20% most of the time and then just about 2sec of full load. Right? Oh and is it a good idea to put multiple MOSFETs in series paralel to spread the load - will it spread evenly? I guess better option is to split them into multiple channels right? Thank you. AI: I see no reason this wouldn't work. If you're concerned about the effects of a PWM load on your power supply, I'd suggest adding some extra capacitors on its output (I don't know how well the output is filtered already, but more capacitance never hurts in a power supply). Your MOSFETs seem appropriate for the job; the HA210N06 on that board is a new one to me, but this datasheet suggests that they will be fine. However thermal dissipation could be an issue: at 5V gate voltage, the channel resistance will be about 6mOhm, so power dissipation for 15A will be about 1.5W. Even at 20% duty cycle, that small heatsink will struggle to dissipate an average of 300mW. I'd suggest fitting a larger heatsink or a small fan. And if you can use a smaller MOSFET to boost the gate voltage up to 10V the channel resistance will halve, which will help a lot. I certainly wouldn't trust the ebay vendor's description that the board is stable up to 25A: there's just no way that tiny heatsink can handle close to 2W. The Arduino Uno board has 6 PWM outputs, which can be set to run on different duty cycles, phases, and IIRC and up to 3 different frequencies, so arranging for appropriate power sharing between your circuits should be possible. Multiple MOSFETs in parallel (not series) works in theory, but in practice variations in manufacturing etc will likely cause one of them to take a lot more of the load than the other, so one will get hotter than the other. If you can arrange to split your load into two separate 15A channels, that would be much more reliable.
H: What can be said about the nature of the noise by looking at this spectrum? I use some industrial amplifier modules where each of them amplifies force transducers. All amplifiers are powered by a single power supply and the output. Amplifier is set to 6kHz filter. And there is no anti-aliasing filter in the system. Interest of frequency is max 10Hz and the sampling rate is 500Hz. Sometimes when the noise noise appears at the sampled outputs it has a peak around 3.1Hz. So this corrupts the readings below 10Hz. I took some offset readings to observe the electrical noise better. I have the following 12 seconds of noisy signal in time series: And here 1 second view: And below is the FFT of the signal: (left-click to zoom in) And finally comparison when that 3.1Hz noise, green when it is there and the blue plot when it is not there: I still could not find the source of this noise. But just by looking at these plots, what can that 3.1Hz noise be? Can that be aliasing? If so, is there a way to estimate the real noise freq. by looking at the peaks at FFT given that we only have 500Hz sampling rate? AI: Looks like you're in 50Hz-land, observing that there are about 10 cycles in 0.2 seconds in the second graph. If whatever 50Hz signal you have is rich in harmonic content, the tenth harmonic will be pretty close to your sampling frequency. In fact I'll speculate it's 3.1Hz away (and will move around as the mains frequency drifts under load). There's a reason sample data systems always need an anti-aliasing filter. If you're not interested above 10Hz, you can use it to attenuate 50Hz too.
H: What is this component called (Plastic housing with screws for connecting wires)? This is part of a PIR sensor circuit. The component in question is the black array where wires can be fastened. I tried searching the web, but for lack of any tangible keywords, I came up empty handed. AI: That's a screw terminal block. As you can see in your provided image: Wires go inside. Loosen the screws, insert wires, tighten screws, done. No soldering or crimping required.
H: Analog Blackfin Processor Silicon Revision issue Recently we got a large batch of ADSP-BF5346s that say they are Silicon Rev 3 but internally read as Rev 2. Is there a way for me to determine the Silicon Revision number on the rest of the shipment without soldering all of them? I'm thinking a bootloader/JTAG but don't even know where I would find a bootloader for that. Here's the code I might can use if I can find a way to load it /* silicon revisions 0.0 1.0 1.1 */ int silrev_list[] = {0x0, 0x100, 0x101}; int running_on = (*pREG_TAPC0_IDCODE & BITM_TAPC_IDCODE_REVID) >> BITP_TAPC_IDCODE_REVID; /* check the part */ int built_for = __SILICON_REVISION__; /* check what we built against */ int running_on_hex = silrev_list[running_on]; DEBUG_PRINT("Built for version %d.%d, running on version %d.%d\n", built_for>>8, built_for&0xff, running_on_hex>>8, running_on_hex&0xff); AI: If you purchased the parts from a reputable distributor and a sampling of the parts show the wrong chip stepping level then you should return the parts to the distributor for a refund or proper exchange. Make sure that you read the vendor documentation completely so that you know 100% sure that you understand the chip version reporting system. Sometimes things may not be exactly as we think them to be. Lastly if you purchased parts from a less than credible source, which may be done to save money, then you have what you have and your recourse is limited or nothing.
H: BJT vs FET for VHF LC oscillator In the ARRL (2011) section 9.3.1 about LC oscillator circuits it says that "[t]he N-channel JFET source follower shown appears to be the most popular choice nowadays", but does not explain the advantages of JFETs over BJTs. All I can think of is the fact that BJTs need extra components in order to be biased, and JFETs have a higher input impedance. What would be the advantage of a JFET (e.g. J113) over a BJT (e.g. MMBTH11) for this application? And why the preference for an emitter follower topology? EDIT: Here are the schematics from the ARRL (2011) And my simulation which works well when tested on breadboard AI: What would be the advantage of a JFET (e.g. J113) over a BJT (e.g. MMBTH11) for this application? And why the preference for an emitter follower topology? I've run common-collector Colpitts oscillators using BJTs from sub VHF to 600 MHz and there is no great problem to be found. I prefer the BJT because there are more options to choose from and JFETs appear to be not as much in favour as they used to be. But, the reduction in component count will be significant to some designers so it shouldn't be ruled out. As to why the common-collector Colpitts oscillator is preferred is down to Miller capacitance - the collector is not used hence it does not force negative feedback to the base and cause problems. Loop gain comes from the voltage amplification due to C3 and L (Colpitts A) and the oscillation frequency sits on the slope of the resonant peak. It's the same answer for a JFET - miller capacitance is constant and drain amplification is zero.
H: In Charging Circuit with battery detection The circuit is charging the battery with Vcharge and VCharge also power up the circuit operation. Battery will serve to power the circuit when main power supply VCharge cut off. A switch is added to connect battery to the circuit with led indicator. simulate this circuit – Schematic created using CircuitLab The led is act as indicator to show the battery is connected to the circuit. It is operated as expected when the switch is turned on without Vcharge. However, when VCharge is applied , then the led will also light on regardless of the switch turn on or not where it is needed to charge the battery. Is there any method to make the led light on only when the switch is turn on even when VCharge is applied? AI: Is there any method to make the led light on only when the switch is turn on even when VCharge is applied? Use a double pole switch like this: - Only when the switch is operated will the LED illuminate.
H: I don't understand the windings inside my power drill. I was curious about how my power drill worked and I disassembled it. I understand the general principles at work here but I don't understand why the winding is set up this way. I assume running current through the solenoid in the center induces a magnetic field and causes the motor to spin. I notice the wires go parallel the axis of rotation (I assume to align the field correctly) so I'm not sure if you still refer to this as a solenoid. You can see there are 2 sets of winding. I am not sure why. Not sure why the winding is configured this way either. The trigger is a rheostat that goes from open -> ~15MOhm -> closed. The directional switch (not sure) I believe just changes which coil gets power. Since it's just AC and there's no AC-DC transformer I'm not sure how it would even matter which coil gets power since the field would presumably be flipping at the frequency of mains. AI: The motor is a universal motor. It is so named because it can operate from either AC or DC power. The center rotating part is called the rotor. The outer stationary part is called the stator. The smaller diameter copper part on one end of the rotor is the commutator. Current flows through the stator windings and the commutator to the rotor windings. As the rotor moves, the commutator changes the connection of the rotor windings so that the magnetic field in the rotor is always at close to a right angle with the stator windings. That way the magnetic force keeps pulling the rotor around in a circle trying to align the rotor field with the stator field, but it can never catch up and just keeps on turning. When a universal motor is operated from AC power, the current reverses 50 or 60 times per second depending on the power frequency. Since the current flows from the rotor to the stator, the current and magnetic field reverse in both parts at the same instant. That keeps the motor turning in the same direction even though the current keeps reversing. To reverse the motor, the rotor winding connection is reversed with respect to the stator winding. Since the universal motor has torque vs. speed characteristics similar to those of a DC motor, inserting a series resistance as with a rheostat works well as a method of speed control except for the heat generated in the resistor.
H: Why carriers move when Electric field is applied on Haynes-Shockley experiment I would like to know why excess carriers/minority move when an electric field is applied at the Haynes-Shockley expirement AI: This is because charge in field feels force equal to field times charge. Coulomb law. The interesting question is why don't those charges accelerate to very high speeds. This is because they statistically hit the lattice atoms, then start all over. This is the mean free path.
H: Q: Digital potentiometer MCP4162 I am having a hard time understanding the MCP4162 Datasheet. The application for the digi pot is have an Ardunio to control the wiper resistance so I can have a constant desired output voltage regardless of input signal. So depending on the input signal the digipot will find the ideal resistance to get close enough to the target output voltage of 1.98V. Example: Set Output Voltage = 1.98V Input = 1.414Vp \$Digi pot = ((\frac{V_o}{V_in})-1)*R1\$ \$Digi pot = ((\frac{1.98}{1.414})-1)*1000\$ \$Digi pot = 400\Omega\$ Input = 0.5Vp \$Digi pot = ((\frac{V_o}{V_in})-1)*R1\$ \$Digi pot = ((\frac{1.98}{0.5})-1)*1000\$ \$Digi pot = 2960\Omega\$ simulate this circuit – Schematic created using CircuitLab I have read the datasheet multiple times and I still don't which register is the one I need to be changing. The one I would assume is the 0x04 address where it's described below. The datasheet only tells you about 2 registers and what their bits do when you write into them. and I dont understand the equation stated in the datahseet that tells you the output resistance. AI: According to the datasheet, you're going to want to write to Volatile Wiper 0, and 1. The TCON Register is used for configuring how the devices outputs are connected, you'll probably have to set that up on powerup. Although the defaults might be ok. You can ignore the non-volatile variables. Those are used if you want to program the chip and then run it without a micro attached.
H: Proper power supply for this gate driver IC I will use the gate driver configuration shown below: Gate Driver datasheet MOSFET Datasheet As you can see, the 5V and 12V are isolated. I chose this AC/DC converter for the 5V supply. It's 1 Output 5V/3A. It will supply a STM32 and a Raspberry Pi. I decided to step up the 5V to 12V using this Isolated Module DC DC Converter. That module is just 1W/ 84mA max. My question is: Can it effectively supply the peak currents to charge gate capacitance using decoupling capacitors? AI: Do the math. Find the total effective gate capacitance of the FET. Determine the maximum rate you will ever switch the FET. From that you can get the average current required on from the 12 V supply. If that's more than 84 mA, then you chose inappropriate parts. If less than 84 mA, then it is doable. Find the total charge that is required to drive the get high once. Assume all that charge will come from the cap across the power input of the gate driver. Use a capacitance large enough so that the voltage drop is acceptable. Once you do all that, you'll realize that you don't really need much. Then just plunk down a 1 µF 20 V cap and be done with it. Added I just looked at the FET datasheet, and the total effective gate charge is 200 nC. That will cause a drop of 200 mV on a 1 µF cap. That shouldn't be a problem. If you don't like that for some reason, put a 10 µF cap in parallel with the 1 µF. In that case, put the 1 µF physicall closest to the gate driver IC.
H: Why would it be bad practice to limit current with just a resistor? I am sure I am incorrect, but nobody can tell me why I am incorrect. I have some LEDs that require 1amp. My DC source 52v @ 2.6amp DC power source (constant current technology) A proper solution is not easy without careful engineering. All ICs on mouser get close but still leave to much amp. Restricting proper amps for high powered LEDs is important. I want to just slap on a few resistors behind current regulator (updated) ALT80800KLPATR (and not part of topology, yet, if at all), and call it a day. wishlist: It would get the voltage down, regulate the current and leave some play room for an Arduino to switch resistor values for a possible LED upgrade (what if I need an extra amp later?). I am told I am wrong which I am sure I am but, when they say it can't be done I show them then after adding a 560 ohm If I am wrong, then I am wrong but those numbers tell me that it should do what I want it to do. Can somebody debunk me properly? AI: It is hard to know where to begin with a question like this. It seems that there are many things you don't fully understand about electricity and LED's. I will do my best. What determines the brightness of an LED is how much current goes through it. So when driving an LED, the goal is always to achieve the desired current. The starting point for design is always based on two things: How much current does the LED need? What will be the voltage across the LED when that much current is flowing? There are lots of ways to drive LED's. One of the most common for low power indicator LED's in low-voltage circuits is to have a voltage source supply current to a resistor/LED. We call the resistor a "current-limiting resistor" because its purpose is to limit the current to a chosen value. Here: simulate this circuit – Schematic created using CircuitLab The LED current will be (3.3-Vf) / 560 Vf is the forward voltage across the LED. "Forward" just means in the direction required to turn the LED on. This works fine as long as you are OK with the power dissipated by R1. If V1 was 100V, for example, then R1 would need to be a large and cumbersome power resistor, and you might need to add a fan or heatsink to keep things cool. Another way is to use some type of current source. In that case, it is pointless to add a resistor. All the resistor will do is dissipate power without changing the LED current. simulate this circuit But this is not the last word. Because REAL current sources only work over some finite output voltage range. If you add a big resistor in series with a real current source, at some point, it will typically act like a voltage source. At that point, you may be able to limit current with a resistor (just like the first circuit). That could be what is happening for you. Not sure. Some current sources may not like it if you put a large resistor in series. So if you are not sure it is best to avoid doing that. You might get unreliable behavior or unpredictable results. You can also try dimming your LED by adding a resistor in parallel with the LED. This also wastes power, but should not cause harm to the supply or the LED. simulate this circuit Basically, what you are doing is giving the current an alternate route so that not all the current flows through the LED. The smaller the resistor, the less current flows through the LED. The exact current through the resistor will be Vf/R1. In all cases with resistors, you should calculate the power dissipation in the resistor to make sure it is reasonable. I would say reasonable is up to around 100 mW. From 100mW to 500mW might be OK in some cases. Above 500mW, you should figure out a more efficient way to drive or dim the LED, because getting rid of 500mW without overheating other stuff is going to be more trouble than designing a more efficient circuit to begin with.
H: What does it mean when a capacitor and it's connectors are marked with a red marker? Is there some kind of convention in electrical component maintenance that would explain a red marking on a capacitor? I found this in my Pioneer SA 5300 audio amplifier and wondered if this carried some special meaning. AI: Most likely Quality Assurance inspection. For what purpose is anyone's guess (comments above are good guesses).... Here are some other ideas: Such a large part as this could cause problems at or before the wave-soldering stage....an inspection to see that it is well-seated against the PCB after soldering. A three-legged part with fat leads may miss a hole. An inspection to see that all three made it through their respective holes and bend over to make an acceptable mechanical seat. An inspection to ensure that a polarized capacitor was inserted the right way, to save injury to the QA-person down the line who powers-it-up the first time.
H: Portable high lumens array I am trying to build a portable light source - running (exclusively) on a 12v electrical bike battery. Have it operate approx 1 hour on a charge and produce the maximum possible lumens. What would be the best approach Led and driver wise? (Strip/die?) A bit lost trying to calculate what components will fit best. AI: Your battery pack consists of 5 parallel strings of 13 series 18650 Li-ion cells. Type : Li-ion battery pack Nominal voltage: 48V Capacity: 12 AH Specification 13S5P (18650 Cells x 3.7v, 2500mah) Size: 420 mm x 100 mm x 100 mm Weight: about 4.2kg I recommend the 1120 mm (44") Bridgelux EB-Series Gen 2 strips BXEB-L1120Z-40E4000-C-B3 @ $12 each. EB Series Gen 2 Linears are designed for use in premium indoor or industrial applications where a high level of efficacy is required. The new generation uses the high-efficacy SMDs to achieve up to 180lm/W, which enables designers and fixture manufacturers to meet DLC Premium requirements. They are designed for linear troffers, pendants and other luminaires in indoor commercial and industrial applications. Magnified photo of an EB strip. It is about 1" (24 mm) wide. You can easily run these EB strips at 1 Amp in open air without a heatsink. That would be about 40 watts for ≈7,000 lumens @ CCT=4000K CRI=80 At 40 watts (40V x 1A) with a 46.8V 12 AH battery you should be able to power 12 of these strips (84,000 lumens) for at least 1 hour. This would be the equivalent of over one hundred 60 watt clear incandescent light bulbs. If you need diffused light, that could reduce the lux significantly. The project is a mobile art installation 4000K CRI 80 is a middle of the road light source. If the strips are to illuminate art then a 90 CRI would be better. The ideal CCT would depend upon the colors being illuminated. Example: lower CCT like 2700K would bring out the reds much better. The voltage output of the battery over its discharge cycle will range from ≈47V, full charge, down to 39V cutoff. A Mean Well LDD-1000H LED driver for each strip would keep the output consistent and uniform by providing a constant current of 1 Amp throughout the entire discharge cycle. The LDD driver would add a cost of about $5.00 per strip. The LDD a fixed constant current source with no dimming.
H: Data memory usage reported by AtmelStudio for ATtiny85 I am using AtmelStudio to program an ATtiny85, which has 512 bytes of SRAM data memory. My code includes a large lookup-table (array) which is 512 bytes: const uint16_t lut[256] = { ... }; The project has no other global or static data, so when I compile it, AtmelStudio reports: "C:\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "mcp4821_attiny85.elf" text data bss dec hex filename 242 512 0 754 2f2 mcp4821_attiny85.elf Done executing task "RunCompilerTask". Using "RunOutputFileVerifyTask" task from assembly "C:\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll". Task "RunOutputFileVerifyTask" Program Memory Usage : 754 bytes 9.2 % Full Data Memory Usage : 512 bytes 100.0 % Full Done executing task "RunOutputFileVerifyTask". As shown, AtmelStudio reports that I have exactly filled my available data memory space. If I make the lut array one element larger, the compiler alerts me of the memory overflow. Conversely, if I make the array one smaller, the compiler reports that I have room to breathe (of two bytes). However, when I used the code to program the chip, I found that there was indeed a memory corruption, and I received bad data when reading the last 16 bytes of the array. For testing, the LUT is just a sine wave - and the microcontroller is writing the LUT to a DAC. The glitches in the image below reveal the erroneous data from the bad memory accesses (sorry for the poor image quality): I resolved this problem by following the great advice found here: Memory management problems with ATTiny85 Changing const uint16_t lut[256] = { ... }; to #include <avr/pgmspace.h> const PROGMEM uint16_t lut[256] = { ... }; and using pgm_read_word() to access the array elements. But I'm not sure why this is necessary. My questions are: why doesn't the array fit into the data memory even though AtmelStudio reports no error. and most importantly, why does AtmelStudio report no error? I suspect the answer to both is related to stack space, but I'm not sure. Thanks. AI: Even if you define your variables as const, the compiler will still put them into the AVR's RAM. Only if you define your variables with the PROGMEM attribute will it keep the variables only in flash and read them from there. Your array fits right into the RAM, completely filling it. But as you already suspected, running your main or other functions will use part of the RAM for the stack, probably overwriting your LUT. This is called stack collision and can not be predicted by AtmelStudio, as it has no way of knowing which functions you will call and how often. If you really need all 512 RAM Bytes and don't want to load from flash, you could write the code to drive the DAC from the LUT in assembler code without using a stack. For illustration graphic borrowed from here
H: How to get more torque using a Stepper motor I am using a stepper motor with a belt. The system has more friction due to the belt. So, I need to increase the torque of the motor at rotating. I am currently using 57HS09 motor and M542 It has microstepping setting as 1000PPR and full current(4.0A) is given. Pulse generated by an Arduino. The main coding is given bellow. This is the function of Arduino code.stepDelay is given by another function after some calculation. void move() { if (micros() - lastStepTime >= stepDelay) { lastStepTime = micros(); digitalWrite(STEP_UP, HIGH); delayMicroseconds(100); digitalWrite(STEP_UP, LOW); delayMicroseconds(100); } } I have no idea how to increase the torque more. How do I increase the torque of the stepper motor? AI: You have two possiblities. 1) You can increase the current in the motor. Your motors are rated for 4 amps. Use it. Be aware that this will increase the self-heating of the motors, and depending on your motor mounts you may overstress the motors. Using wood or plastic is not a good idea. Metal will conduct heat away from the motors much better. 2) Cut the number of microsteps. Using microsteps is a tradeoff of less torque for smoother operation and better resolution. You'll get maximum torque with no microstepping at all.
H: Step-up converter with Vin, Vout, GND I want to use pololu step-up converter https://www.pololu.com/product/2836 in order to power a 5V device with two Ni-Mh batteries (1.3V each). It has only Vin, Vout and GND connectors. I've checked with voltmeter the batteries together and they give stable 2.6V, which should be, according to specs of the converter, enough to make it work. I've tried wiring as below but the voltmeter shows 0.48V, when I'm expecting 5V... I don't know what am I doing wrong... Is this wiring wrong or my converter broken? AI: Solution found: My input voltage was too low to start the module... I'm not sure how I've missed it, but replacing Ni-Mhs with regular alkaline batteries ~3V total made this circuit behave as expected... Thank you, John D for pointing that out.
H: How to align components for front panels I am struggling with the front panel setup. I need to align 3 types of components: push-buttons, potentimeters and 5mm leds. The potentiometers have a nut to fasten it to the front-panel, for the leds I have small plastic mounting rings. The push buttons would need to go onto a pcb, that I could mount under the front-panel with stand-offs - the height looks good to me: With this approach getting the leds mounted is complicated - not a lot of space and I would push the pins in millimeter perfect so that the led body would click into the panel mount rings. I could also just mount potentiometers and leds into the front-panel and wire things freely, but then I have no idea how to handle the push buttons. AI: From your somewhat scrambled description you only have problems with LEDs... which is strange because the LEDs are the only components with long flexible leads that could be bent easily to required position. So, bend the leads to get the LEDs as close to required position as possible but do not solder them. With everything else in place attach your perfboard to front panel, guiding LEDs into their holes. Then solder them, while holding steady in required position. If you are OK with LEDs sticking out a bit, push them forward until the flange is flush with back of the front panel before soldering. This will ensure perfect alignment of them all.
H: Use single GPIO out to reset multiple lines I want to use a single Raspberry Pi GPIO out to reset two lines: LCD and CTP. What would be a correct schematic ? Can I simply connect both lines together ? Both devices are "no-name", i.e. no schematic available. LCD IC is HX8379A, CTP is FT6236. AI: Yes, they are both active low +3.3 Vmax. From the datasheets I see no reason why you can’t simply connect them together, assuming you’re willing to sacrifice individual control.
H: Solid state relay voltage current rating I am looking to use a solid state relay like this one . This relay has a peak load voltage of 350v and continuous dc current rating of 110mA. My question - if I wanted to control 12v @ 1A DC through this SSR, will it be able to handle it? 350v @ 110mA = 38.5W and 12v @ 1A = 12W, since 12W is less than 38.5W it should work, correct? AI: My question - if I wanted to control 12v @ 1A DC through this SSR, will it be able to handle it? No, The limit is 110mA for DC, you can't go beyond 110mA DC without risking damage to the part. There are other conditions that you can go over the 110mA limit, and the bottom graph shows you why, the switch is anywhere from 10Ω to 16Ω It appears to me that the switch would be useful for isolation and a switch for triacs or relays or but not for any substantial load.
H: Embed Component into LTSpice I have downloaded the Spice file for the TLV9062 here. I have now created a custom symbol LTV9062 that lives in my AutoGenerated folder and links to the TLV9062.cir file for the Spice model. When I make a schematic it runs fine on the original machine but won't work on any other computer because the folder path is different for the symbol and the circuit. Is there some way I can include this symbol and circuit such that it takes it from the same directory as my schematic? What I want to do is to be able to zip my schematic and all custom circuits that it uses into a single folder. When I email it to someone I want them to be able to run the schematic without having to relink all these parts. I tried looking at libraries but am still confused. AI: Simplest Approach That .CIR file looks like what could also be .LIB or .MOD (or whatever, really.) It's just a text file with SUBCKTs and MODELs. And like any other part of a Spice deck, you can insert this directly into the schematic. Doing so may be distracting because there will be a LOT of text now appearing in your schematic. But doing it this way guarantees that the MODELs and SUBCKTs follow the schematic since the entire text is included in the schematic. That means it is really easy -- just copy and send the schematic. You may complain at this point that you also built a custom schematic symbol, as well. If so, my response would be to point out that there was no need to do so for an opamp like this. There already is a customizable symbol located in every LTspice installation. Just hit F2, select the [Opamps] folder there and scroll over until you see the symbol name, "opamp2", located towards the end. Use that symbol and paste it into your schematic. Now, just right-click carefully over the word "opamp2" that appears near the symbol and edit it so that it says "TLV9062". If you follow the above process, then your schematic will completely contain all of the spice deck required to run the schematic. It will be built into the schematic. So you won't even need to transfer a folder of files. You can simply hand out the single schematic file. It will run in any plain vanilla installation of LTspice. If you have more such models to include, that just means lots more text on your schematic. But you can re-arrange things so that it is still readable for anyone. Of course, if it turns out that you really do need to create custom symbols (and there is a need for that), then this is no longer workable. Symbols require a symbol file (extension is .ASY) and so now it would be appropriate to take the next step. Schematics with Custom Symbols If you need to use custom symbols (which can apply to an hierarchical schematic in a .ASC file of the same name or can apply to any SUBCKT you write), then you will need to save these symbols as files so that LTspice can find them and apply them. Any symbol you create can also include the file name containing the model. There is a special attribute called "ModelFile" which you can include and modify, specifying the name of the file containing one or more models and subcircuit definitions. If you do NOT use this method, then you probably will need to include a ".INCLUDE" Spice statement on your schematic that includes some specific file containing these models and subcircuits. In your case, you are provided with a .CIR file. So just save it inside the same folder where you keep your schematic. Then just use .INCLUDE and give that file name. No need to add a directory. LTspice will find it if the file is in the same folder with the schematic it is working on. If you use the ModelFile attribute, again do not include a directory. Just the file name for the .CIR file. (Include the extension, .CIR, though.) LTspice will find the model file, as well. This way, you can just transfer the folder and all needed, related files. Anyone should be able to run the schematic.
H: SPICE issue: keeping subcircuits independent of eachother TLDR I want to make circuits that are connected but independent in Spice. I am using the Xic graphical editor for WRspice, but I think that this issue isn't specific to the type of Spice being used. What I want to do is this: send an input into my subcircuit, and then take the output of said subcircuit and pass it onto other subcircuits. Basically: input -> subcircuit1 -> output -> subcircuit2 and onto more subcircuits. My trouble is that when I add anything else to the output location of subcircuit1, it affects the behavior of subcircuit1. Does that make sense? Adding a resistor onto the circuit changes how the circuit behaves. I want to send an input into a circuit, have that circuit generate an output, and send that output onto the next circuit without the components of the second circuit affecting the behavior of the first. I.e making these circuits independent of each other while being connected. Is this possible? I hope I am clear. Thanks! AI: Assuming you want to use the voltage of one as the input of another, could you use a voltage dependent voltage source, with a gain of 1? It won't be a realistic simulation of the circuit, but hopefully you understand that since you're specifically asking for that.
H: AS6C62256A SRAM Usage I'm in the process of creating a RAM module for a breadboard computer I'm making. The RAM I've decided to use is the AS6C62256A SRAM chip, in 32K x 8. Here's the datasheet: https://www.alliancememory.com/wp-content/uploads/pdf/AS6C62256A.pdf. I'm quite new to this field, and don't have much of an idea on how to access the memory. At first I assumed that I would have to simply set the inverted write line to low in order to write data to the current address, but there must be something wrong with the timing. I've looked at the timing diagrams, but have no idea what they mean. Could anyone give me some step-by-step instructions on how to write data to this chip? AI: Here's an example timing diagram from the datasheet:- The traces are similar to what you would see on an oscilloscope. Address and data lines are shown both high and low at the same time, representing multiple bits with (possibly) different logic levels. A line in the middle represents a 'high-z' or 'floating' signal. hatched lines are 'don't care' signals that can go high or low randomly without affecting operation. To write data to the RAM:- the address lines must all be valid and stable (not changing) during the entire write cycle. W is brought low to start the write cycle. E must then be held low until W goes high again. External input data (DQi input) must be placed on the data bus and held stable for at least tSU(D) before W is pulled high, and held stable for tH(D) afterwards. During this time the RAM data outputs (DQi output) are 'high-z' (open circuit) allowing the input data to be on the bus without contention (the diagram shows two separate traces for clarity, but they are combined on the data bus). G can be either high or low during the write cycle (it must be held low to enable the output buffers when reading the RAM). In the other type of write cycle ('E controlled') the roles of W and E are reversed. In practice this means that the write operation is completed by whichever one is raised first.
H: Producing energy from lighting bolts An average bolt of negative lightning carries a current of 30 to 50 kiloamperes, transfers a charge of 5 coulombs, and dissipates 500 megajoules of energy (120 kg TNT equivalent, or enough to light a 100-watt light bulb for approximately 2 months). However, an average bolt of positive lightning (from the top of a thunderstorm) may carry a current of 300 to 500 kiloamperes, transfer a charge of up to 300 coulombs, have a potential difference up to 1 gigavolt (a billion volts), and may dissipate 300 GJ of energy (72 tons TNT, or enough energy to light a 100-watt light bulb for up to 95 years). All that energy is being send to the ground instead of used. Why are there no ecologically-wise energy producing centrals that collect lighting (in lighting-oft regions)? Is it really that hard to collect the energy from lightings? The problem is that "you don't know where and when the lighting will strike"? I think if McDonold's resturants on their own become energy collectors, a lighting bolts will occasionally strike on the right place. AI: All that energy is being send to the ground instead of used. No it's not. This classic misconception is probably the origin of all these "harness the lightning" ideas. Actually, the voltage across the ground is insignificant compared to the lightning itself. Instead, imagine that the lightning is a tungsten filament, or lightning is like the resistor connected between two HV terminals. With a hot tungsten filament ...would we say that all the energy is being sent into the wires and therefore wasted? No, it's being sent into the hot filament, not into the connecting wires. (Current is not an energy flow. That's the key concept. The path for current is in a closed circle, while the path for energy-flow is one-way: into the lightning plasma itself.) During a lightning strike, how does the energy flow? Cloud-ground lightning is just a spark between two large "capacitor plates." The energy starts out as strong vertical e-field between the cloud-base and the Earth; between the two plates. During the lightning bolt, energy in the air below the cloud is flowing inwards towards the lightning. The energy-flow looks like a shrinking cylinder, with the lightning at its core. Energy in the wide-spread e-field ends up as energy in the tiny region of hot plasma (and then becomes emitted light and sound, and some hot air.) If you see a lightning bolt, that means the energy is already wasted in powering the bolt. The current in the ground may be enormous, but the wattage there is miniscule. In other words, if we want to harness lightning, we have to get rid of the lightning bolt, and replace it with some sort of energy-absorber which is connected to some sort of energy storage device. No huge flash, no noise, no miles of "bulb-filament made from plasma." Instead, look at all that silent invisible e-field energy starting out between the cloud and ground: the two enormous capacitor plates. We want the field-energy to flow into a small point-like absorber on the ground. NOT flow into a miles-long vertical plasma-filament. So, to solve the problem, just tell everyone how to design a fairly tiny machine to efficiently suck the energy out of a capacitor where the plates are two miles wide and a half-mile apart. Here's an 'easy' solution: build a tower that's a couple miles tall, and mount a metal sphere on top that's roughly the size of a thunderstorm. Then, when it passes through a moving storm, a major portion of the storm's electrical energy cam be collected but without wasting it as a mile-tall streamer of incandescent plasma.
H: Question about Multi-Tap Transformer So I have this multi-tap transformer as a project. I bought the transformer, the only thing I did is the connections and the casing. When I tried to connect a 12v DC motor, the motor will vibrate like it is spinning but the rod/tip of the motor is not. Sometimes it spins clockwise or counter clockwise. What is the problem? Help please. AI: A transformer, by the very definition of what a transformer is, is an AC/AC converter. So, you can't attach a DC motor directly to a transformer. You need some kind of rectifier after the transformer, or you need an AC motor.
H: Can you determine needed input voltage from just looking at this circuitboard? Question poster's level of knowledge: BEGINNER/NOVICE/MENTALLY CHALLENGED Device: A stage lighting pan/tilt motor, for one axis. Used in sets of two to provide remotely controlled X and Y movement of a spotlight. Function: It has been designed to be controlled indirectly THROUGH a followspot light fixture, which itself is DMX controlled. The DMX movement instructions sent to the light are sent to the LIGHT, and then are 'forwarded' to each of two motors over Cat5 cable by the light. The Cat5 is 'daisy-chained' such that the connections look like this: DMX_CABLE_INPUT_TO_LIGHT>LIGHT>Cat5CABLE1>MOTOR1>Cat5CABLE2>MOTOR2 Goal: Use motor control devices without having a light fixture translating and forwarding the commands to the motor controller. Reason for goal: I have many of these motor units, but do not own the light fixture they are controlled by. I want to use the motors for the same purpose, but on different objects (Eg - a different model of follow-spot and/or other lighting). Issue: I have made magic smoke come out one as I attempted to figure out what it's power requirements are. 5v makes it smoke. I don't want to ruin any more by guessing and hoping, because I actually want to use these, not just experiment with them. NOTE: J1 on the RJ45 input board connects to BOTH J2 and J3 on the main board. The two pins on J1 closest to the "J1" label connect to J3 on the main board, and these seem to me to be the power input pins for the board as well as the motor. ANOTHER NOTE: I am working under the assumption that if I can supply power to the boards properly, I can then begin to explore how to address it using the DMX protocol, since the DMX protocol is 'knowable' via Google and it's voltages/signal are searchable. The boards, it seems, are not Google-able. Also - Forgive me for my awful diagram. QUESTION, IN THREE PARTS: 1) Can the power needs of the board be determined by visual inspection? 2) If the answer to number 1) is 'yes': What is that power need? 3) If the answer to number 1) is 'yes': How was this determined, in terms a novice might understand? AI: Nah, don't listen to the naysayers. Actually, I can figure out a lot from the information you've provided. And the high-res images were very helpful. My attempt to answer your questions: 1) Can the power needs of the board be determined by visual inspection? Answer: Mostly. Googling for "stepper motor ic 24 pin" led me to find that U2 is probably an Allegro MicroSystems A3982. Photo here shows marking style and part numbering identical to your photo. Looking at its datasheet, it uses two power rails: logic rail needs 3V to 5V and the stepper motor power rail can take up to 30V or so. Make sure you read that datasheet. 2) If the answer to number 1) is 'yes': What is that power need? More reverse-engineering steps are needed. First one makes a hypothesis, and then one tests the hypothesis. So here's the data I think is relevant: a) There's a black and red wire pair going to 2 pin J3 connector. Guess: probably power. b) J3 is next to U7. Guess: U7 looks like a typical linear voltage regulator c) Typically, stepper motors would not be fed tightly regulated voltage and too much current or voltage for regulator U7 to deal with. Guess: J3 probably connects directly to U7 VBB1 pin which powers the motor. 3) If the answer to number 1) is 'yes': How was this determined, in terms a novice might understand? Basically, you can use the data deduced so far to make a good hypothesis: a) J3 provides stepper motor power. Test this by verifying that one pin of J3 goes to GND plane, the other pin goes to VBB1 pin of U2 using an Ohmmeter or tracing the pin (you should have posted an image of the bottom side). b) The label on the stepper motor should give you a voltage rating maybe 12V or 24V or so. If 3a) above is verified, then this would be the voltage you feed into J3. c) U7 is a linear regulator that powers the logic block of U2 stepper driver IC. Test this by verifying that one of its pins connects directly to U2's VDD pin. If true, then the stepper motor and driver IC gets all its power from J3 connector; just feed in whatever voltage is stated on the stepper motor label into J3. Other Power 4) There's another red/black wire pair on J2. Black on pin 4, red on pin 1. Looking at your schematic, this is probably 5 Volts. a) U6 is an LT1791 is an RS485/RS422 line transceiver. This makes sense since there are two twisted pair wires in your cable. Skimming through that datasheet, LT1791 signalling is at 5V, and the RJ45 clamps the data signals to the red/black power rail with the Schottky diodes so it must be that the red/black pair on J2 is probably 5 Volts. Follow the RX and TX of U6 to J2 connector and you'll figure out which twisted pair is RX and which twisted pair is TX. Error in RJ45 schematic There's a glaring error in the RJ45 board schematic and I was really confused until I read that you drew it yourself. The photo shows black and red pair (I assume are power wires) which in your schematic correspond to green and gray lines. But matching up the photo with your schematic, it would mean the diodes on the RJ45 board would get forward biased and short circuit the 5V. So either your schematic is not quite right, or the black wire is carrying 5V and red is GND which is backwards from convention. Other Tidbits U1 is a Microchip PIC18F???? something 8-bit microcontroller. It has the Microchip logo and the "PIC18F" is just barely readable. It has a crystal on pins 17 and 18 so you can use that if you want to confirm it is a PIC. U4 is probably another linear voltage regulator. It could be they are running the PIC at 3.3 Volts. You can trace that wire on the circuit board, but not really relevant here. There's a whole bunch of vias around U4 and U7. But it seems like the PC board layout guy/gal forgot to put a polygon fill to tie the heat tab of U4 and U7 to those vias. Duh. In Closing So basically, that is how you reverse-engineer someone's work. You compare each small section to circuits you've seen before, find the IC datasheets, make some hypothesis, and then test the hypothesis by tracing out and "Ohming out" the connects to match your hypothesis. Update/correct the hypothesis if the data doesn't agree with it, and repeat. And you don't need to reverse-engineer the entire thing; just the parts you need: the power rails and RS422 signaling pairs. Hope that helps and good luck! Edit: P.S. The power stuff is actually not that hard. What will be harder is reverse-engineering the data protocol. Without a working set to "sniff" data from or source code to figure out how it talks to the board or a protocol specification, you won't know how to "talk" to the board unless you can read out the PIC code (if not protected) and disassemble it (very advanced stuff).
H: What does a double arrow mean on a schematic? In this schematic, what might the double arrows at M5 and M4 represent? This is in the power supply for a 1980's CRT monitor, if that narrows it down any. AI: Another example Inline connector as seen in the image. Ref. 1: http://nolanwebdev.com/6323/qM6f-6350/ I will add the source of images soon. Searching it again.
H: Yet Another question on using GPIO to short a remote push button OK, I bought this little remote-controlled Ac outlet thing for $1. It controls 3 outlets via RF. I didn't realize it was RF at first, but I currently have my BeagleBone Black doing a bunch of home automation stuff on my network anyway, and figure I can wire in the remote into the BBB via a couple transistors and be on my way. I can't read the chip in the remote, it's blank. Supply is a 3V coin cell battery, but I figure I can run it from the 3.3V supply of the BeagleBone (maybe with a resistor to drop the voltage? Or should it be okay at 3.3V? I'm thinking it should be okay at 3.3V). There are 6 buttons, 3 for on, 3 for off. There are two positive rails, one for all the on buttons, one for the offs. Each of these rails connects to a different pin. The buttons connect the positive rail to different pins. For schematic see @Transistor 's post below. Some of this is a bit sketchy and I purposely omitted what looks like a power supply cap, all the antennae stuff (P1 and P7 I think). Hopefully, it gives you an idea of what I'm looking at. So, if I drop a few GP PNP transistors over the ends of each switch, then connect base to different GPIO pins on the BeagleBone, then dropping the GPIO pin low should make the transistor conduct, right? The GPIO pins on the BBB are also 3.3V and current in minimal, so what sort of resistors am I looking at to avoid frying stuff? I'm a software guy, not a hardware guy. Any and all help is greatly appreciated!! Edit: Working now and Google Assistant can now control the AC outlets I bought (3 for $1). I have a purple livingroom light and a big fan connected right now. Not using number 3 (yet). Software will be made more robust later, but really cool to have it on my phone now AI: This isn't a full answer but may help you sort out your schematic. simulate this circuit – Schematic created using CircuitLab Figure 1. A redraw of the OP's suspect schematic. Draw positive at the top and negative at the bottom. Try to keep it read from left to right with current flow from top to bottom. Your reverse engineering looks suspect to me. I suspect that the chip is multiplexing the switches but that you have misread the board. See if they are connected as a 2 x 3 matrix. simulate this circuit Figure 2. A more likely multiplexed arrangement. The chip stobes columns 1 to 3 (Col1 to Col3) low (0 V) sequentially and reads rows 1 and 2 (Row1 and Row2) to see if any switches have been pressed. R1 and R2 are pull-ups and pull the rows high when no switch is pressed. Supply is a 3 V coin cell battery, but I figure I can run it from the 3.3 V supply of the BeagleBone (maybe with a resistor to drop the voltage? It should be fine at 3.3 V. The chip is probably designed to run from a couple of AAs and a pair of these could exceed 3.3 V when fresh. There are 6 buttons, 3 for on, 3 for off. There are two positive rails, one for all the on buttons, one for the offs. Each of these rails connects to a different pin. The buttons connect the positive rail to different pins. They're the rows with pull-ups on Figure 2. So, if I drop a few GP PNP transistors over the ends of each switch, then connect base to different GPIO pins on the BeagleBone, then dropping the GPIO pin low should make the transistor conduct, right? You haven't sketched a plan but this probably won't work well as you don't have a definite ground on Col1, Col2 or Col3. Figure 3. The CD4016/4066 pinout. The switches are CMOS and behave like low value resistors when the respective control pin is pulled high. The control pin can be driven by micro-controller. Your best option is Umar's suggestion of 1.5 CD4016 or 4066 quad switch chips. Check the datasheets carefully for the minimum operating voltage. (I haven't done that for you.) The GPIO pins on the BBB are also 3.3V and current in minimal, so what sort of resistors am I looking at to avoid frying stuff? Direct drive to the CMOS control inputs is fine.
H: Ion-selective electrode: high input impedance to measure the voltage I read that an ion-selective electrode has an high impedance (\$100 \, M\Omega\$) and that it's necessary a high input impedance to measure the electrode voltage. I'd like to understand the above sentence with a circuit. I tried to draw a circuit with a voltage source and two resistances (input resistance and load resistance): for the Kirchhoff law: $$E=(R_i+R_L) \, i$$ At this point it's difficult to me to understand why I need a high Ri. Could you suggest me the right way please? EDIT I am studying a biosensor (https://ieeexplore.ieee.org/document/7576627/) and at page 947 there is the sentence: Ion-selective electrodes (ISEs) separate specific ions with a semi-permeable membrane between two electrodes, thereby creating a potential difference (∼0.1–100 mV) proportional to the amount of that ion concentration in the solution. However, due to the nature of these sensors, their impedance is very high, roughly on the order of 100 MΩ, necessitating high resolution sampling of the electrode voltage with a high input impedance. Thank you in advance. AI: In your setup, the assumption is that both E and Ri are unknown. You are trying to measure E with a voltmeter having an input resistance of RL. The voltage seen by the voltmeter, call it Ev, will be the result of the voltage divider formed by Ri and RL, namely Ev = E*RL/(RL+Ri). Since Ri is not known, E cannot be accurately determined unless RL is much greater than Ri. In that case, the equation reduces to Ev = E. That is why your reference calls for a high input impedance voltmeter.
H: Charging and Using a Lithium Battery I’m using an Adafruit micro-USB Charger connected to a standard 850mAh LiPo battery. I would like to know if it’s safe to charge the battery while also using it. The circuit that the BATT and GND pins are connected to will draw about 60-150mA. The charge current is 500mA. From what I can tell, the charger board does not implement the MCP73831’s load sharing feature. I believe this means any load will be paid out by the charge current. Is this okay? In testing, I can see so far that the DONE light never illuminates (battery gets to about 4.18V and as soon as I disconnect BATT from the remainder of the circuit, it illuminates). Schematic, etc: https://learn.adafruit.com/adafruit-microlipo-and-minilipo-battery-chargers/downloads AI: Generally speaking, safety of Lithium batteries have to be verified on the product and charger is only a part of the product. Your circuit from Adafruit is based on MCP73831/2. This linear charger IC has the usual constant current/constant voltage charge control and, once termination is detected, it will restart charge only when battery voltage decreases under a certain threshold. This kind of regulation, under some circumnstances, works even if the battery has some load applied. However, MCP73832 has a "charge termination" feature. Charge is terminated when the system current is below a certain percentage of the programmed charge current. If your system drains constant load from the battery, this current is always exceeded, and that's why charge termination is never detected. I suggest you to have a read at AN1149 here: http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf This application note explains the problem and suggests you some possible solutions. It should be valid also if it is not strictly related to the same charge controller.
H: What's the minimum amount of transistors I need to operate a stepper motor? I would like to know the minimum amount of transistors to operate a stepper motor.Could I pilote it with one transistor or I need one transistor for every coil? Thanks in advance! Edit: the minimum number N of transistors I should connect to ports to drive the stepper motor. For example, if I have 4 coils, I think I should have 4 bjt to drive my motor . My question is actually: does exist a stepper motor with 4 coils that could I drive with only one of these bjt like this? (I know this last circuit is for dc motor but somebody told me I could drive a stepper motor with this same circuit.... is that true?) AI: simulate this circuit – Schematic created using CircuitLab Figure 1. A typical stepper motor with two coils. It should be obvious that to generate a rotational sequence that one transistor is not enough to switch even a two-coil stepper motor. DC motors and stepper motors are quite different. DC motors run continuously and are not capable of stepping. The minimum number of switches required is shown in your first diagram: four.
H: Fuses - Are there any voltage conversion for the break-off Anyone knows the very common glass fuses in electronics etc. But I am uncertaion about the breaking conditions. Example: A fuse rated as 5A/250V, it is the breaking point. But I have seen such used in devices with a much lower voltage, like 12V or 24V. The breaking of the fuse is based on a maximum energy generated as heat to melt the internal lead by Ohm'S law, aka P = UxI. But this does not correlate with the current (A) at different voltages. In the example, the nominal is P = 5A*250V = 1.250, which used with a 24V case, would be (I = P/U) = 1.250/24 = 52A which is way beyond the rated 5A. In other words: We have different currents at different voltages to generate the same energy, if we are to follow Ohm'S law and that the breaking requires the same energy in any case. This is a little confusing, because it must be the current that are the dominator and the current is driven by the voltage, so the voltage is certainly a factor... AI: Your calculation gives the power dissipated in the load. A fuse blows by the power dissipated in the fuse - not the load. The fuse resistance will be very low and the power to blow the fuse will be correspondingly low. The current rating is that nominal value which will blow the fuse in a certain time. The voltage rating is the maximum voltage that can be reliably interrupted without forming and sustaining an arc across the burnt-out fuse wire. Figure 1. GDC fuse time vs current. Source: Cooper Industries. Note in Figure 1 how the 1 A fuse can sustain about 1.8 A indefinitely (1). On the other hand for a 1 s trip time (2) the fault current would have to be 3 A (3). How about the resettable fuses (with button) ? Is this the same ? because they are voltage rated too. They will have the same limitations. Find a datasheet and study it in the light of my Figure 1. If you take my approach you will learn the new words and practice pronouncing them then start to figure out what they mean from the context in the datasheet and further reading. Read, read, read. It's worked well for me.
H: PCB contacts for membrane keyboard looks corroded? One of the keys on my Rigol DS1054Z oscilloscope wasn’t working. I opened up the scope and this is what I found. Is that K5 pad corroded? Other than sanding it is there any other way to restore functionality? I tried cleaning it with IPA and then Acetone but that didn’t work. AI: Clean it as Tony suggests (pink or non-abrasive white eraser) and it looks like you got water into it. Don't do that. Maybe the water got in deeper and damaged something else - you should check that out. IPA alone should have cleaned it (assuming it is proper high purity isopropanol and not drugstore rubbing alcohol which is adulterated with additives). Do NOT sand it as you will destroy the super-thin layer of gold plating on the contacts and it will never be reliable again.
H: Why isn't the BIOS' ROM chip made using CMOS technology? After reading a computer hardware course on BIOS/CMOS, I'm still unable to determine the reason why the BIOS' ROM chip isn't built using CMOS technology, and why it is connected to a separate chip called "CMOS" for storing the configuration information. This is from the lecture note: Programs are stored on the system BIOS chip, while the changeable data is stored on a CMOS chip CMOS Group of Hardware: Hardware that is common, necessary but may change – RAM, hard drives, floppy drives, serial and parallel ports I know that the BIOS is stored in a flash memory, and that CMOS MOSFET technology dissipates less power compared to other implementations. Why is it only the BIOS ROM that doesn't use CMOS, like other storage devices - what exactly is the advantage? And why can't the BIOS configuration information be stored in its own ROM chip instead of the "CMOS chip"? AI: You're mixing up implementation technology with colloquial terms for functionality. CMOS - Complementary Metal Oxide Semiconductor - is a method of making logic and related circuitry using both N-Channel and P-Channel field effect transistors. One of its defining characteristics is extremely low static power consumption - power is almost only used when changing state. As a result, a CMOS static memory chip can retain its contents for years on a battery, and is a handy place to store semi-permanent information. BIOS and related startup code has traditionally been stored in PROM or EPROM devices. EPROMs in the era of the IBM PC were typically made in pre-CMOS technologies like NMOS, but the critical distinction is that these were not typically writeable when installed in the computer, but only in a special programmer. Further while many contemporary systems and clones used EPROMs, the actual production versions of the IBM-PC used cheaper non-reprogrammable PROMs (pinouts were typically compatible in use). The PC-AT design then added a battery backed CMOS memory for storing customizable settings, and also (perhaps in the same device) a persistent real time clock. This came to be colloquially referred to by end-users as CMOS, though it was of course only a particular usage enabled by a then rapidly spreading chip technology. Today of course we no longer use parallel E/PROMs for BIOS, but rather use serial NOR flash and transfer the contents into faster RAM for execution. Modern FLASH chips are in fact made of CMOS-derived technologies. And they typically can be reprogrammed in circuit. It's really up to the system designer if they want to put semi-permanent configuration information in a battery backed RAM, or in reprogrammable flash - the end user or post-boot operating system may have little actual visibility into a distinction. But even if flash is used for settings, there's still typically going to be a low power real time clock that keeps running on battery.
H: What is the purpose of a disconnectable wire in this power supply? In this circuit, there is a wire between M5-1 and M5-3 (at the bottom). It's a little plastic connector with a wire in it that you can pull out. I've been trying to debug a power issue after recapping this 1980's power supply. At first, I forgot to put that connector back. Some of the reading looked correct, but others were too low. When I added it back, the formerly-correct readings jumped to ~1.5x. What purpose does this connector have in this circuit? Why would you want it connected? Why disconnected? Why isn't it just permanently there? AI: It's just mains voltage selection, quite common those days. It turns the diodes and the two 220uF capacitors in either a bridge full wave rectier for 240 V use (wire removed) or a voltage doubler for 115 V usage (wire fitted).
H: 1.54 e-ink without driver PCB I want to know if it is possible to use this raw e-ink display with Arduino. Is it possible to directly connect cables from this ribbon cable to Arduino without any driver PCB and control it with 3 or 4 wire SPI? I was looking for some tutorials but I haven't found anything. In the future I would like to use it with nRF52832 BLE chip. the pinout of the display is on 6th page AI: It looks like it is definitely possible to drive the display with a general purpose MCU. Check the voltage levels depending on Arduino some are 3.3V ones and some are 5V. Take care of the discrete stuff too! From the data sheet:
H: RF transformer design for a capacitance variation sensor So I`m trying to design a variable capacitance vibration sensor and the best implementation I came up with is a capacitance-to-phase converter. I used: a PIC16F15323 NCO peripheral to control the input frequency to compensate for large stray capacitances a simple RLC circuit like in quadrature detectors to measure the capacitance a XOR gate to measure the phase shift an active low pass filter to amplify the audio signal Maximum capacitance delta is 1.5 pF, maximum oscillator frequency is 11 MHz but I plan to decrease it to 7–8 MHz. The results are satisfactory but recently I stumbled upon condenser microphone cicruits which use transformers for phase detection. I think they have much better performance compared to my setup since transformers, unlike XOR gates, add no jitter and are capable of noiseless voltage amplification, thus allowing to get rid of a noisy op-amp amplifier. The problem is, I`ve never worked with RF transformers and I`d like to know how to choose the right parameters for a target transformer. Here are some circuits I`d like to use; see below. My questions are: how do I choose a proper transformer? how do I interface a CMOS oscillator to it? (source) AI: Short story: In my opinion, don't change your basic idea covered in your points (1 to 4) Both "transformer" circuits you have offered-up appear to use types of double balanced mixers that demodulate the audio from the microphone after the microphone has modified the phase shift of an oscillator. The microphone is excited at the XTAL frequency by either a direct winding (Sennheiser schematic) or via a capacitor (1 pF, C5) in the 2nd diagram. The mixer stage is like the traditional balanced mixer using transformers: - I'm not going to go into detail how each circuit in the question uses a double balanced mixer similar to the traditional one in my picture. If you want more details, you'll have to study a bit more. Suffice to say that a double balanced mixer has one fundamental property that makes it useful for "mixing" two RF signals and that is signal multiplication. And what you get with signal multiplication is an output level that can vary significantly with amplitudes i.e. it can be used as a phase detector but you need to keep signal and reference amplitudes stable or you'll get a phase angle DC output level that is also somewhat made erroneous by amplitude variations in the input signals. So, to use DBM accurately as a phase detector you need to have a limiter circuit or saturate the mixer. Given that you are operating at (only) 11 MHz there are a few quite fast EXOR gates that can do the job - after all, you have an oscillator already at CMOS levels and the tank circuit (fed via a resistor) from your oscillator can have an output level that is easily amplified to CMOS levels via a fast schmitt trigger (plenty to choose from) so, in my humble opinion, this is the best route to take. unlike XOR gates, add no jitter You are operating at 11 MHz and your base bandwidth might be (say) 50 kHz, so what do you really think will be the problem of jitter. At (say) 50 kHz, there would be 220 cycles of clock jittering a bit this way and that way but if you averaged the effect of the jitter, just how much base band noise is really going to be present? You can easily simulate this and find out BTW. Think about all those RF receiver chips that use Gilbert cells to electronically perform multiplication - how much noise do they produce when they demodulate (say) an FM broadcast using quadrature detection? Are these chips all as noisy as hell? No they aren't but, you could say that they are operating at carrier frequencies about ten times higher than 11 MHz so the base band filtering will be ten times better. But those gilbert cell mixers are dealing with a low level RF signal - a signal that is much much smaller than what appears across your tank. So, what is a gilbert cell? Its forerunner was an attempt to design an exclusive OR gate which brings us nicely back to my original claim that I really don't think you are going to improve on using an EXOR gate acting as a quadrature detector. I've /designed built sensitive capacitance probes and the minimum delta signal level was less than 20 femto farads - in other words this change in capacitance could be discerned on the demod output when connected to an oscilloscope.
H: I can't flash my new ATMega328p with PL2303 USB-TTL converter I've soldered my ATMega328p-au to a SMD to DIP board, and I've connected pins like this: USB | ATMega RX ---> TX TX ---> RX 5v ----> 5v GND -> GND and GND --> button --> RESET My USB-TTL converter doesn't have a DTR pin. But, I tried programming my Arduino UNO with it. I hold RESET pin on my Arduino UNO, click upload and release the button. It works. When I do the same with ATMega, avrdude / Arduino IDE gives me this output: ~$ sudo avrdude -c arduino -p atmega328p -P /dev/ttyUSB0 -U flash:w:blink.hex avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 ... avrdude: stk500_recv(): programmer is not avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 avrdude done. Thank you. Same error with -c avrisp and on Arduino IDE. 1) Do I need something special for first time, like burning a bootloader? I read that I can flash it without burning bootloader, so I don't think that's the case. 2) Also I saw a lot of people using crystal and capacitor for flashing. Is it necessary? Because I don't have crystal. 3) If I can flash it without a bootloader and without a crystal, what am I doing wrong? Thanks! Edit: It appears I needed a ISP programmer. Even though I tried it with ISP programmer it did not work. I connected a 16MHz crystal and I successfully programmed it! AI: The ATmega328 comes from factory without any boot loader. There are several ways to flash it (either fully or just a bootloader), but UART upload through the RxD and TxD pins isn't one of these. The simplest way to upload initial software is using the built-in ISP interface through the MISO/MOSI/SCK pins. You need a programmer for that, which may be as simple as some GPIOs from a Raspberry Pi. It's also possible to repurpose an Arduino as the programmer. Choose your poison, avrdude has to support it, that's the limitation.
H: What kind of setup can take portable solar USB power & charge a AA battery charger that is usually designed to plug into a wall? I have a portable solar panel that generates 21w of power, seen here: enter link description here . It has a USB connection wired into it that will accept a USB cord to charge small devices via USB. Separately, I have a Panasonic wall charger device (model BQ-CC75) seen here: enter link description here that will plug into a wall outlet to charge 1-4 rechargeable Ni-MH AA batteries. I would like to figure out if it is possible to find a way to connect the solar panel to the wall charger device in order to charge the AA batteries by solar. I know there are other devices out there that are designed to charge AAs from a solar panel, but I am wondering if the Panasonic can do it using an appropriate connection, and if yes, what that connection type might be. So far, I have considered running this connection cable: enter link description here that would go from the solar USB connection to a cigarette-lighter plug, which is connected to a "wall outlet" style plug, such as this: enter link description here or this: enter link description here , and from there, plug in the Panasonic AA charger ... the hope is that this would charge 1-4 AA batteries successfully via solar. Would this approach work? If not, what would work? If it works, but there is an easier way, what would that look like? Thanks so much in advance for your advice, and thanks again for forgiving me for not knowing enough to figure out the good and bad of this idea on my own, and for not knowing the proper terms to describe things. AI: You're approaching this from the wrong end: What you're trying to do is: solar cell -> step down or down -> USB (5.0V) -> step up -> cigarette plug (12V) -> step up -> wall plug (120V or so) -> step down -> NiMH cell That's ... very bad. As every step up and step down wastes energy, this will hardly work. Instead, just use a charger that works directly off 5V (since I guess you can't access the solar cell's output directly). Chips like Maxim's DS2710 have been around forever. There's plenty of even cheaper alternatives – but using the DS2710 would kind of feel like the "least effort, works instantly" alternative for designing this. I'm also pretty sure you can buy charger devices that you can plug into USB directly. Every solution's bound to be cheaper than your convert-all-over-the-place approach.
H: 1v for non-inverting op-amp input I need to reduce 5v to 1v for use as a reference voltage in an op-amp. What would be the best way to do this? The simplest solution to me is to use a voltage divider, although I understand others have reservations about this. Alternatively, a voltage regulator of sorts, although a quick Google, Mouser, Digikey, Farnell search yielded very few results... Ideally I'm looking for a basic, and easy to understand solution. AI: A voltage divider can work well if: Absolute accuracy is not that critical The 5V source supply is stable and accurate The current load you put on the central point of the voltage divider is 100 times less than the current you put through the two resistors of the divider will allow for ~1% variation You use decent 0.1% or 1% resistors in the voltage divider And you place a capacitor across the lower resistor in the divider to filter some of the voltage changes that are caused by sudden changes in the load current. A very simple way to get a very decent reference is to use what is called a "shunt regulator" or "voltage reference" IC. One of these would connect to GND and to a pullup resistor to the +5V supply. The top side of the reference would be your stable voltage. If you need 1V you could look at the Analog Devices ADR510ARTZ. You can shunt up to 10mA through this part. This picture from the Analog Devices data sheet for the ADR510 shows the typical operational behavior of the shunt type regulator. Keep in mind that the shunt regulator will adjust the amount of current that it sinks (IQ) in order to keep the voltage drop across itself equal to 1V. The size of the bias resistor (RBIAS) sets the nominal current through the resistor/shunt regulator assuming no load current (IL). Once that operating point is established if the load is such that it wants to sink current then that additional current will be supplied through the bias resistor. If the load wants to source current then that extra current gets sunk through the shunt regulator. As with any linear regulator (shunt like this one or other series pass type regulators) power dissipation is always something to consider. So if the load current nominal value is say 100uA because it just feeds impedance loads it would not be necessary to have there being 10mA flowing through the shunt regulator all the time. On the other hand if the load current had a dynamic change of say +/-5mA during operation you would want carefully pick the bias resistor such that the current variation to the load keeps the shunt regulator within its operating range. For the ADR510 that operating range of shunt current is from 100uA up to 10mA.
H: Hidden pins in CD4000.lib with LTspice While working with the CD4000.lib in LTSpiceIV I came across the following: A capacitor was discharged via a CMOS Schmitt trigger input. Analysis of this behavior revealed that LTSpice may not handle hidden pins correctly. See for yourself: The first case was the one where I noticed the behavior. In the second case, I represented the discharge as an RC element. In the third case I looked at the input filter stage of the CD40106 in the CD4000.lib (there is also a 100Meg resistance against VGND as expected. ) The net list of the subckt CD40_IN_S_1 was transferred into the current simulation and connected to GND and VDD. During the simulation, of course (as it should be) the diodes struck and cut the negative voltage. In the fourth case, input filter stage has been inserted again, but this time without connecting the diodes to VDD and GND. During the simulation, exactly the behavior that caused me headaches became apparent. This raises questions: What's wrong here? How are hidden pins used in LTspice? What has to be done in this case to get correct simulation results with the CD4000.lib? Here is the asc file: cut here --- Version 4 SHEET 1 3772 2028 WIRE -48 320 -352 320 WIRE 48 320 -48 320 WIRE 192 320 112 320 WIRE 400 320 192 320 WIRE 640 320 400 320 WIRE -352 496 -352 320 WIRE -48 496 -352 496 WIRE 48 496 -48 496 WIRE 192 496 112 496 WIRE 400 496 192 496 WIRE 656 496 400 496 WIRE 768 496 736 496 WIRE 560 624 560 576 WIRE 560 704 560 624 WIRE -352 864 -352 496 WIRE -48 864 -352 864 WIRE 48 864 -48 864 WIRE 192 864 112 864 WIRE 400 864 192 864 WIRE 560 864 560 768 WIRE 560 864 400 864 WIRE 672 864 560 864 WIRE 736 864 672 864 WIRE 928 864 816 864 WIRE 672 912 672 864 WIRE 928 912 928 864 WIRE 560 944 560 864 WIRE 112 992 -240 992 WIRE 144 992 112 992 WIRE -240 1040 -240 992 WIRE 672 1056 672 992 WIRE 784 1056 672 1056 WIRE 928 1056 928 976 WIRE 928 1056 784 1056 WIRE 560 1104 560 1008 WIRE 784 1104 784 1056 WIRE -240 1136 -240 1072 WIRE 96 1136 -240 1136 WIRE 144 1136 96 1136 WIRE -240 1168 -240 1136 WIRE 784 1168 784 1104 WIRE 560 1328 560 1264 WIRE -352 1488 -352 864 WIRE -48 1488 -352 1488 WIRE 48 1488 -48 1488 WIRE 192 1488 112 1488 WIRE 400 1488 192 1488 WIRE 560 1488 560 1392 WIRE 560 1488 400 1488 WIRE 672 1488 560 1488 WIRE 736 1488 672 1488 WIRE 928 1488 816 1488 WIRE 672 1536 672 1488 WIRE 928 1536 928 1488 WIRE 560 1584 560 1488 WIRE -352 1632 -352 1488 WIRE 672 1680 672 1616 WIRE 784 1680 672 1680 WIRE 928 1680 928 1600 WIRE 928 1680 784 1680 WIRE 560 1696 560 1648 WIRE -352 1728 -352 1664 WIRE 784 1728 784 1680 WIRE 784 1792 784 1728 FLAG -48 496 stimulus FLAG 192 496 response2 FLAG 192 320 response1 FLAG 192 864 response3 FLAG 768 496 0 FLAG -240 1168 0 FLAG 784 1104 VGND FLAG 112 992 VDD FLAG 96 1136 VGND FLAG 560 1104 0 FLAG 560 624 VDD FLAG -48 320 stimulus FLAG -48 864 stimulus FLAG -352 1728 0 FLAG 192 1488 response4 FLAG 784 1728 VGND FLAG -48 1488 stimulus SYMBOL cap 48 512 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C1 SYMATTR Value 2.2n SYMBOL cap 48 336 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C3 SYMATTR Value 2.2n SYMBOL diode 576 1008 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D1 SYMATTR Value CD40DIO1 SYMBOL diode 576 768 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D2 SYMATTR Value CD40DIO1 SYMBOL res 720 848 M90 WINDOW 0 5 56 VBottom 2 WINDOW 3 27 56 VTop 2 SYMATTR InstName R1 SYMATTR Value 10k SYMBOL cap 944 912 M0 SYMATTR InstName C4 SYMATTR Value {Cval} SYMBOL res 656 896 R0 SYMATTR InstName R2 SYMATTR Value 1e8 SYMBOL cap 48 880 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C5 SYMATTR Value 2.2n SYMBOL Dig_Add\\CD4xxx\\cd40106b 688 272 R0 WINDOW 38 -118 145 Left 2 WINDOW 39 -118 117 Left 2 SYMATTR InstName U2 SYMATTR SpiceLine VDD={Versorgungsspannung} SPEED={SPEED} TRIPDT={TRIPDT} SYMBOL res 640 512 R270 WINDOW 0 27 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName R3 SYMATTR Value 100Meg SYMBOL MiniSyms4\\voltage- -240 1056 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value {Versorgungsspannung} SYMBOL MiniSyms4\\voltage- -352 1648 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value PULSE({Versorgungsspannung} 0 0.025 0.0001) SYMBOL res 720 1472 M90 WINDOW 0 5 56 VBottom 2 WINDOW 3 27 56 VTop 2 SYMATTR InstName R4 SYMATTR Value 10k SYMBOL cap 944 1536 M0 SYMATTR InstName C2 SYMATTR Value {Cval} SYMBOL res 656 1520 R0 SYMATTR InstName R5 SYMATTR Value 1e8 SYMBOL cap 48 1504 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C6 SYMATTR Value 2.2n SYMBOL diode 576 1648 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D3 SYMATTR Value CD40DIO1 SYMBOL diode 576 1392 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D4 SYMATTR Value CD40DIO1 TEXT -312 584 Left 2 !.param Versorgungsspannung=15\n.param SPEED=1.0\n.param TRIPDT=5e-9 TEXT 672 784 Left 2 !.MODEL CD40DIO1 D(Is=1e-12 Rs=100) TEXT 976 880 Left 2 !.param Cval = 1.8e-12*5/{Versorgungsspannung}*{SPEED}\n.param vt1=2.5/5\n.param vh1=0.4/5\n.param gain=(1/{Versorgungsspannung}) TEXT 664 624 Left 4 ;Schmitt-input; 2.9V/2.1V @5 CD40_IN_S_1 TEXT 1408 1144 Left 2 ;see CD4000.lib TEXT -204 1750 Left 2 !.tran .5 TEXT 440 848 Left 2 ;in TEXT 440 1472 Left 2 ;in TEXT 864 1472 Left 2 ;out10 TEXT 872 848 Left 2 ;out10 TEXT 912 320 Left 2 ;cd40106b.asy is linked to cd4000.lib TEXT 656 416 Left 2 ;should be hidden pins ( see parameter window: "SpiceModel VDD 0" TEXT 672 688 Left 2 ;input filter part \nreengineered from .subckt CD40106, .subckt CD40_IN_S_1 TEXT -304 928 Left 2 ;Here (hidden) pins are explicitly connectet to VDD and VGND TEXT 1048 1080 Left 2 ;response3 is clamped by diodes D1, D2. TEXT 904 480 Left 2 ;RC with Tau=2.2n*100Meg gives the same response\n--> where are these 100Meg's ... TEXT 712 1000 Left 2 ;...here. TEXT 680 1248 Left 2 ;without diodes: response4 = response2 TEXT 680 1328 Left 4 ;What is wrong with case 1 and case 3 TEXT -256 288 Left 4 ;case 1: TEXT -288 824 Left 4 ;case 3: TEXT -264 456 Left 4 ;case 2: TEXT -264 1448 Left 4 ;case 4: RECTANGLE Normal 1632 1168 400 576 2 RECTANGLE Normal 1632 1792 400 1200 2 cut here --- AI: Thank you for your suggestions. The spice model I use comes from the library CD4000.lib. The cd40106b.asy symbol indicates CD4000.lib as the location of the model. In CD4000.lib you find ".SUBCKT CD40106B A Y VDD VGND vdd1={vdd} speed1={speed} tripdt1={tripdt}" ... so a model with 4 ports. Connections A and Y are visually present in the symbol. The VDD and VGND connections are set to VDD and 0 via the symbol parameters in the SpiceModel attribute (see case 1). Further you find the input filter: "XIN1 A A Ai VDD VGND CD40_IN_S_1 vdd2={vdd1} speed2={speed1} tripdt2={tripdt1}"... Under.subckt CD40_IN_S_1 you find the netlist ... OH - I GOT IT: You find * Schmitt-input; 2.9V/2.1V @5V .SUBCKT CD40_IN_S_1 in out VDD VGND vdd3={vdd2} speed3={speed2} tripdt3={tripdt2} .param Cval = 1.8e-12*5/{vdd3}*{speed3} .param vt1=2.5/5 .param vh1=0.4/5 .param gain=(1/{vdd3}) * *D1 0 in CD40DIO1 *D2 in VDD CD40DIO1 R1 in out10 10k C1 out10 VGND {Cval} R2 in VGND 1e8 * E1 out20 0 out10 VGND {gain} B1 out20 0 V=LIMIT(0,V(out10,VGND)*{gain},1) AE1 out20 0 0 0 0 0 0 out 0 SMITH vt={vt1} vh={vh1} vhigh=1 tripdt={tripdt3} .ends * !!!! with commented out diodes. So the model used can be seen in case 4. To simulate the real behavior of the CD40106, the diodes must be present. They limit the amplitude of the input voltage to VCC+0.3V and GND-0.3V. But attention: A pin compatible 6-way Schmitt Trigger MM74C914 has a different input protection circuit and allows VCC+25V and GND-25V. The model would have to be changed accordingly.
H: Tiny Magnet Sensor Switch I know just enough about electronics to do the occasional Arduino or Raspberry Pi project, as long as I don't have to understand too much of what's going on. I am a software guy who dabbles in hardware a tiny bit. So, I'm not even sure I can form a good question, which is why I haven't been able to Google an answer to this question. I have made a small wearable device (about 30mm x 30mm x 10mm) that has one simple job. There is a magnet clipped onto the device. When the magnet is removed, it tells my phone (via BLE). Think of a sort of personal alarm device. My first prototype uses a NC reed switch and works perfectly ... except that the reed switch is quite susceptible to false activation when jostled around too much. The device should only activate when the magnet is removed. As an improvement, I figured the solution was probably to use a hall effect IC. I've also read a little bit about MEMS. Cost is not an issue, within reason (i.e. sub-$20), but size and durability are absolutely important. My questions: First, is a hall effect IC an appropriate solution, or is there something else that would work better? My assumption is that I must use a NC switch that is open when the magnet is nearby. This makes a digital IO pin go HIGH only when the magnet is removed. My reasoning is that if the switch is NO, then it will be closed when the magnet is nearby, making the IO pin HIGH most of the time. I believed that this would be an unnecessary drain on the battery. But, I recently read something to suggest that digital IO doesn't work like this. So, my question is ... does it use more power to maintain HIGH state than LOW? Am I thinking about this all wrong? Is there a simple way to accomplish the same thing in a very tiny package? I am using a 3V logic Arduino derivative with plenty of pins. The device currently uses just about 50uA, on average, and I'd like to keep it that way. AI: Your idea to use a Hall Effect device would seem to be ideal. There are plenty of Hall Effect sensors, here is one at about $0.40 that would be ideal IMO. It operates at 2.3 - 5V and has an open drain output and so could be used with a single digital input with just a high value pullup resistor. You could probably even just use the inbuilt pullup supplied on most MCUs (in the 20-50k Ohm range. You could search for others on Digikey. It has ultra low power consumption, but you could drive it using a digital output pin, so it's only turned on when you want. I assume to get very low current consumption of your MCU you are spending most of your time in sleep mode. Before you go to sleep simply turn the port supplying power to an input (lowest power consumption) with no pullup resistor.
H: what is this component and the brand name ? P527 DGM Im studying this board's circuit. But cannot find what's this P527 DGM component is. Could anyone tell me? Thanks AI: It is a TVS diode from the Chinese company BrightKing. It appears to be a clone of the Littlefuse SMDJ64CA. The picture below shows a clip from the SMDJ page on the BrightKing website. Note the matching logo on the part. Here is a link to the BrightKing SMDJ datasheet. Below are clips from the datasheets showing the specs for the parts. LittleFuse is in green followed by BrightKing in red. Note the package marking code DGM for the bidirectional part. For small parts, manufacturers often use marking codes, since the full part number does not fit.
H: What effect would a hydrogen bomb detonated at high enough altitude have on the power grid and solid state electronics? After reading several dozen reports on EMP effects of nuclear explosions and viewing archived government footage of nuclear weapons testing I have come up empty handed. As for example let us assume 1-5 megaton hydrogen bomb at an altitude sufficient so that the line of sight would be the continental U.S. I use line of sight as straight lines extending from the fireball. Some reports say only minor disturbance. And Other reports say all transformers and all electronics that does not belong to the military with the exception of some automobiles. With manufacturing electronics , communications electronics and networking equipment destroyed. In addition to all high voltage transformers, nuclear plant cooling transformers and electronic control. All aviation, train , trucking distribution centers electronics. Air and cooling equipment as well as gas distribution , water and sewage treatment electronics. One source I found said the disturbance would actually be no different than a powerful lightning storm and pale in comparison to a Solar Coronal Event and that the danger has been overblown in the media. While other sources like National Geographic say it would be the end of civilization and no country on earth would have the manufacturing ability to replace even the transformers needed much less the electronics. They site South Africa's rolling blackouts as an example of how hard it is to get transformers let alone electronics. Are there any reliable sources or is this one of those hush hush topics understood perhaps only by our military people? AI: You can expect any electronics with cables to get approx 50kV/m for E1 impulse to fail unless they have TVS type protection on those ports. Power line responses are estimated by the LF E3 pulse at 85V/km. https://en.m.wikipedia.org/wiki/Operation_Fishbowl https://apps.dtic.mil/dtic/tr/fulltext/u2/1051492.pdf
H: Schematic Critique - ATMEGA328P & VS1063 My knowledge in PCB design is very limited, so I've been trying to learn as much as I can on my own. Some feedback on my first design would be incredibly helpful! Description ATMEGA328P "A" is supposed to receive serial commands via USB, output RGB LED data through the two LED ports and send commands to ATMEGA328P "B" via I2C. ATMEGA328P "B" is supposed to read MP3 files from an SD card via SPI, and send data to VS1063 to decode which plays audio through AUX jack to external speaker/headphones. Both ATMEGAs are TQFP. Connected RGB LED strips are 5V. Questions Can pins like CS, BSYNC, and DREQ on VS1063 be connected to any GPIO? Do I need the linear voltage regulators for 3V3 and 1V8? Or just voltage dividers? Can ATMEGA328P “B” read MP3 from SD then send data to VS1063 on the same SPI line? Can I leave unused pins floating? Do I connect them to ground? Can I connect I2C lines of ATMEGAs directly? What should I keep in mind when designing the PCB? Any additional feedback is greatly appreciated! Datasheets ATMEGA328P Datasheet VS1063 Datasheet FT232RL Datasheet AI: Can pins like CS, BSYNC, and DREQ on VS1063 be connected to any GPIO? Yes -- this would be the easiest way of using them, and is the approach shown in the example application on page 16 of its datasheet. Do I need the linear voltage regulators for 3V3 and 1V8? Or just voltage dividers? Regulators. Current usage can vary over orders of magnitude, so unless you plan on wasting a lot of power heating up your voltage divider a regulator will be necessary. Can ATMEGA328P “B” read MP3 from SD then send data to VS1063 on the same SPI line? Yes. You have separate SS lines for each peripheral, so they should work just fine on the same bus. Can I leave unused pins floating? Do I connect them to ground? On the microcontroller, floating is fine (although I'd suggest attaching them to a pin header in case you find a use for them later). The VS1063 datasheet states that unused GPIO pins should be grounded through a 100K resister. Can I connect I2C lines of ATMEGAs directly? I presume you intend to use one as I2C master and the other as an I2C slave to enable communication between the two? This is supported, although you'll need a pull-up resister on the lines to make it work. See the application note here. What should I keep in mind when designing the PCB? There doesn't seem to be anything in the design that stands out as needing particular attention; obviously pay attention to getting your decoupling capacitors close enough to the ICs they relate to, and keeping audio paths clear from sources of interference, but it should be reasonably simple design as far as I can see.
H: How to make a circuit to trigger a relay once the cell voltage reaches 83.5V DC I need to make a circuit that will trigger a normally closed relay to cut a signal. I have a 12V power supply DC I need it to trigger once the main system reaches 83.5V DC Needs to be powered by the 12V DC system. EDIT: Thank for all the great input on my question thank you all so much! i did think about it some more. I have made a regenerative system but it doesn't know how to cut the Regen once max voltage of 83V is reached the system has a 12V step down that uses a common ground from my battery pack. so there is a 12V+ and a 63V-84V -(neg) common. if the battery pack is at 83.0V(safety) i need to trigger a relay that would be normally closed, and keep it triggered until the voltage is below 83.0V(once voltage is reached again re trigger) so the regeneration can not function. My battery max voltage is 84V but my Regen system can output 90V. all this is doing is metering voltage, it needs to be made with no adjustments, tolerance is permissible if pack will not go over 84VMax. Or maybe with adjustment? AI: Your question is very short on detail, and you should think about WhatRoughBeat's questions in comments, and come up with some specifications. However, when you are starting, it's difficult to do that in the abstract, so here's an example circuit, a straw man, to get you thinking about why specifications are needed. There are many ways to implement your circuit, this one is convenient. simulate this circuit – Schematic created using CircuitLab I've shown the TLV431 as an NPN transistor for 2 reasons. 1) There isn't a symbol for TLV431 in this schematic editor. 2) The way we are using it, as a voltage comparator, it behaves like an ideal, a very precise, NPN transistor, with a 1.24v VBE which is more or less insensitive to device temperature, and with near zero base current. Just think of it as a switch that's off with VBE <1.24v, and on with VBE > 1.24v. In fact this is the way the 431 is usually used in its intended application, monitoring the output voltage of a power converter, turning an opto-iosolator on when its voltage exceeds a set point. Questions 1) Can the grounds of the input voltage and 12v be connected as shown? 2) This draws about 1mA from the monitor point. Is that too much? It's got to be enough for the TLV431, which can use an order of magnitude or two less, but there are components which take much less input current than that. 3) Do you want the divider to be adjustable like this, or built without adjustment? What range of adjustment? This is plenty to trim out the tolerances, but a larger R3 ratio is needed to adjust the input voltages significantly. Even with adjustment, you may still want to consider the temperature coefficients. 4) If built without adjustment, what tolerance is permissible? The TLV device comes in initial tolerance grades from 0.2% to 2%, though there is a little tempco to add. Resistors of 1% and 200ppm/C are commonplace, 0.1% and <50ppm/C are fairly obtainable. +/- 2% is +/- 1.6v, is that too much? Without adjustment, you will need a higher R1/2/3 current, as you need to allow for the input current tolerance of the 431. 5) This device has no hysteresis. If this is monitoring either the charge or discharge endpoint of the 80v battery, then as soon as the charge or load stops, the voltage will change, and the charge or load will start again. This is rarley what's wanted, and so hysteresis is added to the voltage comparator, so that (for instance) it turns off at 84v, but back on at 82v. You can probably work out for yourself some sort of feedback from the relay driver or relay that changes the reference voltage or divider to acheive this. 6) This device has no noise filtering, a spike could trigger it. It would be normal to put a capacitor across the input of the comparator. What time constant would you need? Too big, it slows down operation. Too small, it lets through too much noise. You have to specify a compromise. 7) It is always live to the battery like this, or is it a one-shot, that has to be manually reset? That would need the addition of some sort of memory element. In practice, battery systems are popular because they are usable, and usable means meeting charge/discharge endpoint accuracy with 'reasonable' consumer grade circuits. A battery system that needed calibration-lab performance to use would not survive in the mass market. Which means a few % is probably all the tolerance you need. If you want a system that switches off the load when the battery falls below a set voltage, you might want to consider a modification of this, which draws no power when off, and works as the on/off load switch as well.
H: What is torque-ampere ratio at electric machines? How it is related with machine efficiency? When I am reading a journal about SRM (switched reluctance machines) it said that outer rotor design has better efficiency due to higher torque ampere ratio. How it is related with efficiency? AI: Torque / amperage ratio means how much torque produced from consuming a specific amount of current. The more torque produced from the same amount of current results in a better efficiency of the overall machine. Machine efficiency can be calculated by the following form : $$ \gamma = \frac{P_{output}}{P_{input}} $$ Input power is the electrical power consumed from the main grid. Main grid voltage is constant across most nations around the world so power is dependant upon the current consuming. Output power is the mechanical power available to do some work. $$P_{mech}=T \omega$$ So more torque / amperage ratio means the reduction of the overall cost and the more available work to be done.
H: What current should be used to calculated the drop across the diode? RMS current or average current? I was designing a power supply, following is the output bridge diode current waveform from LTSpice simulation . My intention is to calculate the power drop across the diode. What value of current (RMS value or average value of the current) should be taken to find the voltage drop from Forward voltage drop versus current curve of diode. My basic understanding is to go with the average current, But not sure about the theoretical aspect. AI: Ignoring the small glitches as current rises and falls, the diode is only conducting at the top of the waveform so that is the only real place that it will dissipate power. It's not a perfect value but I'd consider using the value of 3.7 amps at whatever volt drop is seen across the diode to calculate power lost in the bridge diodes. And, of course this power is only wasted 50% of the time for a duty cycle of 50%. So if 1 volt is dropped across the diode(s), the power dissipation is 50% of 3.7 watts = 1.85 watts. Alternatively use LTSpice to calculate this for you - i.e. produce a power waveform that is V*I and average it.
H: Detecting velocity in a specific threshold I have three velocity sensors that are axis in 3D. I would like to know the best method to do basic ON/OFF trigger.. I'm thinking of a hystersis control, is there a method that can detect if the velocity from all the three sensors exceed a specific range like 10 m/s? AI: yes if its outside a range If you need to detect whether a signal is outside a range you need a window comparator like this: - It uses (or can use) two op-amps where one op-amp detects a high threshold and the other op-amp detects a low threshold. If the signal is between the two thresholds you get a logic 1 output and if it's outside the range then you get a logic zero. This would need to be triplicated for three sensors and you could use a three input OR gate (for example) to detect the situation where all three signals are outside their specific range.
H: Opamp DC offset Question Just need some help understanding what's happening in removing the DC offset from two band-pass filters. VG has a value of 4.5V. When I added in the virtual ground the circuit had an offset of 4.5V at the Out and Out2 nodes. I added in capacitors C7 and C8 at 1\$\mu\$F understanding that it will block the DC signal. This worked for the node at Out but not Out2. Later I saw a similar problem where the solution was to put a resistor between the output and opamp which worked but I do not understand why the resistor is needed and why Out didn't need one but Out2 did. The resistor that was added was R7. AI: When you run a simulation, in most circumstances, the default starting voltage across a capacitor is 0 volts. This means, that at the instant of beginning the simulation, if 4.5 volts is forced onto one plate of that discharged capacitor by the op-amp output, 4.5 volts is also seen on the other plate. Without a discharge resistor (such as R7), the OUT2 node will remain with an average level of 4.5 volts.
H: Display Driver for a SHARP LS020B1DD01D LCD I am working on a personal project that will feature an LCD panel and push buttons to control the graphical user interface. For the LCD I would like to use the SHARP LS020B1DD01D (for the specifications, see http://www.panelook.com/LS020B1DD01D_SHARP_2.0_LCM_parameter_20847.html) due to the size dimensions and resolution. I have been researching for several days, trying to find a compatible display driver for it, but as I am not very experienced with using separate LCD's and display drivers yet (up until now, I have been using display modules that already include the driver board), I am having trouble finding the right part for the job. Are there certain key specifications that I should be looking for? How does one usually go about choosing the best display driver for their embedded system projects? Are there any online resources that could be helpful for finding a solution or learning more about this subject matter? Note: Like I said, I don't have much experience with this, so please forgive me. I appreciate any feedback you can provide. AI: If you are building an embedded type project you may want to steer away from this LCD panel. The device requires four power supply voltages and is setup to need a controller to drive it that can provide a video frame rate of 60Hz. In other words this device does not contain any internal memory to persist its display like you would want for a simple embedded device. There are plenty of small color graphic displays available in the market that include the controller as part of the display and then your embedded MCU just has to load the display image to RAM in that controller. After that the controller will take care of keeping the display refreshed without the MCU having to supply that data 60 times a second.
H: DC-DC converter in "parallel" I'm designing a system that needs two converters. The Vin input voltage is approximately 14.5V. I need to lower the Vin voltage to 12V and also to 5V. I chose two LM2576-5 (5V) and LM2596-12 (12V) converters, the two converters require a 100uF Cin capacitor. I put a 100uF Cin capacitor for each converter. Looking at the schematic below, as the Vin voltage goes to the two converters, the capacitors C6 and C8 in this scheme seem to be in parallel, resulting in a total capacitance of 200uF. I wonder, can this affect the functionality of the converters? The correct would be to put only one capacitor for the two converters? What can I be doing wrong by putting the capacitors in this way? AI: The data sheet is very clear: - So you use one per instance of each LM2576 and make sure you have headroom voltage rating i.e. make C6 and C8 both 25 volt versions to be safe.
H: Help with P-channel mosfets i am trying to get my head around p channel mosfets and bought some A03401 mosfets. As i understand the mosfet will not allow current to flow if Vgs == Vds and thats why the pull up resistor is there. I have not even attempted to connect a microcontroller yet because the led was on in this configuration. i read Vgs and Vds and they are both 0.6v and so i am not sure why the mosfet is allowing current to flow. any help would be much appreciated. thanks. ps. appolgies for poor picture quality, camera is broken. AI: You have the P-MOSFET connected wrong. The Source (S) terminal should be toward the 5V and the Drain (D) should connect to the LED in your diagram. The condition where the P-MOSFET will be off is if the voltage between the Gate (G) and the Source (S) is less than the VGSTHR. The reason that the LED lit up in your drawn configuration is because the body diode was forward biased and letting current pass from the D terminal to the S terminal.
H: Connecting Temperature sensor EVAL board (ADT7516) to the BeagleBone Green I have a BeagleBone Green and an evaluation board of the temp sensor (ADT7516). I also have a 4-pin female jumper to grove 4 pin conversion cable. I am not an electronics student and have no idea how to make the connection. I would like to have some reference for the connection. My goal is to write the driver for the ADT7516 and to test it accordingly. Also, I don't want to use a breadboard here. So can anyone help me with the connection here. Thanks AI: If you can't find any documentation about how the communication over USB works, connecting the devices by I2C will probably be your best bet indeed. First one should check if the signal voltages of the Beaglebone and the Eval kit are the same. The silkscreen marking on the Beaglebone says 3V3, and if you have a look at the Beaglebone system reference manual, you will see that it is indeed 3.3V for its I/O pins and also the grove connector. Then you have to check for the Eval kit. In the schematic part with the sensor (ADT7516) you can see that its supply is tied to +3.3V. So the voltages check out. Now you should be able to just connect the SCL, SDA and GND signals of the Beaglebone to the SCL, SDA and GND connectors on the Eval kit with jumper wires. Don't connect the Vcc/3V3 pins, supply each board seperately over USB. There is the possibility of the USB controller on the Eval kit disturbing the communication on the I2C bus, because not all devices are multi-master capable. If you feel like you are having problems with this come back here and we will talk about how to disable the USB controller.
H: Designing a circuit for active low input relay How do i modify the following circuit for a 1 form A contact relay such that it has active low input. AI: simulate this circuit – Schematic created using CircuitLab You could add an NPN and resistor like this. It will invert the behavior. The output will be high if the input is low, and vice versa.
H: What is the recommended battery chemistry for digital multimeters? I would like to know if the different internal resistances of different battery chemistry somehow affects the calibration of a digital multi-meter. If so, then what would the optimal battery chemistry be for commercially available multimeters. For instance, would low self-discharge Alkaline batteries contribute to a more accurate reading than rechargeable Nickel-Cadmium batteries? Or vice-versa? Since Capacitors have ESR, I'm assuming so do batteries. Do certain battery types give a better ERS rating? Does this even matter for digital multimeters? AI: Multimeters use complex integrated circuits that are designed to work with a range of supply voltages, because they mean to be portable and therefore use batteries, and all batteries tend to drop their voltages as they worn out and age. To accommodate this variable range, the DMM ICs have built-in voltage regulator(s) for important internal circuitry, and use internal self-calibrating techniques to keep their specified accuracy of measurements. And DMMs don't consume any heavy bursts of current when taking measurements (they use steady, continuously running integrators, not some fast high-consuming sampling ADC), so the ESRs of batteries (in fear of voltage sagging) don't make any difference as long as overall battery voltage stays above certain level. (I guess this was the false assumption that led to this inquiry). Therefore, DMMs are effectively "de-coupled" from power supply, and therefore can use ANY kind of batteries, high-ESR, low-ESR, whatever (as long as their voltage is above certain level) without affecting their functionality. Of course, batteries with low self-discharge would be the best.
H: How can I solve this circuit with voltage and current sources using the node voltage method? Here is the circuit. simulate this circuit – Schematic created using CircuitLab What do I have to do when there are two different sources? Find all the voltages in the resistors. Supposing every current going out of the nodes, here are the equations: NODE1) \$V1=-15\$ NODE2) \$V2/R2+(V2-V3)/R3-I1=0\$ NODE3) \$(V3-V1)/R1+(V3-V2)/R3-I2=0\$ I don't know if the first equation is right, or if it has to be \$-15+(V1-V3)/R1+I1=0\$ I don't know what am I supposed to do with the \$V1\$ in the NODE3 equation, using -15 instead of \$V1\$ or simply don't put it. (?) Considering only the NODE2 and NODE3 equations: \$G*V=I\$ I have to find \$G^-1\$: \$G^-1=1/detG*(G^a)^T\$ \$G^a\$ = matrix composed by algebraic complements, \$G^T\$ = transposed. By doing that I find the wrong results. I know there are many ways to resolve this problem, but I have to practice the node voltage method. It may be that I made some algebra or numerical errors, I'm trying again in the meantime. AI: I've added a ground reference to your schematic on the left and then redrew it, on the right: simulate this circuit – Schematic created using CircuitLab You already know \$V_1=+15\:\text{V}\$. That's "free." At this point, you need only quickly write out the other two equations: $$\begin{align*} \frac{V_2}{R_2}+\frac{V_2}{R_3}&=I_1+\frac{V_3}{R_3}\\\\ \frac{V_3}{R_1}+\frac{V_3}{R_3}&=I_2+\frac{V_1}{R_1}+\frac{V_2}{R_3} \end{align*}$$ I divide up my equations (shown above) using a "mental model" I acquired from reading Spice source code: I place out-flowing currents on the left and in-flowing currents on the right. A current source is either an out-flowing current or else it is an in-flowing current. So I place that on whichever side it belongs, depending on which way it points. You can re-arrange the above equations per the standard format for matrix solution, if you want. $$\left[{\begin{array}{cc}\frac{1}{R_2}+\frac{1}{R_3}&\frac{-1}{R_3}\\\frac{-1}{R_3}&\frac{1}{R_2}+\frac{1}{R_3}\end{array}}\right]\left[{\begin{array}{cc}V_2\vphantom{\frac{V_1}{R_3}}\\V_3\vphantom{\frac{1}{R_3}}\end{array}}\right]=\left[{\begin{array}{cc}I_1\vphantom{\frac{V_1}{R_3}}\\I_2+\frac{V_1}{R_1}\vphantom{\frac{1}{R_3}}\end{array}}\right]$$ Now use Cramer's rule, if by hand. Or use Sage/sympy or some other software product, if you prefer. Regardless, the simultaneous solution of the above will produce \$V_2\$ and \$V_3\$ for you.