text
stringlengths
83
79.5k
H: What is the difference between an analogue multiplexer and digital multiplexer? As far as I know, analogue multiplexing is used to take voltage samples from many channels in a short time. It passes the voltages from an input to the ADC without amplifying them. I guess buffer them? But is that called analogue because of the inner circuitry or because of its operation? And what is a digital multiplexer used for? AI: The operation of any multiplexer (MUX for short) is conceptually the same, be it analog or digital. In essence you have a set of numbered data inputs (usually a power of 2, say \$N=2^n\$ inputs named, say, \$X_0, X_1,\$ ... etc.), a set of digital selection inputs (in number of \$n\$) and an output. A mux works by sending one (and only one) data input signal to the output. The data input to be "routed" to the output is the one selected using the selection inputs, i.e. the one whose number, expressed in binary, is put on the selection inputs. In other words, a mux acts like a digitally-selectable single-pole/N-throw switch. The difference between analog and digital muxes, seen from the outer world, is that the data inputs and the output are digital (two-level) for digital muxes, whereas in analog muxes the data signals can be analog. The common implementation, in the two cases, is quite different. Analog muxes are made using FET switches (most commonly MOSFET transmission gates) and they act more like actual switch arrays, without amplification of the switched signals. Take as an example the common 74HC4051 analog mux: Here S0, S1 and S2 are the selection inputs, /E is the enable input (all four pins are digital), whereas Y0..Y7 are the analog data inputs and Z is the analog output. Note that in this case you can also reverse the role of the analog inputs and output and get a demultiplexer (a.k.a. DEMUX). In particular, see how a single switch is implemented: Digital muxes, on the other hand, use a bunch of digital logic gates to steer signals from (digital) inputs to the (digital) output. Digital muxes amplify the signal, since the internal gates are, after all, buffer amplifier. You can refer to the Wikipedia article about the mulitplexer to understand how a digital multiplexer works internally. Actual implementations don't differ too much. Take as an example the common 74HC151 digital mux and its internal logic diagram: In this case they use I0,I1,...,I7 for the data inputs and Y for the output (they also provide a negated output for free).
H: Can you have two sources run to one speaker if the power is cut to one? I have a Radio that I am modifying to be able to play a old radio programs off of a SD card. Basically I have a mp3 player and radio in one case the mp3 play is powered off of its own power supply and the radio is powered normally but with a relay in line so that the mp3 player can cut power to the radio. Then put it own signal to the + - lines of the speaker. Can I have both devices soldered to the + - lines of the speaker or will this cause problems? They should never be playing at the same time. If the mp3 player is playing there should be no power going to the radio and if the radio is playing that means that the mp3 play is not playing otherwise it would have cut the power to the radio. Is it safe to do or would I have to make some kind of mixer? Is there any way there could be some kind of feed back that could damage ether device? The mp3 play is powered of 5v usb if that helps and the Radio is 110v. The only connection would be the - and + of the speaker with both connecting to the - and +. AI: Can I have both devices soldered to the + - lines of the speaker Not in the general case, no. or will this cause problems? Quite possibly, yes. Amplifier outputs aren't really designed to be backdriven by something else. Ideally they are somewhat robust against electrical faults (for example shorts) but not always. Before IC amps with build in protection circuits, blown fuses or transistors could happen. Note that two amplifiers trying to drive opposite voltages are similar to a shorted speaker wire. The specifications of many active semiconductor devices specifically prohibit having voltages on pins when the device itself is unpowered. Even if there is no damage, the unused source may load the speaker lines, taking power and quite possibly causing distortion. A "mixer" would only be a solution for low level outputs which you then fed into a power amplifier - you don't really mix power amplifier outputs. A switch (possibly even more contacts on your relays) could be an option. Running an amplifier without a load isn't a good idea either, but many will tolerate this briefly even if they don't have protection against other kinds of faults.
H: Why use the fast Fourier transform for noise reduction instead of a classical electronic filter? I'd like to know how to remove environmental noise from a speech recording. I've made some research and I've noticed that most of the methods proposed use the fast Fourier transform. But why can't you use a classical electronic filter to remove the noise frequencies? Why bothering with doing an FFT? AI: I'd like to know how to remove environmental noise from a speech recording. Well it's stored digitally now, right? so are you planning on putting your microphone next to the speaker after an analog filter to re-record it? Enough messing around, I'll be serious. In order to make a filter attenuate more in a smaller range of frequencies, aka making the frequency response curve more vertical, then you just need to increase the order of the filter. That is something that is reasonably easy to do in Matlab. It's also something that is feasibly to do post-processing. It's also about repeatability, if you apply the filter on a sunny day today, then you expect it to work identically to tomorrow when it's raining. You expect it to work exactly the same, right? In analog circuits you have all these "5% resistor", "1% capacitor", and all other stuff. So if you want to make something exact you will definitely need to trim the circuit afterwards so it matches your desired filter perfectly. If you want to increase the order of the filter... then sadly.. it will make the filter so much larger physically. Instead of taking up the size of a credit card, it will take up the size of, I don't know, depends on filter order and what you're okay with. Regarding the repeatability, doing something today.. warm.. tomorrow.. colder... the resistances will change ever so slightly, the frequency response will change, a couple of Hz there, some there, the more components you got in your circuits, there more likely it is that your components will change their values. And then you have humidity, oxidizing... And here's the punchline that I should've said first, you can't really post-process it, unless you got cassette tapes. I'm not 100% sure what analog musical medium that is being used to record / delete easily. LP discs would be a nightmare... And let's not forget the price. One is software, if you write it yourself then it's essentially for free, the other requires components, physical parts. But don't think analog filters are bad, they got their uses, such as removing nasty harmonics in large DC motors, or making ultra silent stepper motors for 3D-printers by smoothing out the current. And tons of other uses. - Also if you would solve it with an analog filter, no one would think it would be a bad solution. I believe I'm indirectly answering why FFT is a better way to go about it, post-processing wise. The bottom line is that it's much cheaper to do. You could also just apply a notch filter if you know what frequency the noise is at. Or a wider, aka bandstop filter. And last thing I want to add... woaw this answer is so long, I'm sorry. But if you use an analog filter and you... mess up with your calculations and then think it's all fine and dandy and use it in some serious event, like interviewing the king of Sweden (Knugen). And you messed up with the sizing of a capacitor, instead of filtering 16kHz noise, you're filtering out 4kHz "noise". If you instead deal with it digitally then it's just a matter of changing some variables, you don't need to desolder -> solder another component. Also the interview is ruined.
H: STM32F407VG SDIO read and write speed I am writing the on board accelerometer data to my SD card. I am using a STM32F407VG board. The data is being written and read. How can I measure or test the speed of reading and writing data to the SD card through STM32F407VG board? AI: Count the number of written blocks per second. You can probably hook into the SDIO interrupts or driver to get an integer increment somewhere. Or it might already have this, check the documentation. Then in the systick for example, see every 1 second how many blocks were written. And reset the integer. Or use the producing data thread, and increment an integer each byte you write to the file stream. Then see how big this number is every 1 second, and clear it. For example, printf and related functions often return the number of written bytes.
H: Can I break a radio tranceiving device by operating it with no antenna connected? People tell me I shall not use my CB-radio station without an antenna connected or it will result in damage of the device. Is this true and why is this? AI: You could potentially break some radio transmitters by operating them without the antenna connected. Several things combine to make this possible. First, it's difficult to make power at RF frequencies, so the power devices are often fairly fragile, and run near their limiting conditions. Secondly, radio signals passing down a transmission line behave in a way most non-engineers don't expect. They get reflected from an open circuit, that is, from a connector without the antenna connected. The antenna provides a load, absorbing the energy travelling down the transmission line from the power device to the antenna. If that energy is reflected, then for a well matched transmitter, it has the potential to double the voltage seen at the transmitting device. Depending on the length of the line, it might alternatively double the current, which usually isn't as bad. So a transistor that's already close to its limits could be pushed beyond them. If the transmitter's output device is poorly matched, then there's the potential for much higher voltage magnification. Usually, the transmitter will be designed so that the power device is sufficiently within its ratings that it won't fail into any load, as blowing up into no load is not very nice behaviour. But sometimes, especially for low cost and high power amplifiers, like your CB kicker for instance, it won't be, and needs that load to prevent reflections.
H: RS-232C with phone connector I found the following picture of the connectors of a monitor. The serial connector looks like a phone connector. But I know only the D-sub and RJ connectors for serial ports. Can anybody tell me the name of the specification for this cabling? AI: It's likely a 3.5mm audio jack also called a phone connector as you say. It's common to use a cheaper connector to add (an often unused by the consumer) serial port. Anyway if you want to use it, grab an old audio cable or a pair of headphones and cut the cable. Or you could get yourself a 3.5mm audio plug from digikey. Then just ohm it out to find gnd and then connect to either a scope or a serial device and try to figure out which pin is gnd and which is receive. There's only a couple of combinations of RX, TX and GND.
H: Electrical commutator for a coffee machine i would like to understand the role of the commutator in the following diagram. NB: abbreviations: Co: commutator Re:heating element Pr: pressure switch Sa: heating element protection Ct: power supply connector Ma Bv and Gv are colors I have not a solid background on electrical engineering, the circuit is from CMA espresso coffee machine technical book. AI: The switch appears to transfer the heater between the power source shown as R-N at the top/right side of the diagram and the CT power supply connector at the bottom/left. I have no idea why. What is shown is a connection diagram rather than a schematic diagram. Rather than showing the switch function, the diagram shows a switch housing with wires connected to some of the terminals. The number of used and un-used terminals indicates that the switch has more contacts and functions than are required for this application. The description quoted from the data sheet seems to require a double-pole, double-throw switch as shown schematically below.
H: Charging 2 LiPos in serial used as split rail I was wondering what the recommendations are for creating a charging circuit for 2 LiPos when they are connected in series, but as a split rail, shown below. Currently I am just disconnecting them and charging them using the sparkfun charger PRT-10217. Previously I have implemented a charging circuit around the MCP73831 for a single LiPo, so I was wondering if it were possible to use two of those in this type of configuration: This is of course assuming that I disconnect the batteries from the rest of the circuit first! Is there anything else I need to be careful of? Thanks AI: Since lipos can be very dangerous, and 'assuming that I disconnect the batteries from the rest of the circuit first' doesn't lend much confidence, I advise you make it as fool-proof as possible. Adafruit has a decent article on multi-cell charging, of which I'll reproduce here. Basically, you'll want a 3PDT switch (not abundant, but available) to switch between connecting the batteries to the load and to the chargers. Otherwise, you could just remove the batteries from the circuit and charge them. Whichever method you choose, again, I advise not to assume that the operator (you or another user) remembers to hit a switch in order to avoid a potentially unsafe state of the batteries.
H: Part name in Pspice I was working on some simulations in logistic map in MATLAB, and need to verify some results in a virtual circuit of a logistic map. I found this circuit diagram for the logistic map. However, I am having some trouble finding two parts of this circuit in PSPICE. First, what should I search for to get the box with '{R}', which is basically multiplying by a scalar value 'R'? Second, what is that part below 'TD = {delay}'? I haven't yet been introduced to it? AI: Anything with curly braces is a parameter or in some spice packages a conversion to a scalar value. In this case the parameter {R} is set to 3 (probably with a .param statement in the netlist or graphically in the paramters list). It means the voltage is being multiplied by a power of 3. The second thing is a transmission line with an impedance of Z_0 = 1k and a delay of 100us
H: Water Sensing Circuit I'm working on a circuit board driven by a PIC18F; one of the components on the board is a water sensor. This is pretty straightforward, there are two electrodes on a probe; when immersed in water, there's enough conductivity to complete the circuit, and it pulls a pin high on the PIC. Below is a sketch of the relevant portion of the circuit. The electrodes are CN4-1 and CN4-2, the board is powered by a 3.6 V battery. As it stands, it works as intended, but I'm seeing some undesirable behavior. The system is highly sensitive to anything touching the second electrode, CN4-2; I'm assuming this introduces stray charge to the system, and I can get a false positive detection (even if nothing is touching CN4-1, so the circuit is not completed). In particular, there's an LED that signals the presence of water, triggered by this circuit. If CN4-2 is touched by a conductor (either water or something else, like a hand), the I/O pin gets pulled high enough to trigger the LED, but in some cases just having the LED lit is enough to pull some current from the battery, letting the signal to the I/O pin get pulled low enough that it turns off again, and we end up switch back and forth between states. Tying the ground of the board to an external ground helps reduce this, but doesn't always eliminate it. Reducing the size of the resistor pulling the pin low reduces these false positives, but then makes it hard for the circuit to pull it high when there's a legitimate signal. Simultaneously reducing the size of the resistor that pulls it high can fix that, too, but then the total resistance of the circuit is low enough that when the circuit is connected across CN4, there's a significant current draw, which will shorten the battery life significantly. I inherited the board design, so I won't be offended if you tell me that there's a completely different way to handle this that would be better. I'm ideally looking to have the system very responsive to a connection across CN4, minimal power draw whether CN4 is open or closed, and preventing a false positive signal when only a single electrode has some contact. If it can be done without requiring tying the system to an external ground, that would be convenient. AI: You could use this circuit instead. The capacitor on its input will filter out most interference and the PNP transistor will give better output voltage levels. If it's still too sensitive to interference, increasing the value of C1 and/or R3 will help. If the water doesn't trigger it reliably, increase the value of R2. (The circuit will work for a water resistance of about 15MOhm in its current form) simulate this circuit – Schematic created using CircuitLab As with any circuit that puts a DC voltage across water, the electrodes will slowly corrode when submerged in water. You could also design a circuit that measures the capacitance between two twisted, insulated wires sticking into the water, but that would need an oscillator and time measuring circuit. It's possible to implement this in the PIC but it would be way more complex and might also need more power. The main advantage of such a circuit is that it's even less sensitive to (conducted) interference and doesn't corrode the electrodes.
H: How to make a button activate its corresponding binary address I have 15 output buttons and 4 digital inputs. As in the picture: How do I make each button activate its corresponding address. For example, when I press s3, I want GND to be sent to inputs 0 and 1. When I press s7, I want GND to be sent to inputs 0,1 and 2.I have to do this without one button influencing the other AI: From the comments: Yes, my inputs are already pull-up, the problem is that with this type of configuration I can only recognize one key at a time, if I activate keys 1 and 2 at the same time the input will receive 3. It sounds as though you need a proper keyboard matrix controller. Figure 1. The MM74C922 16-key encoder. The MM74C922 and MM74C923 (20-key version) provide all the necessary logic to fully encode an array of SPST switches. On-chip pull-up devices. No diodes needed. Internal debounce with single external capacitor. "Data Available" goes high when a valid entry has been made. Available output returns to a low level when the entered key is released - even if another is depressed. The Data Available will return high to indicate acceptance of the new key after a normal debounce period. This two-key roll-over is provided between any two switches. You even get to be able to detect SW0 thanks to the Data Available signal! Figure 2. MC74C922 internal schematic. You won't be able to use your common ground switch arrangement but all other potential problems will be solved.
H: Differential Amplifier with Global Negative Feedback This question refers to audio amplifier design, using BJTs only. I am wondering how differential stage amplifier plays an important role in hi-fi audio amplifiers. According to this book (where picture was copied from) I have, a part of output signal is feeding the base of Q2. Q1 and Q2 somehow amplify input signal and at the same time cancel out some of distortion that is being brought back from the output to the differential input stage of amplifier. I want to understand the process of this differential stage and how it manages to cancel out some of the output distortion. I almost completely understand functions of other transistor stages so there is no need for explaining how the whole circuit works. *Source: G. Randy Slone : High Power Audio Amplifier Construction Manual AI: The original question asked about "cancelling output distortion". This answer shows the diffpair ADDS its own distortion, uncancelable distortion. with 200 milliwatt power dissipation in your diffpair, you will experience lots of thermal distortion. Put in a clean square wave (into the actual circuit) and examine the overshoots (or undershoots) on pulse leading edges. You can model this in SPICE, using voltage-controlled-voltage-sources to modulate a DC voltage in series with base or with emitter, that source changing -2 milliVolts per degree Centigrade of collector heating. Now if you just had a good thermal model of those transistors. Assume each is 100 micron cube. 1u cube is 11.4 nanoseconds 10u cube is 1140 nanoseconds 100u cube is 114000 nanoseconds (114 microSeconds) Given 4+ milliamp through R1, and 50 volts Vce across each of Q1 and Q2, there is at least 200milliWatts total in those 2 devices. You care about the transient thermal resistance.
H: Solid State Flasher controlling other Relays I'm a freshman computer science major, and I still have a lot left to learn in the realm of circuitry, but I have a decent understanding of the fundamentals. I have made an electric bike, and I wanted to install turn signals. The bike's battery is a 52 volt nominal, Lithium Ion battery (max 58 volts), so all my components must be able to operate on the voltage of this battery (unless I wanted to get a dc-dc converter to reduce to 12 volts, which I don't). I installed a 60 volt solid state flasher relay to control the LED turn signals, but one problem is that the flasher doesn't allow the signal lights to flash completely on and off. Instead, they flash from 100 percent brightness to about 50 percent brightness. There appears to be some electricity leaking through the flasher. When I insert my body into the circuit, my own dry skin is enough of a conductor to light the LEDs to about 40 percent brightness. (Crazy huh?) So, the LED's apparently don't need very much electricity. Therefore, I expect it might be difficult to use a resistor to reduce the system power enough to prevent the LEDs from lighting at all when the flasher is "open." My knowledge of resistors is still limited, so any suggestions on this approach are appreciated. Alternatively, my next idea was to use two electromechanical relays to completely break the circuit. I plan to control the energizing of the relays via my dashboard turn signal switch on my handlebars. Observe the following diagram (You'll have to forgive my circuit design skills): simulate this circuit – Schematic created using CircuitLab Are there any flaws in this idea? Improvements? Will this work, given I get the right relays? If so, can you point me to the best relay for this (must handle up to 60 volts)? Thanks! LEDs: .08 amps at full brightness .02 amps at half brightness Volts across flasher: 2 volts in "open" state 36 volts closed Flasher Resistance: 512 Ohms with multimeter dial on "2000" AI: simulate this circuit – Schematic created using CircuitLab Figure 1. Simple on-off control. It's not clear why you think you need relays. They will probably add a nice clicking sound but you should be able to obtain complete isolation with the switches only. OK. That's not going to work due to the leakage. simulate this circuit Figure 2. Adding a pair of diodes eliminates one of the relays. How it works: Switching on LEFT will cause the relay to turn on when current flows from the flasher through the coil and D1. D2 prevents the right LEDs from turning on simultaneously. The problem is that a 60 V relay will require little current to energise it so you may find that the relay stays on and now you have LEDs at full brightness. If you supply all the requested info and some details on the LED specifications there may be a workaround. LED current Voltage drop across flasher On 80 mA 2 V "Off" 20 mA 36 V From those numbers appears that your flasher passes about 20 mA when off. This is required to power the internal circuitry and on a 3 A load is < 1% so it wouldn't be noticed. On your 80 mA load it is passing 25% of the "on" current. Solutions: Buy a better flasher. A three-terminal one would have its own direct path to ground so that the output could be fully off. Try your relay solution. simulate this circuit Figure 3. (a) A common loading resistor. (b) Individual loading resistors. Add a load resistor. As shown in Figure 3 a common load resistor or individual resistors per side will "shunt" some of the current around the LEDs. Since you have about 32 V across the LEDs and 20 mA flowing through them they are acting like a resistance of \$ R = \frac {V}{I} = \frac {36}{0.02} = 1800 \ \Omega \$. Therefore, if we put 1800 Ξ© in parallel we will shunt about half that current away from the LEDs. (Because the LEDs do not behave like resistors the voltage and current will not split exactly as shown above.) We now need to check the power rating of the resistor when the flasher is on. Power is given by \$ P = \frac {V^2}{R} \$ so let's say we want the LEDs very dim when off so we add 1k in parallel and we'll have 58 V across the resistor when on. \$ P = \frac {V^2}{R} = \frac {60^2}{1000} = 3.6 \ \mathrm W \$. Obviously a 0.25 W resistor isn't going to be good enough. Work with the numbers and your available parts to find something that will work.
H: Current amplifier to raise 0-5 mA to 0-20 mA range I have a little BLE device that can drive an LED at variable brightness (according to a programmable 0-255 byte value). This works, but has the major caveat that it can only source 5 mA, whereas many LEDs are spec'd to run at 20 mA nominal. The result is that it can only drive the efficient tiny SMD chip LEDs, and not most discrete LEDs. So I'm looking to make a little current amplifying circuit to take the 0-5 mA and amplify it to the range of 0-20 mA. What approach would be the best to go about doing this? Any pointers are greatly appreciated. AI: You need add this to your circuit, see picture below. You can power this addition with 3V (instead of 5V as show in picture), maybe you'll have to adjust the R2 value. You can learn more about it in the following link: https://learn.sparkfun.com/tutorials/transistors/applications-i-switches There's an animated GIF at this page that is very good to help you understand the concept.
H: Series Termination Resistors Sharing a Common Point Suppose I have a high speed digital signal (represented as a square wave) that splits off and is shared between two subsequent inputs stages (represented as MOSFETs). Is it better to have two series termination resistors for each input stage? simulate this circuit – Schematic created using CircuitLab Or better to have a single resistor for both stages? simulate this circuit My hunch tells me the former would work best, but the latter could work as long as the post resistor line is routed correctly and kept short. The Internet doesn't seem to have much to say on the matter. AI: I'll assume that your 240MHz source is far enough from your "inputs stages" that you actually have a transmission line and that is why you are asking about termination. If the connection is short you're dealing with a RLC circuit and your resistor is more about damping than termination (more on how to determine if your line is short or long in this question). If you are dealing with a transmission line then you want to match your 240MHz source to the line. So I would place a single series resistor at the source. This will serve as your source terminator for any reflections coming back. Now let's say you now have a 50 Ohm line after your resistor, if you split it into two 50 Ohm lines well now you have an impedance mismatch? Instead you can split it into two 100 Ohm lines. This is the recommended approach for "bifurcated lines" in Johnson's high speed digital design book. If you could handle the voltage loss you could go further and end terminate the line at your "inputs stages" and you should have a nice clean setup. On the other hand your example uses a clock. If all you need to do is get a clock to multiple locations cleanly there are a number of inexpensive clock buffer chips or oscillators themselves that come with 2,4,x outputs. Sometimes it's just easier to use one of those.
H: Power & Reset in momentary switch in analog circuit So I am designing a circuit and wanted to implement both power and reset in one momentary switch. What I mean is, if the switch is pressed, it sends a reset signal (4.5v), but if it is held for x seconds, it powers on/off. I figure I might need a 555 timer. How to do this? EDIT: Some specifics: One press when the circuit is off turns it on. It is to reset an IC (so HIGH at 4.5v). AI: A discrete analog circuit could be something like this... Power would always be available at SOURCE and is switched via the P-MOSFET M1 to the POWER_OUT line. Initially all transistors are off. The P-MOSFET is gated by an N-MOSFET, M3. This MOSFET is gated either by the momentary switch to SOURCE, or via the output from the P-MOSFET. As such when you press the button M3 turns on, which then turns on M1, which then keeps M3 turned on when the switch is released. SW1 also charges C2 to hold the RESET line high until the button is released, at that point reset will decay as C2 is discharges through R5. Further, holding down SW1 will cause C1 to charge through resistor R1. When the voltage at the top of C1 rises above the gate threshold of N-MOSFET M2, the latter will turn on and pull the gate of M3 low, turning off the P-MOSFET which will stay turned off when the button is released. C1 will then discharge through D4 and R6 during which time you would not be able to power up again. Briefly pressing the button again while it is powered up will simply recharge the reset capacitor. Note the circuit itself uses zero current, other than leakage, when the button is not being held in. simulate this circuit – Schematic created using CircuitLab
H: Guidelines on PCB design with components only partially wired on PCB traces There were a number of questions/answers here somewhat related to this question, but not exactly the same. I am developing an inverter with half bridge MOSFETs with high voltage and current over 100 amperes using parallel MOSFETs. MOSFETs drains are connected to the copper power bus which will mount outside of the PCB. All the components are undoubtedly part of the same schematic as some of the MOSFETs pins are placed on PCB traces, but a chunk of circuits will be outside of the PCB. This is a common task for motor controllers and for power supplies, but I can't find guidelines on PCB design. Whatever PCB CAD software is used, the rule check will fail in unconnected parts of the schematic. Please share your experience. Note: I am using DipTrace for schematic and PCB design, but the workflow should be similar for any CAD to fully use capabilities of CAD and yet escape DRC errors. AI: I see a few potential approaches Draw the connections that are on the schematic but not the PCB as "lines" rather than "wires". Preferablly in a different colour so you can quickly see them for manual checking. Just treat the list of design rule violations as warnings rather than errors. I don't like this approach though because it can be hard to spot the real error in amongst the list of errors you are deliberately ignoring. Set conditions on the "un-routed net" design rule that exclude particular nets.
H: Factors to consider when swapping a battery with a power supply I'd like to swap an 18V lithium-ion battery with an 18V DC power supply for use in battery-powered hand tools (cordless drill, reciprocating/circular saw, weed whacker, etc.). Logistical issues aside, are there any electrical considerations where a fully-charged battery may behave differently than a power supply of the same voltage? For example, these tools are likely highly inductive loads, and the datasheet for this power supply states outputs are protected to short circuit conditions (~5.5A draw). Even so, I am not sure how this compares to the characteristics of a li-ion battery. AI: There are two things that define a voltage source: 1) Voltage 2) Source resistance Batteries have a different source resistance than a regular supply, this affects its ability to source current to whatever load\device you are using. Make sure the battery will source enough current. The other thing is voltage, unlike a regulated voltage source, batteries are unregulated, meaning the voltage that is supplied could range from 21V to 26V (or more) from a 24V lead acid battery. If the load needs a regulated voltage, you'll need to add a voltage regulator or the load might not function correctly. If your going the other way around, since the load expects an range of voltages of probably 5 lithium cells which would be 16-21V if you have a regulated supply with 18V that should work assuming you have more current than the battery could supply. Make sure you don't make the cable too high resistance or the voltage drop on the cable could be high enough to cause problems.
H: GPIO Output Registers on the STM32 Hi I'm currently attempting to write a simple program using the STM32 Nucleo development board, based around the STM32F334R8. The application sets up the GPIO ports A and C and reads the state of the button. If the button is pressed, it turns on the LED. If not, it turns it off. From ST's documentation (STM Nucleo 64) I've verified that the button is wired to Pin C13 and LED2 is wired to Pin A5. From the datasheet, I've been reading through the registers for the GPIO (Long STM32F334 Datasheet) and see there are three that seem to be related to the output; ODR, BSRR, and BRR. When implementing the application mentioned above, my first thought was to write the GPIO pin state for the output LED using ODR, like so: SET_BIT(GPIOA->ODR, GPIO_ODR_5); CLEAR_BIT(GPIOA->ODR, GPIO_ODR_5); This did not appear to work. My button presses were detected, as I could verify this in the debugger by seeing it follow different paths. Here's my setup code for the GPIO: // set one to input CLEAR_BIT(GPIOC->MODER, GPIO_MODER_MODER13_0); CLEAR_BIT(GPIOC->MODER, GPIO_MODER_MODER13_1); // set another to output SET_BIT(GPIOA->MODER, GPIO_MODER_MODER5_0); CLEAR_BIT(GPIOA->MODER, GPIO_MODER_MODER5_1); // set output to push-pull CLEAR_BIT(GPIOA->OTYPER, GPIO_OTYPER_OT_5); // set input with pull-up SET_BIT(GPIOC->PUPDR, GPIO_PUPDR_PUPDR13_1); CLEAR_BIT(GPIOC->PUPDR, GPIO_PUPDR_PUPDR13_0); // enable GPIOA and GPIOC clock SET_BIT(RCC->AHBENR, RCC_AHBENR_GPIOAEN); SET_BIT(RCC->AHBENR, RCC_AHBENR_GPIOCEN); I also saw a piece of example code that worked on my board that uses the BSRR and BRR bits, like so: // set output high SET_BIT(GPIOA->BSRR, GPIO_BSRR_BS_5); // set output low SET_BIT(GPIOA->BRR, GPIO_BRR_BR_5); ... But this didn't work. I'm not sure I understand the difference between the three registers and their functions. What are the use cases for each? Which one is suited to my application? AI: The most obvious problem I see in your code is that you're writing to the GPIO registers before enabling the clocks for the appropriate peripherals. Peripherals won't respond correctly if their clocks haven't been enabled. Enable all peripheral clocks before you try to do anything with the peripherals. That all being said: the differences between ODR and BSRR/BRR are minimal. If you only need to change one bit, though, a single write to BSRR (or BRR) is faster, and uses less code space, than a read/modify/write cycle on ODR. However, if you actually do want to set the state of the whole port at once, or if you need to check the current output state, ODR is the way to go.
H: Why do I get terrible static in my phone mic / recording when my phone is charging from the mains? I live in an apartment block in the UK. When I record my voice into my phone's voice app when the phone is charging from the mains, I get a terrible constant static sound that is not present when the phone is not plugged in. I suspect that the static gets much worse when my neighbour is using their washing machine. Is there anything I can do about this? Is it harmful to my phone or to any other appliance like a laptop? Thanks! AI: From what you have described it sounds like your phone charger is carrying a lot of noise from the mains to your phone. Noise on your power source can come from a variety of causes, for example the one you have listed in your question: a washing machine. Electro-mechanical systems that take a lot of power are difficult to regulate, and can thus push noise back on to the mains voltage. AC-DC converters then typically try to remove this noise in the form of filtering, but some are made better than others. Again, your phone will probably be filtering the DC that is supplied, but in this case it sounds as though it is not filtering it sufficiently and is actually letting it effect other subcircuits, in this case your microphone circuit. Microphones (I'm presuming an analogue mic) are very sensitive to noise as the signal they produce are very low amplitude. When you are just on your battery the noise will not be present as batteries are generally very quiet power supplies. The noise shouldn't be damaging, but if you are very concerned there are additional filters you can get in the form of power strips that could reduce this issue.
H: Half of differential tage voltage gain I can't understand why is 2Rpi in equation 375/376. It looks like the current ib1 goes through Rpi of first stage and through Rpi of second stage but it must go through first Rpi to ground and back to signal source. Why it's so? AI: Here think of the differential mode half-circuit as the small-signal equivalent of a common-emitter with no degeneration. The gain of such circuit is \$A_v= \frac{v_o}{v_i}=\$ \$-g_m.R_C\$. Here \$v_i=\frac{v_d}{2}\$ and \$g_m=\frac{\beta}{r_\pi}\$. Substituting \$v_i\$ in \$A_v\$ you get \$A_{dm_1}=\frac{2v_{o1}}{v_d}=\$ \$-g_m.R_c\$. Now dividing both sides by 2, you get \$A_{dm_1}=\frac{v_{o1}}{v_d}=\frac{-g_m.R_c}{2}\$. This is the differential gain of a single-ended output of a differential pair.
H: LED spotlights in soffits I am looking into buying some 5W LED 3000k GU10 spotlights with a rating of 450 lumens, for my gypsum soffits. The only part which is confusing me is what viewing angle I should get. I have found a lot for sale with a viewing angle of 60 degrees, 90 degrees or 120 degrees. However I am not sure which to opt for. At the moment, the best deal which I found is on a viewing angle of 120 degrees. Would it be a good choice? Below is a plan of how my spotlights are laid out. The main bedroom already has 4 spotlights which are not shown on the plan. Would 120 degrees work for these rooms? Or else, should I get different viewing angles for different rooms? AI: 120 degrees is more of a floodlight than a spotlight. I replaced the halogen GU10's in my kitchen for 120 degree LED lamps and really hated the effect - it was like having fluorescent tubes that give really flat lighting. I swapped them for 45 degree LEDs (which are similar to standard halogens) and was much happier. In a bedroom I think you want the spotlight effect, so I'd go for the around 45 to 50 degrees. Also, 5W may be far too bright for a bedroom, so either use 3W or make them dimmable - you should make sure the LED lamps are dimmable, not all are.
H: random current on/off IC available? I am still very new to electronics, but have been using Arduino to build stuff with. But I require a component for a project that does not contain any Arduino because of space. So I am looking to see if there is, or the best work-around, a IC that will randomly generate a pulse if a button is pressed. So once the button is pressed it either allows a pulse to go though to an I/O, or stops it. But for this to be random. The space is width 150mm and length 500mm and a 7mm height. it only has a small current as the battery is 3v. Any ideas/advice to achieve this would be really helpful. Thanks AI: This is the ATtiny85. It comes in sizes from small to very, very small. This is an Arduino core that works with the ATtiny85.
H: mic5504 + esp8266 = going mad I've a board with an esp8266ex and a flash IC. The main power rail is +5 and it goes into a MIC5504 for 3.3 voltage regulation. The enable pin of the MIC5504 is tied up with a 10k resistor to the +5 power rail. The problem is that I'm going literally mad with this voltage regulator, I've already replaced 4 of them, while some simply burned on power up, others either gave me a 4.4 volts in output (and I burned out the ICs) or gives me a 2.4 volts without any visual difference (I'm using the same pcb)... If I remove the MIC5504 and power the board with a 3.3v direct voltage, everything works wonderfull and the current is about 0.02-0.06 amp , so there's no short around the PCB or excessive current draw (that by the way should shutdown the MIC5504 from its datasheet). During one of the tests, I magically got a 3.4v output from the MIC and did some test. After this , I just noticed that I forgot to put 2 decoupling capacitors around my flash IC and indeed I was able to flash it , but the flash failed to work on a regular startup (maybe due to the missing capacitor). After soldering the capacitors back, bhooom, MIC5504 down to 2.2v . I cannot see any sense to this... I cannot sort out this thing in a comprehensive way, I simply have no clue.. Do you have any hint ? Any expert that worked with this voltage regulator that I'm starting to hate ? Or do you think the problem is somewhere else ? AI: What you describe is typical behaviour for those LDO regulators (like the MIC5504) which require specific input & output capacitors, and those capacitors are either: not fitted; or are fitted, but they are too far from the regulator; or are fitted, but they are the wrong type of capacitor. Here is the relevant section from the MIC5504 datasheet, with some important points highlighted: With missing / incorrect capacitors, especially the output capacitor, the regulator can oscillate causing incorrect operation of the connected device(s) and an abnormal reading on a multimeter (if you used an oscilloscope to look at the output voltage, then the output oscillation becomes visible). You got different behaviour when you were missing the decoupling capacitors for your flash memory, as they are also effectively across the regulator's output and therefore altered the problem. I've asked you to add a schematic and photos into the question, in order to see your specific implementation of those requirements. If those updates lead to any further analysis, I'll add it here.
H: Theoretical calculation of DDR3L transfer speed I am not sure if this questions belongs to this stack exchange site but I didn't find other better one. In case it doesn't, let me know and I will move it to some other place. I am working with a QorIQ T2080 Soc and DDR3L (DDR3-1866 mode, cycle time: 1.071ns @ CL=13 ) memory (model MT41K256M16). The configuration of the DDR3L allows me 1866M/T Data Rate with a 64bits bus-width, so, the theoretical peak achievable data-rate would be 14.9GB/s (1866Mhz * 64bits/8). However, performing a DMA memory copy test, the data-transfer-rate that I obtain is about 4GB/s (2GB/s x 2 because I am copying memory). I would like to understand where this value comes from. From what I know, correct me if I am wrong, DMAs normally create the data path when moving memory, and so, data doesn't go through them. Therefore, I didn't consider it as a data-rate limiting factor. I reached the conclusion that the memory could be the limiting factor and made the following supposition: The datasheet specify a burst length of 8 transactions of the bus size (64b). It is also specified a CAS latency of 13 for each column access to the memory (cycle time of 1.07ns). As I said before, the maximum peak achievable data-rate should be 14.9GB/s. However, each time we access a new column from the ram, data will only be received during 8 cycles at a frequency of 1866Mhz and then we will have to wait the true latency [3]: CL * 1.07 = 13.9 ns . Hence, I obtain a theoretical worst case: $$ \frac{64B \: transferred \; in \; a \; burst }{\frac{8 \: burst \; length}{1.866 \: Ghz}+14ns}= 3.4 \; GB/s$$ In [1] they mention that commonly the DDR controller is able to obtain a higher throughput, getting even close to the peak data-rate. My question is: Is this supposition right? Other sources where I looked: DDR2 data rate and data bus confusion DDR3 Data Prefetch Memory Performance Speed Latency AI: Your calculation of the peak throughput is correct, given the input. The actual throughput largely depends on the design of the DMA and DRAM controllers. The 3.4 GB/s is a good approximation, but it relies on the assumption that the DMA controller does one 64-byte transfer at a time and each transfer hits already opened (active) DRAM bank. In DRAM, reads and writes may be partially overlapping, so that the column address of the next operation is sent to the DRAM chip while it is still transferring data for the previous access. This is how actual throughput may get close to the theoretical peak. For this to happen, there should be enough buffer space to store the burst data, obviously. In memory to CPU transfers, usually the CPU cache can quickly consume or produce a relatively large chunk of bytes, when prefetching from memory. I am not sure about DMA controllers, though. Your DMA controller may have FIFO buffers, but I don't know if there are big enough to sustain a transfer longer than a single burst. Lacking enough buffers may be the reason you are not getting close to the theoretical throughput. Another aspect is related to DRAM pages. In order to issue reads and writes, the corresponding page has to be open ("activated"). Typically, DRAM chips consist of several banks, each having its own page buffer. If source and destination of your transfers happen to reside in different banks, there may be no additional cost of opening a page. Otherwise, the controller may have to close and open pages on every access, which would slow down the transfers significantly (~30-50 ns each time). The controller may also choose to close the DRAM page after each access, implementing so called "closed page" policy, if configured to do so. There will always be page open/close overhead when crossing pages, but it should be amortized in large sequential reads and writes. Unfortunately, to get a more definitive answer, you have to dig through the DRAM and SoC/DMA controller datasheets, if they are available. ADDED: I forgot to ask: why are you concerned about DMA memory to memory throughput? Since DMA is mostly intended for device access, it may not be designed for high speed and you may have better luck copying memory by CPU.
H: STM32F103ZET6 ADC with DMA whilst sleeping and interrupt every 0.5s I am currently trying to get my STM32F1 MCU to ADC 500 samples and DMA these into memory whilst asleep and wakeup after 0.5 seconds, i.e. have a sample from every 0.01s and then wake up after 0.5 seconds to process. I am currently getting a wakeup every 2 seconds. I am unclear of where I am incorrectly seting up my DMA, or less likely the ADC. I know that my processor is definitely entering into deepsleep as the board goes from 50mA to 30mA, the interrupt i've setup does trigger in debug mode and in my interrupt I have input a delay so I can see it in the scope. Any suggestions on what settings I am missing? // Local Variables ADC_InitTypeDef ADC_InitStructure; DMA_InitTypeDef DMA_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; // Code RCC_ADCCLKConfig(RCC_PCLK2_Div6); // PCLK2 is the APB2 clock ADCCLK = PCLK2/2 = 24/2 = 12MHz RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE); // Enable DMA1 clock so that we can talk to it RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); // Enable ADC1 clock so that we can talk to it ADC_DeInit(ADC1); // Put everything back to power-on defaults // DMA1 channel1 configuration DMA_DeInit(DMA1_Channel1); DMA_InitStructure.DMA_PeripheralBaseAddr = ((uint32_t)0x4001244C); DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)&ADC_output; DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC; DMA_InitStructure.DMA_BufferSize = 1000; // Number of samples in buffer DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; // 0x400 = 1024 DMA_InitStructure.DMA_Mode = DMA_Mode_Circular; DMA_InitStructure.DMA_Priority = DMA_Priority_High; DMA_InitStructure.DMA_M2M = DMA_M2M_Disable; DMA_Init(DMA1_Channel1, &DMA_InitStructure); DMA_ITConfig(DMA1_Channel1, DMA_IT_HT, ENABLE); // DMA1 NVIC configuration NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; /* Enable DMA1 NVIC channel1 */ NVIC_Init(&NVIC_InitStructure); /* Enable DMA1 channel1 */ DMA_Cmd(DMA1_Channel1, ENABLE); /* ADC1 Configuration */ ADC_InitStructure.ADC_Mode = ADC_Mode_Independent; ADC_InitStructure.ADC_ScanConvMode = ENABLE; ADC_InitStructure.ADC_ContinuousConvMode = DISABLE; ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T2_CC2; // Timer 1 ADC_ExternalTrigConv_T1_CC1 / Timer 2 ADC_ExternalTrigConv_T2_CC2 ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right; ADC_InitStructure.ADC_NbrOfChannel = 1; // Number of ADC channels ADC_Init(ADC1, &ADC_InitStructure); ADC_DMACmd(ADC1, ENABLE); ADC_Cmd(ADC1, ENABLE); ADC_ResetCalibration(ADC1); while(ADC_GetResetCalibrationStatus(ADC1)); ADC_StartCalibration(ADC1); while(ADC_GetCalibrationStatus(ADC1)); // ADC1 regular channels configuration // Configure ADC channels to be sampled ADC_RegularChannelConfig(ADC1, ADC_Channel_2, 1, ADC_SampleTime_55Cycles5); ADC_ExternalTrigConvCmd(ADC1, ENABLE); // TIM1 counter enable // Change if using a different timer trigger TIM_Cmd(TIM2, ENABLE); // TIM1 main Output Enable // Change if using a different timer trigger TIM_CtrlPWMOutputs(TIM2, ENABLE); AI: Was an issue with the timer that I was using to trigger the ADC not being set to 1000Hz (1ms) and me not enabling both the half and full buffer interrupt. Fixed Code: DMA_ITConfig(DMA1_Channel1, DMA_IT_HT, ENABLE); DMA_ITConfig(DMA1_Channel1, DMA_IT_FT, ENABLE);
H: 9 wire universal motor So I found an old washing machine and salvaged the motor. However I can't find any information about how to wire it because it has 9 wires coming out. So 2 of them are speed control = 7 to go. 2 are brushes and that leaves 5 for windings which seems like a lot. This picture shows the inside where there are to connections in the top and one at the bottom. Also the two whites are connected and I don't know what they are supposed to do. This picture shows the outside wires. I will explain what I have done as it has actually run already. I will number them 1-9 starting from the top. 2&3 are brushes. 7&8 are speed control 5&6 were connected before I touched it I did the following: Connected 1&2 Set power on 3&4 Leaving 9 which goes inside, unused in the setup. The motor ran but it leaves me wondering what the two whites connected inside does as well as wire nr 9 which I didn't use. Can anyone help? Update: Here is some information about it if it could help. I've searched a lot for a datasheet on it I've been unable to find anything so far. Thx for the answers so far. AI: Here are some possibilities. They should be verified by testing with an ohmmeter, tracing wires etc. Speed may be controlled by shorting some of the field windings or connecting more or less of the field coil in series with the armature. One or more temperature switches inside the motor may protect from overheating. They may be connected to an external relay rather than cutting off power directly. The motor is reversed by changing which of the two brushes is connected to the field and the power source. There may be a wire for connecting the frame of the motor to protective earth ground.
H: Induction motor scalar control I have been developing a software for scalar control of three phase induction motor with squirrel cage rotor. This control method is based on voltage-frequency characteristics of the motor. The used motor nameplate contains 400V, 50 Hz and the stator is in wye connection. Based on these values I expect that the slope of the voltage-frequency characteristics will be \$K_1 = \frac{(\sqrt(2)*400)}{(\sqrt(3)*50)} = 6.5\,V/Hz \$. The problem is that I would like to rotate the motor at 60 Hz. Based on the above given voltage-frequency characteristics the operating point would be in the field weakening region. I had an idea that I can prevent the field weakening of the motor by changing the slope of the voltage-frequency characteristics \$K_2 = \frac{(\sqrt(2)*400)}{\sqrt(3)*60)} = 5.4\,V/Hz \$ i.e. the nominal stator volatge would be achieved at 60 Hz and not at 50 Hz (please see the attached graph). Is it possible or is this idea wrong? (I see that below the 60 Hz the magnetic flux of the motor will be lower than the nominal value. But the motor starts with no load and the load torque is applied as soon as the motor achieve the no load speed.) Thanks for any ideas. AI: If the motor nameplate says 400 V, 50 Hz, wye connection, that is the line to line voltage that must be supplied for the wye connection 8 V/Hz is required. If you re-connect to the delta connection, you can supply 4.62 V/Hz. That would be 231 V for 50 Hz or 277 V for 60 Hz. If you do not provide the rated V/Hz the motor can not produce the rated torque without overheating. Rated V/Hz is required to produce the magnetizing flux for which the motor is designed.
H: How to implement 8b10b en/decoding protocol between two FPGAs? I'm using two Xilinx FPGAs (one Kintex 7 and one Artix 7). The Kintex 7 is tied to its own system (OPAL-RT software, it is a simulation software that is an addon to Simulink which lets data be output to an FPGA via a user CPU input) and will be outputting the its data as 10 serial bits. The problem I am trying to solve is to send 20 serial bits (actually, 16 bits, but when it's encoded it should be 20, if I'm not mistaken) from the Kintex 7 to the Artix 7. They will be clocked differently, but I thought the point of 8b10b was so that the clock of the primary FPGA can be recovered by the secondary via the data stream. Clearly I'm not very learned on the subject of setting up a communication link between two Xilinx FPGAs, but if someone has any insight that can help me, it would be super appreciated. Worth noting is that I have access to Vivado/Xilinx System Generator. AI: You need a "clock data recovery" (CDR) circuit. Your FPGA may include one as a hard core, if you are using signal rates in the gigabit-per-second range. This function generally requires some specialized parts, such as a voltage-controlled oscillator (VCO) and an analog control circuit for the VCO, that aren't easily implemented in the FPGA fabric. So if you want to work at frequencies where the FPGA's hard cores don't work, you would need to purchase an external IC to do this function. You'd need to choose a data rate that is used commonly enough to make it worth building ICs to work there. If you want to send this data at a relatively slow rate (say, below 50 Mb/s), you might want to use Manchester encoding instead of 8b/10b. With Manchester encoding, you can recover the clock from the data using a simple circuit requiring only a couple of gates, without needing a VCO or PLL. Your synthesis tool might not be happy about implementing this circuit, but at low data rates it should work just fine.
H: Power amplifier input source current path Can anyone draw (or write in text) the small-signal path from signal source XFG1 at input of Q1 base to amplifier load for positive and negative input signal swing? AI: I will try to show you two extreme cases (when clipping). For the Positive half of a sinusoidal swing: And for Negative half of a sinusoidal swing: This two cases should help you understand what is going on in the amplifier. Because in the normal operation we have "slightly" similar situation. For example: For the Positive half, \$Q_1\$ reduce his \$I_{C1}\$ current (just a bit), hence \$Q_2\$ must increase his \$I_{C2}\$ current. But this reduction in \$Q_1\$ current decreases the \$Q_5\$ base current also. And all this means that the \$I_{C5}\$ collector current is decreasing also. Hence, the voltage at \$Q_{12}\$ collector increases. The larger part of a \$Q_{12}\$ collector current (\$I_{C12}\$)can now flow into the \$Q_7\$ base. So, \$Q_7\$ and \$Q_9\$ conduct more current. And the load current increases. I hope this helps you. Because my English vocabulary is limited.
H: 5V Tolerant I/O A lot of micro-controllers has 5V Tolerant I/O pins using lower supply voltages (For example 3.3V). Even when they can't drive more than 3.3V at the output, they can be used in open-drain configuration for tri-state operation (useful for I2C) What is the real advantage of it? Is there so many external interfaces operating in 5V to make it attractive for the market? Does it apply for IoT devices? Thanks! AI: What's the real advantage of 5v tolerant I/O? It expands the market. It means that there are more potential customers for a 3.3v microcontroller that has this feature, than one that doesn't. Which means more sales, more profits etc. It's also fairly easy to provide this feature, you just leave out or modify the output to V+ ESD protection diode to allow the outputs to be pulled up to 5v. The I/O transistors are usually different to the core transistors, beefier and higher voltage as they're user-facing, so will probably handle 5v anyway.
H: How did rotary converter commutators conduct electricity? I've been reading about rotary converters and examining photographs, but I've noticed that nearly all have a very strange (to me) commutator design. It looks like a piece of wire screen rather than solid commutator plates. Compare: rotary converter commutator vs a normal motor commutator It doesn't seem likely to me that a commutator could have so many connections, or that a continuous metal screen connecting all the brushes could be of any use. How can such a setup conduct electricity to/from the rotor windings? The mesh/screen thing definitely spins; see this video. AI: I think you may be misparsing the photo you linked β€” the commutator has solid copper sections separated by insulating material just like a motor commutator. (For example, if you look at the brush section marked "12" in the photo you can see the brushes reflected in the metal surface.) So, it is not different physically. Now as to the number of segments. I'm not an expert in the field but I think I can explain this, so take this with a grain of salt: On the AC side of things, the converter is like a synchronous AC motor β€” that is, the AC line frequency is a multiple of its rotational frequency. If the multiplication factor were 1 β€” the rotor has a single coil β€” then it would be spinning at 60 Hz, or in more conventional units for motors, 3600 RPM. We can clearly see that it is not going that fast β€” and if it was, it would be making more noise, putting more wear on the bearings and brushes, and experiencing more losses from air resistance. Instead, the rotor and stator have many magnetic poles and correspondingly coils. Therefore, on the DC side, the polarity on the commutator also changes more than twice per full circle, so there are more than two brushes β€” but they are connected in two parallel sets. (If you used only two brushes, you would still get DC out, but you would not be evenly drawing from all of the rotor coils.) I'm not sure, but I think in the edge-on view in the video starting at 1:00, you can see that the brushes are bolted alternatingly to two circular bus-bars. I'm not sure that this is right β€” the Wikipedia article on rotary converters seems to indicate that there may be even more commutator segments than magnetic poles. If this is so, then the point of having many of them is to connect to the portion of the rotor coils which is experiencing the maximum EMF at any given instant, thus producing a smoother DC output (whereas, at the other extreme, having exactly two commutator poles would mean the output goes to zero but not below, like it does in a diode rectifier without any smoothing capacitor).
H: Is it safe to use a lower rated cable to power a higher amperage device if it isn't constant? I'm designing a breakout kit for an open source standalone ECU. The ECU has a 40 pin IDC male socket which has all the pins required to run the engine. One of the components will be injectors which use around 3 - 4 amps. Each injector actually uses two of the pins to help with the load. The only 40 pin, 1.27mm ribbon cable I can find for a reasonable price is rated at 28awg. 26awg is apparently recommended. Now since each injector will only fire for a fraction of a second, every second, is there any issue to using 28, or even 30awg wire? AI: There are two reasons you want a bigger wire for more current: Voltage drop due to resistance β€” i.e. your signal is attenuated too much. You can figure out for yourself whether this is acceptable experimentally, or by calculating or measuring the resistance of your wires and modeling the effect on your circuit. Overheating (melting insulation and possibly then wire) due to resistive heating. For this, only the average current usually matters. More precisely β€” you're going to put in a pulse of heat energy exactly as much as the resistive loss you computed for the previous point. Then, there are two questions: Does this heat immediately raise the temperature enough to melt anything? (Depends on heat capacity of the wire and insulation.) Will the heat have dissipated sufficiently over the time to the next pulse so that the average temperature doesn't continue to rise until something melts? (Depends on how well the wire is cooled by ambient air etc.) At the speed of an engine's firing cycle, you almost certainly only have to worry about the average current (heat moves slowly), and the reduced wire gauge will not be a significant issue for heating of the wire. The voltage drop may yet be a problem; you'll have to work that out yourself. You should also consider including protection devices (such as a resettable fuse) which will open each circuit if the controller (or its drive transistors) fails β€œstuck on”. This can avoid turning a problem that is temporary or affects one subsystem into a spreading β€œyour wires are melting” problem.
H: How to determine which bridge rectifier to use I tried searching and couldn't find how to determine how to decide which bridge rectifier to use in a circuit (assuming you know load). is the only consideration that the rating exceed to voltage and current of the circuit or could it pose a problem if that rating were too high. Specifically I am creating a set of power indicator LEDs for use with a prototype electronics test bed. I have three inputs that could be any combination of V+, and V-. I want to use 2 bridge rectifiers to correct the polarity to go through an LED and indicate power on either input 1&2, 2&3, or 1&3. My max voltage will be 15Vdc and my max current will be 20mA. If I choose a rectifier with a high voltage and current rating will I end up dropping too much voltage across the series diodes to show a visible glow in the LED? I have provided my circuit diagram cause it's a bit more clear. AI: For long term reliability, it is standard to use components that are rated for twice the parameter that the component will see. For example, if the peak input voltage is 15 V, use a bridge rated for at least 30 V; 50 V is a common value. Current for a single LED isn't an issue, but if the load were 1 A, then try for diodes or a bridge rated for 2 A. Usually using something even more overrated is not an electronic issue; if you have 200 V bridges getting dusty on a shelf, and they fit physically in the available space, use them. Yes the forward voltage Vf will be slightly larger, but at 20 mA the increase will be millivolts.
H: Theory of Mosfet P channel someone can help me explain why is ~6V at source terminal? AI: After turn on supply on source is 10V, but beetwen source and gate is -10V (gate is invers polarity for source). Transistor go into conduction state but with increase current the voltage on source terminal decrease. Potencial beetwen source and gate decrease and transistor will stop conduction (or better word, current flow decrease). Finaly transistor reach ballance and on source temrinal you get ~6V. Because gate is always zero polarization of source have matter.
H: Why does inductor current in my LTSpice model rise to infinity? I have been working on learning LTSpice because it appears it could save me a great deal of time. To that end I have constructed this circuit Purpose of circuit This circuit is a high side driver for a N-channel MOSFET. It switches a resistor on and off. It is capable of a 100% duty cycle. Theory of circuit This circuit consists of a voltage amplifier formed by Q1 & Q2. This amplifier switches the gate of the MOSFET between V1 and 0 volts above the source. V1 is 12 volts, a commonly available voltage. R2 biases the amplifier to the high state, that is to say the MOSFET is on by default. R1 limits peak gate current, L5 models PCB trace inductance. R9 causes the MOSFET to turn off when the circuit is powered down. In order to switch the MOSFET, the bases of the voltage amplifier just needs to be clamped to the same potential as the source. Q3 and Q4 form a bistable multivibrator, commonly known as a flip flop. Instead of switches, inductors are used to manipulate the current of Q3 and Q4. The base of Q4 in series with L2 which is the "set" circuit. The base of Q3 is in series with L3 which is the "reset" circuit. L1 is coupled to L2 (set circuit). L4 is coupled to L3 (reset circuit). All inductors have an inductance of 100 microhenries, this seemed like a reasonable value for a small toroid wound with a simple bifilar winding. Coupling factor is 0.99. I had to set the internal resistance of the inductor to "0.01 ohms" in order to get this circuit to work. Use of inductive coupling allows the high side drive to be isolated, although this does require a separate voltage source (V1). V2 and V3 are pulsed circuits which work together to produce a 10000 Hz square wave in the other circuit. They just produce very brief pulses to actuate the flip flop. The pulse voltage is 11.5 volts. V4 and R6 are my sample load. V4 is 24 VAC 60 Hz. Here is the graph of the voltage of V4 and R6, showing the circuit in operation. After the body diode in the MOSFET turns off at 0 volts, we get a nice chopped up sine wave of voltage on R6. To me this demonstrates it works. This is my problem. This is the current in L3 and L4 The current starts at 0 amperes and goes down from there. It's shown as negative just because of the way I have the inductor in the circuit. It's doing the right thing. So here are my questions Why does the current go downwards towards infinity? This seems like it isn't modeling what I think of as real world behavior. After the voltage across the inductor drops to zero I thought the magnetic field collapsed. Is there something else I need to configure on this? Why do the voltage pulses from V2 and V3 need to be 11.5 volts? I was thinking that I needed a voltage pulse of slightly less than 1 volt. The idea being that it would just be enough to temporarily counteract the voltage drop across the base-emitter junction of Q4 and Q3. Instead, it seems that I need a pulse of voltage with a value of V1 - Vbe. I don't understand this at all. Is this a problem with the simulation or a misunderstanding on my part? AI: Magnetic charge is in units of Webers, just as electric charge is in units of Coulombs. (This is all classical, pre-Einstein physics that depends on the idea of an aether and specialized constants describing that aether and Maxwell then presenting a case that these two things were related to each other, such that \$\mu_0\:\epsilon_0=\frac{1}{c^2}\$.) Electric charge (Coulombs) divided by capacitance (Farads) yields the electro-motive force (Volts.) Magnetic charge (Webers) divided by inductance (Henries) yields the magneto-motive force (Amps.) That's the way things were seen. Bigger capacitors required less electro-motive force to store electric charge. Bigger inductors required less magneto-motive force to store magnetic charge. The key difference is that the electric force was imagined as volts and the magnetic force was imagined as amps. Note that applying an electric force (Volts) for a period of time (seconds) yields a certain amount of magnetic charge (Webers or Volt-seconds.) Similarly, applying a magnetic force (Amps) for a period of time (seconds) yields a certain amount of electric charge (Coulombs or Amp-seconds.) In this sense, a capacitor can accept an applied magnetic force (in amps), applied for a certain time (in seconds), and turn that into an electric force (in volts.) And an inductor can accept an applied electric force (in volts), applied for a certain time (in seconds), and turn that into a magnetic force (in amps.) And now you might understand better what happens when you put a capacitor in parallel with an inductor. The electric charge of the capacitor is expressed as an electro-motive force on the inductor over a period of time, yielding an equivalent amount of magnetic charge on/in the inductor. This magnetic charge of the inductor is then expressed as a magneto-motive force on the capacitor over a period of time, yielding an equivalent amount of electric charge on the capacitor. And this repeats, assuming there are no energy losses. To get to the meat of things, you can operate an inductor in any way you like, while keeping its constant of inductance, so long as you stay within its limits of magnetic charge (Webers) allowed by an inductor's design. This limit is controlled by the core material, where you must avoid exceeding its maximum accelerating Lorentz force (in Teslas, or Webers per meter squared.) If you apply an electro-motive force (Volts) on an inductor for a certain period of time, that inductor will accumulate a certain amount of magnetic charge (Webers.) This "magnetic charge" is denoted by the number of amps flowing in the inductor (and the inductor's supposed constant value.) Similarly, if you apply a magneto-motive force (Amps) on a capacitor for a certain period of time, that capacitor will accumulate a certain amount of electric charge (Coulombs.) This "electric charge" is denoted by the number of volts on the capacitor (and the capacitor's supposed constant value.) Just as you must discharge a capacitor, you must also discharge an inductor. You cannot keep building up magnetic charge on/in the inductor, forever. All that does is increase the current forever. You can increase the charge for a bit, then decrease it, then increase it, etc. Or you can start at zero, increase it for a time, then drop it back to zero. But there is always a maximum magnitude (plus or minus) beyond which you cannot go. Because the Lorentz forces acting in the core will eventually be too great. Just think of the inductor like a capacitor and realize that you cannot exceed the charge limits allowed by the device design. Of course, Spice doesn't care. As far as Spice is concerned, your inductor can tolerate any number of Amps without limit. Just as it also would allow a capacitor to tolerate any number of Volts without limit. You can get entirely aphysical results from Spice. You are supposed to know when you are doing something crazy. Spice doesn't care. So of course current can just rise towards infinity in Spice. If you don't want that, then add mechanisms to limit the accumulation of magnetic charge in the inductor. Just like you would have to add mechanisms to limit the accumulation of electric charge on a capacitor. Similar idea. Note: Magnetic force is actually a side-effect, because the effects due to the motion of charge take time to transmit across spacetime (speed of light.) Engineers still use the classical approach and treat magnetodynamics and electrodynamics as two different, but related forces. Engineers also still use Maxwell's classical approach which built on the idea of the aether and little tubular corpuscles (cells) that could be stretched or compressed. Einstein pretty much destroyed the idea of the aether and it's possible to reformulate Maxwell's equations in a relativistic form.
H: How can I set the pad spacing and size of the footprint of the PQFP package? I'm beginner in electronics. I want to make footprint of HV5622 shift register using Eagle cad. But I don't know how to set the pad spacing and pad size of the footprint. There are three values in the datasheet: min, nom, max. I don't know which one to use. And, in the datasheet, the leg length of the chip is 1.95mm, but I don't know how to set the length of the pad. AI: There are three values in the datasheet: min, nom, max. I don't know which one to use Use nominal values (+ 0.2mm) to make your pad. The pitch is 1.27mm. You have enough space to increase the width. And, in the datasheet, the leg length of the chip is 1.95mm, but I don't know how to set the length of the pad In this case, I'd say you should increase the length of your pad (by 0.8 to 1mm, I guess) since that wouldn't interfere with the pitch of your device. PS: Once you have designed the land pattern, review and measure all the dimensions just to be sure. :)
H: Are DIP sockets against overheating worth the cost? Sockets allow easy replacement of a device and eliminates the risk of damage from overheating during soldering. [Wikipedia] I personally never (ever) replace these ICs. For programming microcontrollers (as a hobbyist) I use a dedicated pin header. So the only reason for me to use DIP sockets is to prevent overheating. Now I'm a cheapskate (student) so I would not want to buy any of these sockets if they are not absolutely necessary. However, I find it hard to decide whether I need them. Given that my DIP-packages cost around €2.50 each, should I protect them with DIP-sockets? AI: If you are not going to swap / change / reprogram your ICs just solder them. I have never overheated any DIP IC during the soldering. It is not easy to overheat them. Maybe 40 years ago ICs were more sensitive but nowadays it is not the issue,
H: How to compensate gain and offset errors I have an analog circuit which has an offset error as well as an gain error. I can measure the analog output of the circuit and I am able to manipulate the gain of the circuit by means of a factor k_gain_comp and the offset by an additive value offset_comp. What is the right approach to compensate those errors? Should first the gain error be compensates or the offset error? How can k_gain_comp and offset_comp be calculated? Any answer is highly appreciated. AI: If you have a linear circuit where Vout = f(Vin) and f(0) is ideally 0, it's easy, just null the input offset with 0V applied and apply something close to full scale and adjust the gain. No iterations required. For more complex situations where f is nonlinear and/or f(0) is not zero you may need to adjust the gain and offset both before and after the nonlinearity and/or you may have to iterate the adjustments. Ideally you want to minimize the interaction of the adjustments, to do that you have to analyze where the errors are coming from and adjust them appropriately. For example, take a simple signal conditioner that produces 4mA out for -10mV in and 20mA for +90mV in. If most of the offset error is in the front end (before gain) you can adjust out the offset there. So you might apply 0mV and adjust the offset (applied before the gain adjust) to get 5.6mA at the output. Then apply +90mV and adjust the gain to get 20mA. However if the gain has affected the zero a bit you may have to iterate a few times to get the adjustment accurate enough. Similarly, if the offset is more a result of tolerance of resistors in the output (say you use a zero-drift op-amp but compromise by using cheap 1% resistors rather than fancy ones) you may do better to apply -10mV and adjust for 4mA then +90mV and adjust for 20mA, repeat until both are within tolerance. If there is a nonlinearity in your circuit (perhaps you are linearizing a sensor) you may need more adjustments, since an error before a nonlinearity will lead to a error in the curve if you adjust it by fiddling the gain after then nonlinearity, and vice versa. Some of this becomes moot if you digitize the signals and manipulate them in the digital domain, but you still may have to worry about accuracy at the DAC and the ADC in a similar fashion.
H: Are transient response, natural response, impulse response same thing? According to wikipedia, they are equivalent. Is this correct? AI: Natural response is the zero input response (i.e. response to initial conditions). Impulse response is (unsurprisingly) the response to a unit impulse - the Laplace Transform of a unit impulse response is the transfer function. Transient response is a generic term that applies to any time-domain component of a response that decays to a steady state value.
H: Does somebody know about this tool? I'm very proud to be a part of this community. I'll be very thankful,if somebody does recongnize this simulation tool? (Please see image) Thank you very much for your help. AI: It is Ascet for model based software development. Advanced Simulation and Control Engineering Tool
H: What is the fault with my hbdridge design in the below circuit using pchanel and n chanel mosfets? In the image... Q1,Q2 - p channel mosfet (IXTH11P50) Q3, Q4,Q5 - n channel mosfet (IRFP460N) The problem I faced here was...when I test the circuit with 12 volt dc supply, and my load is two leds, it works very fine... When i connect my supply voltage to 300 volts dc with lamp load and when I just turn ON Q1 and Q4(by connecting the pin 1 to 5volt supply and pin 2 to ground )just for checking..the lamp lights up without any fault. Same as when I turn on Q2 and Q3 it also works fine. when I connect the pins 1 and 2 of optocouplers to microcontroller where the microcontroller alternatively makes the pins 1 and 2 high with a frequency of 2.5HZ (ON time of 400 ms). When i connect my supply voltage to 12 volts with leds as load it is working fine. But with the frequency of 2.5HZ i connect my supply voltage to 300volts DC and lamp load..its not working at all..the mosfet gets bursted each time. A short ciruit is prevailed either left or right side mosfets. So please suggest me some ideas or the fault am doing with this circuit. I have added two images ..one is for 12 volt dc with leds as load just for testing the circuit.. And the other image is for 300 volts dc with lamp load. In the lamp load circuit..there will be a 50k resistor with a n chanel mosfet attached, to its drain. The idea here is to make the voltage divider network when the Q5 mosfet turns on.. so the voltage divided with this network will be 286 volts ..then 300-286 = 14 volts for Q1 gate to source. This happens when we turn on Q5 mosfet. If Q5 is turned off then no current flows through 50K resistor and Q5 and no voltage divider exists and 300 volts will headup to gate which means there is no voltage difference between gate and source for Q1. Please see to my circuitry part and suggest me with some ideas to clear my fault. Thanks Regards. AI: MOSFETS have a significant gate capacitance. That means their turn on time is heavily dependent on the resistors in the gate drive line. With low voltages these resistors can be small, but with large voltages, with this kind of voltage divider circuit, the resistors need to be large so as not to waste too much power. That means the MOSFET turn on time will quickly become large and make this circuit unusable. Driving high voltage bridges requires a much different technique. Fortunately, integrated drivers are available for this. An alternative, since you are using opto-couplers anyway, is to add a -12V supply up at the 300V rail and use that to power the top-side drivers. simulate this circuit – Schematic created using CircuitLab BTW: If you are smart you will up those 12V supplies to like 10% less than whatever Vgs_Max is for your selected MOSFETS for maximum efficiency.
H: Piking servomotor from datasheet Hi I saw several datasheets from servo that use kg-cm units and other that use kg/cm I think that is a misspelling error, this is not my problem I assume that the unit most be kg-cm in units of torque force times distance. Ok, so when the units are in N-m there not problem by when they use kg I'm not sure if they are talking about kg in terms of mass or kg in terms of force, because one is about ten time bigger than the other. AI: kg, when used as part of the units for servo torque, always means 9.81N. kg is an incorrect but customary substitute for kgf, which is the force required to support 1kg in earth's nominal surface gravity. Even if the manufacturer did mean kg to represent mass, he actually means the force required to support that mass, that is kgf. It's the tension on a string that supports that mass. When measuring torque, the units are always force Γ— distance. It's customary for servo manufacturers to write that incorrectly as well. In context therefore, kg-cm does not mean mass minus cm, but means kgf Γ— cm. Similarly kg/cm does not mean kg mass per cm, but kgf Γ— cm. The correct way to write that unit would be kgfΓ—cm.
H: Does the polarity of this crystal matter? I am using TXC 7B 16.0 mghz crystal for my design. I just received photo proofs from my PCB assembly house and it appears they soldered this crystal 180.0 degrees reversed. https://www.digikey.ca/products/en?keywords=887-1104-1-ND Edit: the real datasheet AI: No, the polarity does not matter. Crystals do not have a polarity. Watch out with Crystal oscillators in a similar housing though (also 4 pins) as their polarity does matter. But since this is a crystal only (no oscillator) polarity does not matter. It will work mounted either way. I speak from experience with similar crystals from the same manufacturer.
H: Is it possible to search gerbers for specific parts? I am using GC-Prevue to view gerbers I have been supplied. When I am looking for a part, I typically search through the silkscreen until I find it, (I do not have the PCB design file). This is really time consuming, very annoying and shockingly inefficient. Given I have the pick and place data, it should be possible to match with the gerber data. Is there anyway to search for a component with only the gerber and pick and place data? AI: I'm not aware of a way in GC-Prevue to link pick and place files to Gerbers. You could get the (x,y) part location from the pick and place file, assuming it's in ASCII format and not something machine readable, and then use that to navigate to the same position in GC-Prevue to find the component. If whoever is supplying you with the Gerbers doesn't want to share the PCB design files, could you ask them for ODB++ files? It's easier to find components with those.
H: Symbolic logic operator "implication" to logical gates I need to translate a symbolic operator to a logical gates circuit. Following the table that the symbolic operator has: P Q Result 1 1 1 1 0 0 0 1 1 0 0 1 Any idea how can I make it? This is a draft of solution AI: A simple solution for such puzzles is counting the one and zeroes at the output: all zero or all one β†’ trivial one zero and three ones β†’ OR gate (or NAND gate) one one and three zeroes β†’ AND gate (or NOR gate) two zeroes and two ones β†’ trival (copy P or Q) or XOR or XNOR gate P Q R 1 1 1 1 0 0 0 1 1 0 0 1 Three ones. So we have an OR gate at the output. Let's take a look at the case where R is zero: An OR gate needs two zeroes to create a zero. So we have to invert P before feeding it into the gate. P -P Q R 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 1 Let's order the lines the "normal" way: P -P Q R 1 0 0 0 1 0 1 1 0 1 0 1 0 1 1 1 I think you can see now the solution is inverting the P input, then feeding -P and Q into an OR gate.
H: STM32F746 Clock not reporting as expected I'm using an STM32F746VGT6 microcontroller configured from STM32CubeMX for all the clocks and I'm getting roughly 220% higher clock rates when compiled. For instance I have an HSE crystal at 11.2896MHz with the following main PLL settings: PLLM /11 PLLN *234 PLLP /2 PLLQ /5 I have selected HSE for PLL source and PLLCLK as System Clock Source. Doing that in STM32CubeMX yields 120.080291MHz. However, after SystemClock_Config(), SystemCoreClock = 265909059. Due to that discrepancy, the microcontroller thinks it's working 220% faster than it actually is so all my timings are off by that much. Has anyone else seen this issue and what could be the problem here? Thanks for any insight. AI: I speculate that STM32CubeMX does not know the frequency of your oscillator and assumes it is 25 MHz, as happens to be on at least some of the STM32F7 Discovery boards. 265909059 * 2 / 234 * 11 = 24999997, according to my calculator.
H: Interpretting WS2812 datasheet data input requirements I'm really new to hobby electronics, just got a raspberry pi and trying to read different data sheets and requirements to figure out what I need to get so that I can drive an LED strip with the correct voltages and current. I've been looking at the data sheet for the WS2812 NeoPixels here: https://cdn-shop.adafruit.com/datasheets/WS2812.pdf Specifically at I'm quite confused about the Input current listed there and what exactly it means. Firstly it says in the Condition VI=VDD/VSS but VSS is 0 so is that not actually a division going on there? And I'm a little confused about it being a max of 1 micro Amp for the input, is that really the max current it can take? I'm trying to figure out what sort of pull-up resistor rating I need so that I can drive the data line with an external 5v power supply and control the switch by turning on and off sending the 5v to ground with the GPIO pins of my raspberry pi, something similar to #4 in this answer on another post: https://electronics.stackexchange.com/a/82149/166893 Perhaps I'm going about this wrong and I don't need this? If there is any guidance I can get in determining the pull up resistor rating that I need that would be great. I can see that I need at least 3.5V but that doesn't seem to be all the information I need. AI: That is an "or". \$V_I\$ is supposed to be a digital input, so the valid states are either 0 (\$V_{SS}\$) or 1 (\$V_{DD}\$), and the input current value is valid for both in steady state (the input is supposed to have an impedance of at least \$5\ \mathrm{M\Omega}\$. It's most likely connected to the gate of a FET, so there is your high impedance. Pulling up the GPIO on the RasPi is a problem. The GPIOs are not designed to see higher voltages than the processor supply voltage, which is \$3.3\ \mathrm{V}\$. Instead, I'd just connect the WS2812 directly, through a small (\$33\ \mathrm{\Omega}\$) series resistor if you have one. The voltage drop across the resistor is negligible at \$1\ \mathrm{\mu A}\$, but it protects the Pi if the first WS2812 fails and shorts D to ground. This is also out of spec (\$3.3\ \mathrm{V} < 5\ \mathrm{V}\centerdot0.7\$), but usually works.
H: Resistor Divider PMOS Example Problem From Razavi's Design of Analog CMOS Integrated Circuits, question 2.6a asks to plot \$I_x\$ vs. \$V_x\$ as \$V_x\$ varies from 0 to 3 V in the circuit below. The solution manual states that: $$V_{sg} = (V_{dd} - V_x)\frac{R_1}{R_1 + R_2}$$ However, this doesn't seem right. I think instead: $$V_{sg} = V_{dd} - (V_{dd} - V_x)\frac{R_2}{R_1 + R_2}$$ What should \$V_{sg}\$ be in this case? AI: Since the resistor \$R_1\$ is connected between source and gate, \begin{align*} V_{SG}&=\mathrm{voltage\ across\ R_1}\\ &=\mathrm{I_{R1}\times R_1}\\ &=\frac{V_{DD}-V_x}{R_1+R_2}\times R_1 \end{align*}
H: How to stop a 555 timer I have a 555 timer set up so each cycle it will count up a 7 segment display. clock output of 555 goes to a CD4026B clock input , this feeds the 7 seg display. I would like when the 7-segment display reads 9 9 the 555 timer turns off. Any idea how i can do this? AI: With those counters you would need to decode the segments then disable the counter clocks. simulate this circuit – Schematic created using CircuitLab
H: Measuring noisy signals: Does wrapping the test lead through a ferrite reduce common-mode noise? Let's assume we have a test set-up involving an oscilloscope and a unit we are testing. we measure the voltage between two points using a standard scope lead and see significant noise, I now take out a clip on ferrite wrap 2 or 3 turns around this ferrite and close it. The noise on my scope is visably reduced. What have I done? We should note here that the scope is plugged into the wall and so connected to mains earth. The scope return lead is tied to earth via the scope and the UUT may otherwise be floating or tied to earth by a different route locally (same building). My personal understanding is I have effectively added a common-mode choke in series with the signal and so I am filtering out at least some of the common-mode noise. There is at least one user on this site who has a different opinion on this. The last thing I want to do is start a flame war but I am sure in this case that we are both able to discuss this calmly and both keen to learn if we have misinterpreted things. So does wrapping a scope lead around a ferrite reduce noise because it cuts down common-mode noise or some other method? AI: What you are describing is a current balun which serves to add common mode impedance and thus limit the high frequency ground loop sometimes formed by longitudinal mode current flowing in the screen of the scope lead. I have a couple made up on ETD cores wound with micro coax, occasionally very handy.
H: Power plant cost accounting For a 300 MW power plant, 14.5 MJ / kWh of heating capacity must be provided. For this you can use coal with a heating value (hW) of 29 MJ / kg and a price (P) of 35 € / t or gas with a calorific value of 36 MJ / m3 and one Price of 90 € / 1,000 m3. What is the hourly cost (KB) for these fuels? This is a question from school. I dont understand how 14.5 MJ / kWh could be possible? I can shorten this to 14.5 k / h. This make no sense? AI: I'm not 100% sure if this is the right site for this, since this has nothing to do with electronic design. But hey, it's fun to take on some math problems once and then. Let's ask ourselves this: How much total heating capacity is required for one whole hour? For every kWh we need 14.5 MJ, how many kWh is there in 300 MWh? Number of kWh in 300 MWh is = \$\frac{300Γ—10^6Wh}{10^3Wh} = 300Γ—10^3\$ Total heating capacity requred for one hour = \$14.5 Γ—300Γ—10^3\$ MJ = \$14.5Γ—300\$ GJ. Now we know how much energy this power plant requires for one full hour in order to deliver 300 MW. Let's start with coal and see how much that would cost. Coal can give 29 MJ / kg. How many kg's of coal do we need to deliver \$14.5Γ—300\$ GJ? Well that would be equal to x kg = \$\frac{14.5Γ—300Γ—10^9}{29Γ—10^6}=\frac{14.5Γ—300Γ—10^3}{29}\$ kg. The price per ton (1000 kg) is 35€. So how much would that cost? x€ = \$\frac{14.5Γ—300Γ—10^3}{29}Γ—\frac{35}{10^3}=\frac{35Γ—14.5Γ—300}{29}=5250\$ € Now we're done with coal, let's calculate the gas price. Gas can give 36 MJ / \$m^3\$ How many \$m^3\$ of gas do we need to deliver \$14.5Γ—300\$ GJ? Well that would be equal to x \$m^3\$ = \$\frac{14.5Γ—300Γ—10^9}{36Γ—10^6}=\frac{14.5Γ—300Γ—10^3}{36} m^3\$. The price per 1000 \$m^3\$ is 90€. So how much would that cost? x€ = \$\frac{14.5Γ—300Γ—10^3}{36}Γ—\frac{90}{10^3}=\frac{90Γ—14.5Γ—300}{36}=10875\$ € So the amount of money you have to pay to supply the power plant with enough coal for one hour is 5250€. And the amount of money you have to pay to supply the power plant with enough gas for one hour is 10875€.
H: Can 1 relay turn one light off and another on? I have a 24 VDC sensor that connects to a switching amplifier. When the sensor detects a fault it should send a signal to a relay which is connected to a green LED and a red LED. The Green LED should be on all the time unless there is a fault sensed by the sensor. If there is a fault the red LED should come on and the green one should turn off. Is it possible to do this with just one relay? And how would the wiring schematic go? The input voltage is 120 VAC. The switching amp connects to the sensor on one side through an intrinsically safe barrier. AI: simulate this circuit – Schematic created using CircuitLab Figure 1. Indicator relay schematic. How it works: The relay is chosen by coil voltage and contact arrangement. You need a 24 V coil and a single changeover contact. The green (OK) LED is powered from the normally closed contact. The red (FAULT) LED is powered from the normally open contact. I've shown resistors on the LEDs as a reminder that current limiting is required. It's not clear why you might want to use 120 V AC for the LEDs. If you do then you need 120 V AC LED indicators with built in diodes and resistors.
H: Trying to understand how to design the gate of a frequency counter IΒ΄m trying to design a frequency counter for my physics class. My teacher demanded that we build it using a 32768 Hz crystal and 4060 ic. In my research i stumbled across this design: I donΒ΄t have a good knowledge on digital electronics and i have no idea on how i can fisically build the main gate and gate/flip-flop blocks (which ics to use and stuff). I deeply appreciate any help. AI: Usually when I hear the term "frequency counter", I think of a device which measures and displays the frequency one signal with respect to another. The drawing you posted is a start at building one of these. They are also sometimes called "time interval counters". Since your professor only instructed you to use a crystal and a CD4060, I'm guessing that your task is to just build a simple clock using the 14-stage binary counter. But either way, you start the process the same: First: Wire your crystal to Pins 10 and 11 like this: Second: Now you can choose the desired signal from the counter's stage pins. A commonly wanted signal is 1 Hz. Did you notice that your 32.768 kHz oscillator is a power of 2? If you divide this number (32,768) by two, 15 times, you will get 1 Hz. But since the CD4060 is a 14-stage counter (and we need 15 stages to get 1 Hz), you can only get a 2 Hz signal, on Pin 3 (Q14). You can, however, add an additional stage manually. For example, this circuit will give you 1 Hz (and beyond): circuit reference Finally To complete the design of an actual frequency counter, you can basically now just repeat the process. Clock a second counter with the signal that you intend to measure, and gate the chip's operation with the 1 Hz signal created above. The gate should serve as both a reset to the second counter, and a latch to send the previous measurement to the display (or receiving circuitry). The second counter will therefore tell you how many oscillations occurred within your 1 Hz (1-second) time period - and oscillations per second = frequency in Hz.
H: varistor curve and voltage meaning Could I get an explanation for these datasheet definitions for a varistor? 1) Max. applied voltage. 2) Min varistor peak volts. 3) Max varistor peak volts. 4) The clamping voltage is known to be the maximum voltage can pass before it restricts. This diagram is iv characteristic curve for varistor. AI: Varistor ratings are given for two different conditions - when they are off (current up to 1mA) and when they are on (current at the clamping current, many amps). You need to keep within the voltages given for the off condition for the vast majority of the time so that the varistor is not dissipating much power continuously. Therefore the varistor should have higher a.c. or d.c. (as applicable) voltage rating than the maximum continuous voltage at that point, so that they don't start to turn on. Due to manufacturing tolerances, the components vary from part to part so they give min and max values for some parameters - you would want the min peak voltage rating to be above the maximum continuous voltage at that point in the circuit to be sure it is off. Under transient pulse conditions, the varistor turns on and conducts high currents. Again there is a variation part to part, and also varistors I-V characteristics change after each pulse, depending on the energy of the pulse. The max clamping voltage is the maximum that the varistor will clamp the voltage to when it is conducting the max clamping current. You probably want this as low as possible so that you can use lower voltage rated components downstream of the varistor, but this is a compromise with the both the Off State rated voltage and the pulse current due to its effect on the lifetime. For example, the Z130PA20C is rated at 130V AC RMS which might make it suitable for a typical 110V AC supply, assuming you never expect the 110V AC to get to 130V. It will remain in the off state as long as the RMS voltage stays below 130V RMS or 184V peak according to the datasheet. It will start to conduct between 184V peak and 220V peak, at 1mA. It clamps the voltage to 325V at 100A for a standardised pulse. Therefore the rest of your circuit needs to be able to survive 325V for these microseconds. If this is too high, you will find that larger diameter varistors, or multilayer varistors, have flatter clamping characteristics. Some manufacturers give much more information, for example Littelfuse, which defines all the terms of page 16 of this document.
H: LDO voltage regulator with passthrough I'm trying to design a circuit that will power my 12V LEDs. The battery should be 12V and up to 14V when charging. I would like to route it through an LDO voltage regulator when the battery is charging and just pass through the battery directly to the LEDs when it's below 13V (as the LDO won't operate below 13V). I looked at buck boost converters and couldn't find anything that looked helpful, and I didn't want to waste the power in doing a boost then buck converter. Is this schematic feasible? Below 13V, the JFET just stays on and passes power to the LEDs. 13V or more, the zener diode allows power to the LDO, which then passes 12V or so to the N-Channel JFET gate, turning off the JFET. EDIT: I see that my poor schematic software is causing a lot of confusion. Fritzring does not have the parts I was trying to render. I am NOT using an LD33, but rather a typical 12V out, 2Amp load LDO voltage regulator. Here's the datasheet for the KA278R12C: http://www.mouser.com/ds/2/308/KA278R12C-1120707.pdf. This is not for a vehicle, but rather some indoor lighting hooked up to a battery. AI: The LD33 is a code for an SMT fixed 3.3V version of the LM1117, which is a semi-LDO regulator. It won't be of any help. If you set up an appropriate LDO regulator with 12V out it alone will do what you want. Above 12V plus a bit it will provide 12V out (and will be called upon to dissipate a lot of power perhaps), and below 12V plus the dropout voltage (down to a few volts) it will provide the input voltage less a small drop, typically. Edit: Given a potential part number, the above paragraph can be illustrated with a figure from the datasheet: As you can see the output voltage tracks the input voltage (above a few volts) with a small voltage drop of some hundred of mV that depends a bit on the loading.. until it gets to a bit over 12V at which time the regulator begins to regulate and limits the output voltage to 12V nominally. /Edit There are many potential pitfalls in what you are trying to do- aside from current and heat, the situation you describe implies a vehicle electrical system which has a whole associated set of concerns. Also keep in mind that a 12V battery doesn't stay at 12V- it drops as the battery is discharged- significantly. Your LED lights will probably get dim from a relatively small drop in voltage. Also, its normal to consider some kind of low voltage cutoff so the battery is not damaged by accidentally running it flat.
H: Thevenin \$V_{th}\$ calculation problem I'm back with my basic questions. I'm trying to answer some questions, using Thevenin, for this circuit: simulate this circuit – Schematic created using CircuitLab I must answer: \$R_{th}\$ \$V_{th}\$ Find short circuit current on A-B For \$R_{th}\$ it is quite simple ( I hope...), and can be done calculating the total resistance of the following : simulate this circuit Which results in 0,75 ohm. Now my problems comes. To calculate \$V_{th}\$, I started using superposition calculating the voltages for \$A_1\$ and \$E_1\$. For A1 I calculate: simulate this circuit Considering that the current in A-B is the \$A_1\$ current source, the voltage is: $$V_{ab}'=A_1\times R_{th}=2A\times 0.75\,\Omega = 1.5V$$ To calculate voltage using \$E_1\$ source. My problem is that the point \$A\$, from the \$E_1\$ point of view i in between of a \$\Delta\$ resistors connection (\$R_1\$, \$R_2\$, \$R_3\$). I tried to do \$\Delta\$ to \$Y\$ like: simulate this circuit Which is most probably wrong, 'cause it means that voltage on A-B is the same as \$E_1\$, that gives $$V_{ab}=-E_1+V_{ab}'=-16V+1,5V= 14,5V$$ That is wrong, 'cause I know the result is \$-12.5V\$ I did something from or need I a different approach? AI: Your Delta-Wye transformation is wrong. The two \$400\, m\Omega\$ resistors in your last schematics are connected in parallel. This can happen only if the current source is replaced with a short circuit. Which is wrong. See the schematic below. (a) is the delta version and (b) is the Wye. simulate this circuit – Schematic created using CircuitLab
H: The stopwatch function in MPLABX gives a value that's way off in reality I have a PIC16F688 running on 4MHz (intosc) and I need a delay for about 1 second. Using this for-loop: for (unsigned long n = 0; n < 219300; n++) {} yields this result in the stopwatch function in the simulator: Stopwatch cleared. Stopwatch cycle count = 0 (0 ns) Target halted. Stopwatch cycle count = 4038340 (1.009585 s) That's perfectly fine for my application. But when I run the code in an actual chip, the delay takes about 10-12 seconds instead of 1. This made me think that the chip is running on a way lower frequency than 4MHz, but I've double checked and it is in fact running at 4MHz. The simulator is also setup to run at 4MHz, so no mismatch here. Other than a too low frequency I cannot think of any other error that makes this delay way off. Interrupts are turned off (INTCON = 0). Any clue as to why this happens? Why doesn't the stopwatch value match reality? AI: I think the Rc oscillator frequency( which is the internal Rc frequency) is what you should use in your calculation and not the instruction frequency. seeing that (4 MHz/250 KHz) == 16, your code lagging by 12 seconds can be attributed to this mismatch.
H: Device to programmatically controlled USB relay/switch (Edited to remove shopping question. I don't need recommendation of a specific product as much as I would like to know what such a device would be called.) I'm know more about programming than I do about electronics, and I'm looking for an inexpensive way to programmatically open/close a low voltage circuit. I imagine there must be some sort of simple USB controllers; I'm probably just not using the right search terminology. I'd have a few applications for such a device. One example: I can already receive real-time household temperature & humidity data with a USB sensor like this. I can collect and analyze that data in Windows (with VBA in a Microsoft Access database, for simplicity's sake), but I also want to open & close the low-voltage control circuit for my furnace, for both real-time temperature control, as well as analysis and experimentation. What would a device like this be called? Expensive solutions would be counterproductive since the overall objective is to save money, not spend it! AI: My solution would be a Digital I/0 module from.... http://www.weedtech.com/digital-io.html Works with windows, and you'd have ample ports left over.
H: How to connect clean power to multiple pins I’m more inclined with software than hardware, so there may be a simple answer I’ve missed somewhere. Most of the ICs I’ve been looking at require multiple VCC and VSS pairs such as cortex processors. I have read many posts elsewhere aging that these pins need to be connected and that they need clean power. What I don’t know is how to properly do it. I’m not asking for exact part numbers or the like, I just want a template that I can adjust for as many or few power pins as I need. I’ve been warned against placing multiple voltage regulators in parallel to accomplish this. Constraint; I want to supply power to the circuit board with a single pair of wires from an appropriate battery pack and then split that power cleanly to the multiple VCC/VSS pins. Assume required power will be either 3v or 5v Any equations I will required to determine the correct parts would be nice, but I really need a diagram with indicated repeatable sections. AI: I think you are confusing multiple pins and multiple supplies. If a device has 5 Vcc pins and 5 Ground pins, all the Vcc pins should be connected to the same supply, and all the ground pins to the same ground. If the device has 5 Vcc pins and 2 Vcc_ADC pins, the latter two could be attached directly to the same place as the 5 Vcc pins, or indirectly to there through some additional filtering. Each and every Vcc pin should also have an associated decoupling capacitor, or capacitors populated and attached as close to the pin as possible. Additional, more complex, filtering can also be added for sensitive circuits or very high frequency devices. With this type of component, power and ground planes are much preferred as the pins can connect to the appropriate plane very close to the pin for SMT, and right at the pin for through hole. Related Question
H: Periodic or not Periodic signal I am trying to solve following problem which I try to find the signal is periodic or not. However, as it is different from traditional examples I do not know how to solve it. Can you please give me clues or solve it? AI: If a signal is periodic then its derivative will also be periodic So $$x(t)=sin((\sqrt{2t}+5)+sin(\pi t))-1$$ its derivative is $$x'(t)=\frac{cos((\sqrt{2t}+sin(\pi t)+5))}{\sqrt{2t}}+\pi cos(\pi t)cos((\sqrt2t+sin(\pi t)+5))$$ $$x'(t)=x_1(t)+x_2(t)$$ where \$x_1(t)=\frac{cos((\sqrt{2t}+sin(\pi t)+5))}{\sqrt{2t}}\$ and \$x_2(t)=\pi cos(\pi t)cos((\sqrt2t+sin(\pi t)+5))\$ Now \$x_1(t)\$ is aperiodic because wolframalpha result $$\lim_{t \to \infty}\frac{cos((\sqrt{2t}+sin(\pi t)+5))}{\sqrt{2t}}=0$$ Now $$x_2(t)=\pi cos(\pi t)cos((\sqrt2t+sin(\pi t)+5))$$ $$x_2(t)=\frac{\pi}{2}{[cos((\pi t-\sqrt2t-sin(\pi t)-5))+cos((\pi t+\sqrt2t+sin(\pi t)+5))]}$$ Now \$x_2(t)\$ can also be checked with above property of derivative individually that will come as aperiodic signal So \$x'(t)\$ is sum of two aperiodic signal that will be a aperiodic signal. Hence \$x(t)\$ is aperiodic signal
H: Vccs op-amp with transistor So, i got this Vccs opamp that I want to use. I know that the Vcontrol is the voltage that will appear in my Rsense and knowing my Rsense I can find the Ie. What I dont get is the role of the Vc and whether it determines the Ib and Ic. I got the datasheet for both the opamp and the transistor which do have the different Hfe values. I mean I will have to supply the Vc. What I want is to know exactly the values of all the currents and voltages in paper before trying it out on the actual circuit. AI: Vcc need to be chosen based on a few things. You need to examine the spec-sheet of the particular op-amp. First: The device itself will have a minimum voltage at which it will operate so your VCC needs to be at least that large. Second: the op-amp needs to output a voltage at least as large as the maximum control voltage plus the base emitter diode drop in that transistor. Op-Amps have a voltage swing that does not go all the way up to Vcc. Look at the spec-sheet and see how much greater Vcc needs to be over the voltage you just calculated. Whichever of those voltages is greater is your minimum Vcc. Chose a suitable supply greater than that value. Vcc- could be ground in this circuit since you do not need negative voltages. However, not all op-amps will work rail to rail and not all op-amps will drive all the way to the bottom rail. Again, you need to check the data sheet to see what you need on this supply so your output can reach zero. In this circuit, since the current through the sense resistor is \$Ic + Ib\$ then collector current is actually governed by the equation \$Ic = (V_{Control}/R_{Sense}) * H_{fe}/(H_{fe}+1) \$ As such, since \$H_{fe}\$ is quite variable, it is not that great a circuit. ADDITION: To calculate the \$V\$ value, you need to know the load resistance. This is where your example schematic is incomplete. At this point you have to assume the implied components shown below exist. simulate this circuit – Schematic created using CircuitLab \$V_{min} = V_{ControlMax} + I_{cMax} * R_{Load} + V_{CESat}\$ However it can not be grater than the max \$V_{CE}\$ of the transistor nor high enough to cause the transistor to overheat from \$P = V_{CE} * I_{cMax}\$ \$V_C\$ will of course be \$V - (R_{LOAD} * I_C)\$
H: Adder propagate P expression When dealing with carry-look-ahead adders, the following expressions are commonly used: $$P=A \oplus B$$ or $$P = A + B$$ I understand that using the second expression takes less gates for calculating the propagate signal. When computing the final sum $$S=A \oplus B \oplus C$$ where C is the carry from the previous stage, the sum expression contains the first expression. Doesn't this mean that using the first expression saves gates without causing extra delay (because that expression has to be calculated anyway for calculating the final sum)? Therefore, why is the second operation sometimes used as well? AI: Computing NAND and NOR functions is cheaper than computing XOR and XNOR. While the best ways of computing X XOR Y and X XNOR Y are slightly cheaper than anything that could by synthesized out of NAND and NOR gates, it may be cheaper still to synthesize them out of other signals like X OR Y or X AND Y if those have also been computed for other reasons. If one computes X OR Y for P, and X AND Y for G, then the combined cost of computing P==X OR Y, G=X AND Y, and S1=P AND NOT G will be cheaper than synthesizing P=X XOR Y, G=X and Y, and S1=P. Note that I've slightly over-simplified things here; computing X AND Y in isolation would require computing X NAND Y and then inverting the result, but if complemented forms of X and Y are available it could instead be evaluated as X' NOR Y' for the same cost as a NAND. Any real evaluation of the relative costs of different ways of writing out logic should take such issues into account. Further, running wires for a significant distance on a chip can be expensive; if X and Y are needed in two places that are some distance apart, evaluating X nand Y in both places may be cheaper than evaluating it in one place and running a wire to feed that result to the other.
H: (System)Verilog: signal is x or 1 depending on placement of concurrent blocks in the code? I'm basically aware that the Verilog scheduler is inherently indeterminate, but I really don't understand why that's the case with the following code (I've simulated both cases with Icarus and Incisive on EDA Playground). The differences between the TB_A and TB_B is in the order of the initial and always blocks. Case A: module TB_A (); reg nrst; reg signal; initial nrst = 1'b0; always @(negedge nrst) signal = 1'b1; initial #10 $display("value is: %b",signal); endmodule Case B: module TB_B (); reg nrst; reg signal; always @(negedge nrst) signal = 1'b1; initial nrst = 1'b0; initial #10 $display("value is: %b",signal); endmodule I would expect that at T=0 the transition on nrst occurs and inevitably triggers the always block, putting signal at 1. This happens in Case B but not in Case A, where is displayed the value x for signal. In other words I wouldn't expect indeterminacy in this case, but evidently I'm missing something. Switching to SystemVerilog doesn't change anything. AI: People misunderstand the simulation behavior of always blocks. It does not execute at every negedge. It is a process just like an initial block that executes procedural statements. It the same as if you wrote initial begin nrst = 1'b0; end initial begin @(negedge nrst) // this means suspend the process and wait for a negedge signal = 1'b1; @(negedge nrst) signal = 1'b1; ... // repeats infinitely for an always block end This is a race condition because the order that initial blocks start their processes determine if the assignment to nrst in one process is seen by the other process that suspends waiting for a negedge transition. A NBA assignment to nrst as well as moving the assignment after time 0 would solve this race.
H: Why is this reed switch / solenoid circuit not working? The (normally open) reed switch should close by waving a magnet across it, completing the circuit. The 6v solenoid lock should pull inwards allowing the door to be opened. When the magnet is removed the reed switch should open. So my issue is the solenoid pin isn't being pulled in when 9 Volts is applied. It only pulls in when pressed three-quarters of the way in. This made me suspect the voltage wasn't right but tested showing 9V. I tried two others batteries with the same results. I also tried putting two 9V batteries in series to make 18V, but the solenoid would only operate if pin was pushed in half way. ($%Β£!!!) I also noticed on both the 9V and 18V that the reed switch would get stuck in the closed position. Any ideas would be greatly and deeply appreciated. AI: It sounds like you have two problems. First, reed switches are delicate and shouldn't be used to switch a lot of current. When the switch opens (and, to a lesser extent, closes) a small arc is generated between the contacts. This can cause The contacts to eventually weld together, so that it won't open correctly, or A buildup of non-conductive junk between the contacts, preventing it from closing correctly! You never know which failure mode will happen first. Even before it finally fails, it may become more and more resistive as the contacts degrade. To solve the problem, you should use the reed switch to signal some other, less delicate, device. Then, this device should switch power to the solenoid. Common solutions would be either a MOSFET or a relay. Here is a simplified MOSFET example: simulate this circuit – Schematic created using CircuitLab It includes a pull-down resistor and a flyback diode (sometimes called "anti-kick diode"). If you like, please see this answer for why they are required. The second problem is that you need to provide enough power to your solenoid. It sounds like yours is rated for 6V. If you are giving it the rated voltage and it isn't working, then you probably aren't able to supply enough current. 9V batteries have a high internal resistance, and so can't provide much current. You could put 4 AA batteries in series to get 6V and it could supply a lot more. By the way, solenoids require a lot of current. AA batteries might not be sufficient. Do you know the current specification for your solenoid? You may need a dedicated power supply. By the way, don't just increase the voltage! If you exceed the rated voltage you can cause failures in the solenoid.
H: How can I use half-wave rectified 120VAC to activate a PLC input? I am working with a CLICK PLC with the C0-08NA 120VAC input module. According to the documentation, the C0-08NA's equivalent input circuit looks like this: A device I need to interface with is powered by 120VAC but uses diodes at various points in its "logic" to rectify the signal. I need to read one of these signals with this PLC, to determine if it's Off or On. As a test, if I place a 1N4003 diode in series with a 120VAC input and connect it to one of the C-08NA's input pins, the input light flashes very briefly once, then stays off until the next time I touch the wire to the input. This obviously prevents me from detecting an "on" condition from this voltage level. I assume this is because the rectified AC would only be about 60V instead of the 80V required to turn on the input, per the specifications. What is a simple and safe way to convert this signal into a level that's readable by this PLC? Note that the PLC also has 24VDC inputs available if that helps. Commercially-available DIN-mount components are preferred. FYI I tried actuating a 120VAC relay with this rectified signal and it just buzzes but won't close. Thanks for any advice. AI: The datasheet gives us a clue: Figure 1. Note that the input current and impedance change with frequency. Since both input current and impedance change with frequency it means that there's a reactive component to the input and that must be the first capacitor. It is doing most of the voltage drop and the parallel resistor is there to provide a discharge path. \$ Z_{50} = \frac {V}{I} = \frac {100}{8.5m} = 11.7 \ \mathrm{k\Omega} \$. \$ Z_{60} = \frac {V}{I} = \frac {100}{10m} = 10 \ \mathrm{k\Omega} \$. These numbers are somewhat at odds with the input impedance figures but they're the right order of magnitude and the ratios are correct. From \$ Z_C = \frac {1}{2 \pi fC} \$ we would expect that if the capacitor formed the bulk of the input impedance then the ratio of impedances to be \$ \frac {Z_{50}}{Z_{60}} = \frac {2 \pi 60C}{2 \pi 50C} = \frac {6}{5} = 1.2 \$. It actually works out at \$ \frac {11.7}{10} = 1.17 \$ which is close enough. We can ignore the other series resistor. We can estimate the value as \$ C = \frac {1}{2 \pi fZ} = \frac {1}{2 \pi 60 \cdot 10k} = 0.83 \ \mathrm{\mu F} \$. simulate this circuit – Schematic created using CircuitLab Figure 2. Equivalent circuit. Note that in Figure 2 you now have half of 120 V AC on the left of the capacitor so effectively you only have 60 V AC on the input. This isn't enough to reliably turn on the opto-isolator. simulate this circuit Figure 3. Addition of R1 to allow C1 to discharge As others have noted in the comments, without R1 D3 charges the left side of C1 and it has no discharge path so the next positive going half-cycle can't pump more current in. Adding R1 discharges C1 when the voltage falls and allows it to accept more current on the next half-cycle. Figure 4. The low-pass filter on the logic input. Note that on the logic side of the opto-isolator there is a low-pass RC filter. This is what is keeping your input "on". I reckon that this is also just on the edge of working with the reduced input voltage caused by half-wave rectification. You might not see the LED blink but you may find that the program glitches intermittently if the logic-side input falls below the the threshold for one scan or more. You could be a long time debugging this if you weren't aware of the internals. It might be worth debouncing the input with a 200 ms off-delay timer in the program. Possible work-arounds to increase reliability: I've thought about this overnight and I don't think there is any "right" solution - but I often think that much of engineering is finding "the least worst" solution. The first thought when faced with increasing the output of a half-wave rectified signal is to add a smoothing capacitor on the output (as one would on a power-supply). This won't work in this case as we would then be feeding DC into the AC input and the capacitor would block it. simulate this circuit Figure 5. Using a 110 V DC relay to buffer the signal. A second option would be to use a relay. A 110 V DC relay such as Finder 46.52.9.110.5000T presents a nice high resistance load to the sensor. With this example a 24 ms time constant would average out the voltage enough to give 110 V DC. A 470 nF adequately rated capacitor would do this. Figure 6. Coil voltage with filter capacitor on 60 Hz supply (for your convenience). I think this is the simplest reliable option. The time delay added by C1 is short and repeatable. There are no heat-generating components other than the relay coil and everything is readily available. Make sure the capacitor peak voltage is > 200 V DC.
H: Discharging MOSFET using Resistance or Diode (Best possible Alternate) I have two Questions about MOSFET as sensor device. 1. I had been using resistance to discharge MOSFET. but I can not figure out minimum requirement of the resistance which could work on 12V power supply? 2. Can I use diode to discharge MOSFET? as given in following circuit diagram.. AI: Ok lets draw your circuit properly... simulate this circuit – Schematic created using CircuitLab Now lets say when the switch is closed you only want 0.1mA of current to be wasted. \$R2 = 12V/0.1mA = 120K\$ Now, from the data-sheet an IRF530 has a max gate capacitance of 800pF. So the gate will discharge exponentially with an RC time constant of 9.6uS when the switch opens. That seems fast enough to me... Maybe you want 1uA... R would be 12Meg and that would put the time constant close to 1mS.
H: DC Motor causing photodiode emitter/detector into binary counter to malfunction Schematic shown below, except the resistor on the phototransistor is now 4k and I took out the PNP. The system is supposed to activate the motor on an up-down switch, forcing the first t flip flop positive. Then an 8 hole optical encoder on the DC motor shaft generates pulses groom the photo emitter/detector that is used for binary counting via 3 T flip flops. B2 runs through an OR gate with the switch so that when it goes back to 0 it forces Q1 to 0 and the motor stops. Essentially I want one full rotation for the DC motor with every switch toggle. My binary counter works fine with the photo emitter/detector when I use a notecard to block the transmission. When I hook up the DC Motor the entire binary system starts going crazy, flickering lights, some stay on, some go off, always random. What can I do to prevent such noise? Thanks. AI: You need to consider what is happening with your encoder. As the slot moves across the path of the LED/Sensor it goes from covered to partially covered to fully uncovered and back. That means those edges are quite slow, and the slower the motor is moving the slower the edges. Worse, the motor can stop right at the mid-point. While in that transition phase, any noise in the system, be it electrical or mechanical, will introduce extra counts on the clock pin of your counter. There are a few things you can do to fix or improve that. Make the holes as small as possible in your encoder disk with clean sharp edges. Add a slot filter in front of the detector so light has to travel in a narrower beam to enter the sensor. (Shown in blue in the image above.) Add a low pass filter to the sensor signal. Add a buffer that Schmidt trigger buffer in the line so the signal has to cross the hysteresis threshold and keep the system "noise" under that threshold window. Change your optical arrangement to add another sensor offset mechanically from the first one to produce a quadrature signal. This is ultimately the best solution since, with quadrature, things need to happen in a specific order and extra edges are of no consequence. It also lets you know which direction the motor/encoder is turning.
H: DC motor single rotation using Photodiode-transistor I am trying to build a system where a switch toggle (up then down) will cause a dc motor to do one full rotation and stop until the switch is flipped again. The only other input allowed is a hard reset button. This is an analog circuit on a breadboard. I have rebuilt the same system about 5-10 times no and can't get it to work so I was hoping for some suggestions on a less noisy system. The previous system worked perfect for binary counting WITHOUT the motor connected, but as soon as I connected the motor I got tons of noise. Needs to be done with a binary counter. Below is my first try. I took out the PNP and put a 4k instead of 220 on the photo emitter. Also, I am going to be using a dc motor with a 10rpm gearbox. AI: Here is an alternative solution since I know how frustrated you are getting. You could always ditch the electronics and go old school with a cam, two limit micro-switches and a relay. The top switch opens when the cam is home, so is normally closed while the motor is turning. The bottom switch opens briefly when the motor has turned the shaft 180 degrees. simulate this circuit – Schematic created using CircuitLab Pressing the button closes the relay. The second pole of the relay bypasses the home switch to power the motor. Motor will advance and close the top switch keeping it running till the switch opens again. The second pole of the relay pulls the relay coil low through the other micro-switch. That keeps the relay activated when you release the button. When the motor makes half a turn the second micro-switch will open briefly, releasing the relay. However, at that point, the motor will still be powered through the top micro-switch. I also added a fly-back diode to the motor and a snubber circuit to limit the sparks and noise and make the relay last longer. Old school I know, but I also know you are a "mechy" and can probably appreciate it more. Plus I know you will do a good job with the cam mechanics :) BTW: If the motor inertia is too high for it to stop in time with the switch, you may want to consider adding a solenoid pin stop to the cam. You could drive that in parallel with the relay coil.
H: Confusion regarding piece wise linear diode model I understand that when you have a diode that is in forward bias, it can be modeled by a resistor and a voltage source, as seen in the top right of this diagram. However, I'm confused about the negative bias region (modeled by the bottom left corner resistor/source combination). If the anode of a diode has positive voltage with respect to the cathode, why isn't the resistor/source combination modeled like this? I feel like I'm missing something really fundamental here. Thank you for your help EDIT to include further questions requiring clarification: (1) Using the forward bias diode model. If I use a positive voltage (1.6V) source greater than the "turn-on-voltage(0.6V)", I get a positive (clock-wise) current which is the same as the value given in the piece-wise linear diode model graph. However, when I use a Voltage less than the 0.6V "turn-on-voltage", I get a negative current. What is this negative current telling me? (2) Also, assigning a voltage of -7.2V and using a clockwise current loop. Why do I get a value of -110mA when I should be getting -100mA according to the graph? AI: If the anode of a diode has positive voltage with respect to the cathode, why isn't the resistor/source combination modeled like this? When the device is reverse biased, the anode does not have a more positive voltage than the cathode, it has a more negative voltage. While the term anode technically means the electrode into which current flows, in practice it is used to mean the electrode into which current most typically flows. When a reverse bias is applied to the device, we don't rename the cathode to be the anode and the anode to be the cathode. Even in zener diodes, which are most often used in "reverse" mode, we still call the p-doped side of the junction the anode and the n-doped side of the junction the cathode. However, when I use a Voltage less than the 0.6V "turn-on-voltage", I get a negative current. What is this negative current telling me? Notice that in the piecewise linear model, the model with a 0.6 V source and small resistor only applies when the applied voltage is greater than 0.6 V. So when you get a negative current, it's telling you that you're using the wrong piece of the piecewise linear model and you should be using the piece where the current is 0 for applied voltages between the reverse breakdown voltage (-6 V in your example) and the forward turn-on voltage (+0.6 V in your example).
H: Electrochemical Measurements Using Lock-In amplifier I'm trying to measure small electrochemical signals using a trans-impedance amplifier fed into a lock-in amplifier. I have an electrochemical cell that poses a very high impedance (100s of MegaOhms) that I feed a triangle wave into (5V P-P) the excitation frequency ranges from 1Hz to 100kHz. The current across the cell is amplified with a trans-impedance amplifier with variable gain. One problem is that there is a lot of noise in the measurement, mainly due to the strong RF fields around (due to the experimental setup). I have been RF shielding and passively low pass filtering the output to get rid of some noise, but the output waveform is still very noisy, especially at high gain. I have a feeling that lock-in amplification might be the solution but I am not sure how to set it up. I have a model 5210, Princeton lock-in amplifier at my disposal. I have tried splitting the driving signal and feeding one end as reference to the lock-in. I then feed the output of the trans-impedance amplifier into input channel A and record the X and Y outputs. With various filter settings and phase adjustments, I wasn't able to recover any signal successfully. The resulting I-V curve from similar experiments look a bit like this: I'd appreciate any help with setting up the amplifier, am I using it correctly or is this approach fundamentally flawed? I have little understanding of the theory behind the instrument so I'm feeling slightly lost at the moment. AI: OK I think I see now, you're sweeping the voltage and measuring current. In that case to use the lockin you need to modulate the voltage slightly. And then sweep the DC voltage slowly through your signal. In this configuration the signal you will see is the slope of the I/V, the derivative you were seeking. You have to adjust the modulation amplitude, depending on the 'size' (in volts) of the feature you are looking for. For adding a modulation voltage onto the slow sweep, I might first try an opamp summing circuit. You could also do it with an audio transformer.
H: Open Wounds and Skin resistance I always read that pierced skin will dramatically affect skin resistance, but they never seem to specify where the open wounds are on the skin. Say I have open wounds around my chest area, but I am touching something with my fingers. Does the location of these open wounds near my heart give me a greater risk, or only if the wounds are near where I am touching the electrified object? AI: Open wounds only matter if that is where the electricity is entering or exiting. For example, if you pierce your skin with two needles and connect them to a 9V battery you can potentially get a life threatening current flowing.
H: Principle of diode in DRL AND gate The explanation (from https://en.wikipedia.org/wiki/Diode_logic) states that R is connected to +12 volts to provide the forward bias current for the diodes and current for output drive. If all inputs A AND B AND C are a positive voltage (+6 volts here), current flowing through R will pull the output positive till the diodes clamp the output to +6 volts, the logical 1 output level. If any input switches to 0 volts (logical 0 level), current flowing through the diode will pull the output voltage down to 0 volts. The other diodes would be reverse biased and conduct no current. Why the explanation says that R is connected to 12 V? Is the 12V obligatory given "1" is 6V? What are the Kirchhoff equations for this... well it is not a circuit. Is this a kind of star topology connection? What is the mathematical nature/description of this? What exactly does clamp mean - does this mean diodes connected in parallel with cathodes to input, anodes to output will sink all the voltage until it is equal to minimum of their input? AI: There is more than just logic going on in this circuit due to using that +12 V. If that was +6 V things would be more clear I guess. Fact is that all 3 inputs are either 0 V or 6 V. When only one of the inputs is 0 it "overrules" the others and pulls the output low. This is the logic AND function. All have to be +6V for the output to be 6 V as well. Why 6 V and not 12 V? Because the diodes will not allow it, the output voltage is "clamped". For there to be +12 V at the output all diodes would have to be non-conducting. This can only happen when all 3 input voltages are +12 V. Since the inputs are defined to be either 0 V or +6 V, this (all three inputs at +12 V) is never going to happen so the output will never be +12 V. It can only reach +6 V. well it is not a circuit What would you call it then? In my opinion a circuit consists of at least two components having at least one common connection. So I'm quite sure that this is a circuit. And I'm even more sure that Kirchoff's laws still apply. But rather than "throwing" Laws and formulas at circuit (which I often see beginners do) I look at the circuit and ask myself "What happens here".
H: LM324 op-amp wheatstone bridge amplifier formula I'm planning to use an LM324 opamp as a signal amplifier for a cell load (strain gauge in a Wheatstone bridge). This particular application is shown in the datasheet (see image). It shows the Wheatstone brige (bottom-left resistor is the strain gauge) and the opamp in a differential amplifier circuit. My problem is I can't quite figure out how the formula is calculated. I get I have to use Thevenin on both sides of the bridge. This gives me: $$R_{t-}=\frac{R}{2}$$ $$ V_{t-} =\frac{ V_{REF}}{2} $$ for the right side of the bridge and $$R_{t+}\approx{\frac{R}{2}}$$ $$ V_{t+} \approx{\frac{ V_{REF}+\delta V_{REF}}{2}} $$ for the left side. Now the circuit becomes: and the differential amplifier circuit formula gives me: $$ v_o = \frac{R_f}{R/2}(v_{t+}-v_{t-})=\frac{R_f}{R/2} \frac{\delta V_{REF}}{2} $$ which differs from the datasheet formula for a 1/2 factor. So, what's wrong with my calculation? AI: Your problem resides in the oversimplification of $$V_{t+}$$ If you take directly the tension divider between the R and R(1+delta) resistors you get instead $$V_{t+} = V_{REF}\frac{1+\delta}{2+\delta}$$ Which is approximately the same as what you used, but yields the good formula. $$v_o = \frac{R_f}{R/2}\frac{\delta V_{REF}}{2(2+\delta)} \approx \frac{R_f}{R}\frac{\delta V_{REF}}{2}$$
H: Emergency light circuit - What is the function of resistors, diodes and capacitor? simulate this circuit – Schematic created using CircuitLab I found this circuit on the internet. In this, the bulb glows when AC supply is OFF and bulb goes off when AC supply is present. So, this functions as a Emergency Light Circuit. I managed to figure out that when AC supply is available Q1 is OFF or in cutoff region and consequently Q2 is also OFF. Hence, bulb does not glow. Further, when AC supply is unavailable, Q1 is in ON state or saturation region. Consequently, Q2 is in active region and acts as an amplifier and makes the bulb glow. However, what I cannot understand is the exact use of the resistors, capacitor and diodes in the circuit. I understand that removing even one of them causes my circuit to not work as I have described above, but I cannot figure out why. Note : I have performed the simulation of this circuit in Multisim, through which I was able to verify the modes of operations of Q1 and Q2 in both AC supply on and off cases. AI: When AC power is available, D2 is a half-wave rectifier. The resulting DC charges the battery V1 thru R4. R4 limits the charging current. D1 also acts as a half-wave rectifier. It charges up C1 once every line cycle. That keeps the base of Q1 high, which keeps it off. That keeps Q2 off, which keeps the lamp off. When there is no AC present, R2 discharges C1, which eventually gets low enough to turn on Q1. That turns on Q2, which turns on the lamp. Now R4 limits the current thru Q1 and into the base of Q2. Once the voltage on the base of Q1 reaches steady state, C1 no longer performs any function. It's job is to delay the light coming on enough so that this doesn't happen between peaks of the power line. After all, the AC voltage is "off" twice per power line cycle. Q2 is either fully on or fully off. When on, it is saturated, so the C-E voltage is probably 200 to 500 mV. In saturation, the base current is higher than what it needs to be to support the collector current. In this case, the base current will still be a bit lower than the collector current. Q2 is mostly acting like a current-controlled switch, although it does switch a higher current than what it is being controlled with. R4 does double duty, limiting the base current of Q2 when the power is off and limiting the charging current of the battery when the power is on. Note that 100 ohms and 6V means the base current for Q2 will be in the 50mA region easily saturating it, but that R2 should be sized to dissipate the resulting heat. Notice also that this current is broadly similar to that flowing in the lamp, so efficiency in terms of battery life could be improved by say adding a resistor in Q2s base connection to limit the base current to maybe 6mA or so. Part of the point of D2 is to prevent power from the battery from flowing "backward" through the circuit to where it could charge C1, which would prevent the lamp from lighting, even when the AC power was off.
H: mosfet capacitance charging question Can someone please explain to me why the output of this level-shifting circuit starts charging from around 2.8V to 5V, and NOT from 3.3V to 5V. At the time where the output is at 5V there is a 3.3V potential at the source and gate terminal. So i thought that the drain-source capacitance and the gate-drain capacitance would ramp up from 3.3V to 5V. below is the circuit diagram and oscilloscope pictures. I get the exact same results when simulating the circuit, so i am definitely missing something. UPDATE: After studying my simulation a bit more: This is what it looks like when i zoom. The voltage is initially 3.3V. Could this be due to reverse recovery??? so that the body diode conducts in the reverse condition for a short period of time. Could that be why the source voltage goes to 2.7V because of a diode drop? AI: Consider this simplified capacitor MOSFET model... In this model, all switches switch at the same time, so when the input switches the short across C3 is removed. simulate this circuit – Schematic created using CircuitLab When it initially switches the gate jumps up to 6.6V and the drain to 3.3V. The gate charge quickly drops down to zero and C2 discharges into C3 (Cds) creating a negative Vds voltage. With equal capacitances, and the diode disconnected, the output would reach half 3.3V. Thereafter the capacitors are charged though R1. With the diode connected across C3, it prevents the output dropping under Vf below the input voltage. Which is what you are witnessing. Of course the real model is more complicated than that and includes inductances, but for the scope of your question at hand, this model is sufficient. As for the capacitance. If you look at your scope trace you will see that the charge is almost linear as it first rises. This is because the capacitance falls as Vds increases.
H: Voltage for transistors in saturation I need to find the voltage Vi for Q3 saturated with B = 100 for transistors. I did the calculations and then simulated the circuit and i had similar results. the Question is: the analysis is right ? My calculations: If Q3 is in saturation then vce3 = 0.2v and with: 20 - 0.2 = 5kIc3 Ic3 = 0.00396 A, also Ib3 = 39.6 uA If i suppose Vce1 aprox 0.2v and vcb3 = -0.5v: 19.8 - 0.2 - 0.5 - 1.98 = 5kIe1 then: 5kIe1 = 17.12V and Ie1 = 0.003424 A, Ib1 = 34.24 uA but: Vcb1 = 1.712V and Q1 is not in saturation. Because: Vcb(sat) = -0.5v Using: 5kIe1 + Vce1 = 17.32v , Vcb1 = 500Ie1 , Vce1 = Vcb1 + 0.7 solving: 5KIe1 + Vcb1 = 16.62 500Ie1 - Vcb1 = 0 Ie1 = 0.003A, Ib1 = 30 uA, Vce1 = 2.2 v, Vcb1 = 1.5v For Q2 i can say that Vce2 = 2.68v and Vcb2 = 1.98v from 50kIb3 + 0.7 = Vce2 I3(5k) = Vce2/5k = 0.000536 A With Ib1 + Ic1 = I3 + Ie2 + Ib3 Ie2 = Ib1 + Ic1 - I3 - Ib3 Ie2 = 2.4544 mA, Ib2 = 24.544 uA Ending with: Vi = 1.98 - 100kIb2, Vi = - 0.4744 V are the calculations right ?. I doubt about the ecuations: 5kIe1 + Vce1 = 17.32V Vce1 = Vcb1 + 0.7 Vcb1 = 500Ie1 Seems right, but i didnt take in consideration the rest of the circuit. Thanks a lot for your help and time. AI: Your circuit doesn't really make any sense, in my opinion. Chances are, it was created almost at random and without any "intelligent actor" behind it. You'll see why I have that opinion in a moment. Let's redraw that crazily laid out schematic, to start. simulate this circuit – Schematic created using CircuitLab Let's analyze the schematic first by assuming that \$Q_2\$ is completely off (\$V_I=20\:\textrm{V}\$) and see where that leaves things. Here's the KCL nodal equation for \$V_X\$: $$\begin{align*} \frac{V_X}{R_3} + \frac{V_X}{R_6} &= I_E + \frac{700\:\textrm{mV}}{R_3}\tag{Eq. 1} \end{align*}$$ Where we know this from KVL: $$\begin{align*} V_X&=20\:\textrm{V} -I_E\cdot R_2-.7-\frac{I_E}{\beta_1+1}\cdot R_5\label{vx}\tag{Eq. 2} \end{align*}$$ Let's see what assuming \$\beta_1=100\$ gets us: $$\begin{align*} I_E &\approx 1.916\:\textrm{mA}\\\\ V_X &\approx 8.772\:\textrm{V} \end{align*}$$ From here, we can work out that \$I_{R_3}=\frac{V_X-700\:\textrm{mV}}{R_3}= 161.44\:\mu\textrm{A}\$. Given your own computation that \$I_{C_3}=3.96\:\textrm{mA}\$, this already works out to \$\beta_3\approx 24.5\$ and that is already well below your nominal value of \$100\$. So it's clear, now, that without any contribution from \$Q_2\$ the circuit already puts \$Q_3\$ in at least a shallow saturation situation. Okay. So now what? Well, \$Q_2\$ won't contribute anything until its base voltage is at least \$700\:\textrm{mV}\$ below the above-computed value for \$V_X\$. So \$V_I\le 8\:\textrm{V}\$, roughly speaking. As you imagine the value of \$V_I\$ declining towards (and perhaps below ground), \$Q_2\$ will start pulling away current and thereby gradually moving \$Q_3\$ out of saturation. That will happen about when \$\beta_3=100\$, or when \$V_X\approx 2.7\:\textrm{V}\$. From \$\ref{vx}\$ above, we can easily work out that this happens when the emitter current is \$I_{E_1}\approx 3\:\textrm{mA}\$. Subtracting \$I_{B_3}\approx 40\:\mu\textrm{A}\$ and \$I_{R_3}\approx 540\:\mu\textrm{A}\$, this leaves about \$I_{C_2}\approx 2.42\:\textrm{mA}\$. As \$V_{CE_2} \approx 2.7\:\textrm{V}\$, \$Q_2\$ is not in saturation at this time so the full \$\beta_2=100\$ can be used and we figure \$I_{B_2}\approx 24.2\:\mu\textrm{A}\$. We know that \$V_{B_2}\approx 2\:\textrm{V}\$, so this means that \$V_I\le 2\:\textrm{V} - 100\:\textrm{k}\Omega\cdot 24.2\:\mu\textrm{A}\approx -420\:\textrm{mV}\$. So now we know approximately where \$Q_3\$ leaves saturation and enters into active mode: \$V_I\le -420\:\textrm{mV}\$. \$Q_3\$ is in saturation for all positive values of \$V_I\$ and computing the point where it leaves saturation is a bit nuanced. This is why I think the whole question was made up without much attention given to it. (It might be a good question if you are somewhat advanced in DC analysis.)
H: 12V DC Overvoltage Protection I'm trying to create a air pump system with a rechargeable battery pack. My question is: Because my air pump is a positive desplacement pump, which task is to create a vacuum in a container, will its voltage increase above 12V when the workload increase (because vacuum) and will I need a overvoltage protection system for the DC motor? If so, is it possible to get a overvoltage system that will cut off the current to the momentary ON/OFF switch? I would also appreciate any comments on the schematics below. Thanks for any help! AI: Assuming a brushed motor - You likely don't need an 'overvoltage' protection, but you probably do need some sort of flyback diode and a small capacitor across your motor terminals. When your momentary switch to your motor opens up, you will likely get an inductive kick-back which needs to go somewhere. The diode provides that path. One final note, in most air systems that are radial in nature (your computer fan is axial), if there is a vacuum, the load actually decreases.
H: With power only on this LCD, will I see anything? If I only connect the VSS (pin 1) to ground and VDD (pin 2) to voltage, will I see anything on this LCD screen (as a test)? Might I expect to see a cursor of some type? Simple data sheet: http://www.mouser.com/ds/2/178/08216h3-11837.pdf Or do I have to send data also? I apply 5v (up to 6v) and I don't see anything. Also, what is Vl pin 3? Does it need voltage on it also? EDIT Is there any easy way to test an LCD screen like this in lieu of connecting all data lines to a source? EDIT 2 - success All the great help got me there. Thanks to @Janka and @duskwuff. Janka, just like you said one dark row and one light row. DuskWuff - got the pot connected to Vl and adjusting that is what made it show up. AI: What you have here is a HD44780-type character display. Displays of this type will typically display black blocks on the first line of the display when powered on. It's technically possible to send commands to the display with a bank of switches, but it's annoying enough that I'd advise you to do it with a microcontroller. If you have an Arduino board handy, the LiquidCrystal library is an easy way to do this. The VL input is a contrast control. Connect it to a potentiometer between VSS and VDD, and adjust it until the blocks are clearly visible.
H: electronic devices impedance and drawing current I have a questions that kind of bugging me for a while. So in electronic devices, it has capacitors, inductors, resistors, transistors and etc. All of these together is the load of the device, which is impedance. From what I understand the impedance lower when the device needs more current, but how does the impedance lower exactly? Isn't when a device, for example, uses more transistors meaning it has more load, therefore, higher impedance? Thank you PS. I am a computer engineering student. So please don't be too harsh on me. And If you want to explain in technical terms, I think I can understand it. AI: Ok so I think I see where your confusion is coming from. Any device has a set number of parts, be that resistors or capacitors or switches or transistors etc. And as far at the power supply is concerned that whole thing has an impedance. How much current the power supply must deliver, as you have mentioned, depends on the impedance. Lower impedance means it must supply more current. So far so good. So how does the impedance lower? The impedance of a device changes depending on the particular state the device is currently in. Since devices have things in them that can change their state, like switches and transistors, that means they can change their impedance. Lets paint a simple picture. simulate this circuit – Schematic created using CircuitLab You can see this device is just a lamp and a switch. It has two parts, but it's impedance seen to the power supply will change depending on whether the switch is open or closed. With the switch open, the impedance is pretty much infinite, with the switch closed the impedance is the resistance of the lamp. The constituent parts did not change, but their state did. As such the impedance of the device as a whole changed. The same applies to all devices, be they simple lamps with one switch, or the computer I am typing this answer on with millions of transistors switching millions of times per second. When busy, my computer is not using more transistors, it always uses the same amount, but rather more of the transistors it is using are switching on and off changing the systems impedance.
H: Do I really need to put stm32 microcontroller into bootloader mode to program it? I have started learning stm32 microcontroller for a while using a very small development board "stm32f103c8t6" (or blue pill). when I started, I learnt from some tutorials that I have to switch a jumper in order to program it. (The photo is a screenshot taken from a random tutorial, but every tutorial I have watched also said that) The jumper - as far as I know - only changes the boot mode of the processor to load from the system memory(the bootloader) which only takes effect if I restart the board to starting booting from there. I don't know how is that supposed to be a "programming mode" as I'm using an external st-link programmer that uses SWD. So my question here , Is there really such a thing called "programming mode" ? and if so, How exactly does it work ? Also it's worth mentioning that I've just tried to program it and the program worked as it's supposed to (I hope I haven't screwed anything up :d ). AI: You only need to put the microcontroller into bootloader mode if you're going to program it over the UART, using the bootloader. Generally speaking, you can program the microcontroller over SWD at any time. The primary exceptions are if the microcontroller is running a program that disables SWD by setting a SWJ_CFG bit in AFIO->MAPR (e.g, to use the associated pins as GPIOs), or if the MCU is running in low-power modes without the appropriate DBGMCU flags set to keep the debug interface active in those modes. If any of these are the case, putting the microcontroller into bootloader mode is an easy workaround, as the SWD interface is active (and sleep modes are not used) while the bootloader is running.
H: Is .95J worth of work within 1 second Equivalent to .95W of Power? This is a question that has two parts to it divided up into two sections. It is similar to the "Is Work done to Transfer Energy?" question but has been refined to include the conversion from Joules of work to it's equivalent Power and if they are indeed identical to one another. The two circuit schematics are real world circuits with losses. Since there is resistance in the connecting wires, capacitor, inductor, diode, and switch the circuit is 95% efficient in the end and is far from perfect. The switch is manually closed and then opened by hand. Only 1 cycle of energy transferred from C1 to C2 will be contemplated. In general the numbers and values in the circuit are arbitrary and may not be exact due to slight changes caused by resistance. Nevertheless everything will be kept as close as possible to what is actually known to be happening in the two circuits. The best effort is being taken to fashion the most accurate question. At any one point where there are doubts of what is occurring there will be a short note about it to acknowledge it. I am sure there will be some details that will be overlooked and brought up and possibly some nitpicking, (For instance is a Joule a unit of Work, Energy or both?). So this will have to be forgiven and possibly overlooked as it's insignificant, or not, to the final result and answer. Section 1: Down below is a simplistic schematic of a capacitor C1 intially charged with exactly 1J of energy. SW1 is closed for 1 second. This causes the 1J of energy to be transferred into L1 inductor's magnetic field to be temporarily stored. Work has been done to transfer the 1J of energy from the C1 capacitor to the L1 inductor's magnetic field. Because of the losses due to resistance, the C1 capacitor has done 0.95J worth of work on the inductor within 1 second of time. (Note:) An attempt was made to match the inductance with the capacitance for a resonant frequency of 1 Hertz precisely which would translate to 1 second per cycle. First half of Question: What is the equivalent amount of power of the 0.95J worth of work that has occurred on the inductor within 1 second of time? Section 2: Next SW1 is opened after 1 second of time has passed. The 0.95J of energy that has been temporarily stored in the L1 inductor's magnetic field then collapses. The 0.95J of energy is then transferred from the L1 inductor's magnetic field through the D1 diode and then finally into capacitor C2 to be stored. The inductor has done 0.95J worth of work on C2. Capacitor C2 ends up with 19.43 V on it. (Note:) It is realized the energy may have dropped again due to resistances. It is also realized that the amount of time it takes for this transfer of energy maybe considerably smaller than 1 second of time since it's a transient voltage spike, but possibly not since the C2 capacitor may or may not be acting as a load, which it is believed that it is. Second half of Question: What is the equivalent amount of power of the 0.95J worth of work that has occurred on the C2 capacitor within 1 second of time? Also what is the exact amount of time for this transfer of energy to occur? From what is understood, power is the rate of work done and work is force x distance. Work has indeed been done because the energy has "moved" or "changed" during it's two transfers through the circuit. There is power because of the changing voltages and currents involved. AI: Power is defined as energy per time. By definition, if 0.95J gets transferred in 1 second, then energy is being transferred at 0.95 watts. If the transfer takes place in 1uS, then the power is 950kW.
H: Is there any risk in storing solder paste and flux in living space? I have solder paste and flux that I regularly use. A lot of times I keep them in my drawer. The solder paste go dry and flux leaks out from the syringe. I have not thought about health risks associated with this practice. Should I store them in a sealed container? AI: Storing solder paste and flux in a sealed container will help limit possible exposure as well as help prevent them from drying out. I've used something similar to this container, which is relatively cheap and still effective. I also put the solder paste inside several layers of sealed bags before putting it into the container (along with some desiccant packets). All containers leak, some just do so more slowly than others. So there will always be some safety risk. Storing solder paste/flux at refrigeration temperatures also helps preventing them from drying/leaking. Just don't put any solder paste/flux in a fridge that also contains food or drinks -- OSHA has some strong warning about lead exposure.
H: Dual Power Supply (Two 9V) I am Not Good At This, and I am trying to breadboard this circuit here: http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/ But I am stuck on the power supply. The instructions state: Regarding power: the easiest way to power the circuit is with 2 9V batteries. To feed your op-amps -9V to 9V of power, connect one battery the correct way, and one backwards. That is, connect the positive lead of one battery to your positive power supply line and its negative lead to GND (ground). With the other battery, connect its positive lead to GND, and its negative lead to the negative power supply line. To "set" GND, you will eventually connect an electrode from your leg directly to the GND line. This will ensure that "0V" is your leg's voltage (unaffected by any head activity), and that all readings will vary from there. Which is fine, until I can't actually figure out what rails to attach the two 9Vs to. I think I get the idea that GND happens between the first + and the second - terminal, i.e. But I can't wrap my brain around how to actualize this. I put the two possible configurations I can imagine on this image below, with the given schematic that I can't entirely understand: I've been testing it wired as the 2nd configuration, and it Mysteriously Does Not Work. Are the batteries hooked up wrong? If so please help me wrap my brain around how this works and I'll see if my chips are fried or not. Hopefully not. If the batteries are hooked up right, don't worry about trying to troubleshoot my other problems. I can test it indefinitely if i'm at least assured the power is right. Here's an example of how one person did it: But I can't be sure how those wires on the right-hand side end, and I'm not experienced enough to guess. Thanks very much! AI: The important thing here is to ensure that the polarity on the op-amp chips is correct. Figure 1. TL084 pinout. simulate this circuit – Schematic created using CircuitLab Figure 2. The TL084 consists of four TL081 opamps in the one package with a common supply. Your figure (1) is the correct setup. A few notes: The supplied schematic doesn't give the power pin-out so that makes your task a bit more difficult as you have to look it up. Note that I have followed the schematic drawing convention of showing the more positive supply voltage on top and negative at the bottom with GND in the middle. The chips are physically the reverse in your layout. It may help to understand that because this is an audio circuit that the signals need to swing above and below 0 V. To do this we need the dual supply. In my Figure 1 BAT1 will supply the current for positive-going output signals and BAT2 will sink the current for negative-going output signals.
H: What is the minimum voltage required to operate an AVR MCU at 8Mhz clock speed? I want to run an AVR off the internal 8Mhz RC oscillator without any prescaller and want to make sure I have enough voltage for proper operation. AI: 2.4 volts. Calculated from this graph (which could have more thoughtfully placed guide lines!)... Since the voltage is linear with clock speed between 1.8V and 2.7V (as per datasheet), it is a simple linear interpolation to get the answer...
H: What device limits output current such that input voltage is maintained above some limit? I think my problem is that I just don't know the name of this device/circuit, but if someone can provide an outline of how to put one together also, or point me at a device, that'd be a help. The device I seek is a current limiter, but it is rigged so that output current can take any value so long as the input voltage to the device does not fall below some fixed lower value. In contrast to more familiar current limiters which, well, limit the current to some fixed upper value. The design intent is to have one power domain for controllers that never falls below X (say, 4V), whilst high-power devices (motors) can be operated freely on the downstream side of the device without fear they will kill the controllers if they draw large transient currents. Thanks AI: Rereading your question I think you are looking for something like this that is downstream from your logic circuits and before the power circuits. simulate this circuit – Schematic created using CircuitLab The top part with R3 is your classical current limiter. R2, D1 and Q3 will begin to turn off the tail of the current limiter if the input voltage falls too low. The values will be rather soft though since you have no solid reference with a sinking rail. As with all current limiters of this type there is a significant voltage drop incurred across the R1, Q1 circuit. Q1 and R1 would of course need to be powerful enough to carry your full load current and worse carry large currents with a higher Vce when it is choking the current. I do not think I would use this circuit for anything but lower level currents. Further, if you intend on using more than one of these on the same power bus, do not be surprised when they start an oscillation between them. Ultimately you would be better to fix your load problems and or get bigger supplies.
H: Why does 10k ohm pull down resistor not work for pushbutton with NOT logic gate? I made the following circuit on a breadboard using a 10k resistor, 100 ohm resistor, LED, and 74LS04 NOT gate. I expected this to work since the input of the NOT gate is at 0 volts when the switch is not on. For some reason, this setup did not work on the breadboard but worked just fine in Multisim. When I measured the voltage at the input of the gate with a multimeter, I got around 1.3V when it should've been 0. I tried changing the value of the pulldown to 100 ohms and everything worked fine. What explains this strange behavior? Would a pullup be more appropriate in this scenario? AI: TTL logic and its descendants all source current into the inputs when low. In the case of LSTTL it will source about 0.4mA - this will cause a voltage to be developed across the 10k resistor such that the input is seen as a logic '1'. If you change the resistor to 1.5k or less it should work. (As corrected by Trevor) The recommend way to interface switches etc is to connect one side of the switch to ground with the other to the logic input and connect a pull-up form the input to +5V. In this case the resistor can be 10K because the leakage current of the input is only 40uA or less. The TTL family is often know as current-sinking logic because of this behavior. The more modern CMOS logic does not have this behavior and would have worked as drawn although even then the favored arrangement is to connect the switch on the grounded side with a pull-up. A similar issue occurs on the output - because it is designed to sink current from the logic inputs it works bette pulling low than pulling high. LS logic can pull about 8mA low but only 400uA high. (74LS04 datasheet) It is better to connect the LED to 5V and a series resistor to the gate output for this reason. The LED will be on when the output is low rather than high.
H: Can I output one flip-flop into another on the same clock pulse? I have two positive edge octal D type flip flops with output enable (they're both 74LS374 chips), and I am wondering if it's possible to enable the output from one chip and clock the other on the same clock pulse, effectively copying the contents from one chip to the other Thanks AI: Well, no. You can't clock the output from one DFF into a second DFF on the same rising-edge. What you can do, though, is clock the 2nd DFF on the falling edge (i.e. invert the clock signal). Something like this: This way both flip-flops will hold the same data at the next rising edge. Just make sure that your clock pulse width is larger than the gate delays + trace delay from Q1 to D2.
H: Altium Document/Schematic Option Revision field auto value from Subversion How do I instruct Altium Designer to fill Document Option Revision field with the value of current Subversion revision: AI: Use the special string =VersionControl_RevNumber. You can find a full list of strings on Altium documentation. The strings are separate for Shecmatics and PCB. Schematic special strings start with a = and PCB special strings start with a .. When you start typing, Altium will give you suggestions for the available strings, so you can find the right one even if you don't know the full string.
H: Does electricity always flow in a closed loop and why does current flow to ground? I have been taught that current flows in a closed loop back to the source. And with electrical distribution, current flows to ground because the whole grid is effectively grounded back to the source. Therefore if you were to touch a hot lead, current will flow from your hand through you body and out your foot to ground and back to the source. My question is what if the source is not grounded to earth? For example, let's say you have a mobile generator that runs off a diesel engine and powers an alternator. The whole generator is insulated from earth because the rubber tires and the alternator is not grounded. In theory, you cannot get shocked and current will not go to ground if you touch one of the leads because the ground is not connected to the source which is the alternator. Is this logic correct? Please Help! AI: In theory, you cannot get shocked and current will not go to ground if you touch one of the leads because the ground is not connected to the source which is the alternator. That's correct but both in theory and in practice we have to remember about capacitance between the generator and ground and between the human body and ground. Figure 1. Capacitance can close the loop in an isolated system. In Figure 1 we can see that the effect of capacitance between the generator and ground could lead to a significant (mA) current flow. In Europe we use isolation transformers for portable tools in the workplace. Figure 2. A 110 V tool safety transformer with centre-tapped secondary. simulate this circuit – Schematic created using CircuitLab Figure 3. In the tool transformer the 110 V secondary centre-tap is deliberately grounded to provide a 55-0-55 output voltage. The tool is powered from the two outer pins. This limits the output voltage to 55 V AC maximum in the event of a fault. Having a definite ground point means that in the event of a single fault one of the output fuses will blow and this will alert the operator to the fault. Without this earthing feature one side could become grounded and if the operator were to come in contact with the other wire s/he would receive a 110 V AC shock. You will find that many portable generators feature a 55-0-55 winding or transformer built in to provide this safety function. It's safety will depend on a proper grounding of the winding centre-tap.
H: Charging 12v 9ah lead acid battery I'm new to electronics, and need some assistance :) I need to charge a 12v 9Ah lead acid battery from 12v input. How should I start with this? 1. step up to 14V? how much do I loose if I try to charge it from 12v? 2. is there a chip that can regulate the exponential charging process? Thank you AI: How should I start with this? First you need to set the desired voltage and current limit. To charge a 12-volt lead acid battery, which has 6 cells in series, you need to set a voltage limit of 2.15-2.4V per each cell. So if it has got six of these in series you need to set the charging voltage limit to 12.9-14.4V. The recommended charging current is between 10 and 30 percent of the rated capacity. So a 9Ah battery should be charged at about 2.5A, or lower. Once the battery is fully charged the current drops to a few percent of the rated Ah, which indicates the battery is charged. how much do I loose if I try to charge it from 12v? Anything above 2.15V/cell will charge a lead acid battery. This means below 2.15V/cell no charging will occur. is there a chip that can regulate the exponential charging process? I don't know.
H: LM317T outputs current on Adjust pin with nothing connected between adjust and Vout? I have a LM317T-based simple circuit and I'm using a 12V battery to power it. I connected the Vin to + 12V and made a constant current circuit as shown here. Now, I'm using a variable resistor of 100k instead of a fixed-value resistor and have connected a LED in place of RL of the diagram. Now before connecting the + 12V to Vin, I set the resistor value to the maximum, 100k ohms. This is a really large value so the current flow to the LED should be so low that it shouldn't light at all. But the LED lights up very dimly. And if I reduce resistance on the variable resistor, the LED becomes brighter as current flow increases, as expected. Even if I remove the 100k resistor and keep the path between Vout and Adjust open, the LED still lights up very dim. Is this normal? Why is this happening? Can anyone explain this behavior of LM317T? AI: Yes, this is normal. The internal circuits in any three-terminal regulator require a certain amount of "quiescent" current to operate correctly (some more than others), and this current flows through the "adjust" or reference pin. When used in a current regulator configuration, this quiescent current becomes the minimum output current. Even "low power" regulators (Iq << 1 mA) will pass enough current to light an LED visibly.
H: Switching and sense circuit The Below mentioned circuit switches 12V when the OPTO sense high voltage The Strings of LEDs is connected to OUT1 and also an SPST switch is also connected externally (not shown in image). The Switch is connected to 12V on side and another side to OUT1. When Switch(SPST) is ON, i.e 12V is short with OUT1 for short time, the OPTO senses High-level voltage and MCU turns on the MOSFET producing flashing effect at OUT1. The moment MOSFET is turned ON, there will be high voltage at the OPTO as well as at the OUT1. This won't have any effect until the OPTO continuously senses High Voltage for 5 secs and MCU will turn off the MOSFET, which will happen only when the switch (SPST) is short for 5 secs, the output from MOSFET will in switching state (1sec on/off), so it can't be continuous of 5 secs. The 5 secs delay in sensing is used to differentiate between the Actual high voltage from the switch(SPST) and the output from MOSFET. Now the issue is with 5 sec delay which is undesirable, 1sec can work but with the kind of switching pattern, it will overlap and the everytime pattern starts the MCU will shut it off. How can the circuit be modified with very fewer components so that, the voltage from the MOSFET side does not go to OPTO and only goes to the OUT1 ? And Whenever Voltage comes from the OUT1 Connector, the Opto should sense that. AI: How can the circuit be modified with very fewer components so that, the voltage from the MOSFET side does not go to OPTO and only goes to the IN/OUT connector? And Whenever Voltage comes from the IN/OUT Connector, the Opto should sense that, doesn't matter if it goes to MOSFET drain or not. My deciphering of this requirement is: I want to detect if LEDs are being powered from the MOSFET or from the manual switch. How can I signal this via opto-isolator to the MCU? simulate this circuit – Schematic created using CircuitLab Figure 1. (a) Original circuit. (b) By reconfiguring the opto isolator we can sense current direction. How Figure 1b works: If MOSFET is on current flows to LEDs through D3. You will lose 0.7 V on the LED supply. 12 mA will flow through R2. Opto-LED will be reverse biased and will be off. If MOSFET is off and MANUAL switch is on then D2, the opto-LED is forward biased and Q2 will turn on. If MOSFET is on AND the manual switch is on then D2 will be off. If the MOSFET is on and you want to detect whether the manual switch has been closed or not you will have to periodically switch the MOSFET off for long enough to detect the opto-isolator turn on. A short blink every 100 ms or so shouldn't be noticable.
H: Cortex-M0+ check if running under debugger control I would like to check from my firmware if the MCU is running under debugger control. The MCU is a Cortex-M0+ KE06Z128. On M4 I used to check a bit in DHCSR. Even though this register exists in M0+, it seems to not be available to the firmware (I can't find it anywhere in device headers). Is there a way to check if an M0+ is running under debugger control (apart from setting some variable by the debugger)? AI: Plainly, you can't by reading register. You just can't access those. However, there are some other workarounds: - See if semihosting is online BKPT 0xAB. But it throws an hardfault when its not... - Have the debug initialisation script write a bit somewhere in memory. - Read the SWD pin states, if the hardware supports that.
H: NE555 Based Speed Controller circuit - Contradicting Pins in 2 Tutorials I am a newbie of Electronics and learning it as a hobby. Over a course of time I realized that Electronic Blogs are not the best place to learn Electronics, unless you have a strong basics and can correct silly mistakes in circuit diagrams posted online. Often I find it difficult to get a circuit working because they have minor typos or errors. Now, I am stuck with such a situation. I am referring two separate Electronics Blogs which are appearing in Google Search who have posted couple of contradicting circuit diagrams of a NE555 based DC Motor Speed controller. I don't know if either or both of them are correct. The circuits use pin 3 and pin 7 of the IC respectively to drive the MOSFET/Transistor. Circuit Diagram 1: http://pcbheaven.com/circuitpages/PWM_Fan_controller_using_a_555/ and Circuit Diagram 2: http://www.gadgetronicx.com/dc-motor-speed-control-circuit-ic555/ My questions are: Are both of them correct? If yes, it's really couple of exciting circuits to understand how both of them work when the pin 3 and pin 7 are used just the opposite way in these two circuit diagrams. Does the use of MOSFET vs Transistor makes the difference? If one of them is correct - which one is that? This question might not be new to Stackexchange because these contradicting diagrams are equally published all over the internet. Unfortunately I couldn't find it on SE. Please link the question, if you already have it. According to my understanding circuit diagram 2 should be working. Because it is similar to astable-multivibrator config of NE555 and pin 3 seems to be generating square wave (i.e. PWM) signals to drive the MOSFET/Transistor. Please let me know if I am wrong and why. Many many thanks in Advance!! AI: They are both acceptable solutions. Notice in a 555 timer, the discharge pin is simply an open collector version of the output signal. In circuit diagram 1 the 555 timer is configured as a square wave generator. The charge/discharge path for the timing capacitor is from the 555s output which will be near top rail or bottom rail. Since, with the pot at 50%, the resistance to the cap is the same in both states, it charges and discharges at the same rate. Hence the "square wave" configuration designation. The discharge pin is therefore surplus in this configuration, though it still switches as normal. Instead, it is used to pull down the MOSFET gate during the discharge cycle. In circuit 2, the more traditional wiring, the charge rate is defined by R2 + whatever the pot setting is, while the discharge is purely through the pot. With this design, mid-range on the pot is not 50% mark to space. Further, during the discharge cycle, this circuit wastes considerable current ( 12mA ) through R2 for no purpose. As such, circuit 1 is arguably the better one. Notice though in these two particular examples, the design of the MOSFET gate driver gobbles up 12mA instead, so these two circuits are pretty close efficiency wise. A better gate driver circuit would fix that. Personally, I would have done it this way. I might even add a nice LED in parallel with the motor so I could tell how hard the controller is driving. I'd need to check if both end points of the pot worked as expected.
H: How can a DC18V ~ 36V LED driver work with DC3.6V LEDs without burning them out? I bought some slightly more powerful leds to build a hobby project and grow some herbs. The kit has 10 LEDs that have the following spec: Power: 3W Voltage: DC3.6V current::700mA It comes with a driver: Output Voltage: DC18V ~ 36V Output Current: 600mA The idea is put 10 in series and drive them from AC with that driver. My questions is how can it work without burning them out? I know about the voltage drop, but the first LED still gets a high voltage? They are only rated ~3V. I "tested" one LED with 9V battery and it lighted up very bright and then it was dead. Was it because of 9V or was it because it drew that much current? What am I missing here, it looks like there is some very basic thing I don't understand. I have studied the OHM law and have built some simple things, but I'm out of ideas here. AI: Your driver will output a fixed current through a string of LEDs. Since your LEDs are rated at 700mA @ 3.6V, this driver will indeed supply adequate current for the LEDs without burning them out. How many LEDs you can put in series on a driver depends on the drivers voltage range, in this case 18 to 36V. So you can attach 18/3.6 to 36/3.6 or 5 to 10 LEDs to this driver. simulate this circuit – Schematic created using CircuitLab With 10 LEDS the output from the driver will be around 36V. That voltage is divided across each LED, so no individual diode has more than their rated voltage. Or more accurately, when driven with 600mA each LED will generate a voltage across it, close to 3.6V, the total of those voltages will be what you measure at the output of the driver. When you hooked up an LED directly to the 9V battery you vastly exceeded it's rated voltage and it went out with a flash of light. You basically fused it.
H: Having trouble finding the voltage simulate this circuit – Schematic created using CircuitLab I can only solve this using Kirchhoff Laws and Ohm's Law. The first thing i tried was finding the current through R3 , Ir3=1mA (Ir3 = 12/12.10^3 = 1mA). Then using KCL on node A: Ir2 = Ir3 + Ir1 <=> 2 = 1 + Ir1 <=> Ir1 = 1mA. And finally using KVL to find Vs : -Vs+R1*Ir1+R2*(Ir1-Ir3)=0<=>-Vs+6+6(1-1)=0<=>-Vs =-6<=> Vs=6.(Which is wrong) But i can't get the correct answer, i suspect im doing wrong the KVL and i've been trying for the last hour different things . Appreciate any help...(I know the correct answer ,which is 24V, in my question i expected someone to point where in my logic it went wrong to get a different answer) AI: Here's what you should do: Calculate the voltage at node A, given the current through \$R_2\$ is known Having the voltage at node A, find the current through \$R_3\$ Find the current through \$R_1\$ by applying KCL at node A Now use KVL to figure out \$V_S\$ Throughout all of this stick to one convention for current/voltage sign for resistors and voltage sources. For example, here's one convention that people usually use:
H: Battery size/type depending on desired usage Directly below is the overview of a project that has been working well for around three months. A 6 Watt, 12V LED spotlight powered by a 12V 7Ah sealed lead acid battery, controlled by a timer switch that runs the light for 10 hours a day. The battery is charged by a 12V 50 Watt solar panel with a solar charge controller between the panel and the battery. The problem that started occurring a little after three months is that the battery will no longer run the light for the full 10 hours. When the battery was fresh from the store, I had timed how long the battery could run the light straight, and it was close to 13 and half hours. When I was doing the math for how much battery I needed to run the light for 10 hours, I did not take into consideration that lead acid batteries do not like being fully discharged on a daily basis. I believe I have ruled out the solar charging as a suspect by charging the battery on a battery charger with the same outcome. Is there a particular type of battery that would be better suited for this type of usage or would my best option be to get a sealed lead acid battery that can handle 10 hours while only being discharged 50/60/70 percent? AI: This battery (Yuasa NP18-12, 12V, 18Ah) should be better suited for your needs. If you look at the "Typical discharge characteristics NP range" graph in the datasheet (last page, bottom right), you'll see that the battery loses most of its capacity within just under 200 cycles if you discharge it completely in every cycle. This is exactly what's happened to your 7Ah battery - you ran it at almost 100% depth-of-discharge and it lost a lot of capacity in about 100 cycles. The key to a long-lasting battery in your application is using a battery rated for cyclic discharge with way more capacity than you actually need. The NP18-12 is such a battery. In your case, it will run at 30% DOD, so it should last for more than 1000 cycles or about 3 years according to the datasheet.
H: Calculate current of resistor with Norton's Theorem I have a problem with the following circuit: simulate this circuit – Schematic created using CircuitLab I have to calculate the following data using Norton's theorem: \$R_n\$ \$A_n\$ \$I_{R_2}\$ For the first I calculate the following circuit: simulate this circuit That is: $$R_n=\frac{R_4\cdot(R_2+R_1+R_3)}{R_4+R_2+R_1+R_3}=\frac{2,5\Omega\cdot(2,5\Omega+5\Omega+2,5\Omega)}{2,5\Omega+2,5\Omega+5\Omega+2,5\Omega}=\frac{25\Omega}{12,5\Omega}=2\Omega$$ To calcultate \$A_n\$ I used superposition: for \$A_4\$ is simple because of current con \$A-B\$ is the same of \$A_4\$, so $$I_{AB}'=5A$$ Considering \$A_1\$ I calculate the voltage of real current source: $$V_1=A_1\cdot R_1=15A\cdot 2,5\Omega=37,5V$$ And then the current: $$I_{AB}''= \frac{V_1}{R_2+R_4+R_3}=\frac{37,5V}{10}=3,75A$$ At the end: $$I_{AB}=5A+3,75A=8,75A$$ Now my problem come: how can I calculate \$I_{R_2}\$?? I know the result is \$2 A\$ and I tried all I can but without success.... AI: Since you know \$I_{AB} = 8.75A\$ and \$R_n = 2 \Omega\$, calculate \$V_{AB} = 8.75*2 = 17.5V\$. From this, we get \$I_{R4} = V_{AB}/R_4 = 17.5/2.5 = 7A\$. If 7A is flowing in \$R_{4}\$ and 5A in \$A_4\$. Rest 2A is coming from \$R_2\$ from KCL.
H: A simple way to detect an AC 3 phase induction motor ON/OFF state Background: There is a 3 phase motor running by an inverter. motor specification is about 1.8KW power and 230/400V and 1.13A. I want to drive another DC motor synchronized with that AC motor so the DC motor goes ON and OFF with AC motor. there is no Neutral connection to motor so I can't use a relay or contactor, also inverter is connected to PLC through Modbus connection and I don't want to modify inverter or PLC. What I have done and my questions: I thought about using a current sensor (or hall effect sensor) to monitor AC current going to motor, and I found too many different kinds of it. I also tried 3 phase monitoring relay, when I connect it to main 3 phase supply it works correctly and a relay activated inside of it but when I connect it to motor/inverter it doesn't work in 6 different connection type I tried. why? Is it right to use current sensor for this application? for example allegro current sensor IC ACS758 is it the right choice for this application? as the inverter make different frequencies, doesn't it cause to make buzzing at sensor or op-amp outputs? should I connect 3 different sensor for each phases and SUM their output into an Op-amp? or is it better to use a non-invasive clamp current sensor (this) around all 3 phases wire? and/or one of the phases? why the phase control relay not works when I connect it to motor/inverter ? my problem solved: I use inverter discrete I/Os terminals to detect motor ON/OFF state. *inverter model is: Schneider ATV12H018M2 *phase control relay is: Schneider RM17TG20 AI: For most purposes, it is probably best to use a signal from the variable frequency drive (VFD or "inverter"). Most VFDs have analog signals, discrete signals or relay contact indications for external use. An output from the PLC would also be a good alternative. You can probably get a variety of indications including: motor running, motor running above X speed, motor torque and others. If the VFD has a Modbus connection, it is probably capable of providing the best indication of most motor operational conditions while the motor is under the control of the VFD. Many of those indications should be available separately from the PLC if you want them that way. A VFD with Modbus likely has some customer configurable discrete and analog I/O points built in for external use. Study the VFD manual to se what is available and don't hesitate to use features intended for customer use. You should not need to buy anything else unless you need to know what is happening while the motor is not under the control of the VFD.