text
stringlengths
83
79.5k
H: Simplifying opamp+thermistor circuit I asked this question yesterday, which got answered and would work, but as I already stacked up on (dual) opamps I might as well do better. I've come up with this (probably flawed..) circuit, to amplify/convert 98 to 140 Ohm thermistor output across the whole 0-3.3V range for my ADC: simulate this circuit – Schematic created using CircuitLab As mentioned yesterday, I don't care about nonlinearity, but less parts to solder would be nice. Using a different topology, I'm supposed to be able to pull this off using opamp, pt100, three resistors (this would take 7 using the values I have on hand) and a capacitor. Losing some precision is still fine, but I would like to have meaningful output at the extremes, for calibration purposes. Any thoughts? AI: Here is what I was thinking before: This is a basic inverting opamp circuit. L1 and C2 are only there to filter the power supply to the opamp a little. They are not strictly required, but might reduce noise depending on what else is going on around this circuit and how clean the 3.3 V supply is. R3 and R4 form a voltage divider that holds the + input at a fixed 500 mV. C1 removes noise that might be coming from the 3.3 V supply. The real meat of this circuit is R2, the feedback resistor, and R1, the thermistor. The way the feedback is arranged, the opamp will do whatever it takes to keep its - input the same as the 500 mV on its + input. That means there will be a constant 500 mV accross the thermistor. The current thru the thermistor is then a function of its temperature. This current only comes from R2, so the voltage accross R2 is inversely proportional to the resistance of the thermistor. This circuit won't utilize the full A/D input range, but will do significantly better than just a bare resistive divider as was discussed in your previous question. At 140 Ω, the current will be 3.57 mA, which produces 1.68 V accross R2. This voltage on R2 is added to the 500 mV bias, so the minimum OUT value is 2.18 V. At 98 Ω, OUT is 2.90 V, for a total range of 719 mV. That would be 223 counts of your A/D, which is more than typical thermistor accuracy can support. You can get a wider output range by using a lower bias voltage and making R2 bigger accordingly. The value of R2 is directly proportional to the gain of this circuit. I showed 500 mV as a example because it seemed like the maximum sufficient value, but 250 mV would give you more than twice the A/D range. I wouldn't go much lower than that since other errors and sources of noise would start to get significant. One advantage of this circuit is that it keeps a low voltage on the thermistor, which makes self-heating negligeable. At the worst case, the 500 mV is applied to 98 Ω, which causes a dissipation of only 2.6 mW. If you use 250 mV bias it goes down by a factor of 4 to 640 µW. Unless you have a very unusual situation, that amount of self-heating should be irrelevant. One issue to keep in mind is that the output is dependent on the 3.3 V supply level. However, since you specifically mentioned 3.3 V, it sounds like it is produced by a regulator, so should be fine. If you only have 3.3 V power available, you need a rail-to-rail opamp as I show. A TL081, for example, would not work here without both higher and lower supply voltages.
H: NTE912 Pinout Confusion The NTE912 contains three standalone BJT transistors and two configured as a differential pair. The datasheet can be found at http://www.nteinc.com/specs/900to999/pdf/nte912.pdf and gives a pin configuration that looks like Short of hooking the chip up and using trial-and-error to see what is the base/emitter/collector, does anyone know how to decipher this pinout? AI: according to what I read it is a pin to pin equivalent with CA3086
H: Controlling throttle valve with PWM and TIP120 I'm trying to achieve this. He's using a darlington transistor, so I started looking for an appropriate circuit. I've made that, with a TIP120, using a 1k4 resistor (instead of 1k) and a 1N4007 diode (instead of 1N4004). But I do not believe that those two changes should make too big of a difference. I use a PIC 18F4450 to generate the PWM signal. However it seems to be low on current. Because it does creates a high pitch noise, but does not move. My 12V power supply can provide up to 20A so that should be enough (by far). I also tried different PWM frequencies, including the 500Hz value that is used in the YT video. I get different noise pitches, but again no movement. If I connect the valve directly to the power supply it opens all the way, so the valve itself is also working fine. What am I doing wrong/not seeing? simulate this circuit – Schematic created using CircuitLab AI: As OP has noted in the comments, they forgot to connect the two grounds together. simulate this circuit – Schematic created using CircuitLab Additionally, they have the diode in the wrong place. The correct place is directly across the two terminals of the motor. Finally, to calculate the Collector Current, (5v Source - 1.4v* VBE Diode Drop) / 1400Ω = 0.00257 Amp or 2.57 mA. The TIP120 has a minimum hfe or gain of 1000, so 2.57mA * 1000 = 2.57 Amps at the collector. The motor show draw about 2.5A or less, at stall, ideally. *(1.4v Diode Drop because this is a Darlington NPN Transistor)
H: Board to board connection cable I have a project where there are 2 board to be connected inside of a metal shielded chassis: 1) 2 layer power/analog/ext connector (usb/spdif/audio) 2) 4 layer digital board (lcd+mpu+fpga) The board (1) will be placed at the edge of the metal chassis, while the other will be at the top of the chassis, like the image below: The connection between the two board will be: -5V power (500mA max) -24Mhz I2S -48Mhz SPI -HS USB 2.0 or ulpi interface -12Mhz SPDIF -Some low speed IO Total count: ~24 The distance between the board is max 3"(7cm). The questions are: 1) Should I place the ulpi usb transciver in the core board(2)(where signal come from) or the connector board (1)(where the connector will be placed)? 2) What kind of connector should I use to be sure that there will be minimum interference on the signal? Should it be shielded? Or am I overthinking and a standard 1.27 ribbon will be fine? Many thanks to everyone would like to help! AI: Ribbon cable will likely be fine. With high speed signals, route it as GND Signal GND signal GND through the cable to minimize crosstalk. With standard ribbon cable connectors, this is really easy - put all the GND pins on one row and all the signal pins on the other row as the rows are interleaved into the cable. Run several parallel wires for the 5V power, probably at least 4, 6 if you want to be more conservative. Alternatively, you can do GND signal 5V signal GND and then decouple the 5V and GND right at the ribbon cable connector on both boards. I would say if you have to run either USB or ULPI through the cable, running ULPI would probably be preferable, but you could run a simple test with a hacked up USB cable to see if you can get a reliable USB connection through a length of ribbon cable. If you do run USB through the ribbon cable, run the wires right next to each other VBUS D+ D- GND with no traces in between the D+ and D- signals. VBUS will do the same thing as GND for isolation, and the D+ and D- pins are differential so they need to be adjacent.
H: pci express bifurcation - clock fanout buffer needed to split reference clock? I am designing for a motherboard with a single PCIe x16 slot which can be bifurcated into 2 logical x8 slots with jumper settings. I am designing a board to handle the physical splitting of the port. The manufacturer of the motherboard has told me I can't just split REFCLK (100Mhz HCSL) to 2 cards, but rather need to use a clock buffer. This adds a decent amount of extra complexity to my adapter board which would otherwise have no active components on it. Is this really necessary? I'm told the original REFCLK is generated by Intel PCH C216 chipset, and the C216 datasheet says it supports multiple PCIe slots. If I was just designing a motherboard with C216, would I need to add a fanout buffer to support multiple slots? Wouldn't the C216's clock be able to drive multiple PCIe cards directly? Are bifurcation adapters like this one completely passive? AI: You definitely need a clock buffer. The reason is that you need to guarantee that there won't be any problematic reflections on the clock signal. The REFCLK is a differential signal that must be routed with controlled impedance. If there is a change in impedance, it will generate a reflection. A change in impedance can be caused by a number of things - vias, branching traces, stubs, etc. If you put a Y in the trace, then at that point the signal coming from the clock source will see 50 ohms differential instead of 100 ohms and several things will happen. First, the split means that you lose half of the signal immediately because one half goes down each side of the split. Second, due to the impedance mismatch, a 1/3 of the signal reflects off of the split and comes back down the trace towards the source. Presuming the clock source is properly matched, the reflected signal should be almost completely absorbed in the source. The end result is that each card gets 1/3 of the clock signal it was expecting. Now, there is another problem that has not yet been considered. What happens if only one card is populated? Now, you have a stub that ends in one of the connectors. The signal will bounce off of the stub and come back down the trace. It will hit the Y, 1/3 will bounce back down the stub (and it will come back again, ad infinitum), and 1/3 will travel towards the connected card and 1/3 will travel back towards the clock source. The connected card will now receive two copies of the clock signal that are both attenuated (one by 1/3 and one by 1/9) and one of them delayed by twice the stub length. This can cause issues with the receiver as it is possible for it to receive more clock edges than were sent. And what if you get a reflection off of the card's receiver or what if the clock driver chip on the motherboard isn't perfectly matched? Reflections galore! Not good. So put a clock buffer on there so everything is isolated. And really, it's just one chip with a bypass cap or two and maybe a couple of resistors. And that one you linked has a clock buffer on it, by the way. There is a TSSOP package chip sitting right between the slots right where the key is located.
H: How can I offset and scale a differential voltage signal I have an HCPL-7840 isolation amplifier. It's input side is connected to some high voltage (~300V) power circuitry. It produces a differential output signal that is nicely isolated from the power side. Each of the two pins that form the signal are between 1.29 V and 3.80 V with respect to the ground of the output side. I want to take that signal and feed it to the analog components in my MCU, which is an ATXMEGA128A3U. It shares a ground with the output side of the isolation amplifier. And it accepts differential inputs. But it requires that both voltages be between 0 V and 3.3 V, and further that the differential voltage be within +/- 1 V. How do I glue these things together? I have some understanding of how it is done for single-ended signals, answers to that problem are crowding out the answer to this problem in my search attempts. I have two uncommitted DACs in the MCU that can output a reference voltage for what I want the new common mode level to be, if it helps. AI: I think a couple of voltage dividers will fit the bill perfectly. Presuming a 'full-scale' input will produce +1.29 volts on one output and +3.80 volts on the other output (and vise versa for negative full scale), the difference between the two is 3.80 - 1.29 = 2.51 volts. If you scale both output voltages down by a factor of 2.5 to get the differential voltage on the right scale, you get 0.516 and 1.52 volts, both of these within the 0 to 3.3 volt range. So I would suggest simply building two divide-by-2.5 voltage dividers. Let's assume the output voltages are split into differential and common mode components. In this case, the output voltages Vp and Vn would be Vp = Vc + Vd and Vn = Vc - Vd. If you use decent voltage dividers, the output voltages to the ADC would be Vp,adc = (Vc + Vd) / 2.5 and Vn,adc = (Vc - Vd) / 2.5. Then the converter takes the difference internally, Vadc = Vp,adc - Vn,adc = (Vc + Vd - Vc + Vd) / 2.5 = Vd / 1.25. Now, if the dividers are not exactly matched, then the result is a little different. Call the divider gains K1 and K2. The ADC output voltage will be Vadc = Vd (K1 + K2) + Vc (K1 - K2). The differential gain is Adm = (K1 + K2) and the common mode to differential gain is Acm,dm = (K1 - K2). In this case, the error caused by the common mode voltage will be proportional to K1 - K2.
H: Designing a mixed signal circuit for the first time I am designing my first mixed signal circuit. I will then have a analog and digital ground plane and my question is: To be able to have separate grounds (analog and digital) on a battery powered device, one would have to have two batteries? One that powers the analog part and one that powers the digital part? Or is it normal to use just one battery and connect the ground planes at the battery GND terminal? And if the analog and digital part needs 3.3V and 5V respectively one would just regulate a common power source of, e.g. 6V and only use the 3.3V for analog components and the 5V for digital components? AI: No, you only need 1 battery. The idea behind separate ground planes is that you want to minimize the return currents from the digital circuitry that flow through the analog ground plane. In the case of ADCs and DACs, connect all of the ground pins to the analog ground. Yes, even if they are 'digital ground' pins. Then split the analog ground plane and digital ground plane, and connect them to each other at the power supply. There are a number of RAQs from Analog Devices that address this issue.
H: Looking for some solar panels to go with this project I've been looking around for some solar panels for a little homemade solar phone charger project. I recently found a portable phone charger project from a student at Cal Poly which I'm hoping I can add solar panels too instead of using batteries. I'm wondering two things. First, can I replace the batteries in this project with solar panels? Second, if so, what panels should I use? I've been looking on Ebay and the Google and there are a lot of options. I'm hoping someone might be able to give me a more direct answer. AI: That charger takes any voltage between about 2V and less than 5V and boosts it to 5V. You could use that circuit with a 2V to say 4.5V solar panel BUT you can instead just use a solar panel directly. A solar panel with full sun loaded voltage of 6V or more will charge a USB cellphone either directly or with the addition of a series diode. (Diode needed ONLY if cellphone battery voltage appears on charging input. ) For 'safety' you should also connect a 5V1 zener-diode (5.1 Volt) across the solar panel output so that Vout can never be > 5.1V. Zener Wattage = Wmp panel = max panel power in full sun. Charge rate is related to panel Wattage. Panel peak watts in full sun = Wmp. The panel wattage for maximum charge needs be no more than : Vpanel_loaded_at_full_sun / Ah_of_cellphone_battery eg a panel with Vmp=6V and charging a 1000 mAh = 1 Ah cellphone battery need have a Wattage of no more than 6V/1Ah = 6 Watts. This would charge the battery at maximum possible rate. Higher wattage panels will heat the zener and lower wattage panels take longer to charge.
H: Wood workbench as ESD protection? ESD protection are really expensive for hobbyist like me. I have a grounded wrist strap but do you think a simple non-treated wood workbench surface can replace a really expensive ESD tabletop ? AI: A good part of ESD safety is dissipating the charge in a controlled manner. If the wood acts as a very high impedance surface, you get no dissipation, and that allows static energy to build up and possibly cause problems. You really should go with a mat that has a ground lug (or buy a ground lug punch/crimper) on top of it.
H: Understanding Electrical Engineering with Analogies Understanding concepts with analogies help can be a useful technique and hopefully this will help me better understand electricity and Electrical Engineering better. Lets start with a simple water example: X volume of water starts flowing from a collector (battery) through the pipe with Y pounds of pressure at Z speed when it comes across a thinner portion of pipe (resistor). Now, perhaps my physics knowledge is off but I would image that when it hits the thinner portion of pipe, resistance increases causing the pressure and speed of the water to increase but the volume would decrease. If this is correct, does that mean that the voltage and current increase but the number of electrons (what is the mass/volume analogy for electrons?) would decrease (and therefore power)? Additionally, since electrons actually flow from negative to positive (electron flow), in contrast to conventional flow, does that cause this analogy to break down in a true circuit (especially with numerous components)? Thanks in advance for the help. AI: You need to be careful with analogies. Here are some problems in the analogy you describe: water starts flowing from a collector (battery) Nothing in an electric circuit really works like a collector of water. In your analogy, water is electric charge which, in metals, is carried by electrons slowly drifting. Batteries do not store charge, they are not a reservoir of charge (nor of electrons). Batteries store energy in chemical form. A better analogy is that a primary battery is a coal-fired water pump that will deplete it's store of coal as it pumps water. A secondary battery is a bit like a pump powered by a wind-up spring, it can be run in reverse to wind up the spring. These pumps can only pump water if their outlets are connected to a circuit of pipes that eventually returns to their inlets. does that mean that the voltage and current increase ... Voltage isn't something you measure at one point, it's something you measure between two points - it's a difference. If you measure the voltage at every millimeter of the circuit with respect to the batteries negative terminal you will see the voltage monotonically decreasing as you progress around the circuit‡. The current measured at any point in the circuit‡ is the same. It neither increases nor decreases ... but the number of electrons would decrease It isn't very useful to think of the number of electrons increasing or decreasing. Where would they go? Where would they appear from? You measure a current† of water in litres per second. You measure a current of electricity in coulombs per second (amperes). In a steady-state system, this current is the same in all parts of a simple serial circuit - whether of pipes or of water. A constriction in a pipe cannot make n litres per second of water disappear. If you slightly turn a gate-valve in a water pipe, the flow of water (litres per second) decreases in all parts of the circuit, including in the pump. resistance increases causing the pressure and speed of the water to increase but the volume would decrease. That's not how water works! If we imagine a simple circuit where a water pump is pumping water around a loop of pipe. The pipe is of uniform size apart from one place where we have a section of narrower pipe. resistance The resistance is greater in the narrower pipe (a greater proportion of the water is close to the pipe walls and experiencing friction) pressure However the pressure is lower, not higher! speed It's the lower pressure that causes the water to accellerate to a higher velocity as it enters the narrow section. volume When you say the volume increases, I think you mean the velocity increases. Water is relatively incompressible, it's volume doesn't change much at the pressures applying in our analogy. The flow rate (volume per second) is unchanged. Footnotes † This is one of the areas where the analogy starts to break down. The word "current" is used inconsistently. If you asked someone to measure the current in a river they might give you an answer in metres per second ("current" = average drift velocity of H2O molecules) instead of litres per second ("flow" = litres per second passing a fixed point). ‡ This answer applies only to a simple circuit of battery and resistor connected by copper wires.
H: RFID system for insect tracking - range of reading I am planning on conducting an insect-tracking experiment in the field. We are going to have square enclosures (15m x 15m), where our insects can move around freely, but will not leave the enclosure. We want to track each individual (around 50 individuals per enclosure) throughout the summer season. I was considering PIT (Passive Integrated Transponder) tags glued on individuals, as it has been previously successfully applied to small size insects; however the reading range is way too short for our experiment (0.5 meters). I understand (hopefully correctly) that the same problem applies to passive RFID systems: impressively small tags, but range of readers too weak. What would be your suggestion to achieve this reading range (15m x 15m), without making any sacrifice from the small-size of the tags? For my experiment, the optimum size of tags would be smaller than 1 cm. I apologize in advance for my lack of electrical engineering knowledge - it would have been a more informative question if I knew exactly what I'm dealing with and used the right jargon. AI: There is no easy way this can be achieved with RFID. RTLS (Real Time Location System) is probably the most difficult subject which can be achieved by RFID system (where size of tags is not a factor); you are complicating it even further by inserting size of tags as a constraint. The only thing which seems feasible is cell based location given an expected read range of one antenna, and basically make a chess grid from your enclosure. If the insects can fly, then your problem complicates even further as you need an antenna that covers vertical distance, not only ground surface. It now comes to mind another aspect: types of tags that can be used. You definitely can't use active or BAP tags. Given the distances the greatest that can be achieved is with UHF tags. The problem is that UHF needs large antenna foot print. Smallest UHF tag with antenna is something like 7 * 7 mm diameter label (TagsysRFID MuTRAK), but will have less ID distance than ordinary UHF. They say up to 10m but you should expect less than that. It really depends what is considered "sufficient achievement" and how precise you need the results to be. Another problem which you need to think about is that the insects will permanently be in a dense field. Sure, RFID is not harmful to humans or other animals, but another recommendation you will always hear is "Spend as little time as possible between antennas as stay as far as possible from emitting antennas." But this might be a great idea for a research: "Is the behavior of insects modified by permanent exposure to RFID?"
H: What does 1.0 It current mean? A datasheet of Li-Ion battery states "The current should be maintained at 1.0 It or less". What kind of unit is It? AI: The datasheet has a 'Glossary of Terminology' which includes the definition of lt. Represents "Current" and is defined as follows It(A)= Rated Capacity (Ah) / 1(h). As such, it appears to be the same as C rating ( i.e. 0.7lt charge current is 0.7C charge rate - after one hour, charge will be 0.7 times capacity in amp hours) (the pdf seems to use lowercase L lt and uppercase i It inconsistently)
H: Wind direction measuring circuit I have some difficulty to understand the schematics for the following anemometer: http://www.fondriest.com/pdf/rm_young_05103_manual.pdf I have confusion at 5 points. Here is the schematics: In the manual it states: “Avoid a short circuit between the wind direction signal line and either the excitation or reference lines. Although there is a 1K ohm current limiting resistor in series with the wiper for protection, damage to the potentiometer may occur if a short circuit condition exists” But when I look at the circuit diagram it seems to me like there is no problem if wind direction signal line and the reference line shorts. It seems like there is danger if wind direction signal line via the 10K potentiometer comes to dead spot and shorts with the excitation line. Do you think there is a problem if wind direction signal line the 10K potentiometer comes to dead spot and shorts with the reference line? What is the use for the capacitor C1 at the circuit diagram which is connected in parallel with ac signal output for the wind speed? What is the use for D6 and D7? Could you give an example when are they beneficial? In the manual it states: It is important to note that, while the sensor mechanically rotates through 360°, the full scale wind direction signal from the signal conditioning occurs at 355°. The signal conditioning electronics must be adjusted accordingly. For example, in a circuit where 0 to 1.000 VDC represents 0° to 360°, the output must be adjusted for 0.986 VDC when the instrument is at 355°. (355°/360° X 1.000 volts = 0.986 volts). Is total dead spot 5° form only one side or it is at both sides as 2,5°+2,5°? In the manual it states: “To prevent false readings, signal conditioning electronics should clamp the signal to excitation or reference level when this occurs.” Is that about the dead spot part in case of short circuit? Does a zener clamp work for that purpose at the signal output? AI: No. A dead spot means there is effectively a large resistance in series with the wiper, not that it shorts to anything. C1 is to filter out some of the high frequencies that are clearly not part of a valid signal. Even in a hurricane, there is some rather low (relative to what even simple and cheap electronics can handle) maximum signal frequency on the pickup coil. C1 probably just shorts out things like radio station pickup. D6 and D7 are clamps. They should never conduct in normal operation. They are there to protect things in case of a screwup or failure elsewhere that could put too much voltage on the pot. It seems from your description it is only on one side. Measuring it would tell you for sure, of course. Your quote is out of context, so this is hard to answer. In general, expect spikes and other noise to be present on external signals that come in from off-board. This seems to be just telling you to use normal precautions for external signals, like make sure your device doesn't blow up if one of the signals is accidentally connected to the power line, or gets zapped by a static charge.
H: What is the difference between a tuner and an antenna? I was just told by my TV's customer service that my TV had a tuner but no Antenna as a response to my question - Can I use my TV's inbuilt Antenna to pick up over the air channels? I was wondering if someone can elaborate on what the differences between these are. Thanks and please let me know if this is not the most appropriate forum to post it on; I can prob move it AI: An antenna is an aerial. A wire structure which, to pick up TV signals, is typically mounted at the highest point in a house and connected by a coaxial cable. A tuner is a circuit that selects a particular signal from all those received by the antenna. Typically this is by tuning to a specific frequency. Some small portable TVs do have a small antenna as a part of them, the older ones would take the form of an external wire loop with or without telescopic elements. I'm not aware of TVs with completely internal aerials. Perhaps they exist but I imagine reception would be very poor.
H: How IC encoder ΤΧ-2, encodes signals? I 'm trying to figure out the way IC encoder ΤΧ-2, encodes signals. The procedure, if I am correct, is: Receives input data (DC signals). Generates digital pulses, via an internal oscillator. a. in case of RF transmission, frequency is at: 128 KHz b. in case of IR transmission, frequency is at: 114 KHz / 76 KHz Encodes the signals, via a bit format (page 6). Parts I can't figure out are: According to bit format (page 6), there are two frequencies. In case of RF transmission, which is/are the frequency/ies of the encoded signal? In case of IR transmission when oscillator generates 114 KHz or 76 KHz? It has to do with electronic components around oscillator? AI: According to bit format (page 6), there are two frequencies. In case of RF transmission, which is/are the frequency/ies of the encoded signal? The encoded signal (pin SO) comprises two frequencies in three parts. Part A is a marker to indicate that data is about to start it is 500 Hz on a 75% mark space ratio. Part B is the data and it appears to be "n" cycles of 1 kHz. Part C is the same as part A and marks the end of the data. The data is a repeated 1kHz cycle (n times) where n varies between 4 and 64. This is decoded by the receiver. Please bear in mind that these frequencies are not the RF transmission frequency - this is set by an unspecified circuit shown on page 9. For infrared you use a different output pin (SC) and this has the same data format but the data is modulated by a carrier of either 38kHz or 57kHz. It also appears to me that although the data format is the same it will be a slower baud rate because the oscillator is meant to run slower for standard IR applications. In case of IR transmission when oscillator generates 114 KHz or 76 KHz? It has to do with electronic components around oscillator? Both infrared and rf applications require a variable resistor (or set of fixed resistors) connected that set the oscillator to run at either 114 kHz or 76 kHz (IR) or 128kHz (RF).
H: Using a Zener diode to ease a voltage regulator I was reading a tutorial on how to hook up a zener diode to ease a voltage regulator. Here if you follow this link, as one can see the zener diode is dropping some amount of voltage to ease a voltage regulator: http://www.flickr.com/photos/oskay/6683456487/ My question is: Is that also possible to use this configuration with a 10V zener diode: Is my figure applicable? Which config would you prefer? Why? AI: If I had to solve this problem with Zener diodes, I would put several of them in series, rather than shunt. You need to drop 36V down to the neighborhood of about 7.5-8V. That's about 28V: four 7V Zeners in series, for instance. They just have to be able to handle the continuous current, and dissipate the heat. Since your current draw milliAmperes are not huge, it seems doable. Each Zener: 7V drop, about 200 mA current, hence 1.4W dissipation. Maybe 7V Zeners can be found which can dissipate 1.5W. Actually the Zeners can be a little smaller in value, since the regulator can tolerate a larger dropout. We can choose a regulator with a bigger current rating, and put a heat-sink on it, then let it work down from a larger voltage than 8V. In the shunt arrangement, you're relying on the series resistor to drop the voltage, with the help of the Zener. The arrangement is sensitive to the current draw. The less your regulator draws, the more current the Zener has to shunt. Essentially you have to hedge between the resistor being large enough to protect the Zener from overcurrent under minimum load, and yet small enough to allow current under maximum load without the voltage dropping too far down. With Zeners in series, you don't have to worry about these opposite scenarios. Under minimum load, there is minimum current through the Zeners, so you just have to worry about what happens under maximum load. As a rule of thumb, I wouldn't do this kind of thing if it required more than one Zener, or if that one Zener had to have more than a single digit Zener voltage to do the job. Powering 5V from 36V is best done with a DC-DC switching converter.
H: Need +9V power supply for breadboard (3x Stepper motors). Tried Arduino wall wart I need to supply +9V to three stepper motors on a breadboard with driver carriers (see parts below). Its too much for my raspberry pi to handle, apparently. I was able to power and control a single driver, so I know my setup is good. I tried using an arduino power supply to drive them (+9V, 0.664A), but when its under load, the voltage seems to drop below +3V and nothing works. I need to find a power source (not battery) for this. I'd prefer not ordering anything (short on time). Any suggestions, or tips to get the arduino supply to work properly? http://www.pololu.com/product/1204 http://www.pololu.com/product/2134 AI: If I read the Pololu documentation corrrectly, the motors are 0.6 A per phase, and have two windings, so you will need to allow at least 1.2 amps per motor, or at least 3.6 amps for the three motors. If the "double the stall current" suggestion applies to stepper motors, you'll need 5 - 6 amps.
H: Relevance of amperage in a voltage divider circuit I'm not very competent on the electrical engineering, so forgive me if this is a dumb question. I'm trying to make a voltage divider circuit to monitor the battery level of a project I'm working on. It utilizes a 12v scooter battery and will be monitored by an Arduino and I'm going to be using the circuit defined here (also attached below) using the table values for the 15v max voltage to do it. I don't want to fry my Arduino because I cant really afford to replace it. This battery is pretty big; does its amp/hour have any effect on whether it'll fry my Arduino? AI: You only need to worry about the voltage. The ampere-hour capacity of the battery has no effect on the operation of the voltage divider.
H: Any more subtle alternatives for LEDs to indicate status? Is there a low-cost, less annoying alternative to a buzzer or LED for displaying the status of an operation? I want my clock radio on at night, but it has this really annoying power indicator LED. I'd like to keep some form of power indicator, so replacing the LED with an equivalent diode or just removing it isn't an option, but I also need to have it on. I have the LED removed, I just need some non-irritating indicator that I can still check if I want to, but without emitting any light. AI: One indicator variety not mentioned in the other answer is flip-dot indicator: https://flipdots.com/en/products-services/status-indicators/ Those had been around for ages, and can easily be considered the most non-annoying indicator around, as they don't emit any light but are still perfectly readable under moon light conditions.
H: How does the iso work in ccd\cmos array detectors I'm curious to know how exactly does the iso sensitivity work in ccd's or cmos detectors that DSLR cameras have? I understand this is a amplification of the raw signal that each pixel has, but is in amplified before digitizing it or after? Can this be accessed manually with a developer kit of some sort (say I want iso 75 instead of 100)? can it be assigned to spesific pixels or pixel lines? I'd appreciate your insights. AI: There is a programmable gain amplification stage of some sort between the sensor readout electronics and the ADC. The readout electronics are basically gigantic buffered mux (or cascade of muxes) with one input for every pixel. Generally the gain stage beween the readout circuitry and the ADC is built with a series of switchable amplifier stages so the adjustment works in a series of discrete 'steps'. No, you cannot select whatever gain you want, you can only select gains that the sensor readout is wired to support. However, it is possible for a sensor to have readout electronics that support setting different gain settings in different ways. In principle, it is possible to change the gain setting pixel by pixel. Unfortunatley, the readout electronics are usually not designed so that the gain changes can be synchronized with the pixel outputs on a pixel by pixel basis. However, some cameras read out more than one line at a time through separate gain stages and ADCs. The Magic Lantern firmware for some Canon DSLRs supports configuring the readout electronics in those cameras to read out alternating rows in two different ISO settings. See: http://www.magiclantern.fm/forum/index.php?topic=7139.0 Actually, most DSLR cameras do not support all of the ISO selections natively. They perform some futzing around after the ADC that results in some ISO settings having a better dynamic range and noise level than others. http://shootintheshot.joshsilfen.com/2010/05/13/canon-hd-dslr-native-iso/
H: Resonance factor of RLC circuit Say we have a RLC circuit, connected to a source. Say, regarding to the positive side of the source, we have in order, an inductor L, followed by a resistance R and a capacitor C in parallel. So we have L in serial with R || C. My question is ... How could I calculate the resonance factor, Q? I have solved parts of the problem... but I'm stuck at calculating Q (i think Q is also called the "quality" factor) Basically... I have the resonance frequency when the impedance Z is only of resistive (real) nature : $$ L\omega - \frac{R^2C\omega}{1 + (RC\omega)^2} = 0 $$ $$ \omega_{r} = \frac{1}{\sqrt{LC}}\sqrt{1 - \frac{L}{R^2C}} $$ After obtaining $\omega_{r}$, what do I do? I'm supposed to use formulas like $$Q = \frac{Q_{L}}{P}$$ or $$Q = \frac{Q_{C}}{P}$$ Where P is the active power dissiped by resistances, and $Q_{L}$ or $Q_{C}$ is the reactive power... either of the inductor (L) or the capacitor (C). I'm a bit lost. I know this shouldn't be complicated. I'm just confused. Also, could you explain me why either one of these equations can be used? Why can we use both $Q_{L}$ and $Q_{C}$ divided by P? Thanks AI: An inductor in series with a resistor, both in parallel with a capacitor has the same Q characteristics as a series configuration of R, L and C. Just think about the components and how they are connected. Wiki has a decent article on this: -
H: Correct use of Flyback or Snubber diode across Motor or Transistor? From seeing a few schematics where the flyback or snubber diode has been placed across the transistor C-E terminals (Right Configuration), instead of what I typically seen as the the flyback being placed across the coil terminals (Left Configuration). Which of these are "correct"? Or does each have a separate purpose? As a note, the diodes are normally listed as external 1N400x type diodes (on TIP120 Darlingtons), not the internal body diode of the BJT or Mosfet. Final note, I have seen a few schematics that have both diodes, one across the coil and another across the CE terminals. I assume that one is just redundant without really affecting the circuit in that case, is that a wrong assumption? simulate this circuit – Schematic created using CircuitLab The answer to When/why would you use a Zener diode as a flywheel diode (on the coil of a relay)? touches on this slightly, by showing a regular Diode in the above left configuration, while showing a Zener Diode in the right configuration. It doesn't say that the opposite isn't true (or why) So as a second part, can a Zener work in the left configuration, and a regular diode in the right configuration? If so, how does it change how it operates? AI: Consider the operation of the circuit. When the transistor is on current is flowing in the coil from top to bottom as the circuit is drawn we now switch the transistor off. The current in the coil still wants to flow. For the circuit on the left this current can now flow back to Vcc via the diode the voltage across the coil has reversed direction and is limited by the diode the current can decay to zero safely. For the circuit on the right the diode does not help. The current flowing in the coil will force the voltage on the collector to rise to the point where the transistor (or possibly the diode) breaks down and starts to conduct. At this point the current can start to decay in the coil but the energy in the broke down transistor (or less likely diode) will be excessive and may well result in the transistors death. Note a zener diode here will work because you allow the voltage on the coil to reverse so the current can decay to zero while limiting the voltage across the transistor to a safe value. It should be noted the allowing the voltage across the coil to reverse to an higher voltage means the current can decay more quickly which is why you sometimes see a zener in the right hand circuit or more than one diode in series in the left hand one.
H: What does the following Verilog code realize I was learning verilog hardware description language. I was confused a bit with the blocking and non-blocking statements. Can someone tell me what the following verilog codes realize and simple hints how always@(posedge clk) begin q1=d; q2<=q1; q3=q2; end always@(posedge clk) begin q1<=d; q2<=q1; q3=q2; end These are two different codes implemented separately. I think FF comes into the picture because of edge detection. But I don't understand what it realizes as it has a intermix of blocking and non-blocking statements AI: Let's start with d=0 q1=1 q2=2 q3=3. always@(posedge clk) begin q1=d; q1 immediately gets the value of d=0. q2<=q1; Non-blocking assignment: save the current value of q1 (which is currently the same as d=0) q3=q2; q3 gets the unchanged value of q2, =2 end At this point the nonblocking assignment happens and q2 gets the value 0. I'm assuming the next always block is in a different module; putting it in the same module will just cause further confusion as you're overwriting the same variables again. Start with d=0 q1=1 q2=2 q3=3 again. always@(posedge clk) begin q1<=d; q2<=q1; Queue assignment of q1 to 0 and q2 to 1. These happen at the end of the block. q3=q2; Set q3 to the current value of q2, ie 2. end Finally set q1=0 and q2=1. Generally it's bad style to mix = and <= in the same block, and generally for synthesis you should always use <=. '=' can be helpful in testbenches where it behaves more like a conventional imperative programming language.
H: Diode small signal model and exponential model comparison I'm working my way through the chapter on diodes in Sedra and Smith Fifth Edition Exercise 3.15 asks: Consider a diode with \$n=2\$ biased at \$1ma\$. Find the change in current as a result of changing the voltage by \$(a) -20mV (b) -10mv (c)... \$ etc. In each case , do the calculations \$(i)\$ using the small-signal model and \$(ii)\$ using the exponential model. so for \$(i)\$ we find the diode small-signal resistance with: (page 161.) \$ r_d = \frac{nV_t}{I_d}\$ with \$V_t = 25mv\$ \$ r_d = \frac{50mV}{1mA}\$ \$ r_d = 50\Omega\$ so then it's simply \$\Delta I = \frac{\Delta V}{50\Omega}=\frac{-20mV}{50\Omega} = -0.40mA\$ This agrees with the answer given. For \$(ii)\$, the exponential model: \$ I = I_S e^{\frac{V}{nV_t}}\$ and as per the book, this can be used to get: (page 150.) \$\frac{I_2}{I_1} = e^{(V_2-V_1)/nV_t}\$ substituting in the values: \$\frac{I_2}{1mA} = e^{-20mV/50mV}\$ \$I_2 = 0.67mA\$ this does NOT agree with the book: the answer given is: \$0.33mA\$ which can be gotten by \$0.67mA - 1mA\$ so I think I have made a small mistake, but I have been stuck on this for last two nights so I thought it was time for some help. All advice is appreciated!!! AI: They say find the CHANGE in current, not just I2. So once you have I2, then you figure out what the change is: 0.67 mA - 1 mA = 0.33 mA. So you have done all the right math, you just need to pick out which number is the answer the book is looking for.
H: Slow PNP turn-off time, how to optimize it I'm multiplexing a pair of Nixie tubes. The high-side control is done with two pairs of transistors, MPSA92 high-voltage PNP to switch the 160V to the tubes, and a BS108 to control the base of the PNP: simulate this circuit – Schematic created using CircuitLab (R2 represents the Nixie tube). The multiplexing is at 1000 Hz. However, I'm having some ghosting issues, and as seen on the 'scope, and in simulation, the problem is the turn off time of the PNP. It is quite slow, around 100-200µs. I want to optimize this - I read about Baker clamps, but I was confused as there are no circuits with PNP transistors about them. I tried adding two diodes, one from collector to R1, and another from base to R1. However, this didn't improve anything at all! I'm not even sure there is such a thing as a PNP Baker clamp... So, what are the possible options for fixing the turn-off delay? AI: Your control pulls the base of Q1 down, so you need to connect a pull-up resistor to it in order to bring it back up as quickly as possible. You will need to pick a value high enough that you don't bleed too much current through M1 when on (since every milliamp through the pull-up, R1, and M1 is wasted), but low enough so that the MPSA92 actually saturates with the voltage created by the divider created by the pull-up and R1 and M1.
H: Voltage divider but don't know current requirement, so how to pick the ratio I want to connect my little RS232 to TTL converter to a 5V power supply but the converter needs 3v3. So I thought, even with my very little electronics knowledge, I could knock up a potential divider to do this... ... on considering it I realised I have two resistor values to calculate and one equation because I don't know the current that the device would draw. R1/(R1+R2) == 3.3/5 So my question is should I just choose resistor values that are as low as possible so the current isn't limited significantly but I still achieve the same voltage across the load? Would this work? Thanks in advance :) AI: For an RS232 level converter the current drawn will depend largely on what it's attached to and the line state at the time. If you use low value resistors you'll end up generating a lot of heat / waste power and higher values won't have good regulation as the current changes. A linear regulator such as the L78L33ACZ is in a hobbyist friendly TO-92 package and is only 40 cents in one-off quantities from Digikey. The drop-out voltage of 1.7V would put it just within spec. I'd suggest buying some of those or something similar from a local supplier and purchase a few extras for your parts drawer for future projects.
H: Problem Reading PIC18F4550 Input Hi I am facing some problem with Reading the input from a PIC18f4550 , for a simple arrangement where when a switch on (switch = 1), few led should glow., and on releasing the switch the led should go off (switch = 0),. On providing some volts across a pin (RA0 or RA1)- the leds should glow but I am getting no success in doing so. I am using MPLAB IDE AND C18 compiler. tried with MPLABX and XC8 compiler too. I wanted to take input from RA0 and RA1 , with a two push switch. And glow leds on RD7-RD4. I made a simple if then else statement, inside a while(1) loop to do so. #include <p18f4550.h> #define switch1 PORTAbits.RA0 // two switches #define switch2 PORTAbits.RA1 #define led1 LATDbits.LATD7 // defining led’s for making life easy #define led2 LATDbits.LATD6 #define led3 LATDbits.LATD5 #define led4 LATDbits.LATD4 void main (void) { // IO settings /* tired both ways*/ TRISbits.RA0=1 //making input for switch 1 TRISbits.TRISA1=1 //making input for switch 2 TRISDbits.TRISD7 = 0; // RD7 to RD4 set to output for led. TRISDbits.TRISD6 = 0; TRISDbits.TRISD5= 0; TRISDbits.TRISD4 = 0; ADCON1bits.PCFG0 = 1; // making all pins digital. ADCON1bits.PCFG1 = 1; ADCON1bits.PCFG2 = 1; // referred Data Sheet Page:262 ADCON1bits.PCFG3 = 1; while(1) { if(switch1 == 1) { led1 = 1; led2 = 1; led3 = 1; led4 = 1; } else if (switch1 == 0) // on reading no voltage { led1 = 0; led2 = 0; led3 = 0; led4 = 0; } else { } } } It did not work out well.. the leds on RD7-RD4 keeps glowing all the time no matter what I do. I tried to change the PORTAbits.RA0 to LATAbits.LATA0 but still no help. I did little bit of research and someone recommended me to turn the ADC value off and after looking up datasheet setting. I turned the adc off ADCON0bits.ADON = 0; //turn off the ADC Checked with the circuit on breadboard. Everything but still situation same. Someone further recommended that , it’s a better idea to turn off the comparator. Hence I turned off the comparator again. CMCON = 0x07; // comparator off. ADCON1=0x0F; //All pins digital I built entire thing again from scratch but still no success. I push the switch on or off. The leds on RD7-RD4 only of port D keeps glowing all the time :’( .. Here I am please help me. PS: [Just to add up, I also thought may be my pic18f4550 has gone bad. Hence I tested a code to blink led on pic18f4550 http://goo.gl/PosRgg from a website it worked fine… hence I am sure my pic184550 is has not gone bad.] Please help and recommend where I gone wrong, i have been trying since 3 days now :'( AI: I don't think ADCON will make a difference in this case seeing PORTD pins you're using are multiplexed with Enhanced PWM Mode and the Streaming Parallel Port (SPP), rather than Analog Input Module, which take priority over port I/O You'll want to disable the Enhanced PWM that're also multiplexed with PORTD pins. Also you'll probbably want disable SPP, by clearing SPPCON register bit 0 (SPPEN) to 0 So a solution in this case can be to configure CCP1CON to anything but Dual or Quad PWM by setting CCP1CON to 00xx 11xx
H: What is the use for non-inverting input resistance in a negative feedback opamp? Here in the Figure R5=50K. This resistor value is not in the equations to obtain output voltage, and in many tutorials non-inverting input is directly grounded without a resistor. What might be the reason to use it here? AI: R5 equals R4 || R6 (resistors in parallel) calculated as $$R_5 = \frac{R_4 \cdot R_6}{R_4 + R_6}$$ and its purpose is to balance the two inputs of the opamp, it cancels the differences caused by the opamp input bias current http://www.ecircuitcenter.com/Circuits/op_ibias/op_ibias.htm
H: How is a varactor diode used in a circuit when it only has 2 terminals? I've been reading about varicaps, and I'd like to try to use one in an op-amp integrator circuit to be able to adjust the gain. My confusion though is that every varactor diode datasheet I've read indicates that only 2 pins are used, like a normal diode. The capacitance is supposed to change with reverse voltage across the diode, but how then is the capacitor supposed to be used in useful way? Only 2 pins used in both package types! Doesn't make any sense to me, since obviously you can't keep the diode at a constant reverse voltage AND use it in any type of circuit where an alternating waveform is applied. I was expecting them to have a 3rd pin where an external control voltage was applied. What am I missing? AI: you can't keep the diode at a constant reverse voltage AND use it in any type of circuit where an alternating waveform is applied. Sure you can as the millions of varactor tuners produced will testify. Of course, the AC signal must be relatively small. From Wikipedia. When designing tuning circuits with varicaps it is usually good practice to maintain the AC component of voltage across the varicap at a minimal level, usually less than 100mV peak to peak, to prevent this changing the capacitance of the diode too much and thus distorting the signal and adding harmonics to it.
H: MCP23017 in series I have a hand full of MCP23017 (16 bit multiplexers/ I/O Expander) but I can only get 8 IC on the bus due to the limit of address but I need 200 pins (about 13 ICs) for a 8*8*8 RGB cube and was thinking about and wondering what issues I might have if. A. changing the addresses of the IC actively OR B. use a transistor to disconnect the clock of on set of ic's and control the other set I don't like the idea of a shift register because of size and programming headache MCP23017 data sheet AI: While some devices will work well with the address being switched while powered on, most datasheets will not reflect that. You will need to test it. To do that, you will need a few spare pins, or an extra 16 bit expander, to drive the address pins. A setup could be have the 13 led expanders A2 and A1 pins tied to logic high. A 14th expander, for driving the A0 pin, with A2, A1, and A0 tied to logic low (0x20). Every time you need to update a new expander, you update the address expander first, then the actual led expander. This adds a 2 to 3 byte i2c transaction to each update. You have two main options for alternatives though. On the Arduino, you could use the software I2C library to have a second i2c bus. This can be on any two pins. Put 8 on one, 5 on the other. Or for general i2c compatibility, a i2c multiplexer/hub/bus extender/repeater/switch (They have many names). Depending on the speed you are using (400kHz vs 1.7MHz [FM+]) you will need to find an appropriate one. Most are for 400kHz use. These allow you to connect two i2c buses, and switch between them.
H: AC small signal analysis of BJT nework Why do we set the input voltage to zero (short circuit) when calculating the output impedance of a transistor network? Why don't we set the output voltage to zero (short circuit) for input impedance calculations? AI: This is a reasonable question and the answer is straightforward. When finding the equivalent impedance of a port, one may zero the independent sources within the circuit and then either calculate the impedance directly or use the test source method. Now, the input voltage is an independent source, an independent variable, that is a stimulus to the circuit. We are free to set the input voltage to zero or anything we wish and ask "given this input voltage, what is the output voltage"? Changing the input voltage does not change the circuit under consideration. It is simply a change in the stimulus to the circuit. However, the output voltage is not a source that is "applied" to the circuit. It is not a stimulus; it is a dependent variable. Forcing the output voltage to be zero volts, i.e., placing a short circuit across the output, changes the circuit under consideration and thus, isn't a valid move to find the input impedance. In other words, finding the input impedance with the output shorted is finding the input impedance of a different circuit.
H: Recognizing low-pass filters Does the capacitor in this circuit serve as a low-pass filter? The premise of the circuit is to be a small SD card based music player. The write up, Simple SD Audio Player with an 8-pin IC, says that it is necessary to filter the PWM output with a low-pass filter. I believe this is usually done with a capacitor. Unfortunately, I'm not overly familiar with the mechanism that a capacitor uses to act as a low-pass filter. Is the capacitor in this circuit acting as a low-pass filter? If yes, then what value capacitor would be good as a low-pass filter for the PWM output? AI: This does not make much sense. You said in comments that in PB4 there is a inductor and not a capacitor. Unless you did a incorrect assemble of your parts it should be a capacitor. The picture shows a capacitor and makes sense to be a capacitor. This is probably a low voltage and low power application. Usually you put low-pass filters into loudspeakers when you have woofers and subwoofers which, by the way, generally need high power. So it makes more sense to be a high-pass filter as Scott said, which is represented by a series capacitor. Depending on capacitor's value will filter more or less but still remove most of bass sound and DC levels. As for the Vcc line, there is a capacitor (left) AND a battery (right). The 3.3v label should be linked to the battery. And this capacitor is now in parallel to the load. So it is a low pass filter and this is probably to help absorbing fast transients in Vcc line and keep it stable.
H: ATtiny 85 io High Voltage I've search all over to no success. I tried the data sheet, but couldn't make heads or tails of it. What is the voltage of an output pin of the ATtiny 85 when high? is it just the same as the input voltage a vcc? Also, what is the maximum current output when run at 3.3v? AI: This is from the datasheet The output voltage depends on the current that you sink when the output is set to LOW state Or the current you source when the output is set to HIGH state
H: Gain in Common Emitter Amplifier I need to design an amplifier having a Vin=150mVp, 1khz; Vcc=3V that can run an 8ohms, 0.25 watts speaker, with a gain for about 7 without noticeable distortion. Below is my designed voltage divider biased common-emitter amplifier with Vin=150mVp, 1khz; Vcc=3V. But here is my concern: I need to have a gain of about 7, or having Vout for about 750mV The first schematic I design having no load resistor of 8 ohms, when I simulated I measured a Vout of about 762mV, as you can see below: But when I inserted a Load Resistance of 8ohms (assuming this is the speaker), I only got Vout of about 46mV which is very low, as you can see below: ****My question is what can I do to increase the Vout for about 750mv having the Load Resistance of 8ohms, at the same time without having noticeable distortion?** Any help will be appreciated. Thank You. AI: The gain of a true common-emitter (emitter at AC common or "ground") is approximately: $$A_v = -g_mR_C||R_L = -g_m 7.5 \Omega$$ for your resistor values. For a (magnitude) gain of 7, the required transconductance is: $$g_m = \frac{7}{7.5} = \frac{I_C}{V_T} \Rightarrow I_C \approx 23mA$$ But, according to your schematic: $$I_C \approx 8mA$$ Back to the drawing board! Also, do realize that the above calculation is for small-signal gain. Since you have the emitter at AC ground, this amplifier is quite non-linear for large signals and the distortion is quite evidently large in both transient simulations you provide.
H: Updated. Extending Range of a microstrip antenna with a SMA 2.4GHz Omni Direction 20db wifi antenna Dear all I have the bellow A2DP bluetooth module which has a zigzag microstrip antenna. I want to extend the gain in the antenna with my 20db wifi antenna. I know as far as that I need to scrape the majority of the zigziag antenna off. Then solder my antenna extension to the remaining bit. Which of the two 2.4GHz antenna wires do I connect to the remaining zigzag microstrip antenna (the inner wire or the outer wire?). Is a ground plane necessary? If so where is the ground plane on this circuit board and how would I connect the two 2.4GHz wires to this board to achieve the best gain? This is quite new to me, thank you for all your help! Update I have cut off the microstrip antenna and soldered on the SMA central wire to what remained from the microstrip antenna. I have also cut the on board copper connections where I have shown in the close up with a sharp knife . Whether I leave the coax outer shield 'F' disconnected or soldered to what I think is ground, point 'G' I can't pick up this bluetooth device on any of my devices (it used to work before attaching the new antenna). Also I have noticed that the point 'G' which is what I think is ground is the same potential as the (-) black power wire and also the same potential as the central SMA antenna wire which I have soldered to the board. So they must somehow be connected. Not sure if this is meant to be like this? So if point 'G' is the same as potential as the negative power wire, should the middle of the coax wire be also the same? Have I shorted a connection somewhere? What have I done to make this bluetooth device stop being received. Added note it still powers up and lights up. Full size image AI: First, I would look up the datasheet of the RF chip to make sure that the output impedance is 50 Ohms (it doesn't have to be). Then, peel the coax of your antenna in such a way that it looks like a 3 toothed fork with the inner conductor being in the middle. This is really important for best performance (otherwise your antenna may not work well due to poor balancing). Using a sharp knife, razor blade (etc) remove the mask on the a small section of the trace leading up to the antenna so that bare copper is visible. Cut that trance after to pad to isolate your old antenna. Expose copper on both sides of the center trace (your ground). Solder the center conductor of your coax to the former antenna trace pad and solder the coax outer shield grounds to the pads. Keep these unwound wires as short as possible. Keep in mind, that you will still lose a couple of dB in the transition and cabling.
H: Android to arduino- best board option for wireless I'm a novice arduino hacker. I need to connect a hacked Android to an arduino wirelessly but unclear as to which option is best. I've read about the Mega ADK and it is my understanding that a regular board (uno?) can be used with a wireless bluetooth dongle. What is the best and easiest way to connect to an arduino wirelessly? AI: You mentioned the Mega ADK, It is quite good, being specifically designed for Android projects, but it is not wireless. If you need wireless, it could be worth taking a look at the Arduino BT. You would have to do the Android app separately, but once you made that, the BT has built-in bluetooth and useful libraries that make connecting easy. Your other option would be a bluetooth shield, of which there are plenty, though none of them are official. There are also WiFi and NFC shields but they are more complicated. Possibly still worth a look.
H: Using open collector as regular 5v output I'm trying to use the following IC: SN74S289BJ so that the output is 5v when HIGH and ~0v when LOW, however I'm having problems due to the open collector nature of it, as I've written data to a specific address and the transistor won't sink the pull-up current (meaning that the output LEDs that I use to verify the data are always on) according to the data sheet whenever there is data on a specific output the transistor will be saturated and will cause it to guide the flow of the current to GND. Currently I have 5v through a 330 Ohms to the collector of the IC 74S289BJ and a LED to show the status. What would be the correct way to set it up? Here is my current setup, assume that the address and data are prepared and that the IC is in read mode (WE is HIGH). Also, the output is inverted because according to the datasheet the output is the data's complement. Note: IC U2/3/4/5 in the above schematic are SN74H04N HEX inverters AI: Typical open collector led setup would be: simulate this circuit – Schematic created using CircuitLab You are essentially creating two paths two ground, which are both variable and not perfect. There is a C-E voltage drop as well. If you measure the output pin voltage compared to ground, when the output pin should be Low (open-collector active), what do you get? The datasheets list that max would be 0.8v. U2-U5, are they buffers? What voltage level activates the buffers? And what part number?
H: Bluetooth4.0 vs WiFi in a Android to arduino connection I've read this article http://gtms1313.wordpress.com/2013/04/01/bluetooth4-0-vs-wi-fi-direct/ which is a good summary of latest Wifi vs Bluetooth technologies, but the actual hardware being used needs to be taken into account. I need to hack an Android which will also connect wirelessly to an arduino. Will the communication be easier with Bluetooth from a coding and serial access point of view? AI: Wifi-Direct has not been widely used yet, even with inclusion into Android 4.0. You will not find any direct modules for the Arduino that support wifi-direct. Bluetooth 4.0, normally refers to Bluetooth Low Energy (BLE) connections. BLE is not backwards compatible with Bluetooth Classic (i.e. Bluetooth 2.0 or 3.0), unless the device supports Dual Mode (Both BLE and Classic). There are BLE Shields. Your phone must support Bluetooth 4.0 LE connections. Otherwise, you would connect with Bluetooth Classic, which is pretty power intensive compared to BLE.
H: Basetech bt-153 issue So I've just received my first bench power supply and she seems like not working. But As it's my first I'm perhaps doing something wrong. First test, I go to continuous voltage, set it to 0V. Put the negative probe of my multimeter in the ground output and the positive to the +V output. Set the multimeter to 20V DC resolution . Start to increase the voltage on the power supply from 0V to 15V (max). My multimeter is like going crazy from -1.5V to +1.5V with any loads (from 0.1V to 15V same result) But the screen on the power supply looks like displaying the correct value. Second one, set it up to continuous current, can't change the value, always display 0A, sometimes voltage change a bit without any wires attached to the output. Usually when the current wheel is at 100%, then I can read 0A and around 1V to 1.2V. So, am I doing something wrong or does it just doesn't work ? (In that cas have to return it asap) EDIT : Additional tests : I've checked the fuse, seems ok (for me shouldn't even turn on without but who knows). I've tested with another multimeter and same result. I've try do plug a PC fan on it 12V, 150mA, in CC or CV doesn't work but work when plugged on a 9V battery so the fan is ok. AI: The ground terminal is almost certainly not connected to the power supply output terminals. To measure the output voltage of the power supply, you must turn the current limit knob up somewhat, and measure the voltage between the black and red output jacks. With the current control turned to minimum, the supply probably won't output any voltage, as the current is limited to zero. To test the current limit, set your meter to a current scale, and connect to the red and black terminals (again, the yellow ground terminal is not connected to the power supply output - it is just there to give you convenient access to the AC power ground). Start with the current control fully counterclockwise (minimum), turn the voltage pots up somewhat, then slowly turn the current limit knob clockwise - you should see increasing current on your meter, which should match the current indication on the power supply.
H: Send a frequency impulse when switch is active I'm a newbie when it comes to electronics, so please forgive any glaring mistakes! I am trying to create a simple circuit that sends an audible frequency/tone to a line-in/mic input when the mercury switch is active. Could anyone help me to identify what component I would need in the circuit to generate and send the frequency to the microphone input? AI: You can use a 555 timer IC to create a tone generator Here is a page that shows such a circuit but you can find many more from google. You'll need to connect a pot (or a resistor divider) at the output to lower the output level to line in/mic levels. The switch can be used in the power supply of the circuit.
H: Motor bridge no longer responds to lower voltages I'm making a circuit that I used for a previous project on a bread board to power two electromagnets. I'm using the same wiring and parts as the first time. It's a simple circuit using an Arduino to control a motor bridge. Here's the problem: when I try to operate it from the arduino, nothing happens. When I run the logic pin (and Vref, etc) through the 12v power supply I would use for the electromagnets (instead of the arduino), everything works fine. Using an voltmeter, the arduino looks fine with volts going up to (and a little over) 5v. The motor bridge is 4.5~20v. Instead of a magnet, I'm just using a voltmeter for testing. The ground is run through the power supply, not the Arduino Here's the circuit: circuit http://www.e-alexander.net/slippers_img/circuit1.gif and the schematics for the ta7291P http://www.electronicaestudio.com/docs/1437_2_4025.pdf I have multiple ta7291P motor bridges and all have the same problem: all worked fine last year when I did the project, but now none of the work from the arduino, none of them work from a 5v constant current used instead of the arduino (second input pin is grounded in that case), all of them work with 12v used to power everything. Are my chips just aged/abused or am I missing something? Thanks in advance! AI: am I missing something? As others have commented, you are missing the common ground connection.
H: Which software is used to design this Cirucit? Could you help me with the name of the software used to design the circuit below? I have used Eagle (Easily Applicable Graphical Layout Editor) but I want to design my circuits with looks something like this below. AI: The software is ExpressPCB. This software includes two applications called ExpressPCB and ExpressSCH, one for drawing schematics, the other for PCB layout. The original post of this image is this, and in the end of the post the Author says what software he used. In the following zip file you will find the schematics in ExpressSCH format and also the PCB artwork in ExpressPCB (both pieces of software can be freely downloaded from the Internet):
H: Effect of emitter bypass capacitor I am studying BJT frequency response, particularly low frequency response, and I am not getting a clear picture of calculating the effect of an emitter bypass capacitor. My question is: why is the impedance looking through capacitor not simply like this: $$ [(R_S //(R_1//R_2)) + \beta_\text{re}] // R_E $$ Where am I going wrong in applying Thevenin's theorem for calculating Rth? AI: Where am I going wrong in applying Thevenin's theorem for calculating Rth? You're not taking into account the effect of the dependent current source on the equivalent resistance, i.e., you're treating the dependent current source as an independent source. To find the equivalent impedance "seen" by the capacitor, you should use a test source, which will "activate" the dependent source.
H: Measuring power with a current transformer I'm working on a project at the moment to measure power through a current sensor. I posted a similar question before, and received very helpful advice which I have tried to heed. I have improved the design (I hope) by incorporating a precision rectifier. I still need to get at the voltage waveform of the household supply. My thinking is that the phase will be constant at any point in the household circuit (assuming the house is on a single phase) and so I was thinking of getting a transformer from something like a cellphone charger and plugging it into a wall socket, and measuring that in the same way as I am measuring the current. Here is a diagram: Is this a good way to do it? What factors do I need to keep in mind? Is there a better way? AI: R4 is not needed - short it out. R5 is wrong - remove it and connect the bottom of XFMR1's secondary to the op-amp's 0V signal rail. Apart from the fact that using ADC1 and ADC2 doesn't give you real power but RMS(volts) x RMS(amps) then it should work. Power is not measured this way in an AC circuit. The AC phase should be almost guaranteeable anywhere in the house but there will be a small phase shift through XFMR1. However, as you are trying to calculate "power" using RMS steady state values this is of zero consequence. Here's what a power waveform looks like at various phase angles between V and I: - With V and I in phase, power is at maximum. In scenario 2, I lags V by 60 degrees and power is half of scenario 1 because cos(60deg) = 0.5 i.e. power factor = 0.5. Scenario 3 is when V and I are 90 degrees to each other - there is still the same amplitude power waveform but average (real kW) power is zero. Scenario 4 shifts the current to lagging at 120 degrees and cos(120) = -0.5 hence average power is negative. To complete this answer it's probably necessary to think about what happens when the current has third (or higher) order harmonics present: - The voltage waveform multiplied by the 3rd harmonic (green in top diagram but strangely(?) blue in lower diagram) produces an average power of absolutely zero watts. This is why measuring RMS current may be a very poor indicator of real power. Despite the RMS of current being increased by the 3rd harmonic being present, this has no bearing on power consumed whatsoever - this is why, these days, we are urged to use devices with power factor correction circuits in - not only do they align the current and voltage but they reduce harmonics of currents - what gets sent down the power cables to our houses is therefore greener and makes the power companies much happier because they don't have to "over-rate" the cables they use to carry useless harmonic currents.
H: What is the hardware/device that can switch a 5V and 12V (simultaneously) PC power supply lines? What I want to do is to switch the power supply lines (5V and 12V) for a hard drive. The 5V line is meant for data transmission, and the 12V is for the spinning disk DC motor. I would like to control the hard drive power from PC through a means of serial port or USB, which I already have a device for. The difficulty is to switch on/off 5V and 12V simultaneously. I might need a specific hardware component to do this. Any suggestions on what might be helpful? Thanks. AI: This 5 volt DPDT relay would work for your project What a relay is and how to understand the part I linked to you The abbreviations stand for SPST – Single Pole Single Throw SPDT – Single Pole Double Throw DPST – Double Pole Single Throw DPDT – Double Pole Double Throw
H: Clocked edge-triggered timing (contamination delay) I'm reading a book about computer architecture, and it says that, in clocked edge-triggered devices, the contamination delay is usually nonzero, and that the contamination delay for registers is assumed to be greater than its hold time, "giving it the important property that its inputs and outputs can be read and written simultaneously (that is, by similar devices sharing the same clock input)". But I didn't quite understand this statement. As far as I know (I'm very new to this subject), contamination delay is a minimum time, measured after the active clock edge, during which the output remains valid after the input has changed (measured after the active clock edge), and hold time is a minimum time requirement measured from the active clock edge, during which the input data has to be kept stable. Why is contamination delay of register greater than the hold time, and how exactly does this fact allow it to be read and written simultaneously? Could someone give a more detailed explanation? Update: I understand basically the importance of having contamination delay greater than the hold time in edge-triggered flip-flop in the situation where there are two chained flip-flops (that is, the output of the first one serves as input to the second one). When clock rises, the input to the first flip-flop gets sampled and propagates to the second flip-flop. Then, after one clock period, when clock rises again, the second flip-flop samples its input. But the input of the second flip-flop must remain at the same value for at least a hold time after the clock rises, if we want it to get correctly stored. So, the first flip-flop must guarantee that its output (which is the input for the second flip-flop) will not change for at least a hold time. That is, the contamination delay of the first flip-flop must be at least the hold time of the second flip-flop. Is this correct? The part that I'm not understanding is why this fact gives to registers "the important property that its inputs and outputs can be read and written simultaneously (that is, by similar devices sharing the same clock input)". AI: From my textbook, Digital Design and Computer Architecture, Harris and Harris, pg. 88 An important note When you are attempting to find the propagation delay of a combinational circuit with multiple elements, you must add the propagation delay through the critical path. However when you are attempting to find the contamination delay of a combinational circuit with multiple elements, you must add the contamination delay through the shortest path. That much is probably obvious to you. Actually, it sounds to me like you are referring to contamination delay. You said contamination delay is the amount of time measured after an input changes that the output remains valid. If you mean the previous output, then yes, because that means the same thing as until the output begins changing to the new value. Addition About your question as to how this deals with reading and writing from a register. This confused me for awhile, but I think it makes perfect sense to me now. So what you said about contamination delay and hold time is correct. This problem applies to when flip-flops are daisy chained. And if you think about it, it also only applies to when you want to read and write at the same time. Imagine a circuit with just 2 flip flops. It doesn't necessarily have to be a register, just that the first flip-flop is the storage element that is written to, and the 2nd flip-flop is the storage element that reads the first one. If you only needed to read and write on different clock cycles, then none of this delay stuff would matter, because reading would always occur on a different clock cycle when the output of the first was stable, and couldn't change since writing can't occur in the same clock cycle. However if you wanted to write a new value to the 1st flip-flop, as well as read the previous value properly into the 2nd on the same clock cycle, then that is the exact situation you described, where if the contamination delay of the first was less than the hold time of the second, then writing to the first would thereby contaminate the reading of the second. It makes perfect sense. The read has to occur successfully before the write begins to change what's being read, or else the value gets lost.
H: Isolate wires soldered on PCB I'm soldering some cables on a PCB. They are are stranded, so I've first apply a bit of soldering on them and then solder them on my pcb. The problem is, there's on some a bit of exposed copper on the basis (1 or 2 mm) and they are soldered really close. For now I don't have any short but it's still dangerous as they can move and ends in a position where the 1-2mm exposed of two can touch. My idea was to use hot glue on the base of the wire to isolate them and avoid the possibility of shorts. Do you think it's a good idea or I should do something else ? Perhap's a soldering technic that could allow me to get better results ? (I was thinking something like, apply the solder on the pcb without the wire, then reflow the solder with the soldering station and, while the solder is hot and liquid, put the wire) AI: Ideally, you should avoid finding yourself in this situation. Using appropriate connectors or atleast making sure you have enough room to comfortably attach the wires on the pads is a useful thing to do. You should certainly try to fix the problem more robustly if you want to produce or manufacture the thing. For a one off thing, though, hot glue should work. There is a technique called potting, which using a different material, which does essentially what you imagine hot glue will do. Typically, potting is used to reduce stress at connector/solder joints and prevent cables from flapping around and so on. The potting material is better at doing this if the signals are especially sensitive in some way, since hot glue isn't a material explicitly chosen for it's insulating/dielectric properties. You should give it a go, though, for most applications it's probably insulating enough.
H: Help me identify this type of pin header Can you help me identify this type of pin header? I know it's a SIP (single in line) package, but would this type of connector be male or female since it has both gender types of connectors? Also, could anyone suggest a distributor to purchase this type of header in bulk? AI: It's a female pin header, most likely 0.1"/100mil/2.54mm (but use your calipers to verify). The little metal pins are for soldering into a PCB, whereas the corresponding male connector plugs into the contacts embedded within the plastic housing. Also note that they are available in "stackable" form, where the metal pins are long enough for the connector to act as both male and female; these are used on both PC/104 expansion boards and Arduino shields so that they can be stacked multiple devices high.
H: Control toy car transmitter with Arduino Uno Could someone suggest how I would go about soldering the necessary wires to a toy car transmitter so it can be connected to the pins of an Arduino Uno to allow the Arduino to control the car - forward, backwards, left, right. Could I solder wires to the pushbuttons connections? If so where? Here is how the board of the transmitter looks. AI: First step: Check VCC level of this transmitter IC. If it is 5V then it is safe to connect power and ground of the transmitter board to power and ground of your Arduino. Just to power them together from one single power source. Second step: most probably one terminal of each button goes to separate pins of the transmitter IC which pulls them high up to almost VCC level through some internal resistor (10-200 kOhms), while other button terminals are connected to the ground. You can check it using any voltmeter you have around. If voltage level on unpressed button is less then 0.5V lower then VCC - it is safe to connect those button terminals to your Arduino data pins and set those Arduino pins as usual digital outputs. Of course if first step was ok.
H: What are the dangers of cutting PCB with Dremel? I'm cutting PCB's with a Dremel. Works really fine at high speed and with the finest cutting wheel. Can get really nice and clean results. There's a lot of project and dust so I place next to my third hand a large PC fan at maximum speed oriented to the opposite of me, wear protection glasses for projection and a 3M dust mask for dusts. But after the cutting there's still a freaking smell in the room and some dust floating in the air. Are these dangerous? Should I quit and ventilate the room for 15 minutes before continuing to work? I don't know the composition of PCB and I'm asthmatic so... AI: I found a MSDS datasheet for FR-4 material, which is commonly used in PCBs. Highlights: Machining, grinding or sawing this material may generate harmful dusts. Continuous filament glass fiber is not considered flbrogenic; however, it Is woven from E-Glass fibers which are listed by IARC as "special purpose glass fibers" and designated as "possibility of carcinogenic in human.” Inhalation of copper fumes, while not expected to occur under typical conditions of use, may cause metal fume fever. See Section 8 for exposure controls. The cited section 8 says: ENGINEERING CONTROLS: Use local exhaust when machining, grinding or sanding to minimize exposures and maintain airborne dust and fiber concentrations below occupational exposure limits. PERSONAL PROTECTIVE EQUIPMENT: RESPIRATORY PROTECTION: In the absence of adequate general or local ventilation, use a NIOSH-or local authority-approved respirator with at least an N95 filter if exposure limits are exceeded. SKIN PROTECTION: Wear gloves during prolonged contact to avoid skin Irritation from dust. EYE PROTECTION: Use safety glasses or a face shield when machining, grinding or sawing this material. So, by using a mask and fan, you've likely kept yourself reasonably safe. You might want to consider getting an electronics-grade vacuum cleaner that meets N95 to collect and contain dust that otherwise may escape into the air.
H: Inverting interrupt edge (STM32 wake up pin) A sleeping STM32 can be woken up by a rising edge on its wake up pin. But if the IC on the other end of the line only interrupts as falling edge, is it possible to invert it somehow ? AI: Yes, the WKUP pin works like that. If you really need standby state, you pretty much have no other choice left to wake up the device. You can, however, put a simple inverting transistor in front the the WKUP pin like this: simulate this circuit – Schematic created using CircuitLab Check the data sheet, you might be able to spare R2 if a proper pull-down resistor can be switched on for WKUP inside the chip.
H: Wire-tie cables Is there a name / specific type for flat-jacketed wires which come tied on consumer product cables (eg. earphone cables, power cables) ? I always collect them from the new products I buy, but I wish to buy some in a volume. I find it the most handy thing (rather than nylon zip ties) to temporarily tie small cables, for storage, and tidying up behind the AV sets. I see they are basically just some thicker wires, but don't think some wires I'd grab from a cat5 cable would stand against that amount of twisting. AI: 'Plastic coated wire twist-ties' seems to hit the right sort of thing on ebay.
H: How can we measure sinusoidal signals in atmega8 ? How is the signal frequency measured in ATmega? In particular, how is the signal frequency (sine) measured in ATmega8? AI: Sample values using an ADC with a minimum frequency which needs to be twice (more is better ;-) the frequency you expect your sinus to be. Then perform a FFT (see here as well). Depending on how fast/often you need this to be done this should be possible on the atmega family. That one here actually looks pretty impressive to be honest
H: Correct USB to RS 3.3 / 5.0 logic level cable I am starting with electronics / arduinos / atmegas here. For a couple of recent days I've played with USBasp programmer, atmega328P MCU as well as with 7805 and LM317 voltage regulators. Now my next step is to try to talk with DS18B20 temperature sensor and then with RF 434 / 868 module. I was thinking how can I see the data read from temperature sensor without having any LCD and the simple answer is using RX/TX pins. The problem is I've stuck on choosing the right cable to do so. I found THIS great stackexchange post about UARTs and RS232 and it narrowed my problem to THAT data cable - which ish FTDI's DS_TTL-232R. Now, I've also read this datasheet and I do see it's "USB to UART, 3.3V TTL logic level, Raspberry Pi compatible flying leads" but it also states "5V safe TTL inputs make the TTL - 232R easy to interface to 5V MCU’s". Do I get it right that this cable will allow me to: - connect PC via USB to atmega328 RS pins (which have 5V logic level AFAIK) - connect PC via USB to RaspberryPi's RS pins (which have 3.3V logic level) Also I do guess basing what I've googled that I will need some other part (logic level / voltage shifter) to connect atmega328 MCU to RasPi directly, right? Or.. is it enough to supply 3.3V to MCU so it has up to 3.05 V ouput high, and not up to 5V, which I again guess would cause damage to my RasPi? AI: The ATMega has a wide VCC range, some run at 3.3v, some at 5v. It's pins are not tolerant of an input at a higher than VCC voltage. The Raspberry PI is 3.3v signal only. No 5v Tolerant pins. The USB to Uart with 3.3v signal but 5v Tolerant pins means you can connect a 5v ATMega to the 3.3v USB-to-Uart, and the Uart will be fine. The opposite is not true. Connecting a 5v Uart to a Raspberry PI or 3.3v ATMega will not end well. If you need to connect a two way signal between a 5v ATMega and 3.3v Raspberry Pi, you would want a level translator on the ATmega TX -> RPI RX line. The other way round, from RPI TX -> ATMega RX, should be good, as the ATMega has a (VCC * 0.6) Input Voltage High threshold. In this case, 5 * 0.6 = 3v. A 3v or higher signal will be read as a logic high, which works fine. Update: I take it you mean connect a RPI to an ATMega through a usb-to-serial adaptor connect to the RPI? Then you don't need to worry about level translation. A 5v or 3.3v USB-To-Serial adaptor will work, since the adaptor is a buffer between the two.
H: 1100 Sequence Detector I have to design a 1100 sequence detector using Mealy model and JK Flip-Flops. Here is the state diagram: And based on this diagram, I obtain following input statements for flip-flop inputs (A and B flip-flops): JA = A and X KA = B --------------- JB = A xor X KB = A nand X Finally, VHDL implementation gives these result: But it catches "110" instead of "1100". When I implement same state diagram using case...when structure, it gives correct result but I have to use logic gates & JK flip-flops. How should I change this design? Is there something wrong or something I missed? EDIT: I need obtain functions JA, KA, JB, KB (which are inputs of JK flip-flops) in terms of present states A,B and input sequence X. AI: Going through the tables and K-Maps, I came up with a completely different result than what you got. Here are my tables and K-Maps. Your equations also seem much too simple. Can you post a picture of your K-Maps? Edit Okay, looks like everything you posted is correct. I didn't know this until I read around today, but it looks like Mealy machines have this interesting situation with their output. From a page of University of Pennsylvania's Electrical Engineering: So the output is correct. I built the circuit according to my equations and confirmed it does work this way. The output goes high on 110, and then back low again on the 2nd 0, so the output is a pulse. That makes sense, because Mealy machines don't have constant outputs while residing in states like Moore Machines do, only in between the states. Unfortunately my laptop died so I can't link you the circuit. This is also consistent with your output waveform, as your output goes low again after the 2nd 0 in 1100. Now you might be wondering that if you input the sequence 1101, then the output still goes high for a brief moment. That's true, and they cover that situation in the U-penn website as well, in the 2nd picture where they talk about the "glitch" in the output. From their page: One notices that there is a glitch in the output after the input sequence 10111010. However this occurs at a moment that the output is not valid (the output is valid just before the positive clock edge). The valid output sequence is than 000100000 as expected. Remember their sequence detects 1011, so the last 4 bits of their input sequence, 1010, is the same glitch situation as if 1101 was input to yours. Looks like nothing is wrong.
H: Finding the thevenin resistance The task is to find the thevenin equivalent (seen form terminals a and b) of the following circuit: I believe I have found the thevenin voltage by simply finding the voltage drop over the 5 ohm resistor, which is in parallel with the 5A current source (if there is a better way to approach this please let me know). However, finding the thevenin resistance of this circuit puzzles me. I am aware of the method of short circuiting and open circuiting independent voltage and current sources. I apply this which reduces to the following: However as we are looking for the thevenin resistance from terminals a and b, I am confused with how to deal with the 5 ohm connected to the node connecting the 10 and 8 ohm resistors. Is it connected in paralled with the 8 ohm resistor, or do we ignore it? Any help will be deeply appreciated. Thanks in advance. AI: Since there is no current through the 5 ohm resistance (the one at the right), you can consider that the 10 ohm and 8 ohm resistances are connected in series (two resistors are connected in series if the same current passes through them). Thus, the Thevenin resistance is (10+8) // 5 = 3.9 ohm.
H: How do DC motors work with respect to current, and what consequence is the current through them? Motors in general have always been a difficult subject that I cannot fully wrap my head around. Considering DC motors, what determines the rate at which the motor spins? It was my understanding that a permanent magnet created the field by which the current through the motor would act against via the conductor's induced field. As current increases then the induced field would thus increase - thereby increasing the rotational speed. However, I have read quite a bit of material that has led me to realized that I was incorrect. Namely, what is said at this link about DC motors: DC Motors For example, the same circuit schematic as above produces (considering back emf) the governing equations: So we have the current through the motor as a function of the back emf. Is the back emf a function of the load on the motor? Is it that the emf is generated in such a manner that current is limited by the lessening of the potential difference between it and the supplied voltage? The governing equations dictate that if the applied voltage is lowered then the back emf decreases further which in turn will decrease the current demanded by the circuit (through the motor). So, is the current through the motor just an indirect indication of the speed, or how does the current otherwise affect the operation? Are all DC motors (aside from brushless) similar? AI: At the end of the day you have to realise an Electrical Machine is basically an electrical energy to mechanical energy converter that utilises magnetic fields as the link. The magnetic field/flux is either generated by magnetics or via electromagnets. Motors in general have always been a difficult subject that I cannot fully wrap my head around. Considering DC motors, what determines the rate at which the motor spins? The rate the electrical machines rotor will spin is fundamentally the same for all electrical machine types (Induction, sync, SR, BLDC, BLAC, brushed, hysteresis ...). The rate of change of flux. How this rate of change is created is very specific to each machine. But basically by creating a magnetic flux on the stator & the rotor, the rotor will attempt to align itself just like magnets do. This Electro-magnetic torque manifests itself as mechanical torque (due to being perpendicular to a freely rotating axis) A torque acting on some inertia results in an acceleration that would want to take the rotor to infinite speed. It can't because of Lenz's law. You now have a rotating magnetic field passing by coils, this induces a voltage which opposes the voltage source you are using to force current into the electrical machine to generate a magnetic field to produce EM_Torque. The faster you go, the higher this voltage, the more it opposes the voltage source you are using. At some point you are no longer able to force current into the windings to create a magnetic field => no more EM_Torque --> no more rotor torque --> no more acceleration. You have now reached your maximum unloaded speed. As mentioned different machined create the changing flux by different mechanism Brushed Machine (DC stator DC rotor) PM stator & a wound rotor, brushes are used to transfer electrical power to the rotor to create a DC current and thus a unidirectional magnetic field on the rotor. Apply the voltage source and the rotor will turn to align itself. This causes “commutation” to occur via the brushes and the rotor magnetic field is changed pushing it away from the present stator pole & attracting it to the next. More voltage ==> more EM_Torque ==> Faster commutation Syncrounous Machine (AC stator DC rotor) Wound rotor, Wound stator. Power is usually transfered to the stator via a Main-Exciter (basically a rotating transformer) and it produced a DC current in the rotor that does not change direction. The Stator is then excited with an AC voltage source. The rotor will “lock onto” this varying stator field and will be essentially dragged around with it. To increase the speed of a Synchronous machine the frequency of the voltage source to the stator is changed: Higher == Faster. BLAC, BLDC (AC stator, DC rotor) These are basically just Synchronous machines but they have permanent magnets on the rotor. Higher the stator frequency the higher the rotor speed. AC & DC just comes from the type of current control that is used. Switched Reluctance (AC stator ... rotor) Beautiful machines, salient rotor NO WINDINGS, NO FIELD GENERATION. Wound stator. The stator is excited to produce a flux. An unaligned rotor will experience reluctance torque and attempt to align itself to minimise the reluctance in the present magnetic cct ==> mechanical torque ==> acceleration. Once alignment occurs you stop firing the stator and let the rotor “coast” for a short period before firing again Induction machine. (AC stator, AC rotor) Wound stator, wound rotor. Unlike a synchronous machine however, the rotor windings are usually shorted (creating a squirrel cage like construction). Applying an AC voltage to the stator creates an AC magnetic field. This induces a voltage on the rotor & because it is shorted produces a current which in turn creates a magnetic field to be dragged around by the rotating stator field
H: Opamp relaxation oscillator (single supply) I simulated and built current circuit. What I got was a rectangular wave generator with a duty cycle significantly lower than 50%. Than I made R3 = R4 and got 50% duty cycle. I managed to think that RC constant is defined only by C1 and R1. It appears I was wrong. How can I define RC constant for this circuit? Can anybody shed some light on the problem? AI: Yes, you are wrong - it's more complex than that. The signal on pin 3 is important to analyse in order to determine operating frequency. When the output is low, the voltage on pin 3 is determined by R3, R4 and R2 - this is the voltage the capacitor has to discharge to in order to cause the op-amp to flip from being low to being high. Then, when the op-amp output is high, the capacitor starts to re-charge up to a new high voltage. Pin 3 is now a higher voltage because the output is now high and, via R2, it sets a higher threshold (on pin 3) than what it did when the output was low. This is called hysterisis. The capacitor charges and discharges at a rate determined mainly by C1 and R1 but, if R2 is relatively big it's going to take longer to attain the "new" threshold in order to flip the op-amp output. This is how they work - calculate the two voltages that could appear at pin 3 and these two voltages are what the cap charges to and then discharges to during one period of oscillation. Then, use what you know about exponential charging of a capacitor via a resistor to fill in the gaps.
H: How do I calculate battery life for my devices? I want to power coupe devices via car battery, but before I do that I want to figure out how long battery will last. Most of the devices work from 5V so I am using 12Vto5V converter (link to item on ebay) The convert powers RaspberryPi, Arduino Pro Mini, and usb hub&devices for raspberry pi. Total current draw is around 2A @5V. Second converter is 12Vto9V and current drain is 1A at most. Lastly I am using one of the cigarette ligher socket 12V to usb devices (link on amazon). I have yet to measure idle current draw but at most this will draw 2A@5V. Now, how do I go about calculating battery life with those devices? I can measure current between 12V and all the devices&converters, but what then? AI: The current rating for the converters is only the maximum current it can deliver, thus is not useful to calculate the power drainage. To get the time you have to know the real input current for every DC converter(\$I_i\$) then, since they are in parallel, $$I_{tot}=\sum_i{I_i}$$ To get the time, suppose \$Q_p\$ is the capacity in Amp/h of your battery, \$T\$ is approximately the time it will last (in hours) $$T=Q_p/I_{tot}$$ So, if you can measure the \$ I_{tot} \$, you can directly use the aforementioned formula. Keep in mind you should not completely discharge a lead battery or it will decrease sensibly the capacity.
H: Accidentally used plumbing flux on a PCB; How do I remove it to reuse the board? Two weeks ago, I picked the wrong tub of flux from my toolbox and used it for making a 9VAC -> 5VDC adapter. I fluxed all the components and soldered it down before realising I was using PLUMBING flux! The solder pads are all still intact and I've tested the conductivity of the leads of all my parts; they are all intact. So to summarize, How should I remove the flux after desoldering in such a way that I can reuse the PCB? and I may have used small amounts on other repairs in the past (all of them my own personal projects, none for others). Will I have to worry too much about these? The flux is labeled as "alpha metals" brand "soldering paste flux". AI: I clean my boards from flux with isopropyl alcohol and a paintbrush , I'm not sure what is different about plumbing flux that could prevent it from getting cleaned the same way. If the flux is not mented all the way maybe a hot air gun will help get rid the majority of it (melted it can be wiped easily or drip away) and then just wipe the excess. Another idea is to try with water first in case the flux is water water-soluble and then use the isopropyl alcohol
H: Debugging an RTD-to-ADC conditioning circuit As a software developer, I got myself into a bit of a pickle trying to make a 3-wire Pt100 temperature probe readable by a 3.3v microcontroller's ADC pin. I followed page 4 of this MCP document which describes how to do exactly what I'm trying to do, and breadboarded everything up. I adjusted the gain of the Sallen-Key filter by changing R_11 from 20kohms to 88kohms. I've got the following problems: my multimeter is telling me the current source is putting out way less than 1mA (the needle barely budges), and the output voltage predicted by this simulator at the end of the Sallen-Key filter should be 2.954V, but I'm reading about 0.125V. I tried swapping out the op-amp IC and the resistors, but I get the same result. So here are my questions: Is there something obviously wrong with my breadboard that I missed? Why does the current source need two op-amps? Could that be why I might be having trouble? Is there an easier way to do this? AI: It doesn't look like you have connected power and ground for your op amp. That's an easy thing to overlook when you are starting out.
H: Problem with Arduino UNO and RC servo This is my first attempt to work with a servo and I'm using this tutorial. I have a "TowardPro MG996R DIGI HI TORQUE" servo directly connected to my Arduino Uno as follows: I also created the following code to upload onto the Arduino: #include<Servo.h> Servo myservo; int servoPin=9; void setup(){ myservo.attach(servoPin); } void loop(){ for (int i=0; i>= 20; i+=20){ // increment by 20 degrees myservo.write(i); delay(1000); } } After hooking up the servo wires to the Arduino (unpowered), I then hooked up the USB power source to my Mac computer (no code uploaded yet). However when I did this, I noticed a very strange reaction: The servo motor instantly started rotating in small increments about once every second or so, like a pulsing. The message "A new network interface has been detected" keeps popping up and closing at the same frequency as the servo's motor. The periodically appearing message prevented me from uploading my code onto the Arduino. Of course, I thought something was wrong and promptly tried to disconnect the power source and reconnect it several times with no improvement. So, I tried the following steps: Disconnect the USB power to the Arduino. Disconnect the servo wires from the Arduino. Reconnect the power usb to the Arduino. Upload the code. Disconnect USB power source. Reconnect servo wires to the Arduino. Reconnect the USB power source. Now, I'm having the following problem: The servo motor does not rotate. A hissing noise is coming from the servo. The message "A new network interface has been connected" does not appear. My computer does not recognize anything at all connected to the usb port where the Arduino is connected to. At this point, I have no idea what the problem is or how to fix it. Any help to understand where I went wrong and how to remedy it would be greatly appreciated. AI: Your servo may behave erratically, and you may find that this only happens when the Arduino is plugged into certain USB ports. This is because the servo draws quite a lot of power, especially as the motor is starting up, and this sudden high demand can be enough to drop the voltage on the Arduino board, so that it resets itself. If this happens, then you can usually cure it by adding a high value capacitor (470μF or greater) between GND and 5V on the breadboard http://learn.adafruit.com/adafruit-arduino-lesson-14-servo-motors/if-the-servo-misbehaves As others have commented, if your servo requires more current than the Arduino (or your USB port) can supply, you should provide a separate power connection for the servo. Your USB port may be limited to 100mA or to 500mA, the Arduino may be able to provide slightly more current at 5V if it is connected to a power source through the barrel-jack connector. It depends on the specifications of the 5V regulator on your particular Arduino (or clone). If you power the Arduino from a regulated 5V supply, you can draw higher currents from the VIN socket. I note that some retailers of your servo suggest it be used with a motor controller board.
H: Help Understanding an Autonomous rectifier Could anyone tell me how does the circuit below work ? It's a autonomous rectifier. Taking the signal between the two output resistors gives a full-wave rectification, and taking it at the output of the second operationnal amplificator gives an half-wave rectification. V_POS = 5V V_NEG = -5V AI: There's nothing particularly mystifying about this circuit. The left-most op-amp circuit is an inverting unity-gain precision half-wave rectifier. The output is zero during the positive half-cycle of the input and is the inverted input during the negative half-cycle. The right-most op-amp circuit is a non-inverting unity gain amplifier so the output equals the input which is just the output of the left-most circuit. At the output node, we have by voltage division and superposition: $$v_{fw} = \frac{1}{3} v_7 + \frac{2}{3} v_{hw}$$ During the positive half-cycle, the right-most term is zero so the output is just \$v_{fw} = \frac{1}{3} v_7\$. During the negative half-cycle, the right-most term is \$-\frac{2}{3} v_7\$ and so, the sum of the two terms is \$v_{fw} = -\frac{1}{3} v_7\$. Thus, the output is an attenuated full-wave rectified version of the input: $$v_{fw} = \frac{1}{3}|v_7|$$
H: What is the best approach for reducing harmonic distortion? I have a power system where on some buses, large converter driven machines result in high harmonic distortion. As far as I know, there are mainly two ways to reduce the harmonics. A filter to remove (reduce) unwanted harmonics within a range of frequencies Reactors to create a smoother wave form. I'm wondering what are the pros and cons for the two alternatives, and are there any other (better) alternatives? I cannot change any of the existing equipment, but I can add equipment (criteria: smallest size then lowest cost). The converters are 6-pulse rectifiers without filtering, and cannot be substituted (12-pulse would typically give a smoother wave). The filter will only reduce some harmonics, and I have problem with the 5th, 7th and odd harmonics between 25-37th. I could design a filter to reduce the higher order harmonics, but then I would be stuck with the high 5th and 7th components. (Or have a filter to remove the 5th and 7th, leaving me with the higher order components). Reactors seems like the best approach, but almost all similar systems I've seen have filters. The size and weight must be as low as possible (even if that might increase the price of the equipment). The equipment rating is in the range 800-1500 kVA and I have THD above 10%. There are no resonance frequencies in the network (the lowest is around the 180th harmonic). Is one of the approaches generally better than the other. Will there be any significant difference in size for the two? I hope someone has any views on this. Thanks! AI: Robert, Nonlinear loads would introduce odd harmonics in current (mainly 3rd, and next 5th). The Voltage supply THD would be effected by harmonic current due to input impedance drop. My first reaction is to measure the harmonics in current drawn by VSD by a PQ meter; it is likely to be rich in 150Hz and 250Hz. Simulate the power supply and VSD load and fine tune the filter required. By rule of thumb, connect a 30% kVA rating LC shunt filter tuned for 150Hz, on load bus. Pure inductance in series or Capacitor in shunt are not an elegant solution. I have faced this problem on 25kV 50Hz single phase ac electric traction supply and shunt tuned LC filter solution has worked for 10 years, after burning quite a few MVAR pure shunt PFC. I can simulate the system for you for free (no charge) if the source impedance, supply cable and load parameters details are known.You can try MATLAB or PSPICE yourself too. Ofcourse there is an expensive solution of DPFC too. Best of luck.
H: Stored energy (and others) of RC circuit In a circuit shown below me and a friend of mine discussed how we could calculate this. simulate this circuit – Schematic created using CircuitLab He simplified the circuit by stating the resistors and capacitors are in parallel, and hence it can be simplified to a capacitor of 17 farad and a resistor of 142k ohm. So energy stored would be: \$ \tfrac{1}{2} CV^2 = 0.5 \cdot 17 \cdot 36= 306 J\$ I thought this was wrong, and one could simplify the circuit to 3 "parallel" rc-circuits, each consisting of a 47k ohm resistor, 50 F capacitor and a 6/3 = 2 V dc supply. So total energy that could be stored is: \$3\cdot\tfrac{1}{2}CV^2 = 1.5 \cdot 50 \cdot 4 = 300 J\$ What is the correct approach, or should a complete different method be taken? AI: Rather than arguing about combining resistors and capacitors in parallel and series, recall that, in steady state, the current through a capacitor is zero. Thus, assuming steady state, replace the capacitors with open circuits. Then, by inspection, there is 2V across each resistor (if the resistor values were different, one would used voltage division to determine the voltage across each). Thus, each capacitor has 2V across. Since the three capacitor values are identical, the stored energy is simply: $$W = 3 \cdot \dfrac{1}{2}50F\cdot(2V)^2 = 300J$$ If the capacitor values were different, the calculation would be: $$W = \dfrac{(2V)^2}{2}(C_1 + C_2 + C_3) $$ If the resistor values were different too, the calculation would be: $$W = \dfrac{(6V)^2}{2(R_1 + R_2 + R_3)^2}(R_1^2C_1 + R_2^2C_2 + R_3^2C_3) $$
H: Accuracy vs Precision Does it ever make sense to have more precision than accuracy? E.g. if you had a variable resistor which you could control with a resolution of 0.01 ohms but your multimeter only had 1% accuracy, then that extra resolution would be pretty useless wouldn't it? AI: Absolutely. There are many applications in which you're much more interested in the relative changes in a signal than it's absolute magnitude. Take digital audio, for example. It is the precision of the converters that gives you the high signal-to-noise ratio you're interested in. The absolute accuracy (i.e., whether full-scale is 1.0 or 1.1 V) is not generally all that important — it just means the signal overall sounds a little softer or louder, which you can compensate for by adjusting the volume control.
H: Multiple voltage regulators? I have a 12V DC voltage and need to draw around 1A at 1.2V. A quick calculation gives me the following results: \$P_{dissipated} = (12V-1.2V) \times 1A = 10.8W\$ That's huge! Can I use multiple regulators like 12 to 9, 9 to 7, 7 to 5, 5 to 3, and 3 to 1.2? That would give me the following power dissipations in separate regulators: 3W, 2W, 2W, 2W, 1.8W. Is that ok? And the two voltage stages are higher than the drop out voltage of the regulators. AI: There's nothing conceptually wrong with using a string of voltage regulators to drop voltages as long as you take the drop-out voltage between each stage into account. It's quite a common approach when multiple voltages are needed by different parts of a circuit. If you only require the lowest voltage and want to stick with a linear regulator there normally isn't a lot of point. Your total power dissipated has just been shared across devices and a more direct approach would be to use something like a LM317K in a TO-3 package with a suitable heatsink. But usually when dropping that amount of voltage at any significant current a switching step-down converter also known as a buck converter is more efficient and ends up being cheaper. Many pre-built adjustable output voltage modules are available on e-bay. If you prefer something you can include in your design and solder to your PCB there are also many easy to use devices around such as the TI Simple Switcher range that include a web-based design tool. While I'm not aware of any with a 1.2V output there is also the Murata 78xxSR Series and similar devices that are switching regulators with a LM78xx pinout.
H: From 5v to 3.3v at from 8mA to 160mA I'm working on an arduino project. The arduino have a 5V output up to 500mA and a 3.3V output up to 50mA. The problem is i have to power several circuits under 3.3V who consume between 8mA and 20mA each. 8 circuit maximum, so 160mA max. So I can use the builtin output to power two of them but will need to drop the voltage of the 5V output to 3.3V. I've found 3 options : Series resistors, but with 160mA I will need some 2 Watts resistor and I don't have some actually. Diodes in series, seems ok for me, got a bunch of 1N4007 but as the load can change, the voltage drop will change too, and let's say I have only one device connected, I will have much more than the 3.3V... Voltage regulator, but I can't find some for 5->3.3, or really expensive (around 10€, 15$) Any ideas ? AI: Let's go through your list of options. Voltage divider wouldn't work. Usually, the textbook voltage divider assumes that the output voltage is measures with an open circuit. In you case, there will be a load with a varying current. Output voltage of the divider will depend on the load and will not be regulated. Series diodes. You have already found the weakness of this approach: regulation is not very good. Voltage regulator is the right method for doing this. If you use a linear regulator, then the power dissipation will be P = (5V - 3.3V) * 0.16A = 0.272 W. This is manageable. TO-92 package, for example, can dissipate 0.5 W. A switch-mode step down regulator (buck) will dissipate even less.
H: How to check if a comparator is broken? I have just started experimenting with electronics and am concerned that I may have destroyed my LM339 comparator circuit. As a basic test, I had a 3.0 volt power supply hooked up to the Vcc pin and one of the + input pins. Nothing was hooked up to the corresponding - input pin. The long leg of the LED was attached to the corresponding output pin with a 1kohm resistor in between. The short leg of the LED was attached to ground but the comparator GND pin was not. I expected the LED to light up when I flipped the power switch. When I flipped the power switch, The LED flashed briefly and then went off. After this incident, I verified that the LED was still working. Now I am trying to figure out if the comparator is broken. How can I do this using my multimeter? What are some basic tests I can do to figure out if the comparator is working properly? AI: The long leg of the LED was attached to the corresponding output pin with a 1kohm resistor in between. The short leg of the LED was attached to ground but the comparator GND pin was not. I expected the LED to light up when I flipped the power switch. Seems to me that you have connected the Anode to the output of the comparator and the cathode to the GND, that can not work for an open collector/ open drain output , the way this works is that you have to connect the positive supply to the load (LED and resistor) and then the output of the comparator will provide the ground (sink current) to the load (LED Cathode)
H: AV.link dongle (SCART's CEC) I am looking for a device I can plug into an old TV's SCART port, which will feed me remote control commands (like 'arrow-up', 'OK', 'menu', etc.) received over the SCART connector's AV.link (control bus) pin in a usable way. By "in a usable way" I mean in a form that is usable by a computer, e.g. over a USB serial connection, or may even as key presses of a virtual USB keyboard; Anything that a common computer could process. Now, I am not looking for any product purchase advice, but I don't know what to search for on the internet to dig up something like this. If such a device does not exist, how would I best go about creating one? Using an Arduino, e.g.? A few pointers would be greatly appreciated. AI: The Bus Pirate is a general-purpose bus snooping device; while I've not used it myself, it looks like either you'll be able to get it to do what you want with the stock firmware or write your own firmware to handle AV.link and send it up over USB serial.
H: Microchip, memory measured in IEC? It doesn't say on the data-sheet, but I'm curious where i can find if Microchip uses IEC or SI as standard for there memory sizes. For example: http://ww1.microchip.com/downloads/en/DeviceDoc/21754M.pdf The Microchip Technology Inc. 24AA512/24LC512/ 24FC512 (24XX512*) is a 64K x 8 (512 Kbit) Serial Electrically Erasable PROM, capable of operation across a broad voltage range (1.7V to 5.5V)…. My question is: By IEC (binary) its (512*1024)/8 = 65.536 bytes but according to SI its (512*1000)/8 = 64.000 bytes Anyone? AI: I thought SI could be distinguished by the lowercase 'k'? In any case, because of the structure of address lines, memory is almost always a power of two in size. So it's 65536 bytes. (Hard disk manufacturers have taken to using SI as it produces larger numbers for the same number of storage units, but this hasn't spread to RAM/EEPROM yet)
H: Ultrasonic transducer response to harmonics? Does anyone know offhand whether an ultrasonic transducer will respond efficiently to harmonics of the fundamental? For example, will a 40kHz transmitter also transmit with reasonable efficiency at (say) 20kHz or 80kHz? AI: A standard piezoelectric ultrasonic transducer will not work efficiently at sub harmonics or harmonics - it's a 2nd order resonant mechanical device with high Q - there aren't different modes of operation as you might find with some crystals (for instance).
H: How to reliably and safely recreate a blue smoke monster for a workshop? First and foremost, I'm going to say that I do and plan to continue to follow all safety best practices for working with electronics. I'm also a relative newbie, so I don't have a lot of experience diagnosing WHY things fail, and especially not in creating deliberate types of failures. That being said, I'm helping a friend make a few short videos to augment an electronics workshop he does. The workshop is a very basic overview of electronics, more to get kids interested in the possibilities than an introduction to electrical engineering. With my background in graphic design and A/V production, he's enlisted me to make his powerpoint presentation more dynamic. I'm adding some short animations and video clips illustrating electrical concepts. One video that I want will show power being applied to a circuit and then having the circuit smoke and fail after a short delay. We have a couple things we want to communicate: electricity is dangerous (if this happens on a small scale, imagine the disastrous results on a larger scale), the delay will show that failures may not be instantaneous, BUT don't let that stop you...everyone's encountered a blue smoke monster, fix it and move on. LED flareups (see how easy it is to burn out an LED by simply mixing up where the anode and cathode land?), aren't nearly as visually dramatic as I'd hoped, but I do recall making something from a kit about a year ago that just smoked like crazy once I plugged it. I'm not sure what component failed, and it's dead on my workbench waiting for a diagnosis...but it looks AWESOME. So I'm looking for a circuit; I envision a PCB or breadboard with a couple components, I attach a power source (AA or 9v battery), and after a few seconds, smoke. If there's an LED that blinks out after the smoking begins, illustrating that the circuit is dead...that'd be awesome. And, being the perfectionist I am, I'd like to be able to reproduce it reliably for multiple takes. Any suggestions for a circuit that'll do this without unnecessarily endangering myself? AI: As usual, you need look no further than the eevblog exploding capacitors video AND, OF COURSE, AS A WORD OF CAUTION: -wear safety glasses -keep flammables away -test out everything first with a proper DC voltage supply that has effective current limiting and safety measures -do it in an actual lab that has real safety and hazard precautions Not following any of the above is probably not smart [but probably how I would do it anyway ;).] With a low voltage, the biggest danger is probably to actual projectiles. I would just reverse bias a low voltage cap (for the most flare up). You can put a diode somewhere after it that will 'turn off'. I would also put a current limiting circuit at the input to kick in after the cap goes, for safety. You could probably get some nice smoke from any IC that you overvolt with a decently rated supply current. You may need more than a single AA or +9V to get this effect.
H: Reason for anvil and post in LEDs Is there a reason for the anvil and post in a LED having the shape they do - other than making it easier to distinguish between the anode and cathode? AI: Both wires are placed symmetrically with respect to the LED's axis. The die is also placed on the axis. Therefore the cathode wire (which holds the die) has to extend towards the center line. The anode wire is shaped so that you can't pull it out the plastic housing.
H: AM demodulation circuit From the receiver circuit below, which is exactly the part that demodulates the RF signal? I know, a typical circuit used for an envelope detector is composed of a resistor, a capacitor and a diode. Is that similar? I' m a newbie and any help would be appreciated. AI: The demodulation is done inside the chip - the chip produces the output lines that control the motor and this is the general clue about where AM demodulation is done. Bear also in mind that the likely type of modulation is OOK (on-off keying) and this makes demodulation a lot easier because you are detecting the presence or non-presence of the carrier. Counting the number of modulated pulses that the transmitter emits is the likely method of decoding data from the transmitter.
H: How does one estimate the electrical power of a power plant? I've asked several people how a power plant creates power (i.e. currents and voltages) and I found that they were unsure. In addition, I’ve done several searches to get more information, and I was not able to find links to answer my questions. I am very familiar with ac power relationships and all the mathematics behind it. When a power plant creates power like the Hoover Dam, it can provide 2.07 GW of electrical power. My question is what does this mean? I assume from Faraday’s law that the induced voltage across the generator coil produces an current, and this combination (P = VI) is the actual power but I'm sure that my thinking is naïve. Can someone roughly sketch out how the electrical power of a power plant is computed? If possible, what kind of voltages and currents are power plants producing before the Step Up transformers? Of course, this varies from one power plant to another. AI: Your question is very general, and so is this answer. When a power plant creates power like the Hoover Dam, it can provide 2.07 GW of electrical power. My question is what does this mean? I assume from Faraday’s law that the induced voltage across the generator coil produces an current, and this combination (P = VI) is the actual power but I'm sure that my thinking is naïve. Can someone roughly sketch out how the electrical power of a power plant is computed? From a mechanical perspective "2.07 GW" means that the peak output of the power plant is 2.07 GW. This is most likely a series of smaller units, say 20 × 100 MW units = 2.0 GW. The generator is a converter of mechanical energy into electrical energy. So to generate 2.07 GW of electrical energy, an equivalent amount of mechanical energy has to be provided. In the case of the Hoover Dam, the mechanical energy is provided by water falling to a lower elevation, giving up its gravitational potential energy in the process. From this perspective, you can think of the maximum electrical output power of a power plant as the maximum rate at which it can convert mechanical energy into electrical energy, factoring in the efficiency of the conversion process. The rate at which mechanical power is generated is a mechanical engineer's problem. For a hydroelectric station, the mechanical power would depend on the water pressure, turbine size, and various design parameters. For a wind turbine, the mechanical power would be set by the radius of the blades. And so on. From an electrical perspective Yes, the electrical energy produced follows Faraday's Law and Ohm's Law, though for an AC system, V and I are sinusoids which may not be in phase, and P ≠ VI. Rather, apparent power (volt-amperes) S = VI, and real power (watts) P = VI cos ɸ. Other complications include electrical losses (per Ohm's law) and magnetic losses (eddy currents induced in metallic parts). If possible, what kind of voltages and currents are power plants producing before the Step Up transformers? Of course, this varies from one power plant to another. Regarding typical voltages In my experience, small generators (i.e. diesel gen-sets) generate directly at the utilisation voltage, say 415 V here in Australia. Larger power station units generate at a medium voltage like 11kV before stepping up to transmission voltage, i.e. 132 kV. I imagine a medium voltage like 11kV is preferred vs. a high voltage like 33kV, because less insulation is required on the windings and the rotating parts may be physically lighter. Regarding typical currents An aeroderivative gas turbine, i.e. the General Electric LM6000, is typically rated about 45 MW and might have a 60 MVA alternator attached to it. Calculation of the three-phase line current at 11kV is left as an exercise to the reader. Don't forget your √3. A coal power station unit might be rated 400 MVA at 22kV. See "Tarong Power Station" in QLD, Australia, which consists of four large units like this. Again, calculation of the line current is left as an exercise. Note: I am at home and hence don't have access to my reference material at work. The above numbers are indicative, so treat them with a grain of salt. If you are curious as to the exact operating principles and theory of an AC generator, I would encourage you to look up a textbook on electric machinery. My personal favourite is Mulukutla Sarma's Electric Machines. Check your university library for a copy.
H: Maximum *charging* voltage for Li-Ion battery I'm implementing a CC-CV algorithm for charging a li-ion battery. I'm confused what is the maximum allowed charging voltage during CC (constant current) phase. All application notes and datasheets, I've found state that charging in the CC mode continues until cell voltage reaches 4.2V per cell. In order to maintain constant current the charging voltage has to be increased as the cell voltage rises. So, when the cell voltage is close to 4.2V the charging voltage must be higher e.g. 4.5V, and this should not cause any damage to the cell. Is my understanding correct? I'm asking because the power control module in the battery pack I'm trying to charge seems to cut off the circuit when charging voltage is above 4.5V. Edit: Some clarification after Russell's comment. The control algorithm I've implemented is basically taken from Atmel's app note - AVR458: Charging Lithium-Ion Batteries with ATAVRBC100. A similar algorithm is described in app note AVR450 - AVR450: Battery Charger for SLA, NiCd, NiMH and Li-Ion Batteries. Both are simple buck regulators with PWM controlled by MCU. Now let's say that we measure two voltages: Vcell -> this is the voltage measured at battery connection when PWM is OFF Vchg -> this is the voltage measured at battery connection when PWM is ON To be clear I've checked the source code implementation of both. During CC charge phase the algorithm periodically checks if the Vcell > Vmax=4.2V. If not then Ichg is regulated, so that it is ~1C. If so, then CV mode starts. I've asked the question because I see that during charging Vchg is higher than 4.2V, e.g. Vbat=3.9V is and Vchg is 4.3V. Edit2: ** I went to check the source code of both app notes again. In fact the above is true for source code of app note AVR450. The impl in app note AVR458 changes to CV when Vchg >= Vmax (4.2). Since this is consistent with all information I've found and with Russell's answer I think that the algorithm in AVR450 is incorrect. AI: So, when the cell voltage is close to 4.2V the charging voltage will must be higher e.g. 4.5V, and this should not cause any damage to the cell. Is my understanding correct? No. Your understanding is incorrect and your charger is suspect. And/or your description is not quite complete and unambiguous. For information on battery matters for most battery chemistries a good starting point is often the excellent site at Battery University. NB: What I have written below is based both on experience and on input from a wide range of sources, including battery university. Assume for following discussion a manufacturers spec of Maximum current = CCmax (usually 1C for LiIon but may be other for specific cells). Assume CCmax is 1C for the cell in question for convenience. Actual spec will be as per datasheet and is temperature dependant and also depends on how many charge/discharge cycles you wish to achieve before the battery turns to mush and/or is reduced to say 70% of original capacity. Maximum voltage of Vmax - usually 4.2V or less. Say 4.2V for now. As for current, the maximum Voltage applied will affect cell longevity (and capacity on a given charge). Charging at a terminal voltage of much above 4.2V will shorten you cell life, may lead to metallic lithium plating out and can lead to the exciting and equipment eating "vent with flame" battery meltdown phenomenon. Minimum current of Icv_min when charging at Vmax. This is the minimum that current should be allowed to fall to when charging in CV mode. When in CV mode, charging is terminated when current drops to this level. Icv_min is typically set at somewhere between 25% of Icc (early charge termination) and say 10% of Icc (maybe sometimes even 5% of Icc). The lower Icv_min is set the longer current trickles into the battery at Vmax in CV mode. Setting a low value of Icv_min adds slightly to the energy that can be stored in the battery on a given cyccle AND utterly tears the battery apart inside and shortens it life. These two important points apply: The maximum voltage AT the battery (1 cell) under maximum constant current CCmax is Vmax = 4.2V in this case. BUT the maximum voltage AT the battery (1 cell) under ANY current is also Vmax. If the battery will not accept Imax when Vmax is applied then CC mode is no longer appropriate. Charging should be CV (or terminated if Icharge at Vmax is <= Icv_min - see below) An important point here is where you measure what you call "the charging voltage". This is properly measured at the cell electrodes as close to the cell internals as possible. In practice anywhere on the (usually) weld-attached tabs should be OK as at the max allowed current the voltage drop across the tabs should be minimal. As long as the voltage at the actual cell is <= Vmax then the voltage at other points in the charger may be > Vmax if the charger design requires it. Consider: Apply a "true" constant current source to a discharged LiIon cell. There will be lead resistance external to the cell so the voltage elsewhere to the system may be higher than at the battery terminals. Ignore that for now - comment on this at end. For a discharged LiIon battery the terminal voltage will be somewhere around 3V and will slowly rise as CC is applied. After about 40 to 50 minutes of charging a LiIon cell at 1C (= CCmax in this case) from fully discharged the TERMINAL voltage will reach 4.2V. This is where you stop applying CC and apply a CV of Vamx (= 4.2V in this case) at whatever current it takes to keep the voltage at 4.2V (up to a maximum of CCmax.) The following paragraph may sound a little complex but it is important. It does make sense - read and understand if you care about the answer to the question that you asked. It is a fallacy to think that you must apply a higher voltage at the cell to get it to accept CCmax when Vcell is at Vmax. This IS true if the battery is fully charged or is charged above the point in the cycle where Vcell first reaches Vmax when charging at CCmax. BUT that is because you are then trying then to do something which is outside the proper charging "envelope". IF a LiIon cell will not accept CCmax when Vmax is applied it should be charged at not above Vmax until Ibattery falls to Icv_min. If you apply Vmax and Ibattery is below Icv_min then the battery is fully charged and you should remove Vcharge. Leaving a battery connected indefinitely to a voltage source of Vmax when Icharge is less than Icv_min will damage the battery and reduce or greatly reduce its cycle life. Charging voltage is removed when Icharge falls below Icv_min to prevent potentially irreversible electrochemical reactions and to prevent Lithium metal "plating out". If Vmax is set at 4.15V then charge capacity is reduced noticeably but cycle life is extended. If Vmax is set at 4.1V charge capacity is significantly reduced and cycle life is significantly extended. The loss of capacity per cycle that occurs when Vmax is reduced leads to an overall INCREASE in total lifetime capacity as the extension in life cycles rises faster than the per cycle capacity falls. If you care mainly about highest capacity per charge set Vmax as high as allowed and accept low cycle life. If you can tolerate say 80% to 90% of max possible capacity per cycle, set Vmax lower and get more overall energy storage before replacement. The graph below from Battery University article How to Prolong Lithium-based Batteries shows what happens when Vmax is increased above 4.2V. At the end are 3 tables from the same battery University page which show the effects on cycle life from varying various parameters (depth of discharge, temperature, Vmax) Internal voltage versus terminal voltage: There will be internal resistance in the cell so the "real" potential in the cell proper during charging at CC will be less than at the terminals. At CV the internal voltage will approach the external voltage as Icharge "tapers off". IF you want to play 'fast and loose' with all manufacturers' specs and all advice given you can assume that you can 'allow' for this resistance and guestimate a true internal voltage which is lower than the terminal voltage. May the force be with you and with your battery, and may it live long and prosper - but, it probably won't. Three excellent tables from Battery University showing how cycle life varies with various parameters.
H: Creating a small scale bumper car ground power grid I'd like to build a tiny RC car that can run indefinitely without the need to charge. Bumper cars have strips of power on the ground and according to Wikipedia this is how they work: "Uses alternating strips of metal across the floor separated by insulating spacers. The alternating strips carry the supply current, and the cars are large enough so that the vehicle body can always cover at least two strips at any one time. An array of brushes under each car make random contact with whatever strip is below, and the voltage polarity on each contact is sorted out to always provide a correct and complete circuit to operate the vehicle." Has anyone attempted this before on a smaller scale? I'm not quite sure the circuit required to achieve this on a 5V~ scale, and the type of "brushes" that would be required. Any links or direction would be greatly appreciated thank you! Edit: Alternatively I'd love if anyone had any ideas on how to keep a power cable directly above a car as it moves around a closed space (so if there were multiple cars they couldn't tangle on each other's wires). AI: Don't know if anyone had attempted this. But, obviously, this should be possible. This is just an illustration of the rectifier idea, which @jippie wrote in his comment. +1 to him, by the way. At least one contact (brush) should be on a positive strip, and at least one puck up contact should be on a negative strip. This circuit will "sort out" the polarity. More contacts with diodes can be added, if necessary. The insulating gaps between the strips should be wider than the pick up contacts (brushes). This would prevent a short circuit from positive strip to negative strip directly through a single brush itself. I would consider a supply voltage higher than +5V, which is mentioned in the O.P. Perhaps +24V. But, this will be dictated by the choice of motors.
H: Finding the amplitude response of an LTI system I'm asked to find the amplitude response of an LTI system described by the difference equation: $$ y[n] - ay[n-1] = x[n] $$ After taking the Fourier transform of both sides and some math, I get the frequency response: $$ H(e^{jw}) = 1/(1-ae^{-jw}) $$ But how do I get the amplitude response from this? I know the amplitude response is $$ |H(e^{jw})| $$ but I'm unsure how to "get the length" of my frequency response. I have a feeling this is a simple math problem that I'm misunderstanding. (Disclaimer: this is a question on a past final that I'm using to study. I have the answer to the question (and will post if proof is needed), but I want to understand the method) AI: Although you are in frequency domain you still should be able to get all parameters as you were in time domain. They are different domains but they both should represent the same thing. Time domain represent things in terms of amplitude in respect to time. Frequency domain represent things in terms of amplitude AND PHASE in respect to frequency values. Note that you should have both amplitude and phase in frequency domain, since in the time domain the phase can be represented in the same plot by a shift. One way to represent these things in frequency domain is by dealing with complex numbers. Complex numbers can be viewed as vectors in a 2D space which have a length (as you said) and an angle. The length represents the output/input ratio and the angle represent the phase shift in comparison also to the input. So, answering your question, you should calculate the H length to find your output/input ratio. To help you, imagine that: \$e^{jw}=cos(w)+jsin(w)\$ In other words, its a complex number with always length of 1 and angle \$w\$ You can solve this by two methods: -Vector method: imagine that number 1 is \$Z=1+0.i\$ which is a vector to the right, with length 1 and angle \$0\$. Imagine that \$e^{jw}\$ is a vector that I showed right above Now add them. Then divive vectors 1 by the vector that you've found. -Cartesian Coordinates: represent all in terms of \$Z=a+jb\$ and also \$e^{jw}=cos(w)+jsin(w)\$ and imagine that you have: \$\large Z = \frac{Z_1}{Z_2+Z_3}\$ and then find length of Z by: \$|Z| = \sqrt{a^2+b^2}\$
H: I2C on PIC12s using MPLAB x (win7) and XC8 I am from a programming background, but very new to microcontrollers. Pardon me if this question is very basic, or doesn't make complete sense. I'm trying to bootstrap my knowledge, and the learning curve appears to be steep in some areas. I am trying to get I2C working with a new IC I purchased, the PIC12LF1552. This IC comes with an I2C module in it, so I shouldn't have to bit-bang. However, It seems like XC8 doesn't support I2C on the PIC12 series. MPLAB X can't seem to find the ic2.h include file (this may not actually be a problem, it could be paths are not setup correctly), so I linked the file with a full path. i2c.h includes pconfig.h on line 32, and pconfig.h includes p18cxxx.h on line 16, which seems like it won't work as it's for a different chip series. So my question is, what support is there for running native I2C on PIC12 series ICs? AI: It depends on what you mean by "support". Just because there may not be a canned library doesn't mean you can't use the peripheral. The XC compilers offer direct access to the special function registers and interrupt capabilities of the target device. You can just as easily configure the I2C peripherals and handling routines in C as you could in assembly language. The device datasheet will include all the details for setting up these peripherals. Just read the datasheet, write the necessary values to the necessary SFRs and poll/interrupt as needed. (It's often easier to code this way, as you're not reliant on closed-source libraries that may not do exactly what the advertise.)
H: Parallel NOR Flash ROM in-system programming issue (Micron M29F160) I'm attempting to program a Micron M29F160 Flash ROM (datasheet) that is memory-mapped into a larger system, and I want to program it from the external interface of that system, but I can't seem to get it to work. I have had success programming the chips directly, using a microcontroller as a USB bit-bang interface like so (sorry for the ASCII art, I forgot my mouse today, so at least this is better than attempting a diagram in Paint with a trackpad...): -------- --------- | |--{A[19:-1]}-----| | [PC]--(USB)--| ATmega |--{D[7:0]}-------| M29F160 | | |--{/CE,/OE,/WE}--| | -------- --------- The system in question contains a single ASIC that sits between the external interface (a typical parallel memory interface with 24 address lines, 8 data lines, /CE, /OE, and /WE) and the ROM chip, and handles the memory mapping. The ASIC also contains internal registers and other functions, but for the sole purpose of reprogramming the ROM, they are not relevant. Physically, the system looks like this, with each address, data, and control signal connected to a physical pin on a card-edge: -------- --------- /-{A[23:0]}------| |--{A[19:-1]}-----| | (Card edge)--{D[7:0]}-------| Mapper |--{D[7:0]}-------| M29F160 | \-{/CE,/OE,/WE}--| |--{/CE,/OE,/WE}--| | -------- --------- I'm using the same microcontroller, with roughly the same code, to attempt to write to the system containing the memory-mapped Flash ROM (obviously, the code is modified to account for the memory map address translation, but that's the only real difference. So, when I connect my microcontroller to the card edge, it looks like this: -------- -------- --------- | |--{A[23:0]}------| |--{A[19:-1]}-----| | [PC]--(USB)--| ATmega |--{D[7:0]}-------| Mapper |--{D[7:0]}-------| M29F160 | | |--{/CE,/OE,/WE}--| |--{/CE,/OE,/WE}--| | -------- -------- --------- For the purposes of ROM mapping, the signals out of the mapper basically just mirror the signals it receives on the input, with the exception of the address being re-mapped, so this is how the mapper responds to the following read command on the cart edge: *Pull /CE, /OE, and /WE high on cart edge -Mapper pulls ROM /CE, /OE, and /WE high *Set address which is mapped to the ROM on the cart edge address bus *Delay to satisfy address hold time *Pull cart edge /CE low, then /OE low -Mapper latches address from cart edge -Latched address is mapped to ROM, so re-mapped address is set on the ROM address bus -Mapper pulls ROM /CE low, then ROM /OE low -ROM responds to read command with data -Mapper assigns cart-edge data bus to ROM data bus value *Delay to satisfy data setup time *Read data bus *Pull cart edge /CE and /OE high -Mapper pulls ROM /CE and /OE high and tri-states the ROM data bus** **I'm not sure if it's actually tri-stating it or if it's driving it low, but my logic analyzer shows the ROM data lines going low once /CE goes high, even though the cart-edge data lines stay the same until the next write. In any case, when /CE goes high, the mapper no longer drives the data bus. This works fine. I can read out the entire contents of the ROM through the cart edge this way. Unfortunately, attempting to write to the ROM does not assert the ROM /CE signal low as it should, though it DOES pull the ROM /WE signal low. Apparently, the mapper knows that the device in the ROM address space is read-only (originally, it was a mask ROM, I replaced it with a Flash EEPROM), so the mapper doesn't select the chip when I attempt to write to it. However, this is simple enough to overcome with a little glue logic. Instead of directly connecting /ROM_CE = /MAPPER_CE_OUT, I cut the trace and added a single AND gate so that /ROM_CE = /MAPPER_CE_OUT AND /MAPPER_WE_OUT. Doing so doesn't hinder reads at all, because with /MAPPER_WE_OUT held high, the output of the AND gate tracks /MAPPER_CE_OUT exactly the way it would if it was connected directly (other than gate delay), but for writes, pulling /MAPPER_WE_OUT low pulls BOTH ROM /CE and ROM /WE low, which should work, as the M29F160 datasheet shows that it doesn't matter which signal goes low first, and there is 0ns delay required between the two signals going low (same for the rising edge at the end of the write cycle). So here's what happens for a write cycle: *Pull /CE, /OE, and /WE high on cart edge -Mapper pulls ROM /CE, /OE, and /WE high *Set address which is mapped to the ROM on the cart edge address bus *Set desired data on the cart edge data bus *Delay to satisfy address and data hold times *Pull cart edge /CE low, then /WE low -Mapper latches address from cart edge -Mapper assigns ROM data bus to cart-edge data bus value -Latched address is mapped to ROM, so re-mapped address is set on the ROM address bus -Mapper pulls ROM /WE low, but ROM /CE remains high -Glue logic pulls ROM /CE low *Delay to satisfy data setup time *Pull cart edge /CE and /WE high -Mapper pulls ROM /CE and /WE high and disables the ROM data bus So, anyway, after all of that explaining, all that really matters is the actual signals, right? So, to start off, here is the actual write-cycle diagram directly from the datasheet for the Flash ROM: I won't post all of the timing parameters here, but you can find them in the datasheet. I will, however, note a few of particular relevance: tWLEL - /WE low to /CE low: 0ns min (no delay necessary between the two, good news for my glue-logic /CE driver) tEHDX - /CE high data hold time: 0ns min (data is latched immediately, which is good since the bus goes Hi-Z or low shortly after /CE goes high) tAVAV - Address valid to next address valid: 55ns min (my code takes 10us per cycle, so I'm nowhere near the minimum timing constraints) Now, as to what I'm actually getting, I only have an 8-channel logic analyzer, so I was only able to monitor 4 bits of the data bus, though I did run the same test 3 times, for D[7:4], D[3:0], and also for A[3:0] just to be certain that the address bus was getting asserted for writes to the ROM, since I wasn't positive that was actually happening, since /CE wasn't being pulled low, but the address bus WAS driven properly. The LA screenshots are too big to post inline without them turning out terribly, so I'll just link them. Shown in the screenshot is an attempt to write the erase command to the chip with the following code: ROMWriteByte(0xAAA, 0xAA); ROMWriteByte(0x555, 0x55); ROMWriteByte(0xAAA, 0x80); ROMWriteByte(0xAAA, 0xAA); ROMWriteByte(0x555, 0x55); ROMWriteByte(0xAAA, 0x10); while(ROMReadByte(0x0000) != 0xFF); The logic analyzer is connected directly to the ROM pins (other than /CE_OUT, that's the mapper's output pin which I cut and fed into the AND gate), so what you're seeing is what the ROM is seeing Here is the logic analyzer results for the upper nibble of the ROM data bus: Here is the same thing zoomed in so you can see the timing better: I don't have a screenshot for the lower nibble, but the results were the same. Everything looks to me like it should be working but no such luck. If the command were successful, the read loop should be returning a byte containing status flags as bit-fields until the write operation completes, at which point, the read would return the value at ROM address 0x0000, which should be 0xFF after a successful erase. Instead, the writes are simply returning the current value of address 0x0000 (which is currently 0x88), indicating that the erase command never occurred, so the ROM just continues in read mode like normal. I'm really stumped here... I'm really hoping somebody can spot something that I'm missing. AI: It has been brought to my attention elsewhere (I posted this on a couple of different sites), that /OE is low during write attempts. That might have something to do with it... derp.
H: Altium footprint Wizard SOT669 Anyone know if the footprint wizard in Altium can be used to generate SOT669 package footprints? It appears to me that its only capable of 3 lead MOSFETs. I searched the web and couldn't find anything, I don't mind making footprints by hand but its a standard form factor and I'm a little confused why its not an included option. Someone feel free to correct me if I am missing something entirely within the options on Altium. AI: Altium seems entirely happy to generate DPAK-style footprints with arbitrary numbers of leads and arbitrary pitch: You may have to override most of the default dimensions, but that should still be easier then doing it manually.
H: Removing solder effectively I have an Epihpone (Les Paul 100, fairly standard) electric guitar, which over the years have gotten to suffer from a non-functioning bridge pickup. I verified this using an ohm-meter, the result being that only the neck pickup gave a signal (also apparent from plugging it into my amplifier and playing) at 20K. In order to repair it or replace it, I am attempting to disconnect it from where it is soldered on; at its volume-meter (see pictures at the bottom). I did attempt to remove the solder by heating it and the surrounding area, and use a solder sucker, but the solder would not melt - even after prolonged exposure to the heat from the soldering iron (30W, fairly standard). My question is, would I be better off using a solder gun? Clearly it gives off more temperature, hence making it easier to melt the solder, but I am somewhat concerned of also harming the nearby wiring (which mostly are not long enough to cut and re-solder on). I made sure to let the iron reach peak temperature and to tip it with some solder beforehand, but the solder barely melted. I guess an alternative would be to cut the wire rather than melt the solder, but I would at any rate have to re-solder a new one on at some point. Any suggestions on the optimal way of getting rid of this piece of solder would be appreciated. Appendix: Results I did the following: Used a 175W solder gun to melt away enough solder to get a better hold of the wire. Cut the black (hot) wire as close to the solder joint as I could. Used the 30W solder iron (pointy tip) to melt away more around the remaining two black wires (bottom of picture 1). Cut as close as possible to the joint for these two as well. Melted the smaller solder joints for the white wire and red wires, allowing them to be pulled away. In total I lost only 4-5 millimeters of wire from the pickup, and slightly toasted a few nearby wires, but not so badly that they took any substantial damage. Also, I tested the pickup (directly on the wires of the detached unit with 20K ohm) which showed that in fact the pickup is functional, giving ground to assume some fault with some other wire, part, or joint. At any rate, replacing the volume-meters and tone-meters is not costly, and re-soldering them should yield better connections. AI: The problem you are facing is that 30W can't produce enough heat to melt solder that is in contact with a lot of metal and consequently works as a heatsink. Best option is to buy a temperature controlled soldering iron that has a higher wattage, the advantage of that is it can reheat the tip very fast when it detects that the temperature is dropping by providing 50w or 70W or even more (depends on the model). The cheap alternative is the heat gun which is powerful enough to melt the solder but has no temperature control so it's up to you to control the applied heat. My suggestion if you intend to use the heat gun is to put some solder paste (avoid inhaling the fumes) on the solder you want to remove which will help it melt when heated, place a desolder braid over the solder and heat it with the gun from the opposite side (The order is I mean is in layers from bottom to top : solder / paste / braid / soldering iron , in a sandwich fashion). This way you will be able to remove the solder little by little without overheating too much the surroundings by sucking the solder in the braid as soon as it melts . Finally there is always the despair solution which is to cut the wires as close to the end as you can and resolder them to the new plug (assuming they are long enough)
H: What's wrong with my Comparator (Hysteresis) My intention is to design a comparator to be used to sense the voltage change in the sensor. Exploring further into comparator's I got that, I must implement Hysteresis to avoid unnecessary switching and use the design in harsh environments. Below is the circuit diagram and R5 is output change from the sensor Here is the simulation graph: I am unable to understand the sharp fall and rise between the resistances 190K and 370K. Since I am using Hysteresis, the comparator must operate in saturation region always. What can be issues? AI: You are using an operating point analysis (.op) with a sweep of the resistor value. In an operating point analysis there is no concept of time, so the comparator doesn't really know whether the input is rising or falling. To simulate this circuit you need to use a transient analysis an just vary the voltage on in using a piece-wise linear (PWL) voltage source.
H: Solve for power over a resistor I'm studying for my final and the instructor isn't in for questions. I'm stuck on a practice exam problem. No calculators are allowed and I don't expect that nodal or mesh analysis will be required(though it's not out of the realm of posiblity, he's never had any problems that required it before because of time constraints). Is there something simple I'm missing, maybe involving power conservation? I've tried mesh and nodal analysis and superposition and I'm pretty sure I'm screwing them up, because I'm not getting "pretty" answers, let alone the ones on the exam. No calculators are allowed, so everything should be a clean fraction or a whole number... As an aside, is there a good web application or something I can use to show my work in questions here? The problem is to find the power in the 10 ohm resistor. a- 0 W b- 1.6 W c- 12 W d- 160 mW e- Other For superposition: Current source open: $$\frac{20V}{20ohm} = 1A$$ Voltage source short: I see a current divider, so: $$2A * \frac{6}{20} = \frac{3}{5}A$$ Total = $$\frac{8}{5}A$$ $$\frac{8}{5}A * 10ohm = 16V$$ $$P = \frac{V^2}{R}$$: $$\frac{16^2}{10ohm} = 25.6 W$$ But that's not an option ... (unless it's "none of the above," and I'm pretty sure he just puts that in in case he messes up the question) AI: Your current division is not done correctly. As you might recall, the greater current is through the lessor resistance. Thus, you should expect the current through the right branch to be less than the current through the left branch. Current division is the dual of voltage division which means that voltage is replaced with current and resistance is replaced with conductance. If you want to find the current through the branch with conductance G1, the formula is: $$I_1 = I_S \dfrac{G_1}{G_1 + G_2} = I_S \dfrac{R_2}{R_1 + R_2}$$ In other words, to do current division with resistances, the numerator is the resistance of the other branch, not the branch for which the current is to be calculated.
H: Measuring water pressure in a tank I am trying to build a pressure sensor ( PSI gauge ) that will be used to measure and monitor the pressure in a pool water filter. These generally have a mechanical pressure gauge like this.... What I want to do is use this Freescale Pressure Sensor so that I can electronically monitor the water pressure in the filter. However, it is not waterproof and would mostly certainly be destroyed in little time if used to measure the pressure of a liquid. Anybody have any idea or experience with use such a sensor in a manner that provides accurate readings while protecting the sensor from the water? Any other methods that work well for this sort of thing? Cost is a factor here. I can't spend a lot of money. Edit: might something like this water pressure sender for cars work? AI: Omega is a good source. There are probably cheaper solutions. But in my experience Omega Stainless Steel Transducers are bullet proof. http://www.omega.com/pptst/PX309-100mv.html
H: ICD3 + PIC + MPLAB: Target Device ID 0x0 does not match expected Device ID We designed a board with a Microchip PIC24HJ256GP610A on it. We've successfully used an ICD3 to program and debug the PIC on the Explorer 16 development board. We think we've followed the design guidelines found in Debugger's User's Guide: Edit: We use a 4.6k pullup resistor between MCLR and VDD. Our PCEG/PGED interface are pins 26/27 on the PIC. These lines are exclusively connected to the chip and not used for anything else. We power our board externally and the PIC is connected to this power supply circuit (3.3 Volts, enough power from this source). Edit: We use some decoupling capacitors on our supply rails (C2, C8, C9 and C16, C18): However, when we try to connect and upload our program to the PIC, we get the following message in MPLAB X's output window: Target detected Target Device ID (0x0) does not match expected Device ID (0x77b0000). This is an excerpt from our board's layout: Can someone see the error or explain what could go wrong? AI: Edited per the updated information provided. 0x0 generally means no communication. Either a bad device, bad connections on the ICSP or power issues. I'll trust that your 3V3 rail 'works' for now. Your _MCLR resistor and use of ICSP port 1 should pose no issue with the debugger. Do you have sufficient decoupling, per the PIC24 datasheet? Decoupling capacitors must be installed as physically close to the PIC24 as the layout and pinouts permit: You can see that for every \$V_{DD}\$ and \$V_{SS}\$ pair, you need a 100nF ceramic cap, and a 10 microfarad cap at \$V_{CAP}\$. What is shown in your schematics for the 3V3 rail doesn't appear to be sufficient, and more importantly, you don't have anything on \$V_{CAP}\$ (which is very bad.) Per page 20 of the datasheet: A low-ESR (< 5 Ohms) capacitor is required on the VCAP pin, which is used to stabilize the voltage regulator output voltage. The VCAP pin must not be connected to VDD, and must have a capacitor between 4.7 μF and 10 μF, 16V connected to ground. The type can be ceramic or tantalum. Refer to Section 24.0 “Electrical Characteristics” for additional information. Fix up your decoupling and let us know what happens.
H: Why isn't my SysTick_Handler() being called in my LPCxpresso C++ Project? I have created a C++ project for an LPC1227 using LPCExpresso 6.1.0. The project, up until now, builds and runs fine. I have not made any changes to cr_startup_lpc12xx.cpp. I would like to add a SysTick_Handler(). In my main.cpp I have added a method: void SysTick_Handler(void) { timerCounter++; // these variables are all declared globally in main.cpp timer_10ms_tick = true; if ((timerCounter % 10) == 0) //every 100ms { timer_100ms_tick = true; } if ((timerCounter % 100) == 0) //every 1000ms { timer_1000ms_tick = true; } } I have also add the following line in my main() method: SysTick_Config(12000000/100); When I run my code via debug, the interrupt is firing, but it is getting stuck in the default SysTick_Handler() that is inside of cr_startup_lpc12xx.cpp (which is just an infinite while loop). If I delete the default SysTick_Handler from cr_startup_lpc12xx.cpp, my program hard faults. I have looked at the Blinky example (which is C, not C++) and it adds a new handler into main.cpp without deleting the handler from the startup file. Can anyone suggest why my overriding handler is not being called? Is this a C++ difference? AI: From https://rowley.zendesk.com/entries/20986562-LPC1114-IRQ-Handlers-in-C-work-in-C-do-not-work You need to declare your interrupt handler as a C function otherwise the function will not override the default handler. So for example you could do something like the following to make the declaration work in both C or C++: #ifdef __cplusplus extern "C" { #endif void irq_handler(); #ifdef __cplusplus } #endif I assume changing irq_handler() in the code above to your SysTick_Handler code will then work. e.g. extern "C" { void SysTick_Handler(void) { timerCounter++; // these variables are all declared globally in main.cpp timer_10ms_tick = true; if ((timerCounter % 10) == 0) //every 100ms { timer_100ms_tick = true; } if ((timerCounter % 100) == 0) //every 1000ms { timer_1000ms_tick = true; } } }
H: Prototyping an antenna array receiver Disclaimer: I am decent with math/theory, but I have zero hardware knowledge (apart from some basic microcontrollers). I'm looking to build a (possibly crude, but functional) hardware prototype of a receiver with an antenna array. The application involves frequencies in the 2.4 GHz ISM band. I am experimenting with array processing algorithms and would like to be able to play around with the array geometry a bit. I would also like to do most of the processing in software. Given my background though, I have very little clue how to start. In particular, I've been trying to read data sheets for various types of components, but I can't figure out what the components expect as input and what they output. Here's what I've figured out so far: I'll need a couple of antennas, of course, close enough so that I don't get spatial aliasing. The antennas will need to be connected to an RF front end, which does the downconversion. At some point, I'll need an ADC for sampling, and then I'll need a 'bridge' into software. Assuming what I just described at least makes a little sense, here are my questions: How do I bridge the RF front end and the ADC? How do I bridge the ADC and the software part? Can I make things a bit simpler?, e.g. can I try oversampling the received antenna signals and then just doing everything in software from there? Additionally, is there a decent resource for learning about practical RF circuitry and prototyping? I think that is perhaps where I am weakest and need the most help. Thanks! AI: 1- an RF Receiver is what you want to sit between the Antenna and ADC. Something like the Lime LM6002 or the AD9361 transceiver IC's might make this a lot easier. There are Eval boards that mate up with FPGA eval boards for an easy (Expensive) solution. Do you need to have these two channels to be coherent? 2- An ADC might have 2 channels (I and Q) of digitized data clocked at 75 or 100 MHz, depending on the bandwidth of the signal you're trying to receive. Perhaps at 12 to 14 bits of bit width, so 1.8GBit/Sec of data to process. This generally goes into an FPGA to do downconversion and digital filtering, with the lower data rate info from the FPGA moved into a DSP for signal processing. 3-You can't really oversample a 2.4 GHz RF signal with a current technology ADC. There are several things that might make this easier. Doing this on the FM broadcast band would make this much simpler, as the bandwidths and frequencies are much lower, and easier to deal with. Using narrow band channels for your Experimentation would also help, as that would reduce the RF BW, and reduce the bitrate out of the FPGA. (Edited to add TV Tuner Dongles) Another dirt cheap possibility is to use a TV Tuner dongle which would work for FM broadcast band. Using that and GNU Radio would take care of a lot of the hardware issues, but wouldn't support the 2.4 GHz ISM band. Some more details here http://sdr.osmocom.org/trac/wiki/rtl-sdr
H: Could 8V of power be safely put onto the 3V3 input of an Arduino Uno? I have permission to access a (borrowed) Arduino Uno, and the documentation says it can be powered with 3.3 Volts from the 3V3 pin: 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA. http://arduino.cc/en/Main/arduinoBoardUno However, I would like to use a 24V DC power source. The safe range is supposed to be 6V-20V. If I could get a transformer in place to change the 24V DC to 8V DC, could I apply that 8V to the 3V3 input (without frying the board)? AI: Connecting anything much above 3.3V (as in say 3.6V) to that rail would fry the Arduino. A transformer only operates with AC voltage not DC, so the best way for what you want to achieve is a step-down regulator also known as a buck converter. Variable ones that can accept 24V DC and output 3.3V (be careful to adjust it before connecting) are available on e-bay. Here's the first example I found: DC Adjustable Voltage Buck Converter 4.5-25.5V to 3-24V Step-down Power Module But important: I'd taken at face value that your statement was correct that it was OK to power the board from 3.3V over that line. As Peter Bennet correctly states some parts are actually 5V based and the 3.3V rail is the output of a regulator. Without removing the regulator and knowing the exact consequences that isn't a good idea. Instead you should consider setting the regulator for say 8V and connect it to the 6V-20V input socket on the Arduino where you'd normally apply an external power supply / wall wart etc. That gives you a bit of extra safety if the adjustment on the regulator ever gets changed or drifts a bit.
H: What is the difference between JTAG and EJTAG? I want to know what is the difference between JTAG and EJTAG? I know about JTAG as it's a hardware tool used to examine the memory and registers. Correct me if I'm wrong. AI: JTAG is more than examining memory and registers, see EEVBlog 499 - What is JTAG and Boundary Scan? [JTAG] was initially devised by electronic engineers for testing printed circuit boards using boundary scan ... [and] is also widely used for IC debug ports. In the embedded processor market, essentially all modern processors implement JTAG when they have enough pins. Embedded systems development relies on debuggers communicating with chips with JTAG to perform operations like single stepping and breakpointing. EJTAG is a MIPS extension of JTAG EJTAG Re-Uses IEEE JTAG Boundary Scan Pins for Basic Debug Interface To keep on-chip costs low, and to minimize any target system overhead, the MIPS EJTAG utilizes the widely used IEEE JTAG pins for its debug functions. Using special debug circuitry on-chip, the EJTAG provides run control, breakpoints on both data and instructions, real-time Program Counter trace. In addition, individual licensees can add additional features when desired. Such features could include complex breakpoints and execution profiling features. On-chip debug provides some new tools for debugging embedded CPUs that avoid the limitations of traditional hardware debug tools. For example, it is not possible to use a logic analyzer to track operations that take place between the CPU and the on-chip data and instruction caches. But, on-chip EJTAG can track these operations. Also, using In-Circuit Emulators with high speed systems is often problematical because they affect the bus loading characteristics of the system and can induce "tool-related" bugs into the system. In addition, they are rarely available for on-of-a-kind system-on-a-chip. Finally, some solutions require special bond-out chips that provide extra control signals and busses. But, this is additional design overhead in both chip and board design and it adds more precious time to the product cycle. EJTAG obtains the same results without the additional time and cost. EETimes: non-intrusive on-chip debug ...
H: What effect does selecting the wrong load capacitance for a crystal have? I've seen questions such as this one and this one that talk about selecting capacitors that, in series, match up as closely as possible to the load capacitance of the crystal. What effect does selecting the wrong capacitance have? Does it skew the frequency, alter the shape of the waveform produced, or something entirely different? Is there an obvious correlation between too low and too high capacitance? Is it a case of slight errors, or orders of magnitude? AI: May not oscillate. May not oscillate reliably. May have low to very low output. May oscillate on wrong frequency (may be an undertone or an overtone). For extra points may jump between modes (not usual) May start up very slowly. And/or not always. May produce less sinusoidal waveform than expected. May shatter crystal (not usual in modern applications). May work perfectly. Factor of 2 in capacitance usually OK, but not always. Note that some ceramic cap compositions are far worse in tempco, initial accuracy and general stability than others. Depends on IC used, layout, how Murphy is feeling and phase of Moon. Layout can be extremely important. Loop area enclosed by capacitor and crystal leads forma part of the oscillator circuit. Manufacturers often give quite specific advice on crystal and capacitor layout. Note it. Crystal oscillators approach more closely to analog and to black magic than sane people want to get on a good day. In many cases they "just work" and the arcanery is well hidden. You MAY find that capacitance that is off by a factor or 2 or even 5x still works OK. Or, you may not. When they don't work as hoped they can be most obdurate obstinate obnoxious odious and generally overwhelmingly annoying.
H: Can anyone explain this high-frequency "alien voodoo black magic"? I was casually watching Mike tear down a spectrum analyser (13:30 is the relevant part, 16:50 is the awesome part), and he came across what he aptly described as "weird messed up alien voodoo black magic stuff": As a layman, I can only nod in agreement with his description. Do we have any sufficiently experienced alien-voodooologists around to explain what this madness is all about? AI: I think this blog post answers your question pretty well :) Demystifying RF Circuit Design – The art of Voodoo In short, the 3 main components illustrated are: hair-pin type band-pass filter distributed element low-pass filter (regularly-spaced rectangles 'dumbells') series LC resonator (the radial stubs off one side of the trace) See the referring page for details about how they work, and which-is-which.
H: Op-Amp Design Resistor Values vs. Actual Values - Gain Calculation I have created the following differential op-amp circuit with the aim of converting a 0-3.28V analog signal into a -10V to +10V output. I have calculated the gain required 3.28/20 = 6.1 From looking at differential circuits the gain is equal to the ratio of resistors used so I chose a 10k and 61k. However when testing the circuit I needed close to 74k to get the required output range. Can anyone explain why there is such a difference between the design values and the actual resistor values? PS. The voltage divider in the top left is to provide the midpoint value 1.64V for the circuit. This should really be added as a comment but need to add the link. I found a formula on the following website, maybe I misinterpreted it. http://cnx.org/content/m13778/latest/ Clearly this is not the case, thank you for your explanation, it is by far the easiest to understand that I have seen so far. AI: First, look at the signal gain from the non-inverting terminal (setting the rheostats to 0) $$\dfrac{V_{OUT}}{V_+} = 1 + \dfrac{69k}{10k+1.91k||10k} = 6.95$$ The voltage at the non-inverting terminal is $$V_+ = V_2 \dfrac{69k}{10k + 69k} = V_2 \cdot 0.873$$ The overall signal gain is thus $$\dfrac{V_{OUT}}{V_2} = 6.95 \cdot 0.873 = 6.07$$ Which is very close to the desired value. How did you arrive at the conclusion that 61k and 10k should give the correct gain?
H: Logic analyzer: multiple circuits, one ground I will receive soon my first logic analyzer but I'm wondering something: There's only one ground on the analyzer. What if I want to measure at the same time two circuits with two separate power supplies? Can I just use one ground? Should I bridge the two grounds together? (Should be possible as it's the same voltage and I think the sum of current of the two circuits is lower than the maximum current on the ground of both individually.) AI: You should not attempt to measure signals with different ground references on the same logic analayzer. It might look like it's working and it might actually be working but you can never be certain that it is. Possibly, somewhere down the line there is a common ground, or maybe there are faults in your house wiring and that's not effectively the case. At some point, something weird will happen and you'll curse at your setup until you determine that the issue was the lack of common grounds. Save yourself that trouble now - don't rely on a flawed test equipment configuration. There must be one ground common to all of the signals you are trying to measure on the same logic analyzer.
H: Water Sensor to detect backed up drain pipe? Trying to detect when a drain pipe, filled with water from a washing machine pump, starts to get backed up. Since the water is being pumped through, a simple water detector is not enough. And since the water is being pumped and draining, but slowly (Too much water volume for the pipe in a small amount of time), I don't know if a float sensor will work (downward movement from pump, upward movement from backing up). Also, the pipe is about 2.5" in diameter. The sensor should interface to a 3.3v or 5v level, or simply open drain, but I can figure it out from there if I need to level shift. It should be water tight to prevent shorts or anything (Though I don't know the proper safety method for this). Is there any standard way of doing this? The microcontroller (a msp430) will not be submerged or anything, just the sensor. Edit: Picture/Diagram as requested. Setup is essentially exactly the same. Pumped water goes down "standpipe", as does the backflow up. My main access is only at the section marked "Indirect Connection, a 2~3" diameter pipe. The Waste Stack is probably 4~5" diameter. There is a sink that is in parallel with the washer machine, and water sometimes backflows out of there instead of the "indirect connection", as it is a few inches lower. Ideally, the sensor could fit and work right above the trap in the diagram, without clogging the pipe itself. I might be able to add a t-pipe between the trap and waste pipe, but I want to avoid that if I can. AI: I once had the exact same problem. My drain pipe was only just a little bit slower than the drain pump in the washer, so the water rose relatively slowly, but fell quickly when the machine was shut off for 5 seconds. My switch would activate several times on every drain cycle, and effectively managed the problem. (And yes, before building my gadget, I did try to unclog the drain itself, but as it ran some 20 feet across the basement, embedded in the floor slab, I didn't have much luck with that. I suspect that it simply hadn't been installed with enough slope, and fixing that would have required jackhammering it out and installing a new one.) I used a float switch that came (IIRC) from an old dishwasher. The wires were kind of short, so I simply extended them by soldering and then heat-shrinking the joints. The switch has a square base with four mounting holes, so I fashioned a simple L-bracket to hold it upside down inside the top of the drain pipe, with the L-bracket simply taped/zip-tied to the outside of the pipe. This meant that the switch became normally-closed, and it opened if the water rose too high. The control box plugged into the wall, and then the washing machine plugged into the box. It contains a 25-amp SSR and a small isolated 12VDC power brick, so the control circuit is completely isolated from the line power. The float switch triggers a 555 timer that cuts off power to the washing machine for 5 seconds each time it opens, which in my case was about right to allow the pipe to drain sufficiently. Obviously, this was an older machine with an electromechanical timer, which was unfazed by such treatment. I don't know if this would work with a modern microprocessor-based washing machine. We used it for quite a while, until we moved out of that house. That was 20 years ago, but I still have the switch and the control box. If you're having trouble visualizing any of this, I can take a picture or two.
H: Calculate Resistor Value for Optocoupler - 24VDC Anode I'm looking for help and unfortunately stuck for time on a project, so hoping someone wouldn't mind helping me out. I am trying to calculate the resistor value required for an opto-isolator circuit. I am powering a 24DC magnetic reed switch passing ground through a Siemens SFH615A: http://docs-europe.electrocomponents.com/webdocs/009c/0900766b8009c194.pdf Can someone recommend a resistor value, thank you very much. I have used the calculator available here: http://led.linear1.org/1led.wiz with a 24V supply, 1.5 forward voltage and 60mA forward current. I would be grateful if someone could double check AI: The resistor value is calculated like any common LED $$ R= \frac {V_{in}-ledV_F}{I_{LED}} $$ The actual value depends on the current you want through the LED For 60mA and typical VF= 1.25v $$ R= \frac {24v-1.25v}{{0.060A}}$$ which results to about 380 Ohm If you want to calculate for VF= 1.5v $$ R= \frac {24v-1.5v}{{0.060A}}$$ which results to about 375 Ohm Peter Bennett made a good point in the comments below about the resistor power rating, make sure it is appropriately sized. The resistor power is calculated as $$ P= {I}^2 * R = {0.06}^2 * 380 ohm = 1.368W $$ so a 2W resistor should be good enough
H: Calculate rated power(P) of transformer? I have a transformer-type PT 13/2/6 as the following page (Versions 34 to 37 from 68). Image like this: The voltage between points A and B is V AB (primary)= 230 vac The voltage between points C and D are V CD (secondary 2) = 6 Vac The voltage between points E and F are V EF (secondary 1)= 6 Vac I have 2 loads, first load 5VDC/2.5A put on EF and second load 12VDC/1A put on CF(DE shorted). My question: How much total power do I need? Is power rate 13VA enough? AI: No - you cannot reasonably expect to do what you are trying to do. You are attempting to draw more power from the transformer than it is designed for and MUCH more power from one winding than it is designed for. I have 2 loads, first load 5VDC/2.5A put on EF and second load 12VDC/1A put on CF(DE shorted) I'll take the VA rating as the same as DC Watts drawn - close enough in this case. 5V x 2.5A = 12.5 Watt 12V x 1 A = 12 Watt. The 5V load is all on winding EF . The 12V load is 50/50 on CD and EF. So CD load = 12W/2 = 6W. The EF load is 6W + 12.5W = 18.5W. A transformer with two identical secondaries is usually designed to allow a maximum of about 50% of total power to each. You can unbalance them slightly but if you take all power from one winding you'll usually get extra losses and possibly transformer failure. Here each winding is rate at about 13 VA/2 = 6.5 VA each. You are trying to draw 6W from one winding (= OK) and 18.5W from the other (about 3 x overload). Overall you are trying to draw 18.5 W from a 13 VA device ~= 40% overload. You need a larger power rated transformer or smaller loads.
H: Logic level converter for H-bridge and UART for Raspberry Pi Here is my situation: I'm using a raspberry Pi to control a H-Bridge. The H-Bridge is not tolerant of both it's inputs being high logic value, which causes a short through the transistors, bypassing the motor. Because the H-bridge requires a 5V input, I slapped together this disaster: Getting rid of floating input in a logic level converter Now, as i understand, that circuit sinks current to the RPi, which is not only dangerous, but also crashes the Pi. Not only that, but the RPi boots with the output pins floating, which causes the logic level converter to output 5V, shorting the H-bridge as mentioned. At, first I got around the issue with having a manual switch disconnect the H-bridge until I could set the RPi pins as outputs, the current sinking was tolerated. Now, I connected UART also through this converter(TX) and a voltage divider(RX) and it just crashes the Pi-s UART, I think it is because the RPi cannot handle sinking that much current. (UART works fine if motors inputs from the RPi are disconnected) I need a schematic for a 3.3V to 5V logic level converter that acts like this: 1. on floating input, outputs 0V 2. does not sink to input 3. uses PNP and NPN transistors 4. is relatively easy to build I'm assuming a voltage divider is fine for dropping the RX line from 5 to 3.3 AI: Uh, I'm not entirely clear on the issue here. You do know you can simply apply a static pull-down directly on the raspberry pi IO pins? The rPi can easily drive a few kilo-ohms load. Just tie the output pin to ground with a ~5-50K resistor. That way, when the pi isn't set as an output, the pin will be pulled to ground, and when you do set the pins as an output, the output driver can just overpower the pull-down, and it'll work as normal. For that matter, what H-Bridge are you using? The common L298 will work fine with 3.3V logic-level inputs, it's probable that the bridge-driver you're using will probably also be fine.
H: GPS accuracy problems outside vs inside with repeater I have an interesting problem testing GPS receivers: While working inside our lab, we get reasonable results. We have a GPS repeater, as shown in the picture. Inside the lab, I get good accuracy (between 3m to 5m error). On the roof, I get more than 10m errors. I am using the Trimble C1216 (MTK3329 chipset) with an SMT antenna. Our building is in an urban environment, however, the roof is quite clear with other buildings more than 30m away. How can I explain the differences in accuracy between the roof and the lab? Can the repeater mitigate the multi path effect? Edit: Some more information: GPS repeater antenna is the Trimble bullet antenna GPS distribution antenna is the Alliscom PA175S The amplifier gain is 26dB maximum GPSNetworkink LA20RPDC AI: Added: I'll add this at the top. It lends weight to the relevant parts of what I said below You additionally said: "Some more information: GPS repeater antenna is the Trimble bullet antenna GPS distribution antenna is the Alliscom PA175S The amplifier gain is 26dB maximum GPSNetworkink LA20RPDC " Re the repeater RX antenna they say: The Bullet GPS Antenna includes advanced filtering technology for reliable performance in hostile RF jamming environments. This is their plot of the repeater TX antenna with frequency. While this is not gain per se it gives an idea of how well it would help limit out of band signals which otherwise may affect the receiver. What does the receiver antenna gain/bandwidth plot look like? Do you have a part number? For the repeater amplifier, specs which help improve on open air may include 22 dBm 3rd order intercept, 1 dB compression point 13 dBm and gain flatness of 1dB across band at 20 dB gain over real world. Overall the repeated environment seems liable to be filtered & amplified, thereby removing real world nasties and improving the signal to noise and signal levels. What's not to like. Possible efficiencies in the RX patch antenna and matching to the receiver chipset may well be being made up for (in fact, probably are) by the benign environment Aspects liable to be of importance include Antenna gain in the band of interest. Repeater antenna may by itself reject out of band or not-of-interest signal components that affect the receiver. Number of satellites seen using Repeater-antenna versus SMD-antenna. Modification of the received signal bandwidth and band shape characteristics when the amplifier is used. eg the amplifier may do a good job of rejecting adjacent spurious signals which cause intermodulation or overload or ??? effects when the GPS chipset is exposed to them directly. "Out of band" does not have the conventional meaning for GPS due to the spread spectrum nature of the GPS signal and probably frequency specific nature of interfering signals. Your system will report the number of satellites being used for a 'fix'. Is it the same for indoor and outdoor tests? You say you are using an SMT antenna but do not make it clear whether this is true in both cases (and I'd guess that the repeater antenna is probably different and superior to the GPS one). ie what antenna is used on the roof end of the repeater feed? I imagine that what you call the "repeater antenna" is different in type from the antenna used on the GPS unit. While your diagram provides a general feel for what you are doing, there is quite a lot missing if you want people to attempt to assist you. Antenna uncertainties as above. How is the GPS unit coupled to the amplifier? You say "distribution antenna" - what sort is it, what are its characteristics, what is the signal level at the amplifier output. A sensible level of detail would be the models and brands of all items used and a link to relevant datasheets.