source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Boundary scan functionality of JTAG for onboard Flash programming I would like to know whether we can use the Boundary Scan functionality of JTAG for programming an onboard Flash device without initializing the core CPU/processor (JTAG compliant Processor). During the initial board bring up, we need to program the onboard empty flash using the JTAG interface.But we don't want to use the processor core logic for programming flash, since after initial assembly we will not be sure if it is working correctly. So, is it possible to program onboard (boot & Code) flash(NAND/NOR/SPI) using the JTAG interface on the processor, without initializing processor core logic? <Q> There are also some other JTAG based programming methodologies that can help to speed up the programming compared to boundary-scan based Flash programming (which is relatively slow). <A> I've done boundary-scan flash programming via JTAG. <S> It works, but you'll really want to have a device that can clock out JTAG bits fast. <S> Back when I did it (around 2006), I used a hand-built parallel-port bit-banger. <S> It worked, but running it in Windows was about a third the speed of running it from DOS, so I used the latter (I booted from floppy in 2006!) <S> Speed under DOS was a bit over one megabit per second, and JTAG has a lot of redundancy, which meant that programming a 64K chip took over a minute. <S> Nowadays, I'd probably use a microcontroller which could clock out data at 8-10mbps or so. <A> Yes. <S> However this is somewhat difficult. <S> See if your JTAG software supports the memory chip you are using. <S> JTAG is actually easier when the processor is not running. <S> You would have to halt a running processor if you want to use JTAG.
Assuming the processor you are referring to has boundary-scan cells behind the pins that are connected to the Flash device you want to program, you should be able to program the Flash with JTAG/boundary scan without involvement of the processor's core.
Low Cost FPGA for 500MHz FIR Filter I need a 500MHz FIR filter for filtering ADC samples (500MSPS). After the filtering a few samples needs to be stored in a buffer, for a simple peak detection algorithm. I have been developing some VHDL code, and used a Xilinx FIR filter library to create the filter. But after looking into the prices of Xilinx FPGA's that would do a 500MHz FIR filter, well above $100, my jaw hit the desk. Is there any good and low cost ( less than $50) FPGA for doing this? <Q> Until recently, 500 MHz would have been considered a fairly fast clock, requiring a relatively high-end (and high-cost) FPGA. <S> But nowadays a low-cost part ought to be able to do that. <S> However, there are other specs that are equally important to the data rate to determine what part will work for you: <S> What's the data width? <S> A 16-bit adder requires a longer carry chain than an 8-bit adder and so requires a longer clock period in a given architecture and speed grade. <S> How many taps in the filter? <S> A very large number means working with RAMs instead of just registers, leading to a new set of timing requirements and new considerations for which parts will meet your needs. <S> What are the weights? <S> Equal weights on all taps means a much simpler calculation. <S> If you have different weights on each tap, you might need to redo the complete set of add-multiplies for each new input sample, making for a much harder problem. <S> But if your other specs aside from clock rate are fairly relaxed you might be able to do this in a low cost device. <S> All the FPGA vendors have low-cost FPGA lines that can be priced as low as $5 each. <S> For example, Xilinx has Spartan and Artix, Altera has Cyclone, etc. <S> In recent generations, these parts should be able to do at least minimal logic at 500 MHz. <S> But if you have to do wide add-multiplies or something, you may have to do some very careful pipelining or other tricks to get them to work. <S> Be sure to look at the most recent generation of parts to get best performance, best pricing (unless a family is absolutely brand-new), and longest assurance of supply. <S> Recent CPLD's from Altera and Lattice are really small FPGAs with built-in flash to allow automatic reconfiguration on power-up. <S> For a simple filter, these might be sufficient. <S> But without knowing your complete design we can't tell you what device will work. <S> You'll have to just try designing it for each candidate part and use the vendor's synthesis tools to find out if you can meet timing in each case. <A> Note that a convolution style filter requires doing doing many multiply-accumulate operations per input sample, which means that you either need a clock rate that is many times the sample rate, or you need to use many multipliers to operate in parallel, or some combination of the two. <S> If you can tolerate some downsampling, one efficiency is a polyphase FIR filter, which only does the calculations necessary to produce the less frequent samples at the output rate. <S> Another common choice is a CIC filter, which is quite efficient at high decimation ratios but has a rectangular impulse response and hence a sync-function frequency response. <S> Frequently the two are used in combination. <S> Another option in some cases is to not process the data at the input rate, but to buffer it and then process it more slowly; of course this only works for intermittent evaluation which doesn't sound like what you want with peak detection. <S> If you only need a little lowpass filtering before the peak detect to remove some noise, you might consider an analog implemention or an IIR instead of an FIR. <S> You could also consider implementing a PID loop which follows the input signal, and taking your output from the loop accumulator. <A> In order to get a sensible solution you need to step back and look at the requirements: 1) <S> What does the typical input signal look like? <S> Unipolar? <S> Bipolar? <S> Frequency? <S> Range? <S> Envelope? <S> Modulation? <S> Noise? <S> 2) Is peak detection all that is required? <S> 3) <S> How quickly/regularly do you need to detect the peak? <S> 4) <S> How accurately do you need to measure the peak? <S> 5) <S> Why do you need to FIR if only peak detecting? <S> 6) Is the FIR frequency selective or simply averaging/noise filtering? <S> 7) <S> If the ADC data is used elsewhere at what rate is it used? <S> If so it may be more efficient to keep track of each bit <S> read from the ADC, noting the most significant combination of bits "P" that is set at least "X" times in your period of "N" samples and simply output this value. <S> The higher "X" is and the higher "N" is the more noise-free and reliable your peak value reported will be.
To me filtering before peak detection implies that you don't want absolute raw peak detection but rather a more conservative peak detection that ignores any spurious spikes that are not considered to be part of the signal of interest.
acceptable bounds for replacement DC adapter Possible Duplicate: Chosing power supply, how to get the voltage and current ratings? I've got a broken gadget that is discontinued. The only thing broken is the power supply (verified by my multimeter). I'm confident enough to open up a replacement power supply and solder in the wire I'll salvage from the broken one. What I don't know is what Volt and Amp bounds are acceptable for the replacement. The broken adapter states it outputs 8V DC 2.6A The gadget it plugs in to states it expects a 8V input The battery it goes to charge is 6V I can't find a power supply that outputs exactly 8V DC 2.6A Is it safe to change this to 9V DC 1A? Or perhaps to 9V DC 2A? <Q> If the old supply put out 8 V and 2.6 A and the equipment says it wants 8 V, then the obvious answer is a power supply that puts out 8 V and 2.6 or more amps. <S> The equipment might be OK with 9 V, or not. <S> It could operate mostly fine, but in some corner case overheat, suddenly stop operating, or vanish into a greasy black mushroom cloud. <S> You are right in <S> that 8 V is not a standard value. <S> However, many OEM power supplies can be tweaked a few 10s of percent from their nominal value with a trimpot or something. <S> Manufacturers know that lots of different voltages are required but can't stock a different supply for every weird voltage a customer wants. <S> Take a careful look at data sheets of some "9 V" OEM supplies, and you will probably find most of them can be convinced to do 8 V. <S> I just wrote a detailed answer about this general topic. <A> I don't know what Volt and Amp bounds are acceptable for the replacement. <S> Neither will anyone else that isn't familiar with the internal circuit design of the gadget. <S> Is it safe to change this to 9V DC 1A? <S> Or perhaps to 9V DC 2A? <S> No, it's not safe to assume that either of those will work. <S> In fact, even if you did find a "8V 2.6A" power adapter it might still not be safe unless you also know whether the old power adapter was regulated or not. <S> Ideally you would disassemble the old power adapter and determine how smart it was - if it's regulated, or even if it has a full charging circuit inside it. <S> Then you would look for another adapter with those same features. <S> Anything else is a risky assumption. <S> However, without additional information, you can almost always replace one power supply with another that has the same voltage output with an equal or greater amperage output. <S> Given that the output voltage is not standard, though, I suspect the adapter plays a role in charging that might not be replicated by a generic adapter. <S> Your best bet may simply be to repair the adapter. <S> Consider disassembling it, taking pictures, and posting here to ask for help with troubleshooting steps. <A> (simplified terms ahead) <S> Devices operate on voltage. <S> Your replacement power supply MUST be rated for the same voltage. <S> Going too low can cause the device to not work (or worse <S> , not work some of the time!) <S> whereas going too high on the voltage could cause overheating or damage to electrical components. <S> When the device is operating at its rated voltage, it has been measured by the manufacturer to "request" a maximum amount of amperage from the power supply. <S> It's akin to going to a gas station and filling your car. <S> If the tank only holds 10 gallons, it doesn't matter that the underground reservoir holds 3000 gallons. <S> Your car only needed 10, so it only took 10. <S> Amperage works the same way. <S> If the device is rated to draw 1A at 12 volts, it will try its hardest to pull 1A (and no more) at 12V. <S> It's impossible for a power supply to supply too much current to a device, assuming the device is working correctly. <S> If the original power adapter was 1A, and the replacement is 3A, then the device will draw 1A from it which is less than the maximum the supply can put out. <S> If the replacement supply is too small (say, 0.5A), the device will still try to pull 1A. <S> The supply is too small and may destroy itself or catch fire trying to supply the current that the device wants. <A> Given that you stated that it charges a 6V battery, I am guessing it does this directly or almost directly (i.e. through a diode). <S> Given this, higher voltages may cause the battery to die prematurely. <S> You should be able to find an adjustable voltage supply, although 2.6 Amps is relatively high current as such things go (i.e. expensive). <S> You should replace it with a power supply rated at or above 2.6 amps and no more than 8v if you want to avoid damaging the battery. <A> If the battery is a Ni-MH or Ni-Cd pack, it is probably charged with a resistor and diode in series, which will slowly charge a battery at a fairly constant current. <S> An increase in voltage would increase charge current slightly, although probably not enough to matter. <S> In the worst case, you may be able to use one or two series 1N5400 diodes to drop about 1V.
If it's unregulated, then it's quite possible that the gadget depends on the particular behavior of the adapter, especially when charging the batteries.
Can an Android tablet serve as USB Host and be charged simultaneously through a single port? A number of Android tablets are powered through the Micro B USB port but also provide USB Host support through the same port (e.g. Motorola Xoom 2, Acer A510/700). I need to be able to use USB Host support while charging, at the full power the device accepts (or at least sufficient power to keep the tablet from draining under modest use). I have rigged up a system with splitter cables and a powered hub. This works on some devices (HP TouchPad, Archos) but not others (Google/Asus Nexus 7, Coby Kyros). And when it does work, it slow charges (probably at USB 2's 500ma). How can this problem be solved? Are there any solutions on the market that will solve my problem? I see there are some USB chips by Silego (their Battery Charger ID line) that may solve the problem, but I don't know of any cables, hubs, etc. that use it. <Q> Apparently it is possible to charge the Host-Device! <S> -- <S> > <S> http://en.wikipedia.org/wiki/USB_On-The-Go <S> Under "OTG Micro Plugs <S> " it says that a USB OTG cable with a 36.5 kΩ resistor between Pin 4 (I suppose its pin 4) and Pin 5 allows you to connect a B-Device (Slave) and (!) <S> a Charger to the Smartphone <S> /Tablet. <S> The Phone and the B-Device can be supplied by the external power source. <S> USB-Power Specifications: <S> http://www.usb.org/developers/docs/devclass_docs/batt_charging_1_1.zip (updated link) <A> We actually got this to work by combining the USB Universal Charging spec with the USB OTG spec. <S> We took the idea from this post and altered it into a single cable solution, whereas the post has a separate power source and data cables. <S> Wiring diagrams: <A> The USB Battery Charger specification does not allow this, as the data pins are uses to indicate the presence of the charger - so they would not be available for data. <S> Are there any solutions on the market that will solve my problem? <S> The USB Power Delivery spec seems to be work in progress <S> so there is no product on the market - or even announced - yet. <A> Generally, you are not supposed to charge a device when using it as an USB host. <S> That does not mean that you can't. <S> One problem is that if you enable the charger before connecting the USB cable the charging circuit will load down the Vbus and you will never get a valid Vbus condition. <S> You can usually fool the charging circuit to do whatever you want by sending commands to the driver. <S> For example, on my Nook Touch, I can charge at 500 mA by doing: echo 500000 > /sys/devices/platform/bq24073/force_current <A> Normally Android 3.1..4.1 is equipped with USB port and can connect to host, not other way around. <S> The host provides 500mA charging power according to Android Open Accessory Protocol. <S> ADK Accessory is possibly the best way to have connectivity + external power + <S> Accesory sub-device controlled by Android. <S> ( when will we see those ADK oscilloscope DIY projects ? ) <S> But, you are asking about Android being the host and receiving charging power at the same time, instead of providing it as USB host should. <S> It is not specced in Android documents. <S> So answer is "No" (as of June 2012). <S> Unless you swap roles and follow ADK. <S> Even if you follow ADK 1.0 and 2.0 (Accessory Development Kit), not all 100% of devices will be able to run your software, because ADK exists since Android 3.1 only. <S> Are you sure that "micro-USB" connector is actually a host ? <S> How many USB connectors are on device total ? <S> If less than 2, then it can only be a USB peripheral, not a host. <A> One of my Android satellite tracking apps uses a third-party IO board (called IOIO Board, see https://github.com/ytai/ioio/wiki ) that accepts an input voltage which is passed on to the USB cable to the phone and charges it. <S> As earlier posts mention, this is the USB On-The-Go (OTG) protocol. <S> I use the IOIO board to further process data that is written from my app while the phone is being charged. <A> Actually, this is possible, and it is also an official USB standard. <S> But, in order for this to work, you need to have a USB host (mobile phone etc.) <S> with a USB micro-AB connector, like, e.g. the Sony Xperia S, which I have. <S> See the desription under "OTG Micro Plugs" in the article <S> "USB On-The-Go" on Wikipedia. <S> Unfortunately, so far I have not been able to find an adapter that does the trick, but it should be possible to have a manufacturer make one for you. <S> There are several manufacturers that accept orders for custom cables. <S> At present I am using a Delock Adapter USB micro-A male to USB2.0 A-male to connect to storage on my Xperia S, and that seems to work fine. <S> This will, though, not make it possible to charge my Xperia S at the same time, so it will drain my battery if used over time. <S> Does anyone know of an adapter that will make this possible on a micro-AB connector? <A> There is a device that I saw today on Kickstarter that allows you to use the same micro USB port to charge from an adaptor and to connect devices at the same time. <S> This will be great for tablets with single USB ports. <S> The company is planning on shipping units around April to May of this year. <S> For those interested here is the link: +port: Power + USB at the same time
Usually the USB PHY circuit and ID pin are interlocked in software with the charging circuit. Yes this can be done - definitively! This does require a custom cable to accomplish, but it does work.
What sensor to choose to track human presence indoors? This is a hobby project about home automation. The idea is that of distributed system of cheap microcontrollers that take measurements, communicate, output data and control appliances. One important task that this system should perform is detect at every room if there are humans inside (awake or asleep distinction would be a over-the-top bonus :) ). I am still at a loss if this is feasible. PIR-s? Webcameras? Microphones? Optical counters at the doors? Ultrasound? Available processing power per sensor output: 5MIPS of avr instructions (8-bit RISC) for 3 seconds = 15 million instructions. Typical usage scenario would be: The apartment is empty (the system should know that). The door opens and a group of 4 people enters the hallway. (the system should know that someone is in the hallway). Two go to a room (the system should track their path by room, with a lag of no more than several seconds, plus know that there is still someone in the hallway). , one of them returns, the other sits on a chair, (the first one is to be tracked. the system should also know in which room is the sitting person). In the meantime the rest two wander randomly in a 2 x 2 meter area in the hallway (taking shoes off, hanging coats) (the system should know they are still in that area). One goes to another room, turns the radio on and goes to sleep (the system should know that there is a sleeping person there). Someone leaves the apartment and returns 10 minutes later (here the only requirement is that the system know that there are still persons inside). The three leave (the system should know that there is still someone inside). Much later, the sleeper gets up, wanders around for half an hour and then leaves the apartment (the system should track his position by room with a lag no more than several seconds, and know when he leaves that there is now no one inside). I have no pets. <Q> Especially for a home hobby project I'd probably start with PIR (Passive InfraRed) sensors. <S> They are cheap and very effective at detecting something warm like a human body moving around. <S> However, PIR sensors will not detect static warm objects like someone sleeping or sitting still on the couch. <S> With enough PIR sensors around the place, you can probably infer where people are motionless by <S> where you know there was movement and in what direction. <S> PIR sensors don't inherently give you direction, but enough of them activated in sequence does. <S> For example three sensors triggered in sequence in a hallway is a strong clue someone is walking down the hall in that direction. <S> This system isn't foolproof, but PIR sensors are cheap and remarkably sensitive, so with enough of them I think you can get to quite a useable level. <S> One thing to keep in mind is that other warm moving things will trigger PIR sensors too, like pets moving about. <S> If you have a dog, then aiming the sensors so they only see motion a few feet off the floor helps. <S> Cats jump around a lot, but are smaller, so maybe there is a way to not trigger on cats. <S> This system will be a lot easier if you know the only warm moving things are humans though. <A> PIR s. <S> Those were motion detectors, which reacted on changes in the receiver's signal, but you can use presence detectors, which also give a signal if the detector receives a static signal. <S> I tested with different types of clothing, like a coat over a pullover, and it always detected me from several meters distance, so apparently the radiation from head and hands was already sufficient. <S> So I guess a person sleeping under a blanket will be detected as well (unless maybe she's completely covered by it). <A> PIR is good at detecting moving humans. <S> If you have a number of them per room you can infer the presence of non mobing humans with reasonable success by tracking people and deciding where they are when they vanish "off the RADAR". <S> Doppler RADAR modules once common for door openers and now largely replaced by PIRs make excellent movement detectors. <S> You can make your own with relative ease. <S> They also detect moving cats and dogs and flapping curtains etc. <S> Detection can be limited to humans by bandpass filtering the output. <S> I'm told that human joints produce articulation frequencies which are unique - especially not found at the same frequency in cats and dogs. <S> I was told tat this is a very reliable people detector. <S> Ultrasound is liable to be less good than PIR's or RADAR <A> For the extra points: a sleeping person can be detected with a cheap DIY force sensor. <S> Take two stripes of aluminium foil, crumple them a bit. <S> Then roll them to form a capacitor. <S> Use a plastic bag or foil as insulator/dielectric. <S> Squeeze this under the full weight of the bed/couch base or foot. <S> Then measure the capacity. <S> E.g. make it part of an oscillator circuit and count interrupts, or count the CPU cycles needed to charge it. <S> It's good enough to detect a pillow being added or removed. <S> It will drift over time, but can detect events reliably: weight added, weight removed, weight shifting around. <S> (Yes I actually do have a log of my sleeping hours.) <S> It won't help if someone decides to sleep on the floor, but it's a start. <A> I was thinking is a good way to detect prescence is using a some electronic design that have the capacity to detect the weight or deformation of the floor in the room to detect the people (obiously diference is some big like 50 kg avrg), only adjusting the room weight before prescence of humans and that would be the master measure comparing with when a human access to the room and then detect by the diference of weight. <A> I believe that producing a radio signal in the KHz range and latter measuring the interference on the signal detected in a long sensing antenna might work much better and easier! <S> You may even detect where the human body is through some quadracture signal applied to a trasmit antenna with know resistivity. <A> My solution stands alone as the most simple minded of all possible solutions. <S> I have a motion detecting software package installed on my computer called: Yawcam. <S> This little puppy takes pictures of anything that moves in my apartment through my HP 5210 web camera. <S> Next, I have a barking dog microwave motion detector pointed out my front door. <S> As a final touch I pasted a small sticker / shipping label on the outside of my front door that reads: <S> Surveillance Camera Inside. <A> Olin Lathrop's answer should be enough but if you add some sound detection sensors with your project this can increase your human presence detection rate. <S> Try to to detect human voice with sound detection sensors, this can be made another sign of presence detection in a room or hall. <S> Cheap and sensitive sound detection sensors are available over internet.
Other systems you mention may be able to be triggered in a beam counter type role but lack the actual person detection capability of PIR and RADAR. If you saw motion of someone entering a room and then motion in the room, but nothing at the doorway, then you can make a good guess the person that entered is still inside but motionless. I've tested Matsushita/Panasonic NaPiOn PIRs on my previous job, also for home automation, and they worked well.
How to make 95%+ efficiency voltage regulator? I need to make an 11 volt voltage regulator. I would really like this to be step-down, not a linear voltage regulator because I am going to be drawing between 1-2 amps at 11 volts, and if I was using a linear voltage regulator it would get very warm. The input voltage that I am using is going to be about 12.8 volts. I know a linear regulator under these circumstances would have 86% efficiency, but they are not reliable when working with voltages close together. The last option I can think of (which is still linear...) would be to use resistors to lower the voltage, but I don't think that that would be any cheaper than using a step down converter. Because the resistors would have to "handle" 3.6watts. There are regulators like this on eBay (which I am bidding on, but only up to $2), should I just buy something like that? Or would it be cheaper to make it myself? Even if it is cheaper, I don't know how, and that's why I'm here :) <Q> That eBay thing is a switching regulator , aka a "switcher", aka SMPS (Switch-Mode Power Supply). <S> These things can indeed reach efficiencies of 95 %, exceptionally 96 %. <S> Lot of it depends on input and output voltage, and the highest efficiency is with parts that are designed for a specific input and output voltage. <S> So the eBay thing won't always be as efficient, especially not at low output voltage or high input/output voltage ratio. <S> You can make them yourself; as you can see they only require a few parts, but designing a high efficiency switcher requires some experience to choose the right parts and make the right PCB layout. <S> So I would suggest you buy one. <S> I guess a component cost for the eBay module will be around 6 or 7 dollar, so 2 dollar would really be a bargain. <S> edit You can't use the series resistor to regulate to 11 V. <S> At 2 A and 12.8 V in you would need a 0.9 Ω resistor, but when the current drops to 1 A that resistor's voltage drop will be reduced to 0.9 V, and the output will rise to 11.9 V. <A> Let's do some math and figure out if we can design this ourselves. <S> For simplicity, let's assume that your specified efficiency \$ \eta = <S> 0.95 \$ applies to full power. <S> \$ <S> 11.6V <S> \times 2A = <S> 23.2W\$ maximum output power. <S> \$ \dfrac{23.2W}{0.95} = 24.421W \$ maximum input power. <S> \$ <S> 24.421W - <S> 23.2W = 1.221W\$ which is your total power loss budget. <S> This represents the total losses available for the entire converter - conduction losses, switching losses, gate drive losses, the losses of the control circuitry, etc. <S> There are tons of <S> application notes and design aids out there that explain how to design a synchronous buck. <S> Remember: the most efficient regulator is no regulator at all. <S> Input = output hence 100% efficiency. <S> : ) <A> Your numbers don't make sense. <S> With 12.8 V in and 11 V out, the efficiency of a linear regulator would be 11V/12.8V = 86%. <S> That's in the range of ordinary switchers, so unless you can get or make a really good one you might as well use a linear regulator. <S> Just as with your 92% number, if have no idea where you got the idea that linear regulators can't be reliable with these voltages. <S> That just plain nonsense. <S> With a linear regulator in the worst case it will dissipate (12.8V - 11V <S> ) <S> * 2A = <S> 3.6 W. <S> If you can arrange to live with that, it is probably your simplest option. <S> As Steven said, switching regulators, which would be buck converters in this case, can do better, but that will not be a trivial design to get the efficiency you want. <S> You will probably need synchronous rectification, good low Rdson pass elements, etc. <S> It is doable, but is not a novice project. <S> Perhaps there are switcher chips out there that provide the drive for the high side switch and the low side syncronous rectifier all built in, and you add the FETs and inductor. <S> In that case it could be worth a try, but you have to read the datasheet carefully and look at the app notes and understand why things were done as they were. <S> We can help here if you run into specific questions. <A> One consideration that has not been addressed is just how good a supply is your 12.8 volts. <S> If it can get higher, then the efficiency of the linear regulators discussed will decrease. <S> If it gets too close to your output requirement of 11 volts, then the regulator may lose regulation unless it is carefully designed to handle a small output/input differential. <S> How sensitive is your load to the actual voltage of the power supply? <A> I think that you should use a power rated diode to drop the voltage. <S> These won't have any effect other than dropping the voltage and wont generate the heat associated with resistors in series. <S> Its fairly easy to get 12.8v down to 11v. <S> Diodes present a constant voltage drop and lower power dissipation than rsistors without causing voltage fluctiation on the current draw. <S> If you've got a steady 12.8 volts and need 11, use a large barrier diode with a voltage drop of 1.8 volts...though 0.7 to 0.9 volts is more common. <S> You may have to use two.
The best chance you have would be with a buck converter using synchronous rectification, and the lowest \$ R_{ds(on)}\$ and \$Q_g\$ MOSFETs you can get to minimize conduction and gate drive losses. A circuit designed for 11 volts may very well work fine at 12.8 volts and thus there is no need for a regulator.
How to switch power of microcontroller by button? I have a microcontroller device with battery power. Currently I toggle power by simple on/off switch. I want to toggle power by one pushbutton with minimal modification of the schematic (and microcontroller program probably) and with no consumption when device is off. How can I do it? ADDED . I know following trick: Here at start microcontroller sets PB3 to high and thus hold power for device. But this is not a solution for my problem, because I need also to off the device by pressing S1. ADDED . Can I exclude VT2 from circuit (i.e. microcontroller drive base of VT1 directly)? <Q> How off do you really need off to be? <S> Many modern microcontrollers have sleep current well below the self-discharge current of even small batteries. <S> Some debouncing will be needed, but that all doable in the firmware too. <S> This sort of on/off method is getting pretty common nowadays. <S> When it only takes a µA, a microcontroller doesn't need to be truly off, just asleep, which it can do under its own control. <S> The button line has to be wired to something that can cause the micro to wake up from sleep, but just about every micro has at least one of those, usually several. <A> Based on the circuit you provide, you could just add a diode in series right after the switch (S1) (cathode connected to the switch) <S> and them you could use an input to detect if the switch was pressed again, if so, turn off PB3. <S> The zener diode protects the PIC input from the voltage coming from the power supply. <A> EDIT - on reflection, the circuit below (which I'll leave for reference) is probably best suited for use in circuits without a micro. <S> AS mentioned in the other answers, unless you really can't afford the few uA, it doesn't really make sense not to use the micro to control the power toggle, as it uses less components and can be controlled accurately. <S> The simplest version can be something like a IOC (interrupt on change) input with pull up, with button to ground. <S> The micro has power applied all the time, and controls a P-channel MOSFET (with pullup from gate to source) for the rest of the circuit. <S> When it sleeps it lets the gate float to turn the circuit off. <S> Reference circuit: <S> At first The P-MOSFET is off, so there is no base current at Q2, which is also off. <S> Q1 is off, so Q1c is at 5V. <S> The circuit is static. <S> When S1 (ignore the + and - nodes, they are there for SPICE triggering purposes) is pressedthe 5V at Q1c is connected to Q2 base, turning it on. <S> This pulls the P-MOSFET gate to ground, turning it on as well. <S> R4 now sees 5V and when S1 is released, it provides Q2s base with the current needed to keep it open (and therefore the MOSFET on too) <S> Q1 is also turned on when current through R2 charges C1 to ~600mV, at which point Q1c is <200mV (i.e. Q1 is turned on) <S> The circuit is now static again. <S> When S1 is pressed again, Q1 sinks the current from R4 (which is keeping Q2 on) turning Q2 off. <S> R1 pulls the MOSFET base up to 5V and switches it off again. <S> Here is the simulation (V(push) high represents when the button is pushed): <S> Also we can see after power off the current heads to zero (as C1 discharges and Q1 turns off) <S> so the circuit consumes <S> no power in the off state (the cursor for I(V1) is at 19.86s and measures 329nA): <S> The original circuit idea is not mine, it comes from Dave Jones over at EEVblog . <A> As Bruno Ferreira suggested, the easiest way to allow the button to act as an "off" switch is to change your circuit is to allow the processor to know when the button is pushed. <S> I think one can reasonably well use resistors to protect the processor's input against voltages in excess of VDD without needing a Zener for that. <S> Here's a rough sketch of a circuit design you might use. <S> The right half represents the behavior of the processor, and I used a combination of a transistor, Zener, and resistor to stand in for a regulator. <S> The processor's output is represented using an analog switch its VDD, rather than a gate, since gates in this simulator always generate +5V output. <S> A key aspect of the circuit, which can cause trouble if ignored, is that it is designed so that the processor cannot turn the circuit on unless its VDD is at least ~3.6 volts; I have also rigged the simulator so that the processor will always try to turn on its output whenever its VDD is below 3.5 volts. <S> I've seen a lot of designs which assume that processors will not try to output a logic high as their power goes away. <S> That assumption may work out okay with some batches of chips used in testing, but then fail with other batches of chips used in full-scale production. <S> The behavior of most processors is unspecified during undervoltage conditions; a good design should be engineered so that the behavior of a processor during such conditions won't matter <S> (slight note: it is probably safe to assume that a processor which isn't explicitly designed to generate voltages which are higher than any applied voltage won't magically start doing so; I don't think there's an explicit spec for that, but I think in most cases it may be safely inferred).
You can have the pushbutton simply drive the I/O pin of the micro, which then toggles itself between sleep and active mode each button press.
Wire gauge of 40 pin IDE cable What is the gauge of wire used in a typical commercial 40 pin IDE cable? <Q> Ribbons with bigger wires (smaller AWG) are more of a specialty. <S> Here's a datasheet for your generic ribbon cable , which specifies the wire gauge (bottom of the page). <S> P.S. <S> Of course, if one wire in the ribbon can't carry enough current , you could use several in parallel. <A> The wire is usually stranded copper wire, usually either 0.32, 0.20, or 0.13 mm^2 (22, 24, or 26 AWG). <S> One of the most popular sizes of ribbon cable employs 26AWG wire. <S> In my defense, the latter has a "citation needed" tag. :) <S> wikipedia <A> The stuff I use (from www.reichelt.de, this is the 10-wire version): Flachbandkabel AWG28, 10-pol., grau, 30m-Rolle <S> • <S> Typ: <S> Flachbandkabel• Rastermaß: 1,27 mm• Aderanzahl: <S> 10pol• Kabelquerschnitt: 0,09 mm²• Verpackung: <S> Rollenware• <S> Kabellänge: 30,5 m• Farbe: grau• <S> Gewicht:0,61 kg
26 or 28 AWG for typical ribbon cables (like the one in the O.P. picture).
What kind of SIM are these? I have a device ( XT107 ) that requires a SIM card. It takes a SIM card that have cobber plate (not sure what to call that) that supports all 8 curcuits on the device. When speaking with people, some say it's a 2G SIM card, but I doubt that since some of my friends have a HTC Desire which uses this kind of card. Mini sim card - 4 pins - (8 circuit): Mini sim card - 3 pins - (6 circuit): What are the differences between these two cards above? I'm really lost here. I need that one with 4 pins(8 circuit), but when speaking with the mobile phone companies' tech support, they are totally lost. Update I have added the real names for the simcard to the above, but still maintain the original question with names etc. <Q> All 6 pin or 8 pin have the SIMs have same functions. <S> At first we need to understand SIM Pinouts; 6 pin includes VCC, GND, <S> I/O, VPP, RST, CLK 8 pin includes VCC, GND, <S> I/O, VPP, RST, CLK, SIM_PRESENCE, GND VCC is supply pin, GND <S> is common ground pin, CLK is Clock pin, RST is Reset Pin and I/ <S> O pin is for Data transmission. <S> The only difference between 6 pin and 8 pin is of SIM_Presence pin, The is an optional pin of SIM, and their are two GND pins on 8-pin sim. <S> The only useable PINs for devices are VCC, GND, <S> I/O, RST, CLK. <S> Hope this will may help you <A> The Grameen card bears a telenor logo and looks exactly the same as a telenor card in Sweden, where norwegian Telenor is a major operator. <S> That card appears to be an 8 circuit card. <S> The latest Telia cards don't look the same as the one on the photo but it appeas that it is still a 6 circuit sim card. <S> These cards should be interchsngeable <S> and I know that both the 8 circuit telenor card and the 6 circuit Telia cards are recognized as present in a German AVM LTE router which has a 6 contact sim reader. <S> I need to find out the order of connectors for a 6 contact sim card reader. <S> The sim card holder I need to use to replace a damaged card reader as three contacts on each side. <S> When the mini sim card is put in place looking down onto the contacts, the cut off corner is on the upper right hand side <S> and I see the back of the card. <S> Placed thus, it appears to me that the order is the following, starting from the cut off corner: 1 VCC, 2 RST, 3 CLK, 4 GND (top on left side), 5 not used, 6 I/ <S> O. <S> Could this be correct? <A> A similar question was already answered here . <S> On the 8 contact SIM card 2 of them are reserved for future use. <S> I can't tell if in the card on your picture they are used on not. <A> What size is the holder, could it be that the sim the device requires is a mini sim (the Telia one you show looks like a micro sim with a mini sim adaptor; the Telenor mini sims I have been able to look at all have 8 circuits)? <S> A mini sim would be 25x15 mm, a micro sim 15x12mm. <S> btw Molex calls the connectors on the sim circuits, not pins.
For you device you may use 6 or 8 pin SIM, as SIM_PRESENCE is not necessary required.
Finding air wires in Eagle I am almost done routing a board. However, is telling me that there is still one more wire. I have looked but I just can't seem to find it. Is there a to make Eagle tell me where it is? <Q> I can think of three options: <S> Zoom out as much as you can then use the route tool on the tiny board, this catches the air wire, then zoom in again and route it. <S> You can also disable the top and bottom layers so the air wire becomes more visible. <S> This script shows a list of all the nets, on that list there is a column "Unrouted", some net is not completely routed a value should appear here instead of "--". <S> You can then type on the command line "show net_name " to highlight it. <A> There is an ULP called zoom-unrouted. <S> When you run it, it will automatically zoom your view to the first airwire it finds. <S> Very useful. <S> Here is the link: https://cadsoft.io/resources/ulps/349/ <A> Air wires are located on layer #19: "Unrouted". <S> By disabling most/all of the other layers, they can easily be spotted. <A> Type in the following command: ratsnest <S> * <S> This will list all the airwires in the status bar at the bottom with their name/net designation. <S> It's a good start, and then at that point if you don't know where they are, use one of the above mentioned methods. <A> I'm not an Eagle user, but you surely can selectively disable layers. <S> Disable the most distracting layers, that will probably be your signal layers, so that only components remain visible. <S> You'll probably see the line then. <A> I think that the fastest option is to select the Edit->Route and click with the left button of the mouse on the board. <S> Automatically eagle will draw a track to the nearest untracked wire of the board (or to the latest unrouted wire, do not worry).
Some time ago I disabled all the layers except the "Unrouted" to look for the unrouted tracks, since I discover this simple and faster method. Yet another option is to run the provided "length.ulp" script (File->Run... or ULP button).
HDMI Mixer/Blender/Superimposer-Chip (2 to 1) wanted Is there a chip on the market which can overlay one HDMI-input over another ? Chip should have 2 * HDMI -IN and 1 * HDMI-OUT HDMI-IN-1 connected with Sat-receiver or other TV-SourceHDMI-IN-2 connected with Android-Box or Network Player The Menues of HDMI-2 shall be superimposed/blended/overlayed over TV-Screen of HDMI-1.e.g. by replacing the black background color of Android-Screen with TV-Screen-Pixel. If superimposing is not available a splitscreen function would be sufficient, e.g. upper or lower part of HDMI-OUT reserved for HDMI-2 IN and rest for HDMI 1 in. <Q> I do NOT think there is a single chip solution neither. <S> However doing this with an FPGA-based platform is certainly doable. <S> As already mentioned the Digilent Atlys Board could be an alternative since you have there 2 in/ 2 out HDMI ports. <S> In case you consider working with FPGAs: <S> First, I would suggest to start with the design of a HDMI transmitter and receiver. <S> There is another question that gives a good starting point. <S> Then, the overlay can be achieved with an HDL- implementation of the alpha-blending algorithm which can be used for mixing 2 images into one. <S> The good point is that this gives you the possibility to configure the level of transparency of individual picture elements. <S> In few words: being <S> x <S> and y the inputs and z the output video signal. <S> An alpha-blender circuit can mix them implementing the equation: z <S> = x.(alpha) <S> + y (1-alpha); where "alpha" is the coefficient or level of blending. <S> Finally, you can integrate the previous blocks making the following processing chain: <S> HDMI receivers -> overlay logic - <S> > HDMI transmitter. <S> I hope this helps! <A> "The reasons are already mentioned by Chris Stratton:- <S> The two signals are not in sync, so at least one of the frames need to be re-buffered (typically, both will need to be, to be able to do the blend/overlay.)- HDMI in a living room typically carries encrypted signals, so you need to also do HDMI content protection <S> negotiation.- <S> The resolutions may be different. <S> Additionally:- HDMI is a pretty high data rate signal, especially if you go above ATSC to 1080p60/30-bit etc. <S> That's half a gigabyte per second per stream direction, so to capture two streams, then read/sum two streams, then output one stream, you end up with 2.5 GB/s in pure data traffic (and more for overhead.) <S> None of this is impossible. <S> Broadcast video equipment does similar things just fine. <S> But it's a cost question. <S> Actually, I did a digikey search, and this chip came up: <S> Analog Devices <S> ADV8003 http://www.analog.com/static/imported-files/data_sheets/ADV8003.pdf <S> At $70 <S> it's not super cheap, and the datasheet is ludicrously empty <S> (doesn't even specify a chip form factor,) <S> so you'd have to work with AD application engineers to actually get anything done with it. <S> And it doesn't do the actual HDMI capture; you have to do that using separate chips. <S> But it's the closest that a simple search could find. <A> But that's 4 chips, sorry :( <S> I thought this bunch used to have a "two-HDMI-in one-out" box, but it appears not. <S> You might try Googling "HDMI video mixer" or some such combination.
Two HDMI receivers, an HDMI transmitter and an FPGA+some memory would do it. The simple answer is "no, there is no single-chip solution.
Trying to get that tube sound from a gainclone amp A Gainclone amplifier makes for a nice simple benchmark/monitor amp. It is a class AB linear amplifier capable of 20 W - 120 W of power, and is based on a monolithic amplifier chip such as the LM1875, LM3875, LM3886, or LM4780. What different ways are there to add controllable even order harmonic distortion to its sound? <Q> You ask about getting "tube sound" but then presume the answer by suggesting a specific method. <S> This simulates heater hum, which is a low level but nearly unavoidable characteristic of AC heated filament* tube amplifiers. <S> The ear/brain associates this sound with "tube amplifiers". <S> This is NOT mentioned in the Wikipedia "Tube Sound" page <S> but I have long ago heard it mentuioinbed seriously as a factor so it is well worth looking at. <S> Even harmonics are referred to (by some) as Octave harmonics as they share a 1:2 ratio with the original, and then 1:4 etc. <S> Processing which emphasises this effect will influence the "octave sound". <S> There are many ways of doing this - or trying to. <S> This remarkably good page A Musical Distortion Primer discusses the underlying principles and then proposes about 15 ways or variants of achieving such effects. <S> one obvious is to use full wave rectification in a variety of ways. <S> A full wave rectifier fed with the signal and with a portion of its output summed with the input AC will give even harmonic effects which may be deemed to be useful. <S> Wikipedia - Tube Sound provides an very extensive overview of the subject but with minimal circuitry. <S> Some useful user discussion is here Of some use <S> http://www.geofex.com/effxfaq/distn101.htm <S> The large majority of tube amplifiers utilise AC heated filaments. <A> Amplifier genius Bob Carver was challenged once to make a solid state amp sound like a tube amp to prove that the tube vs transistor sound was not necessarily due to the active devices themselves but was due to the overall transfer function of the amplifying circuit. <S> I believe he just added some output resistance (resistors) to the solid state amp and a panel of "golded ear" audiophiles could not reliably tell the difference between the two amps. <S> Hope this helps ! <A> I have made solid state Amps sound Valvey by Using 2 Nchan mosfets in a SRPP class <S> A using only a small amount of local negative feedback .The <S> single ended nature of the SRPP gives lots of pleasant sounding even harmonics as does the square law characteristics of the FETs .The <S> mimimal negative feedback means that there are not any TID problems and the output impedence is not too low .Poor <S> damping factor is associated with tube amps and is sonicly pleasing to some .I <S> found that the Amp sounded awesome on older music .
In addition to what you suggest, try adding a small and variable amount of mains frequency signal to the output.
Digital oscilloscope minimal sample rate to capture SPI data going at 500 kHz I need to debug an SPI bus coming out from a beagle board XM rev. C. The clock of this bus is 500 kHz. To do this, I have a SIGLENT SDS1022DL digital scope. Its sample rate is 250 MS/s and the analog bandwidth is 25 MHz. According to Nyquist, the minimal sample rate to have a reliable digital measurement in my case should be 1 MHz but, in practice, I need at least a 4x faster sample rate, so 2 MHz should be fine. If so, my scope specifications are adequate for my purpose. Am I right? <Q> More than adequate, as I think any scope will be for sampling 500 kHz. 500 kHz is a period of 2 µs, <S> so at 250 Msps that gives you 500 samples per period, enough for measuring time with a 0.2 % accuracy. <S> Note that the scope's bandwidth is enough to capture up to the 50th harmonic of a 500 kHz signal. <S> Even with a brick wall filter, cutting of all further harmonics (which doesn't happen), as a first approximation your square wave will still look like this: So the edges of your signal won't suffer from the bandwidth limitation. <A> Your scope will be fine, yes. <S> When calculating required bandwidth, remember that a square wave will have frequency components much above it's primary frequency. <S> The upper bandwidth of these components is solely dependent on the rise time of the signal (i.e. you could have a 1Hz square wave with a 1GHz component if it's rise time is fast enough) Generally with a square wave you need at least the first two harmonics (3rd and 5th) for it to look much like a square wave. <S> Since a square is composed of odd harmonics, so for your 500kHz signal you need at least a 2.5MHz bandwidth (i.e. 5th harmonic), preferably >5MHz. <S> This makes a big difference, as for debugging purposes you are likely to miss ringing, transients and other problems if the bandwidth isn't high enough. <A> What will matter is not the maximum sample rate for the scope, but the fastest sample rate the scope can use while capturing a long enough time window to be useful; in many cases, that will be limited by the length of the scope's data buffer. <S> If you need to capture two consecutive SPI transactions which are separated by some amount of time, you may have to "zoom out" pretty far enough that the scope's sample rate drops to the low MHz. <S> Depending upon the scope's buffer size and the amount of time between transactions, even that may not be enough. <S> Deciphering SPI data may be possible if the scope's sampling interval is no longer than the amount of time that the SPI wires are "stable" between transactions, but the data will be much easier to read if the sample rate is at least twice that, so that the lines will be stable for at least two sampling intervals. <S> Note that if you're interested in trying to determine why an SPI receiver isn't getting the data that was sent, you may need to use a much faster sample rate <S> (so you can judge whether clock-signal edges look clean <S> , setup/hold times look decent, etc.), but in those cases you probably wouldn't need to capture data for as long, and you could thus use a faster sample rate. <S> For that purpose, at a data rate of 500Khz, one would be hard-pressed to find any non-"toy" scope which wouldn't be adequate.
For a 500.0khz data rate, a 2MHz capture rate would probably work decently; one may occasionally end up capturing things right on the transition, yielding an "ugly" trace, but even then the data should be decipherable even if it's a little hard to read.
How do you choose an inductor for connecting separate ground planes? On a board with separate analog and digital ground planes connected at one place, the connection is often made with an inductor. How is this inductor chosen? Obviously it has to be able to handle enough current, but what other factors are important? I'm more interested in the type of inductor rather than the value, since I would expect to try different values. <Q> Another school of thought is to forget the inductor and split ground plane. <S> Instead use a solid plane, but use careful placement and routing to ensure the digital/analogue signals stay in their respective portions of the PCB. <S> According to the figure below, you can see (for high speed signals) <S> most of the return current flows very close to the trace <S> (x is distance from centre of trace, h is trace height above plane): <S> No time to go into more detail right now (will try and add more later) but here are a couple of excellent links on the subject: Henry Ott - Mixed Signal Layout <S> TI - High speed Layout Guidelines <A> Ideally your ground should be 0 V everywhere, so a voltage drop due to any impedance is out. <S> Olin notes that connecting grounds with inductors means they won't be connected at high frequencies, so they aren't grounds anymore. <S> That's correct. <S> But if you completely isolate your digital and analog part for high frequencies you won't need a ground return path for them either. <S> This makes only sense if you block the high frequency noise in all other connections. <S> Power supplies and signals. <S> Combined with a capacitor you get a second order filter which will deal with that microcontroller noise. <S> The low resistance means a minimum voltage drop in supply voltages. <S> If you can keep HF noise away from the analog part you can couple both grounds directly, but at 1 point. <S> When I worked with Philips Audio wired ferrite beads were sometimes used to connect digital and analog ground: DC resistance is in the milliohm range, but like Olin says they will offset ground for HFif <S> you allow it to pass to the analog side. <A> its better to have one solid ground plane and partition <S> your board layout <S> than split grounds
I've used Murata BLM noise suppressors for this; a BLM18PG221SN1 has a DC resistance of 100 mΩ maximum, and an impedance of 220 Ω at 100 MHz.
sending signal to open car with microcontroller I am interested in a way of how to open the caar's doors with a microcontroller device's extension hardware (I have an Arduino Uno Rev 3).I know that the key can do it as well but I want to program things. The frequency of the signal is 433.92 MHz and the modulation is FM and AM. Therefore I need a device (a hardware that can be connected to the microcontroller) that can emmit/send and receive signals with this certain wave's frequency. It is to be mentioned that, for me, it is not the most important thing to finally get to open the vehicle (the central locking system) but to work with it and to do experiments and to read what the key sends (this is actually the most important thing). Can you recommend a hardware that can read 433 MHz signals ?Are there differences among them? I want to express my interest into that I want to receive the signal that is sent by the remote key. (edit)Later on, I can try to get some useful data out of the signal. But, for the beginning, where do I know that all the remote keys work with the same method (I refer to this Wikipedia article: method of modulation). And this is what I meant with FM (frequency modulation) as an example. By the way, ATA5811 sounds really good - I read the data sheet and it can use both ASK and FSK (modulation). How can I find out, what my car key uses (there are so many paramters!) ? <Q> I think the radio part is the least of your problems. <S> Microchip has extensive libraries to go with thier chips intende for this purpose, but you need to sign a non-disclosure to get it. <S> Here is a (probably simplified) explanation . <A> GNU Radio is an open source software defined radio. <S> You can certainly do your stuff as well as many other radio things with it. <S> The funcube dongle is a cheaper option. <S> Since the crypto part was brought up:What i assume you want to do is a so-called "replay attack". <S> Very early systems were vulnerable, but current are not (to a significant extend). <S> Today challenge-response protocols, session keys and rolling codes are used to mitigate this attack. <S> The Microchip system is called "keeloq" and was attacked successfully. <S> The radio part is easy, the crypto will be hard. <S> References: <S> Thomas Eisenbarth, Timo Kasper, Amir Moradi, Christof Paar, Mahmoud Salmasizadeh, and Mohammad T. Manzuri Shalmani - Physical Cryptanalysis of KeeLoq <S> Code Hopping Applications (2008) <S> How To Steal Cars — A Practical Attack on KeeLoq (2007) <S> A complete break of the KeeLoq access control system (2008) talk Nicolas T. Courtois and Gregory V. Bard and David Wagner - Algebraic and Slide <S> Attacks on KeeLoq <S> (2007) source code for keeloq <A> Have you looked into getting the cheapest possible remote compatible for your vehicle, finding the pin outs/specs online, and interfacing it directly to the Arduino board? <S> Let the remote handle all the crypto stuff and send/recieve the signals that the buttons on the remote would normally initiate via keypress. <S> Not an electronics dude, but that's how I would do it anyway.
To my best knowledge most car openers use a cryoptographic system called "rolling keys", which means that recording what the keyfob sent and replaying it won't work.
Where does the Maximum Emitter-Base Voltage come from? The datasheet for a BD679 transistor lists amongst the absolute maximum ratings that the "Emitter Base Voltage" has a maximum of 5v. This figure confuses me - my mental model of a (BJT) transistor has the path from the base to the emitter equivalent to that of a diode and the potential difference is irrelevant - it is the current that controls the gate. I have searched for this term and among the results get ones like this which appear to be talking about a different property of the transistor. The notation ('Emitter Base Voltage' as opposed to 'Base Emitter Voltage') makes me think this might be referring to the maximum 'negative voltage' that could be placed across the Base-Emitter, instead of the maximum in normal operation. Is this correct? If not, what is this figure, and what causes this junction to have such a low maximum compared with the rest of the device? <Q> This is generally much lower than a small signal diode in reverse can handle. <A> You suspicion is correct - it's emitter -base, which means it's the (positive) voltage from emitter to base, not base to emitter (which would be given as -5V) <S> So basically it means you can't let the base drop <S> >5V below the emitter (or emitter 5V above the base <S> ;-) ) <A> Your guess about the order of the terminals is right: it is the maximum reverse voltage that the emitter-base diode can block. <S> Some people claim this makes a good zener diode , others use the zender mode as noise source . <A> You say "path from the base to the emitter equivalent to that of a diode and <S> the potential difference is irrelevant - it is the current that controls the gate. <S> " This is completely wrong. <S> The BJT, like all types of transistors" is a voltage-controlled current source: it is the base - emitter voltage and not the base current that controls the collector current. <S> The base current is an unavoidable error caused by forward biasing the base - emitter junction, but it is not the basis of the BJT's operation. <S> For further information, see the following: http://d1.amobbs.com/bbs_upload782111/files_29/ourdev_554203.pdf
"Emitter Base Voltage" is the maximum voltage that may be applied when the base-emitter diode is in reverse ; not conducting.
I2C: 3.3V and 5V devices without level-shifting on 3.3V-bus? do I really need a level-shifter if I use 5V-powered devices on an I2C-bus that has pull-ups to 3.3V?In my understanding the devices will only pull the lines (SDA, SCL) low (to ground) and never drive their supply-voltage to the bus. So I don't see a reason for a level-shifter as long as all devices detect the voltage from the pull-ups (3.3V) as logical high. That should be the case with devices using 5V as supply. In my case I have an IC whose inputs are not 5V-tolerant as master and I could power my slaves with 3.3V but using 5V is easier in my circuit and allows higher (internal) clock-rates for the slaves. <Q> According to version 4 of the \$\mathrm{I^2C}\$ spec , "Due to the variety of different technology devices (CMOS, NMOS, bipolar) that can be connected to the I2C-bus, the levels of the logical ‘0’ (LOW) and ‘1’ (HIGH) are not fixed and depend on the associated level of VDD. <S> Input reference levels are set as 30 % and 70 % of VDD; VIL is 0.3VDD <S> and VIH is 0.7VDD. <S> See Figure 38, timing diagram. <S> Some legacy device input levels were fixed at VIL = <S> 1.5 V and VIH = 3.0 V, but all new devices require this 30 %/70 % specification. <S> See Section 6 for electrical specifications." <S> (page 9) <S> Deeper in the spec, you'll see that this \$ 0.7 <S> \times V_{DD}\$ is the minimum logic high voltage: <S> For your 5V system: <S> \$ 0.7 <S> \times 5 V = 3.5 <S> V\$ <S> \$ 0.3 <S> \times <S> 5 V = 1.5 <S> V\$ <S> \times V_{DD}\$ for logic HIGH. <S> Your mileage may vary, but it's always best to be within the spec wherever possible... <A> Cees's answer is incorrect, in particular the "always" and "any". <S> Microcontroller I <S> /Os may need 0.6 Vdd as a minimum for a high level, other have a minimum of 0.7 Vdd, and like Madmanguruman indicates this is the standard for I2C. 0.7 <S> Vdd is 3.5 V at a 5 V supply, so 3.3 V is already too low. <S> But it's even worse. <S> Voltage regulators often have a 5 % tolerance on their nominal output voltage, so worst case 5 V may be 5.25 V, and then 0.7 Vdd becomes 3.675 V. Minimum input for a high level. <S> If the 3.3 V has a negative 5 % tolerance then 3.3 V becomes 3.135 V. <S> So with tolerances taken into account the input may well be half a volt too low, or 15 %. <S> So, <S> So I don't see a reason for a level-shifter as long as all devices detect the voltage from the pull-ups (3.3V) as logical high. <S> That should be the case with devices using 5V as supply. <S> is an untimely conclusion. <S> Always check datasheets and do the calculation. <A> This is a pretty old question, and many points were discussed already. <S> However, none of the answers here mention the incorrect assumption that in I2C the devices will only pull the lines (..) and never drive <S> In fact, in one of I2C modes, the HighSpeed mode, the master device can actively drive the bus, so if you're considering allowing HS communication over the bus, then mixing voltages might a bad idea: <S> High-speed IC devices are downward compatible allowing for mixed bus systems. <S> In order to shorten signal rise time HS mode master devices have a combination of an open-drain pull-down and current-source pull-up circuit on the SCL output. <S> HS IC masters can actually source current to the bus which is referred to as boosting . <S> This current source is enabled only (!) <S> during HS operation and just for one master. <S> Citation comes from an introduction to the HS mode which I've just found here . <S> Highlights added by me.
To me, the 3.3 V pull-up looks marginal, especially if any of your 5V devices use the 'new' standard of \$ 0.7
Can I safely use a HDD in a car? A few months ago I bought some new speakers and an amp for my Jeep. I made a little face plate with an ALPS potentiometer to control the volume and it has an iPod dock (no head unit, just the pot). A couple days ago I finally was able to order a Raspberry Pi, and I want to make my own head unit for my car that supports 192/24 for my vinyl rips (iPod only outputs 48/16). Can I use a HDD to store my music on? I know that the gyro effect on the HDD spinning can cause some serious problems if the drive is twisted around a different axis than the platters (because the head of the HDD can scratch the disk). If I securely mount a HDD in my jeep will it break? When I go off road the jeep probably does up to ±4g of acceleration for short times in random directions. Can a spinning HDD tolerate that? I will use a SSD if I have to, but even a small and (relatively) slow SSD for my 100GB of music will cost A LOT of money where as a 256GB HDD cost about $10 on eBay. A more complicated option would be to cache my current playlist to the SD card on the RPi and install an accelerometer. I could monitor the accelerometer and make it stop reading from the disk when the acceleration goes more that 1.2g or so. <Q> 192/24 for my vinyl rips (iPod only outputs 48/16). <S> The audio quality of vinyl discs is way below 48kHz 16 Bit due to the analogue and mechanic process - the "scratching" of the needle generates a relative high background noise level. <S> I strongly recommend using flash memory technology in a car instead of magnetic platters. <S> While 2.5" notebook HDDs can take a bit more abuse, they are still senstive - shock can damage them quickly. <S> But audio needs low bandwidth so you can try to use cheap memory like USB sticks or SDHC/SDXC cards. <S> No need to use expensive SSD. <A> A spinning HDD most likely breaks with \$\pm 4g\$. <S> If you really need to, go for a SSD. <S> On the other hand: Is the audio (and the environment) in the car that great, that you really need 192/24? <S> Wouldn't a lower quality also work (thus reducing the memory requirements)? <A> Go for SSD and if it's expensive for You, go for CF card. <S> Keep static files in CF and dynamic in RAM. <A> Seagate used to make HDDs specifically for automotive use, with much higher shock, vibration, and temperature tolerance: http://www.seagate.com/docs/pdf/datasheet/disc/ds_ee25_2.pdf <S> They discontinued them in 2010 as SSD prices began to approach a similar $/GB of the automotive drives. <S> So, you definitely want to use some sort of flash, as it has replaced these ruggedized HDDs, but as TurboJ noted you don't need an SSD for this application. <S> I have all my music in my car on a 32GB USB stick and it works fine. <S> 32GB/64GB USB will run $0.45-$0.50/GB; if you want to go bigger than that you're probably going to be better off with an SSD which are approaching $0.50-$0.55/GB in some capacities. <A> <A> My answer would be dummy, but I suggest you to use a damp cage. <S> That will smoother and protect the hard disk from the high accelerations. <S> I have disassemble my old Thoshiba dynabook and I could see that there's damped rubber cage around it. <S> It's up to you to design that damped cage. <S> BTW , Unfortunately while you writing ML code simulation for yournew damped cage, you may found there are already designed damping cagesfor your requirement: <S> http://www.acousticpc.com/gup_japan_smart_damper_hard_disk_drive_antvibartion_mount.html[ Please note that I'm not working for acousticpc.com :P ] <S> Even there are good dampers that could hold accelerations in fighter jets. <S> SSD or SD are good alternatives too, But it don't address your question.
For a Raspberry Pi, I highly recommend using a really big SD card and just storing your music on that. For extreme case you could use a mechanism such like that used in train bogies.
Use a power supply as a switch I have some extra fans to cool my Xbox (4). I think that they would drain too much power if I connected them strait to the internal Xbox fan. So I want to know if I have a power suppliy for the extra fans, how can I get them to turn on when the internal Xbox fan turns on? <Q> The simplest solution to this is a relay. <S> Say the existing fan is 12V d.c. <S> (as per PCs), wire a relay coil across the existing fan connections, in parallel with it, and wire the (normally open) contact pair in series with your power supply and the new fans eg break the +12V line of your new power supply. <A> As Martin said, you could use this circuit to control the extra fans. <A> I've built an electronic thermostat to cool my 'disk cabinet'. <S> It keeps my disk drawer at a fairly constant temperature of 27 - 28 degrees (air temp).
It is safer for you to do this by breaking the 12V line to the fans than breaking into the mains live terminal to your power supply since it reduces your risk of electrocution and possible damage to your Xbox if a wire comes loose, but it means the new supply is running all the time. Advantage is that the fan only runs when required; rarely during winter season and every now and then during summer season.
How to mesure distance between two objects? I have some idea about make something and make some small production. Idea is to have something that measure distance between two objects. First one called A size doesn't matter, can be connected to pc or something and measure distance to B. B have to be insignificant size. This will operate with maximum distance 5m (10m even better) in xyz with precision of mm. Is there some technology to measure this, and what technology? And A to B is not necessary to be at line of view, and speed of motions is speed of human motions. B can be attached on for example human who is moving some room or open space. <Q> Signal power drop is an issue over 10 meters because of the inverse square law: if a signal can be detected 10m away, it's going to be 10000x stronger at a distance of 10 cm. <S> For magnetic fields, for example, that's a difference between 60 uT (about the Earth's magnetic field) and 6 T (a very very strong magnet, which would rip the metal off anything nearby). <S> You might could use RF power drop, but I expect that there would be similar safety issues, not to mention the FCC coming down on you like a ton of bricks. <S> You've got two basic options for timing signal propagation: sound, and EM fields. <S> EM fields can't really give you the precision you want using travel time as your distance measurement, because 1 mm is about 3 picoseconds at the speed of light. <S> I could be wrong, but that's orders of magnitude beyond what's a reasonable granularity for timing measurements with any hardware I've ever seen. <S> Sound is easier to work with, but can't really propagate at the distances you're talking about at frequencies over about 250 kHz. <S> (http://www.katho.be/apps.aspx?smid=2688) <S> The wavelength of 250 kHz is about 1.4 mm, so no one microphone is going to give you an arrival time down to the precision you want. <S> Possibly some sort of interferometer? <S> Not to mention that those high frequencies aren't going to work so well without line of sight. <S> Your best bet is probably triangulation. <S> That requires three locations, not two, and might give you acceptable results if a third station is something you can work with. <S> That changes the question to: how do I determine the direction to something, when it might change location by 1mm 10 meters away, giving a needed precision of five thousandths of a degree? <S> I'm afraid I don't know the answer to that one. :) <A> For measuring the xyz you will need at least 3 detectors in order to make triangulation you cannot do it with only on receiver. <S> The the detectors must be away from each other and in a known relative position much like GPS satellites. <A> You should investigate the technology that Polaroid first used in its cameras to perform autofocus. <S> It uses pulses of sound at about 50 kHz. <S> Similar devices are still available, e.g. the SensComp 7000 is a complete system comprising a transmitter, receiver and transducer. <S> It claims a range up to about 10 meters and a 17 degree beamwidth and is relatively low cost (about $55). <S> Accuracy and range resolution are not specified but should be in the order of 10 mm, maybe better since this technology was used to focus a camera lens. <S> You may have problems in your application if the target is small and/or moves fast. <S> Some sort of scanning may be necessary if the bearing of the target B relative to your A can vary a lot and rapidly.
I've seen three basic options for distance measurement: triangulation, measuring power drop from a source of known power, and measuring travel time for a signal of known velocity.
Hum on car stereo when source powered by inverter I have an auxiliary input on my car stereo, which I plugged my laptop into to play music with. It worked fine until I plugged my laptop into an inverter so the battery didn't die. An extremely noticeable hum started coming through the speakers which corresponded to the speed of the engine. Is there any way to prevent this? <Q> The hum is caused by ground loop , a common issue with audio equipment that shares inputs with various devices within the same DC circuit (sometimes in more complex floating negative circuits too) <S> This hum is always there! <S> It is just filtered out by the audio equipment using Ground as a reference point for removing this "noise", always. <S> This noise can include clicking from indicators(relays and high impedance), speed (caused by high voltage discharge on spark plugs) other mechanical/electrical related equipment. <S> The reason it starts to "pick up" this noise once you plug your charger into the inverter(which makes things worse because it "amplifies" all the noise) is that because the ground loops over the filtered audio and causes a double refernce which confuses the filters and assuemes this is the correct audio. <S> You need a simple ground loop isolotor between the inputs. <S> or avoid creating ground loops. <S> ie ( ground creates a full circle via the audio cable) <S> Just for fun <S> Professional (or highly addicted) car audio enthusiasts go to crazy extends in trying to reduce noise in audio to be able to amplify the signal into thousands of watts and over 120decidbels. <S> Noise can cause speakers to distorts which technically makes the loudness go away and also damages the speakers core. <S> Some methods include pre amplifiers, special and very expensive alternators-sometimes even several alternators that go through very expensive current stabilizers, and a variety of other highly priced goods. <A> No, I don't think the hum has anything to do with the switching of your switching power supply for two reasons: <S> The hum is proportional to engine speed. <S> The switcher wouldn't know nor care what the engine speed is. <S> The hum is in the audible range. <S> Switching frequencies are generally much higher. <S> What is most likely happening is that the connection to the laptop back thru the power supply causes a ground loop. <S> The audio signal coming out of the laptop is referenced to ground in a different place than the audio amp's input. <S> The difference between the two grounds shows up as signal at the amp. <S> Such ground differentials are very common in a car. <S> Since this is proportional to engine speed, it is probably the pulses caused from firing the sparkplugs. <S> Each spark plug firing is a multiple-kV event, so a little bit of that causing ground differential between two separate points isn't surprising at all. <A> Laptop power supplies are SMPSs , that means they switch on and off the transformer in order to regulate the output voltage. <S> This switching is made at a much higher frequency than we have on our outlets (50Hz in Europe or 60Hz in US). <S> The humming must be generated on the power supply (in this case the frequency should be high) or by the mains itself (in the case the frequency should be low). <S> In both cases this can be caused for the filtering used on the power supply or by a defective component (usually a capacitor).
Probably the humming is related with the power supply of your laptop. But unless you build something like this.. a simlple 3quid ground loop isolator is your best bet.
What is the difference between these resistors? Take a look at these two different resistors: Fig.1 source Fig.2 source The first one looks "normal" to me (the way resistors I've always bought in the past look..), but the second looks kind of odd. Both of these pictures are of 5% carbon film resistors. What's the difference between them? <Q> The images don't have clear scales, but it can be inferred. <S> Resistors in Fig.1 are rated for 0.25W. <S> Resistors in Fig.2 look larger and are probably rated for more power dissipation: <S> 0.5W or 1W. update: <S> I wrote a brief beginner's field recognition guide for power ratings of common throughole resistors . <A> Note that power dissipation is not the only feature which may differ - see below. <S> You can tell very little with certainty by looking at resistors externally. <S> Knowing the manufacturer is liable to tell you far more than appearance does. <S> An excellent example are the superb SFR16 resistors (originally made by Philips and subsequently sold on several times) and their companion SFR25 resistors. <S> The combined SFR16 / SFR25 datasheet here shows that an SFR16 resistor is rated at 25% more dissipation than an SFR25 but is only about 50% of the length and 80% of the diameter. <S> When placed side by side the SFR16 appears tiny compared to an SFR 25, having only about 33% of the volume. <S> Some other versions of the SRF16 had datasheets that advised up to 0.6W dissipation. <S> (Note that the SFR25H in the above datasheet with the same dimensions as the SFR25 has 0.5 W dissipation). <S> Why, then, use an SFR25 ever? <S> The SFR25 <S> compared to an SFr16 has superior temperature coefficient, 250V compared to 200V maximum voltage rating and much superior noise characteristics in some ranges. <A> Like Nick says the difference is in their power rating, and I join Wouter's bet on 0.5 W for the second ones. <S> The first ones are 0.25 W. <S> Both are constructed the same way, as shown in the drawing. <S> Only with the smaller resistors, like 1/4 W down to 1/10 W <S> the insulation blobs over the end caps are so large compared to the core length that they hide the cylindrical shape of it.
Aside from different resistor values, these resistors probably have different power ratings. While I am almost always in agreement with Wouter, and do not differ very substantially on this occasion, I note that in some cases small resistors from a given manufacturer can have larger dissipations than those of larger resistors from the same manufacturer.
Best way to connect a RS-485 device I have to control a device with a C++ application (Windows) via RS-485. I'm wondering, which would be the best way to connect it. Should I use a USB-RS485 adapter (which would be the most flexible solution) or a RS232-RS485 adapter? Any other recommendations? I am especially concerned about the speed, I used to work with a USB-RS232 adapter, which was very slow (OK, was also cheap). At the moment, I'm considering buying a NI adapter . Any other recommendations? Thanks. <Q> I'm not going to give any specific device recommendations <S> but I will offer some advice. <S> Adapters which use an RS232 port are available but these have some disadvantages. <S> First, these devices generally use the RS232 RTS line to control data direction. <S> If the windows RS232 drivers is used, you may find timing issues (because the RTS line was not intended for this purpose) although some adapters have their own device drivers to circumvent this problem. <S> Other adapters claim to have 'automatic' direction control. <S> The ones that I have seen do this by connecting the transmitted data to the data-enable line of the driver chip so that when the 485 line should be driving the line to the high state, it actually goes tri-state and relies on pull-up/pull-down resistors to 'drive' the line. <S> This solution gives poor drive capability and slow risetimes (which may be the cause of your slow speed experience). <S> One other potential problem is power. <S> Since RS232 ports do not have power as such, RS232 adapters get their power from data or flow-control lines. <S> One adapter I know of has a curious 'bootstrapped' internal power circuit (I won't bore you with the details) which relies on some transmit data transitions to 'kick it off' so it is completely 'deaf' until some data is transmitted. <A> You definitely want USB-RS485 not RS232-RS485, as the latter cana control teh data enable much more precisely - this can become very significant at higher baudrates. <S> Easysync make a range of cased USB-485 products, some based on FTDI's board-only products. <A> Edit: Since you talked about RS232 converter <S> I presumed you had RS232 available. <S> As it appears you haven't the obvious choice is USB-RS485. <S> If you're using just the TxD and RxD of the RS232 <S> I would suggest the RS232-RS485 adapter. <S> Both standards are just about the physical layer of your connection, and transforming voltage levels is completely transparent; your data format remain untouched. <S> USB would add an unnecessary level of complexity, just for transport, since on the PC you'll probably use a virtual COM port driver to get UART data on the USB bus <S> The USB-RS485 bridge will also be more expensive. <A> I will also recommend RS232 to RS485. <S> In case if you are looking for module sort of solution which converts usb to rs232 and rs485, have a look at eDAM modules.
As you say, a USB-RS485 adapter is the best solution.
Why is the voltage regulator's output current not what I'm expecting? I've recently bought a couple of Sanyo LA5003 voltage regulators ( datasheet ). From the datasheet, I understood that the highest possible current on the output can be 60mA. However, when I connect it to several (2 or 4) series-connected 1.5V AA batteries, I get, respectively, around 120mA and around 140mA. Here's how I'm testing the current: (pin 1 is on the right) What am I doing wrong and/or misunderstanding? PS. I've tried measuring on more than one of them, obviously. <Q> The 60 mA is under Absolute Maximum Ratings, which means you never should exceed that at the expense of damage to the regulator. <S> Since you can get twice that out of it it appears that there is no internal current limiter. <S> Which is BAD, every regulator nowadays has current limiting. <S> The datasheet's electrical characteristics and the graphs are specified at 20 mA. <S> There are lots of regulators with better specs available, like uA ground current instead of mA. <S> Also the look of the datasheet doesn't give me much confidence. <S> edit Possible alternative: <S> Seiko S-812C30B : <S> output voltage 2.0 V to 6.0 V, selectable in 100 mV steps 2% output voltage accuracy up to 16 V in <S> low ground current of 1 µA typical, 1.8 µA <S> maximum (that's 1/1000th of the LA5003!) <S> LDO short-circuit protected power-down mode guaranteed stable without output capacitor <S> I'm a fan. <S> In the past I didn't recommend it, though, because of it's bad availability, unless you needed 100k/year. <S> But now I see you can get them at Digikey too. <A> The great advantage of this part compared to regulators like the LM317 or <S> LM7405/ LM340 is the very low dropout voltage of typically 0.2 V. <S> This compares to about 2V for an LM317 of LM7805. <S> This means that Vin-Vout can be as low as about 0.2V. <S> In your application the LA5003 is rated at 3V out nominal <S> so you need at least 3.2V in and <S> really more like 3.5V to be safe. <S> So 2 x AA cells is not enough voltage and 4 ells is more than you need except when the battery is very very flat. <S> For most purposes 3 x AA cells would bge OK. <S> What am I doing wrong and/or misunderstanding? <S> I assume from your diagram and text that you are measuring short circuit current. <S> If so, that is not what the data sheet specifies. <S> The current is specified with the device working properly - ie with not less than about 50 ohms load. <S> With a short circuit 'all bets are off". <S> The Ioutmax rating is the absolute maximum you should ever take - NOT what it may give. <S> Interestingly, the Iout versus Vout graph on page 3/4 , <S> 3rd down in left hand column, shows test current up to 100 mA. <S> Vout was 3.12 V at no load, falling to 3.10V at 100 mA. <S> They are not great respecters of their own 60 mA absolute maximum rating :-). <S> The quiesecent current is not nice <S> but as long as you are happy with the max mA rating the device is quite nice in a number of respects. <A> You are measuring the current incorrectly, and you are misunderstanding what the term "maximum current" means. <S> In order to measure current, you need to place your meter in series with your load. <S> If you place it in parallel, then the meter will short-circuit your source (regulator in this example) and give you a (usually) nonsensical answer. <S> The datasheet specifies maximum values, such as maximum current and maximum power dissipation, and it is your job to make sure that you don't exceed those parameters. <S> The maximum current is the most current that you can safely use without damaging the circuit, but this part won't stop you from exceeding the maximum current.
You are measuring current like you would measure voltage. It appears that you'll have to make sure yourself that the 60 mA is never exceeded.
Voltage and Current Limiting Circuit I'm a newbie to circuit design, so I think I'm either really lost or over thinking this (most likely the former). I need a circuit that will act like a current limiting power supply, which I can design in a specific voltage (20mV) and current limit (100mA) across multiple independent outputs. Each of my outputs will likely be shorted or see very low resistance. So far, I've looked ICs that can provide a constant current source, but none are in the current range I need. I've looked at voltage regulators, but I'm not sure how I could limit the current from them. The most promising thing I've seen so far is using a two transistor current limiter, like this: Source: Wikipedia Is is likely to work? If I have multiple circuits like this (connected to the same VCC and GND), would it still work as intended? Is there a much better way to approach this problem? <Q> No, the transistor circuit won't work at 20 mV, since it needs at least 0.7 V to overcome the base-emitter junction's voltage drop. <S> It's unlikely you'll find any kind of circuit that will work at this low voltage. <S> But all is not lost. <S> A current limiter may well work with a higher input voltage. <S> It will be the load that determines the output voltage, per Ohm's Law: voltage = current x resistance. <S> So even with a 5 V supply and a 0.2 Ω load you'll still have only 20 mV across it if you limit the current to 100 mA. <S> So use a supply voltage of a couple of volts with the transistor current limiter and everything is peachy. <S> Keep an eye on the transistor's dissipation. <S> At 5 V in and 100 mA that's 500 mW <S> and that's often the limit for a general purpose transistor. <S> The BC337 's Absolute Maximum Rating is 625 mW, for instance. <S> So a 3 V supply is safer than a 5 V one. <A> An assumption need to be made which you may wish to clarify. <S> If you want 20 mV at UP TO 100 mA <S> then none of the circuits will work without both a current control and voltage control function. <S> The following circuits deal with current control. <S> These can be used to feed a standard 20 mV voltage regulator circuit. <S> If Iload is < Icurrent_limit then the VR works as desired. <S> If Iload tries to exceed current limit then VR is starved of current. <S> So ... <S> Your circuit will work but is relatively low quality - it depends on the Vbe of Q2 being well defined - which it tends not be be. <S> Steven says that the top transistor needs more than 20 mV Vbe, which is true BUT if you set the current of choice and IF the load drops 20 mV at that current then Q1 will assume whatever Vce is required to drop 20 mV across the load. <S> Original circuit. <S> Not marvellous - Much better are circuits similar to the one below from here . <S> I've modified this slightly but left their values in place as this is to give an idea only. <S> The system turns Q3 on until V_Rsense = Vref. <S> So I_constsnt-current = <S> Vref/Rsense. <S> Vref can be divided from some input voltage as shown using a divide ratio to suit. <S> . <S> You can provide a variable voltage from a pot or a microcontroller etc if desired to vary the current. <S> Note that this is a current sink with the load being supplied from some V+ of choice. <S> Need not be the same V+ as Vcc = <S> BPS+ <S> https://www.google.co.nz/search?q=current+source&hl=en&safe=off&prmd=imvns&tbm=isch&tbo=u&source=univ&sa=X&ei=K2P6T_iZEOijiAfU4JjlBg&ved=0CGAQsAQ&biw=1536&bih=864 <S> Similar but with MOSFET and uC drive <S> This is similar but uses the voltage across R1 to provide a high side current source. <S> From here <S> but he says it's copied from "The art of electronics". <S> Note again that Vref is the HIGH side voltage across R1. <S> ie Icc = <S> Vref / R2 = <S> [V+ x R1/(R1+R3)] <S> / R2 <S> Some thoughts from Maxim from here . <S> Many related thoughts from all over <A> Look at the image below that I found here : <S> The voltage across R is known, it is 5V. Therefore if you want a 100mA current R should equal 5V / 100mA = <S> 50Ω. Beware that the resistor dissipates 5V × 100mA = <S> 0.5W <S> so a 1W resistor isn't a bad idea. <S> Not sure what your intention is with the 20mV requirement. <S> Input voltage should be at least 5V (regulator output) <S> + 3V (required across the regulator) = <S> 8V above your maximum required output voltage.
It is fairly easy to 'program' an 7805 voltage regulator to act like a current source.
Possible to parallel PC power supplies & increase voltage to 14 VDC? I'm in need of 14 VDC @ 100 amps. Switching power supplies are available but too costly. I have enough supplies left over from various desktops to assemble such a beast it's just how? This is to power a 500 Watt HF amplifier so solid voltage regulation and excellent filtering is a must. I've found projects to convert a PC power supply as a multi-voltage bench supply but nothing found to increase the 12 volt rail to 14 volts and then parallel for greater current. <Q> No, you can't generally parallel multiple supplies and get higher voltage. <S> Each supply will regulate to a specific voltage. <S> Even if all are rated the same, some will be a little higher and some a little lower. <S> The ones set a little higher will take most of the load. <S> There may also be oscillations as the multiple supplies try to fight each other. <S> In no case does this have anything to do with making more voltage. <S> However, the supplies need to be designed or rated for this. <S> Switchers are often easier to design for paralleling. <S> Some even have a current sharing signal. <S> This signal is connected between the supplies, which is used to level the amount of current each supply produces. <S> Some supplies achieve this instead by having a somewhat soft current limit. <S> Even if one supply is set a little higher than the others, it will hit its current limit and its output voltage will drop a little. <S> This causes other supplies to kick in and start producing current to hold up the bus. <S> This is generally not considered as good as deliberate current sharing, but it can work with the right design. <S> In any case, you're going to need switchers one way or the other. <S> You want 1.4 kW out, so dealing with waste heat is going to be a major design issue. <S> Even at 90% efficiency you still have 156 W of heat to deal with. <S> That's not trivial. <S> You say switchers are too costly, but what you want to do is not trivial and doing it <S> right will cost. <S> If you think switchers are too expensive, take a look at the total cost of the alternatives! <A> It may be possible if you have done this before, otherwise your power cable will become a 1 kW CB noise jammer. <S> I've seen it happen many times from Mainframes with current shared PSU's to towers we made at Unisys in Rancho Bernardo with OEM PSU's that were designed for current sharing with cross feedback of current. <S> The fix implemented was fine tuning of each supplies voltage and 10% of rated power dummy resistor. <S> When you do not have symmetrical rate of change of voltage in a no-load condition, it is non-linear and the PSU's will oscillate at low RF frequencies at full power. <S> I have never seen a 1.4 kW HF radio designed for 14.0 V but certainly spec'd at 14V with a range of 10~18V or 12~15 etc. <S> I agree switching noise or humm must be avoided, but how low is required? <S> This is what I recommend; <S> Test your radio on your vehicle after confirming the voltage is within spec. <S> Cars are typically 14.2V +/- <S> 0.2 <S> Use welder's cable or starter cable and connect to radio. <S> Test for noise levels on transmit and receive with another radio. <S> Put in a remote starter for your vehicle and run it when you need to power your radio. <S> If you really need it 24x7. <S> bring a car battery inside to power the radio and make sure it has low ESR = good specific gravity in each cell. <S> ( very important ) <S> plastic caps ( I prefer Panasonic) <S> Please report on each step of your test results and specs for power source <S> noise acceptable levels and ensure you use 50 Ω method for measuring noise. <A> Yes, is possible to increase voltage up to 14.5V for a PSU and to parallel two or more to increase oputput current (power). <S> Some server PSU have a pin (RETURN) that alow to increase otutput voltage to about 14.5V; regarding paralleling, need to have care that each PSU share about same current as each others.
Use a regulated battery charger to maintain voltage at 14V then add essential Ferrite filters for CM choke on twisted pair power cables with low ESR (1 mΩ ) It is possible to parallel some supplies to achieve higher overall current.
Getting 7-12V from a computer monitor Does anybody have an idea how to safely get 7-12V from an ordinary LCD computer monitor? I wish to control the monitor via a microcontroller after the fashion of the guide at lucidscience . I'd like to have the microcontroller draw its power from the monitor, rather than add another power source. (The arduino needs 5V to run at the clock speed prescribed by the guide, so I understand that to require 7-12V preregulated.) Perhaps I could simply stick a multitester here and there, but I'm green enough that that looks pretty hopeless. <Q> Find out how much power the power supply for your monitor puts out and then hook up a boost converter (to step up the voltage) or a buck converter (or maybe voltage regulator) (to reduce the voltage) to power the arduino. <S> (The general: Be aware of high voltages applies here too.) <A> Many monitors have built in USB hubs. <S> Get one of those and use the +5v directly from the USB port. <S> Done. <A> Since you are dealing with an LCD monitor you aren't facing any danger from the voltages inside (an old CRT monitor is a very different story). <S> That said, in either case the most guaranteed source of DC voltage is pin #9 on the VGA connector or pin #14 on the DVI connector . <S> Both of these should be at 5V so you will need a buck convertor to raise the voltage to power the Arduino (although the 5V would be fine to power an ATMega328 directly). <S> I have exactly no idea how much current either of these <S> is <S> pins can allow so doing this may burn out your video card so attempt this on a cheap / old card first and be prepared for failure.
Sometimes you even find marked points on the screens power supply to tap into.
Overload protection for battery My 6-year-old son has shown some interest in electronics, and I thought I'd get him some basic components (motors, LEDs, buzzers, etc) and let him experiment (using alligator clips and the like -- no soldering at his age!). The one worry I have is that he'll accidentally short-circuit the battery, which could be dangerous. Are there battery cases (for standard AA, etc) available for purchase somewhere with built-in overload protection? Failing that, I thought of soldering fuses to the battery holders. What would be an appropriate current rating for the fuse? I was thinking 1-2A, but my electronics expertise is pretty rudimentary. <Q> I would suggest a 1A polyfuse. <S> Or a wall-wart with short-circuit protection. <A> I think you're more in danger of exploding components like reverse-biased caps venting. <S> I managed to popcorn the front off a TIP31 in my industrial technologies class in highschool with a lot less power than I thought it would take (pieces were bouncing off the back wall). <S> Nothing he's doing should require more than 250ma at his age, so I'd suggest a large series resistor on the battery pack. <A> The AA (assuming alkaline) batteries are not capable of sourcing dangerous currents. <S> A direct short across a AA battery will produce at most a warm battery. <S> I wouldn't worry about fusing in this particular scenario. <A> That way you can limit what the power supply will do, and it will give you a bit more flexibility than just some batteries. <S> An added benefit is that it's easier to use clip leads with a standard supply.
I would recommend getting an old used benchtop power supply that has a current limit function.
How can I convert an irregular PWM signal with a duty cycle of 95 to 99% to an analog signal? For the purpose of measuring particulate matter (PM) in air, I am trying to set up a DAC system for the PM sensor Shinyei PPD42NJ ( info here and datasheet here ). I've been trying to just use a low pass filter to get an analog voltage, but I'm not sure how to calculate the appropriate capacitance and resistance. Concern: if I use the low pass filter, will past measurements affect the current measurements (unless the capacitor can be reset every time the voltage is sampled)? How often would I sample the voltage if the frequency of the LOW pulses are sometimes as low as .5 Hz? The parameters of the PWM are Negative Logic, Digital output,Hi : over 4.0V(Rev.2) Lo : under 0.7V. Here is a picture with Channel 1 showing the usual behavior of the signal versus time. <Q> Although one could use a simple RC filter, I think one would do better to use some sort of digital filtering. <S> The time scales you're looking at <S> look well within the range of what a processor could handle. <S> A simple way to perform the filter FIR filter is to scale up each reading so as to be a bit short of the full range of a 16- or 32-bit integer, and then do something like (pseudo-code): temp = <S> new_readingfor each item in an array <S> new_temp = <S> (temp + <S> array_item)/2 <S> array_item = temp temp = <S> new_temploop <S> The final value of new_temp will represent a low-pass filtered value of the input; one can vary the number of seconds per reading and the length of the array to adjust the filter characteristics. <S> Note that if one uses e.g. a sampling interval of two seconds and an array that's 16 elements long, only the last 32 seconds of input will be considered in producing the output (meaning that the output will fully respond to any change in input conditions within 32 seconds) but relatively "stable" input conditions will yield a relatively stable output (much more stable than with an RC filter that converges reasonably fast). <A> Looking at the waveform, it looks like you get a pulse every few seconds, and the pulses last tens of milliseconds. <S> This is pretty slow, <S> so: <S> The analog signal will be much slower than your pulse rate. <S> You should expect the analog signal to take about a minute to settle when the pulse rate changes. <S> You will need to choose pretty large values of resistor and capacitor. <S> The time constant of an RC filter in seconds is the product of the resistance in Ohms and the capacitance in Farads. <S> Since you're looking for something in the order of a minute, I'd start with 12k ohms, and 4700uF. See how that works. <S> If you need a slower response, then use a larger resistor. <S> Here's what it looks like with 12k and 4700uF: <S> There are 0.1s pulses every 2 seconds over the course of 2 minutes. <S> As you can see, it hasn't really settled, even after two minutes, and the variation in the analog signal is still about 5%. <S> With a smaller resistor, you can have faster settling time, but more variation. <S> With a larger resistor, you can have slower settling time, but less variation. <S> I don't know if this is an option, but have you considered using a microcontroller to read these signals? <S> What will be reading the analog voltage? <S> If it was going to be an ADC and a microcontroller, I would forget about the ADC, and just let the MCU take care of it. <S> These pulses are so slow that even a computer made out of cog wheels could reliably sample them. <A> If pulses count, but amplitude and duration don't, then you can trigger a monostable multivibrator with them. <S> Then you can change to measuring time which is reasonably easy to accomplish with a counter (in a microcontroller) in contrast to measuring very short spikes through a low pass filter. <A> Looking at the data sheet, the "unit time" is 30 seconds. <S> I'm not sure <S> why , without further details, you want to convert this to an analog signal only to then sample it again. <S> However, if you're committed to converting this to an analog signal, you'll need a filter with a very long time constant of the order of the "unit time". <S> Another option would be to integrate the signal with an op-amp integrator circuit that is sampled and reset every 30 seconds. <S> This sounds like what you have in mind when you ask about memory of previous "measurements". <S> If you'll provide some more context, I can be more specific with my answer. <S> By the way, have you looked at this ? <S> The author interfaces this sensor to an Arduino.
To know what value of capacitor and resistor you want, you will need to think about the response speed you need to achieve. I would suggest that your best bet is probably to do something like sample the input pin once per millisecond and keep track of how many times the input has been low during each somewhat longer time interval (maybe one second or five seconds), and then use a digital FIR filter to add up those readings.
Charging two lead-acid batteries connected in series, separately (with one solar panel) I have 2 sets of 2 lead-acid batteries connected in series to produce 48V. They are powering an audio amplifier. I'd like to be able to charge them with ONE solar panel. If I connect the output of the solar panel to both charge controllers, a short circuit occurs. What can be done to make this possible? I made a drawing to illustrate what I'd like to achieve. <Q> Otherwise, you'd need two separate charge controllers, each isolated from the input. <S> That is not generally how they work, so that would be more difficult to find and more expensive if you do find it. <A> Taking the question at face value, ALL the answers given are wrong [ :-) ] <S> and your question and a subsequent comment do not match. <S> You say you have 4 x 12V batteries to make a 48V supply. <S> Your diagram implies (but does not state) that the panel is 24V rated. <S> In a comment you say <S> I don't think I know <S> the PV array's knew voltage. <S> I know it produces up to 18V in full sunlight though. <S> – Wurlitzer Jul 10 '12 at 23:00 <S> An 18V O/C panel is 12V rated, not 24V as per diagram. <S> Cheap and nasty solution: Use a relay (or relays) to swap the panel between batteries. <S> Either two positions if 24V panel or 4 positions if 12V panel. <S> A simple sequencer will be required to control the relays. <S> Very fast swapping rate reduces relay lifetime, and controller will take a time to settle so "dead time" % is higher. <S> Very slow swapping rate increases risk of imbalance. <S> If you swapped every minute or even every 5 minutes the long term differences will be minimal. <S> A good "real" solution is to use a 48V panel - or 2 x 24V or 4 x 12V panels in series. <S> Also suitable would be to use a 12V to 48V converter. <S> Some MPPT controllers are available which will both up-convert the input voltage and also optimise loading to maximise panel power output. <A> A Single 24volt charger would definitely be the easiest and cheapest way to go, however... <S> If you can spare the $$$ 2x 12volt chargers as you have shown in the diagram would be the way to go. <S> This will give you a nice balanced battery . <S> Usually balanced batteries have LiPo chemistry because of how volatile they are, however, the same technique can be applied to a Pb battery. <S> This will give you longer lasting batteries and more complete "fully charged" state. <A> What is the knee voltage on your PV array? <S> 12 ? <S> 14 ? <S> 16V? <S> If I wanted efficient 24V~28V storage power and I would choose an a PV array to match the batteries. <S> e.g. 48 cells in series * 0.6V = <S> 28.8V near 100% current. <S> ( no converter just a voltage limiter.) <S> Max power transfer from current source PV panel is at knee voltage of panel.
The easiest solution is to get a charge controller with 24 V output.
Why does micro USB 2.0 have 5 pins, when the A-type only has 4? What is the extra, 5th, pin on micro usb 2.0 adapters for? Here is an image with the different connectors. Most of them have 5 pins, but the A-type host only has four. (source: wikimedia.org ) <Q> It's for On-The-Go , to select which device is the host or slave: <S> The OTG cable has a micro-A plug on one side, and a micro-B plug on the other (it cannot have two plugs of the same type). <S> OTG adds a fifth pin to the standard USB connector, called the ID-pin; the micro-A plug has the ID pin grounded, while the ID in the micro-B plug is floating. <S> The device that has a micro-A plugged in becomes an OTG A-device, and the one that has micro-B plugged becomes a B-device. <S> The type of the plug inserted is detected by the state of the pin ID . <A> To complete Oli Glaser's answer, 5 pins USB respects the On-The-Go standard (OTG) . <S> The additional pin added to the conventional USB port is the ID pin added to the 4th electrical pin, and allow to recognize the device. <S> Here is the resulting electrical setup of the pins: VDD (+5V) <S> D- (Data-) <S> D+ <S> (Data+) <S> ID (ID) GND (Ground) <S> Host: ID connected to GND Slave: ID not connected (floating) <A> It's for host:client negotiation. <S> Permits distinction of host connection from slave connection host: connected to Signal ground slave: not connected source <A> There is no info carried by the 4th pin. <S> When connected to the ground (5th pin) <S> it serves to notify the host that it is connected to a dumb-client device instead of a smart-client device. <S> This is confusing at best because some client devices only act as dumb-clients and some client devices can be either smart-client, another peer-host, or a pass-through repeater. <S> You will probably only ever see OTG actually used in case of a keyboard being plugged into the micro or mini connector on a tablet computer. <S> Other client devices usually have enough inherent software capability to notify the host that they are a client using the normal 4-wire USB connection. <A> As shown here the original type A and B connectors use four connections, D+ and D-, which are differential data signals, along with ground and +5v. <S> The newer mini and micro connections add an ID signal. <A> Before USB OTG was popular, the 5th pin was an auxiliary pin to allow the USB port on portable devices to be used for other purposes via passive components/circuits. <S> A resistor array in the cable would indicate the function of the cable to circuitry in the device. <S> Sometimes this could be a composite TV out, but it was mostly used for audio. <S> Manufactures HTC and Motorolla did this audio out on many phones, with different pinout schemes.
As compared to other 4-pins USB devices, where there is no ID pin, the advantage is to be able to distinguish the host device from slave devices.
How to determine the best diameter for a cable? In my understanding having a cable that has a too large diameter can lead to power dissipation, having one that is too small can lead to the same result. apparently the second case is much more popular in the "high frequency phenomena", the first case is probably caused by the material of the cable if i understood this correctly mainly because there will be an higher impedance. i don't really get: why this can happen? it's true what i have understood? how i can calculate the correct diameter? there are differences between AC and DC in this scenario? I have X Volts and i have to provide a maximum of Y Watts, where i have to start to pick the best cable for the job? <Q> You start by calculating the current: <S> Y watt/X volt. <S> The voltage is relevant for the cable's isolation, but not for the diameter. <S> (That's not entirely true. <S> If you work at Really Low voltages the voltage drop due to the cables resistance and possibly high current may become significant. <S> Usually not for mains voltages and higher, though.) <S> Thicker cables has less resistance, so less power dissipation. <S> I don't know where you read otherwise. <S> This page has a calculator for the cable's required diameter. <S> The same site also has tables for different kinds of cables. <S> There's indeed a difference between AC and DC. <S> AC has skin effect, where the current will flow more need the outside of the cable. <S> That "skin" is thinner as frequency gets higher, but already exists to a small extent for 50/60 Hz. <S> So an AC cable may need a somewhat larger diameter, though this skin depth calculator gives a more than 9 mm skin depth for 50 Hz in copper, so that won't be a problem for most cables. <A> If you need to carry current at high frequency (as is typically the case in switched-mode power supply transformers) <S> the current will have a tendency to flow through the outermost part of the wire. <S> This is caused by skin effect. <S> Middle of the wire will not conduct any current and will just be wasted copper (expensive and heavy). <S> To avoid this effect you will typically parallel many wires or use a litz wire. <S> Increasing the radius of the wire above the skin depth will neither yield in increased losses nor will it decrease losses. <A> In my understanding having a cable that has a too large diameter can lead to power dissipation ... <S> I know of no physical effect which would cause this. <S> Speaking for DC: Bigger is always better when you dont mind the extra cost and weight. <S> You think of a length of cable like a simple resistor: It will have a resistance (per meter), and also the ability to dissipate heat (per meter). <S> The current flowing will generate a specific amount of heat: $$P = <S> \frac{I^{2}}{R}$$ <S> This amount of heat (P) has to be dissipated, unfortunately the cable has a thermal resistance and this leads to a rise above ambient temperature <S> (more on that topic can be read if you google a basic tutorial about heat sink calculations, those are the same). <S> In reality these calculations are not needed but you can use tables for that purpose, these tables give you a maximum current for a give diameter of a copper cable. <S> I can't point you to one, since the hardware I deal with usually does not handle any significant current, so the minimal diameter of cables which is necessary to withstand the usual mechanical forces is sufficient. <S> AC on the other hand is quite different: I think it is safe to say that anything under 1kHz behaves much like DC, higher frequencies will show things like the skin effect (not so much diameter, as you suggested). <A> To determine proper wire gauge you need to have at least one of bellow as prime measure calculation . <S> 1-Voltage 2-Amperage(current) <S> 3-Resistance 4-Watt (output or input power) <S> Formula is V= <S> I.R _____voltage= Amp X Resistance Formula is <S> W=I.V______ Watt = <S> Amp x Voltage <S> Then there's chart for wire gauge that indicate require Amp and resistance for each gauge number per foot or per 1000 feet. <S> Regardless of the length you need you can calculate what gauge will carry the voltage and amp you need. <A> Normally cable size is based on current carrying capacity. <S> An old but still valid rule of thumb is 1000 Amps/square inch (changing to metric did not invalidate the basic physics) <S> The overload capacity before the fuse blows or breaker trips (normally 1.25 of the rated or label value) is the value here rather than the working load. <S> For DC or mains AC you can forget "skin effect" for all practical purposes. <S> But volt drop can be an issue at DC, while on AC with heavy loads and long runs, it can be the factor determining cable size and type. <S> At KHz or MHz frequencies when feeding transmitting aerials from medium or high power transmitters; small bore hollow copper tubing is commonly used for the feed line regardless of the transmitter having single ended arrangement as in a ships radio room or balanced line intended to feed a large aerial such as a Rhombic or Curtain Array aerials as found at land based shortwave broadcast and other stations. <S> Switch mode power supply transformers and drive circuitry, and its design; so it performs even at the limits of supply voltage and temperature while meeting all regulatory requirements including better than minimum EMC. <S> EMC quieting is more an art based as much on experience as any theory due the number of interacting variables. <S> Modeling helps up to a point, but gut instinct and intuition is as important if your product is up for the type approvals (CE mark etc) required for mass production. <S> OldBlueBear
The selection parameter for a DC cable is the current (the voltage does matter in terms of insulation, but not for the diameter).
What electrical design reasons are there for making rechargeable batteries non-removable? There are lots of consumer devices that run on rechargeable batteries and have those batteries non-removable without disassembling a device. The most notable example is I guess an iPhone. Making a battery non-removable has these advantages: simpler case - no need for the door that would otherwise need to be strong enough to survive careless operations by the user better case sealing tighter packing of the battery into the case allows for more space for other components or smaller case users are forced to use service shops that can generate money for the manufacturer through "authorization" programs Yet none of these reasons seems to have any electrical design basis. Are there electrical design reasons for making rechargeable batteries non-removable? <Q> 6) <S> The battery management logic and possibly some of the circuitry can be simpler and more effective if the exact battery type, and therefore the battery characteristics, are known. <A> 5) <S> The user can't replace the battery with the wrong type (especially voltage), which may damage/destroy the device. <S> This could well be reason number one. <A> 7) <S> Legal dept recommends what the company should do with <S> it's warranty claims, risk management to massive recalls, service costs and service profits. <S> If a user can service it with 3rd party batteries that fail due to mismatched energy management profiles or quality, it is a huge financial risk at every level from marketting, advertising, sales, service. <S> Was the design technology driven? <S> NoIt is always about Revenue. <S> And the sales of batteries is just a small part of the cost equation. <S> The cost of failure from 3rd party batteries if they ever failed for any reason due to the host charger or even just the "loss of face " from media slander has a cost implication. <S> AS well could Apple rely on consumers to re-cycle their batteries safely? <S> They also have salvageable content. <A> Device design plays big part in this. <S> Battery that is not removable is usually in very thin (less than millimeter) <S> enclosure thus enabling thinner devices. <S> If same battery was to be made removable, they would need to add some rigidity to it and that usually means at least few millimeters increase in size. <S> Other reason is aesthetic one. <S> Smooth lines seem to be favorable these days and, no matter how good your battery compartment is, external battery interrupts that smoothness. <A> The spring-loaded contacts commonly used for user-replaceable batteries have much higher resistance than other options, especially once an oxidation layer forms. <A> Another reason I can think of is to avoid the need for a backup battery or supercap for the RTCC or memory chips that should retain data. <A> I'm surprised nobody seems to have mentioned weather-proofing. <S> Making a sealed case weather-proof (or waterproof) is fairly easy, but throw in a user-replaceable battery and associated battery door, and suddenly it becomes a lot more difficult to ensure that water cannot enter the part of the device where the electronics reside. <S> Yes, it can be done (high-end cameras do it all the time), but is the buyer willing to pay the extra money for it? <S> Just one example of this: electric toothbrushes. <S> Entry-level models can probably be manufactured for 10-20 dollars, if not less, and the better models likely don't cost much more in manufacturing. <S> Now make the battery replaceable, add a battery door and the necessary adaptations to support these. <S> The cost for this probably adds up to a fairly large fraction of that manufacturing cost, while delivering very little value to the customer. <A> If the design treats the battery properly, most consumers will throw the device away before the battery needs replacing. <S> You may still have your 1st gen iPod, but do you actually use it? <S> And most devices are fine until they sit unused in a drawer, killing the battery. <A> If the only time rechargeable batteries were swapped out when a brand-new nearly-fully-charged battery was replacing a dead one, and if after battery installation a unit would be allowed ample time to run a full discharge/recharge/gentle-top-off cycle before it was called upon to do anything else, then allowing user-replaceable rechargeable batteries might not be a particular problem. <S> If rechargeable batteries can be easily swapped, however, users may expect that they should be able to batteries in and out with any state of charge, and immediately proceed to use them. <S> This in turn will require that battery-management logic be bundled with the batteries such that it always travels with them. <S> If one could be certain that batteries would only be charged and discharged by devices made by the original manufacturer, bundling an inexpensive EEPROM with each battery would probably be sufficient. <S> If, however, there is a possibility that batteries might be charged or discharged by a device which doesn't properly maintain the information in the EEPROM, behavior would likely be very poor. <S> Including a charge-monitoring chip with the battery itself could avoid such difficulties, but would add significant additional expense.
This could include getting more capacity out of the battery because the algorithm doesn't have to work accross a variety of battery characteristics.
How a capacitor works I have an AC capacitor from the ceiling fan. When I connect its end to a socket (AC line 110V), it gets charged (as touching the terminals produces a spark). But at this point I am unable to understand this mechanism because I have read that capacitors don't charge storage for AC and act almost like a short circuit at t(0+).[neglecting the phase shift and assuming frequency above 50 Hz]. Could someone please explain where I am going wrong? <Q> Capacitors do store charge. <S> In fact, that's basically what a capacitor does, with the added characteristic that its voltage will be proportional to the amount of charge it has stored. <S> A capacitors doesn't store AC, but it does store whatever charge is on it given the voltage at the time it was disconnected. <S> Since the AC voltage can vary from zero to fairly high peaks, it is somewhat random what the capacitor will be charged to. <S> The peaks of the AC line is the square root of 2 times the RMS voltage. <S> For example, 115 VAC has peaks of ±163 V. <S> A capacitor could get charged to anywhere in that range. <A> There are two common uses of plastic non-polarized caps in AC motors <S> Start Capacitors briefly increase motor starting torque <S> allow a motor to be cycled on and off rapidly Furnace motors switch off the cap. <S> after it reaches 2/3 of full speed or so. <S> Run Capacitors are used in variable speed fans, which use single phase electric motors and need a capacitor to energize a second-phase winding. <S> If this cap is missing or improperly sized; the motor will get hotter, lose power, & become noisy. <A> It's not quite correct to say that capacitors, as used in electrical circuits, store electric charge. <S> In normal usage, a capacitor has no net electric charge even when "charged". <S> It is correct to say that a capacitor stores electric energy by keeping electric charge separated . <S> When you connect a capacitor to a source of electric current, electric charge flows from one plate of the capacitor to the other plate via the external circuit. <S> We say the capacitor is "charged" but we don't mean that it is electrically charged <S> but, like a rechargeable battery, energy "charged". <S> Work is alternately done on and then by the capacitor. <A> A capacitor subjected to AC is being charged and discharged continuously, as the AC proceeds through the positive and negative parts of the cycle. <S> At the instant you disconnect the capacitor, that's the charge that will be on it. <S> It's even possible to disconnect it right at the zero crossing, and have no charge. <S> Some capacitors will be designed to be across the mains, but most are not!
When connected to an AC source, the capacitor alternately charges and discharges, i.e., energy is alternately stored in and then released by the capacitor.
About SPICE: Should I use transient analysis or DC linear analysis? My question is specifically linked to an exam problem where I had to find a function in terms of time for the current on a capacitor and a resistor. The circuit was very simple: A current time-variant current source in series with 2 subcircuits, each composed of a capacitor and a resistor connected in parallel. Please see the figure below: So, if I want to simulate this circuit with a SPICE software, should I run a transient analysis, a DC linear analysis, or some other type of analysis? If the current source was sinusoidal, I would use an AC analysis, but the current source runs a current numerically equivalent to t (in Amperes) where t is the time (in seconds) elapsed since the circuit started working. Below I have written my netlist file. While it is not a valid SPICE netlist, it illustrates what I am trying to do, focus on the current source Iin : CIRCUIT ANALYSISC2 0 2 20mR2 0 2 3Iin 0 1 {time}R1 1 2 2C1 1 2 50m.TRAN 1us 100ms.CONTROLRUNPLOT V(1)-V(2).ENDC.END If you tried to simulate this netlist, you would receive an error similar to the following (which I obtained using ngspice ): Original line no.: 4, new internal line no.: 5:Undefined number [TIME]Original line no.: 4, new internal line no.: 5:Cannot compute substitute Copies=9 Evals=9 Placeholders=1 Symbols=0 Errors=2 How can I achieve this type of analysis? <Q> Rather than using the time parameter you could setup the current source with the pulse attribute, then specify the rise/fall time accordingly if using a standard current source (Ix). <S> Or use an arbitrary source (Bx) and express the signal mathematically using time as a parameter. <S> For example, here is the netlist for your circuit in LTSPice using an arbitrarily behavioural current source: <S> * C:\Program Files\LTC\LTspiceIV\current rc.ascR1 <S> N002 N001 2C1 <S> N002 <S> N001 <S> 50mFR2 <S> N002 0 <S> 3C2 <S> N002 0 <S> 20mFB1 0 <S> N001 I= <S> time.tran 0 15 <S> 1m <S> uic.backanno.end <S> Here is the simulation with V1 - V2 <S> plotted: <A> DC analysis gives you the initial conditions DC steady state values only. <S> You must do a transient analysis to see how the voltages and currents evolve with time . <S> AC analysis is for small-signal sinusoidal steady state only; it is a frequency domain analysis. <S> I believe you'll need to use a piece-wise linear ( PWL ) source for your current ramp. <A> Based on your description of the exam problem, I think a transient analysis is still what you're looking for. <S> In CircuitLab you can just define the current source as having current "T" to generate a linear current ramp proportional to the simulation time: (click here for circuit and simulation) <S> Open and run the transient simulation: <S> You can also examine the currents into each element. <S> As you might expect, the currents into C1 and C2 are constant, while the currents into R1 and R2 grow linearly with time. <S> As far as the ngspice/netlist question, I believe the keywords to be looking for are "behavioral sources". <S> See this page for some examples (one near the end uses TIME as a variable).
You would be best to use a transient analysis.
How can I convert a 2 prong connector to USB? I'd like to convert this: http://www.parts-express.com/pe/showdetl.cfm?Partnumber=060-640&utm_source=googleps to a USB? An ideal solution for me because of cost would be to use an existing usb controller from a usb keyboard. I was hoping someone might help bridge the gap in steps. What is necessary to wire the connector to the usb controller? Any help whatsoever would be much appreciated. <Q> This calls for an FTDI FT245R . <S> FTDI has become the standard for interfacing USB in a simple way to microcontrollers and other digital I/ <S> O. <S> The FT245R has 8 parallel <S> I/ <S> O, so you can connect the switch with a pull-up resistor to one of those. <S> edit <S> You asked about this module : <S> Looks good. <S> You connect the switch as follows: <S> VCC goes to VCCIO, <S> Vout goes to one of the inputs D0..D7. <S> I wouldn't solder directly to the module, but use a socket like this instead: <S> That's it. <S> The advantage over the RS232 interface is that you have 8 <S> I/ <S> O at your disposition. <S> The yellow jumper on the board selects between 3.3 V and 5 V for the I/O. <S> This is important if you want to connect to a microcontroller or other external logic, but for the switch it doesn't matter. <A> This could eg be "A" and it could send an "A" every tie it was pressed. <S> Or something like the "Print Screen" key which would be detectable but would not affect most programs' operation. <S> Or eg "f12" which may or may not be "harmless" in normal use. <S> (2) You could use a cheap (from $5) serial to USB adaptor and wire the switch to eg the CTS line. <S> This can be detected by a PC program. <S> Assumption: "PC" with USB used. <A> In the realm of simple-but-evil, having the button connect a 1.2 K or so resistor between USB D- and USB <S> VBus will probably make the core USB driver think that a device has been plugged in to the bus. <S> Enumeration will of course fail, but depending on host operating system the event could be detected in software. <S> Otherwise, patch it across one of the switches in a cheap keyboard as Russell suggested. <S> EDIT: <S> IMPORTANT <S> The pullup should not go to 5v VBus, but to 3.3v regulated from it. <S> However you can probably get away with a slightly larger resistor and a zener diode to ground to regulate the voltage.
(1) If you have a working USB keyboard, wiring two wires from the switch across the 2 contacts from a key switch would allow your switch to simulate the switch.
Is an ALU a multiplexer? I'm studying digital electronics where the components ALU and multiplexer appear. To me the ALU seems like a multiplexer but it's not specifically mentioned that this is the case. Is it so, or why not? <Q> No, it's not a multiplexer. <S> A multiplexer would select one of both inputs, in an ALU both inputs may be used simultaneously, depending on the pending operation. <S> ALU stands for Arithmetic and Logic Unit, and those are the types of operations it performs. <S> If the operation calls for a left shift of register R1, then the second input is ignored, but you might as well have "add the content from RAM address 0x1208 to register R1", then both inputs are used. <S> Before the add can be performed the RAM data must be fetched and placed on one of the inputs, and the content of R1 on the other. <S> All in all an ALU can perform several logical operations, like adding, shifting, clearing, etc. <S> It's a rather complex piece of logic which works on the operands on the inputs and the operation code. <S> Operations like "clear A" are simple, but "multiply A and B" requires lots of gates. <A> As others have noted, an ALU's function is to perform (typically either binary or unary) arithmetic and logical operations on input busses. <S> You can break an ALU down into three primary stages along with some control logic that configures those stages. <S> Argument Selection: this stage really really is just a Multiplexer for each input that allows for the selection of various inputs for either argument (i.e. RegisterA, RegisterB, MemoryLoad, Pipeline Byassed Value, etc). <S> Arithmetic/Logic Computation: this is where all the math gets done in parallel on the selected / routed inputs Output selection: this can be thought of as a logically as another multiplexer, but for reasons of fan-in/fan-out is often implemented as a tri-state bus with the various output enables driven by a decoder based on the instruction op-code. <S> Here's a really high level drawing <S> I whipped up to illustrate this partitioning. <S> There may be debate about whether the first stage and control logic is really part of the ALU, or if it is rather simply part of the Execution stage of the CPU Pipeline. <A> To me the ALU seems like a multiplexer ... <S> An ALU performs many tasks. <S> A multiplexer essentially performs one task. <S> An ALU could be given a multiplexer function as one of it's features if desired. <S> ie a multiplexer's capabilities <S> may be a small subset of an ALU's capabilities. <S> In a typical implementation, both have two inputs and one output. <S> But the multiplexer carries out only an either/or selection between the two inputs. <S> The ALU could do this plus addition, OR, AND, XOR, Add, Subtract, ... <S> Given a single control input C and an n bit <S> A port (with bits A0, A1, A2 ... <S> An) and an n bit B port a multiplexer can be thought of as implementing. <S> Mout_x = <S> A_x. <S> C + <S> B_x./C <S> for all x = 0 <S> ... <S> n "." <S> = <S> logical AND "+" <S> = <S> logical OR. <A> An ALU is an Arithmetic Logic Unit . <S> It does what the name suggests, perform various arithmetic and logical operations like add, subtract, multiply, shift, AND, OR, etc. <A> It's only a mux in the sense that the selected "function" will select the appropriate result to send to the output. <S> As an example, ADD two numbers, AND two numbers together. <S> Then, the "function" multiplexes either the ADD or AND results to the output. <S> Incidentally, this is how some ALU inside microprocessors are designed.
An ALU performs multiple arithmetic/logic operations depending on the "function" selected. No it's not a multiplexer.
Interfacing Lego Mindstorm with ultrasonic transducers and actuators I'm very new to electronics. I'm working on my school science project and am having difficulties to turn theory into praxis. For my science project, I'm aiming to construct a device that will enable blind people to appreciate the distance of an object ahead of them through the use of ultrasound and a touch signal. Theory (simple): Ultrasound (input) => Mindstorms NXT (process) => Shock (output) In more detail:The ultrasound sensor gathers the distance of the object in front of it.The data of the ultrasound is fed into the NXT. Based on the distance of the object, the NXT outputs a shock; the closer the object, the higher the shock, the further away the object, the lower the shock (the shock is not high, thus not uncomfortable). The NXT runs on 9 AA batteries (9 volts). I can specify how much power a specific output port can deliver eg. setOutput(power in %) (so I'm guessing it's regulating the amount of current that is flowing out). Here's the difficult part (for me). I've bought one of these prank shock toys from the local prank store. I'd like to connect it the NXT output port. The prank shocker runs on 4 button cell batteries that deliver 6 volts. I've figured output 10 % of the output on the NXT output port (setOutput(10)) is close to identical to the current being delivered by the 4 button cell batteries. I've connected the shocker to the NXT, when I run my program and touch the shocker I don't get any shock. The only thing that seems to happen is that the shocker makes a silent little sound. Could someone please share their thoughts on what I'm doing wrong, and the best way to implements what I'm trying to do? Help is hugely appreciated. I can share more details if needed. Update: Due to the difficulties to implement the shocker into my science project, I've scrapped the idea of using it as communication to the blind user. (I know it's not right to "give up", yet thanks to feedback I see it's not the optimal decision and I don't wont to harm my precious NXT). I'll be using my Android's vibrating motor and hook up my phone to the NXT via bluetooth. Apparently there is no way to control the intensity of the vibration (Not sure why, (like Russel says), one could vary the voltage or PWM). <Q> The "buzz word" (pun noted :-) ) is "Haptics" - tactile sensory feedback. <S> Shock relies on skin resistance which can vary with skin condition, atmospehrics and sweat. <S> It also relies on the degree of user sensation, which can vary widely. <S> It also tends to have positive feedback when conduction starts due to sweat generation and user reaction/grip/contact resistance changes. . <S> Vibration level can be varied from insistently frenetic to the barest of tactical murmurs. <S> These are used in eg cellphones for the vibrate function. <S> They are available in many scrapped cellphones and can be bought new from Digikey and no doubt various other suppliers. <S> The motor uses relatively little power, can be speed controlled by varying voltage (or PWMing DC) and are made for exactly the sort of thing you are attempting. <S> These are available new from Digikey <S> but there are many other sources. <A> It looks like your NXT uses PWM on it's outputs: <S> This means the output won't be a DC voltage, rather turning fully on/off rapidly. <S> Whilst this can be used to control many things (motors, LEDs, etc) <S> I doubt it will work for your shocker. <S> It's probably the shocker has <S> it's own internal oscillator as part of a boost converting arrangement produce pulses of high voltage. <S> It may be possible to use the PWM directly as an input for the boost converter, although I'm not sure how satisfactory this would be touch sense wise. <S> In fact I doubt even a controllable DC voltage would work properly to adjust the output level of the shocker since it's very likely (depending on the shocker circuit) <S> the in/out function is non linear, i.e. a steadily increasing voltage in may produce nothing at the output till 80% then it turns full on. <S> If you are determined to go the shock route, then it would help for you to examine the shocker circuit and post a picture/schematic so detailed advice can be given about how to adapt it. <S> I agree with Russell however, that a better solution would be a dedicated buzzer (cheap/commonly available) to provide your haptic feedback. <S> This would be ideally suited to your PWM outputs and could be connected directly. <A> It appears your 9 AA batteries should be betting 9 x 1.5V or at least 15V and not 9V. <S> If these are alkaline, this indicates the batteries are discharged and will not handle any significant load. <S> I am also concerned you have inadequate protection from shock feedback to the NXT driver and may have caused damage from electro-over-stress (EOS) transients. <S> You may need a common mode choke and a TVS diode. <S> Can you share a schematic? <S> As far as User Experience (UX) interfacing for tactile feel on artificial vision for blind assistance, I think the shock idea can be improved, unless the idea was to alert the user of danger. <S> Even then, it would be uncomfortable. <S> I would suggest you explore what has been already done in 2D imaging with tactile stimulus sensors and stereoscopic audio sound generators or even dot matrix grid stimuli. <S> YOu might as the UX stackexchange for feedback or even the blind institute.
You would probably get a better and more easily achieved result by using a vibrating motor which is specifically designed to provide haptic feedback - these are small motors with an offset centre-of-gravity bob weight that produces a "buzzing" sensation when the motor runs.
Power supply too weak, any danger? I have a car console that i wanna test on my work bench. It's rated at 10A DC max @ 12v, but I don't plan on driving any speakers, so the draw should remain fairly low. My power supply can only provide 3A DC @ 12 volts. If the console DOES exceed the 3A draw, will it just not function properly, or could i stand a chance of damaging my power supply <Q> It depends on the power supply. <S> Some have protection against overcurrent, and some don't - it should advise in the manual/datasheet (if it has one). <S> Most decent quality supplies will have some form of protection (current limiting, thermal cutout, fuse) and withstand at least temporary overcurrents, and a good bench supply should withstand an indefinite short circuit. <S> Without knowing anything about your supply though, it's impossible to say. <S> EDIT - so it's "a charger from some old gadget". <S> In this case without opening it up you can't really tell what it will do if overloaded. <S> However, if you are not running any speakers from the amp, I rather doubt you will use 3 amps. <S> Depending on the amp type (class A, AB, etc) it may draw very little current when not loaded. <S> This info may be (should be) available in the manual. <S> I would test the quiescent current with a multimeter to see what it draws, it maybe possible to use the bench supply if the current is low enough - maybe do this to start with. <A> In the unlikely case of no overcurrent protection it will get hot and after a short time components will start to fail in a cascading way, so that seconds after the first one fails the whole power supply is gone. <S> If it has common current limiting the output voltage will remain at 12 V until 3 A is reached. <S> From then on current will not increase, the regulator will decrease output voltage to avoid a further current increase. <S> In the event when the output voltage drops to 0 V the power supply has to dissipate a lot of power, but it should be designed to do so for some time. <S> The input will probably be at least 15 V, then the dissipation may go to 15 V x 3 A = 45 W. A more advanced power supply will use foldback current limiting , which solves the dissipation problem. <S> When there's overcurrent it won't just keep on pouring out 3 A, but will decrease both voltage and current, so that internal dissipation remains limited. <S> Normally a power supply cannot recover itself from a foldback current limit, and needs to be reset. <S> Usually it will have a button for that, so you won't have to switch it off and on again. <A> Your bench supply may get hot and electro. <S> caps degrade quickly and have must shorter lives. <S> If exceeded they can fail. <S> As long as battery charge V = 14.2 max, it will operate like a car.
Probably the output will just sag or trip off for a while, but it may do nasty stuff like overheat and catch fire if you're unlucky. Depends on the design quality of your power supply. Consider using a small SLA or lead acid in parallel to charge and operate the surges.
Should I isolate grounds of an isolated DC/DC converter? If I use an isolated DC/DC converter, when designing the PCB, should I isolate the ground of the input and the ground of the output as shown below? I've never isolated grounds (except for AGND and DGND) but always used one single ground plane for the input and output grounds of any DC/DC converter as shown below: Is this practice not recommended? And when is it recommended to use an isolated DC/DC and when not? Thanks. <Q> If you would connect the two grounds <S> it's not really useful to have an isolated converter in the first place. <S> It would be like two supply voltages on the same circuit, like +5 V for the logic, and +12 V for relays, or something like that. <S> The two power supplies may also only share their grounds, but that way they're not isolated, not even if they would be otherwise floating, like batteries. <S> Isolation is often for safety reasons, or to avoid ground loops, like Tony says. <S> One reason for using an isolated converter may be to have a floating output so that you can reference it any way you want. <S> If it's a 5 V/ 5V converter for instance, then connecting Vout to the input's ground will give you a -5 V at the output's ground. <S> So if you had a good reason to have isolation, don't connect the grounds. <A> For example, will it be running a sensor riding on the power line voltage? <S> Does it need to be isolated to avoid ground loops with external equipment? <S> Does it need to be isolated to allow for fully insulated operation with minimal leakage to earth ground, as is often the case for medical devices connected to patients? <S> If you just want a different DC voltage in the same ground-referenced circuit, then a isolated supply is overkill. <S> In that case you tie the two grounds together to make a non-isolated supply. <A> THere are as many reasons for isolation and common ground in DC-DC. <S> The issues are tradeoffs but tend to cost a bit more with dual isolated windings vs a single wound magnetic part. <S> Hence, the reasons need to justify the extra cost. <S> In addition to Olin's reasons to; a) avoid external ground loops <S> b) provide additional protection to leakage in medical approved patient apparatus safety c) <S> Providing common solution for a V+ or a V- out. <S> - Often referred to as inverted output but with the option to connect ground to + or - output <S> The down side is floating secondaries are more likely to have high CM noise without a low impedance ground, they are more likely to cause EMC egress to high gain microphone circuits with poor CMMR because the isolation leakage gets works as the harmonic content increases with coupling capacitance interwinding creating some issues with telephone inputs and other analog peripherals in some cases. <S> THis is design specific and not all across the board of DC-DC convertors.
The answer depends on whether the output DC power will be used isolated.
Replacing SMD Fuses without access to schematics I'm curious to know if there is a sane way to determine the specifications of a blown SMD fuse without resorting to manufactures schematics / repair manuals. In my particular case there are no obvious markings on either the board or the component (naturally). <Q> No. <S> Even for an intact fuse it's impossible to find out its rating in a non-destructive way if there's no marking. <S> If it's blown it's even less possible. <S> You'll need the schematic to know the value. <S> If you would reverse engineer the circuit to re-create <S> the schematic you may have an idea of the value, but most often the designer has a certain range to choose from, depending on how cautious he is. <S> But without schematic it's not possible. <A> No way I'm aware of, no. <S> If you have a manual and can find a current rating it may give you a clue as to what rating it was. <S> If finding a schematic/service manual is impossible <S> then you're a bit stuck. <S> Maybe phoning the original manufacturers (if they are locatable) might be an idea - I've been successful in getting info this way on a couple of occasions when fixing stuff (it helps if it's not a current product <S> they are very precious about) <S> although mostly it's a dead end. <A> Measure the worst-case operating current and use a fuse maybe 2x this.
Fusing is not a precise science, and as long as it is rated high enough to not blow in normal use, it won't be too critical. Also, as Steven mentions, if you are able to poke around and reverse engineer the circuit a bit you should get a fair idea of what kind of fuse it would need.
What's the purpose of the diodes in this circuit? I'm trying to get my head around the headlight wiring in my car, and I'm curious what purpose the two diodes in this diagram serve. Hoping one of the clever people on here can explain it for me: Is there purpose evident from this diagram or are further related diagrams required? Thanks <Q> The diodes are there so that there can be two separate mechanisms for enabling the main headlight relay without interfering with each other. <S> From the labels on the right, it looks like the two mechanisms are the normal headlight switch, and the momentary passing switch, which makes sense. <S> You want each to be able to turn on the headlights independently. <S> Added: <S> You now say you are looking for more of a low level electrical explanation of what the diodes do instead of the high level conceptual explanation you originally asked for. <S> The diodes allow either switch to turn on the relay, but still remain independent . <S> Presumably at least one of the switch lines is used elsewhere in a way that it shouldn't be signalled when the other switch is activated. <S> Without the diodes, there would be only a single switch line, and that would be activated identically by either switch, making it impossible for other parts of the system to determine which user action caused the headlights to turn on. <S> For example, the general headlight switch may also turn on some running lights or maybe a indicator on the dash that the passing switch is not supposed to turn on. <S> With the diodes in there, the general headlight switch line remains unasserted when the passing switch is activated. <S> Each switch can activate the relay, but there is no connected between the switches. <A> The diodes on the circuit are working as a OR gate. <S> The relays are activated when at least one of the switches is on. <A> In Logic Theory... since the voltage V+ is direct connected to relay coil and switched on the "Low Side" or V- and the diodes are also switch by either source going to V- , we have a logic specification defined as " if either input goes lo,the output goes lo" <S> By rules of Logic and conversion to positive logic, this actually an AND GATE function. <S> ... <S> Meaning that when both inputs are high the output is high in the OFF state. <S> If you may recall from logic theory, if you invert the inputs and the outputs, you transform between the AND vs OR gate. <S> The 3rd diode is a typical back EMF clamp diode on the coil. <S> Wire OR or Open collector or Open Drain <S> (Low Side Switches" would also work without diodes, but fails to permit ease of troubleshooting and sense with self-test or BITE (built in test equipment ) by design for reliability of isolating faults. <S> The trend in Automotive Design for reliability is enhanced now with fault isolation on electro-mechanical parts and drivers, such that isolated driver states can be sensed easily for feedback. <A> After pondering this some more, I have an alternative theory which might explain the Lighting Diode. <S> As others have pointed out, the headlight relays will be energised when either the Lighting Switch is in position II (position I is parkers only) OR the dimmer/passing switch is pulled to momentary on (flash/pass). <S> This is fairly straight forward <S> and I haven't accepted any answers yet as I'm not convinced the diodes have any role in achieving this OR arrangement as they would effectively be disconnected from the circuit by the switches when not activated. <S> The dimmer/passing switch is a fairly substantial switch and you can see that despite the circuit having headlight relays, <S> the full low or high beam bulb current still flows through this switch. <S> The Lighting Switch however is just a small rotary switch on the end of the stalk and it only passes the relay coil current. <S> If both switches are turned on (so Lighting Switch to position II and you also flash the hi-beam), then without the lighting Diode I'm thinking it would be possible for the hi-beam bulb current to pass from HU to HF and to earth through the Lighting Switch. <S> I guess this could happen if the contacts between HU and E got dirty or whatever and became higher resistance than the path through the lighting switch? <S> What do you guys think? <S> Would this make any sense as an explanation? <S> It doesn't explain the Diode R-fog but from the name I'm wondering if it serves a similar purpose to do with the fog lights that's not really indicated by this diagram? <A> the diodes are there to cut down on the amount of copper wire required to run everything independent - save on wire <S> -save on weight -better fuel economy <S> I think that is the simplest explanation.
So technically the diode OR logic with inverted logic active low inputs is an AND gate for turning off the light. As Olin correctly points out the isolation of each driver is important for many reasons such as fault isolation.
SPI Flash: Half the bits are zero I have an STM32 driving two very similar SPI Flashes, an N25Q and an M25P . Strangely, while my driver copes with the N25Q perfectly well, the M25P is only "half" working. What happens is that when I write a page of bytes, and read that page back, the four MSB bits of each byte is 0, and the four LSB bits of each byte is correct. What could be causing half the bits to be 0? <Q> Did you erase the affected memory pages first? <S> For flash memory, you can change only 1's to 0's (the M25P data sheet from above states this explicitly on page 22, in the N25Q <S> its on page 12). <S> So if the M25P was filled with 0x0f's before, you would get exactly that result. <S> When you use the same write command (0x02) for both, you should be fine. <S> Using dual or quad mode would result in in 2 (or 4) bits wrong, but not half a byte. <S> Since I suppose you program a whole page, I think this can't be stuck address bits. <S> The latter one can be checked with a logic analyzer or a scope. <A> One obvious reason is if you were attempting to use dual and quadrature data "fast write" functions designed for the N25Q that are not supported on the M25P. <S> But I suspect you know that already. <A> Do you have a different number of dummy bits set for the M25P? <S> This would possibly account for what you are seeing if reading back a byte at a time.
Other sources for the problem might be: missing blocking capacitor for the flash IC, or wrong SPI mode (which can cause strange results since then normally you read data exactly the moment it is changing).
Coin Cell Battery for Arduino/Microcontroller Excuse the lack of electrical engineering knowledge but I have an Arduino Uno microcontroller that I want to power with a coin cell battery. The project will have 6 LED lights that will flash for a few seconds every few hours.My question is, what sort of coin cell battery would I need for this project? Also, how would I connect it to arduino? With something like this ? Would I require anything like resistors/transistors? Here is a diagram of what I have so far: . (Resistors are 1/4-watt 200ohm resistors) <Q> The Arduino Uno isn't fit to run off a coin cell. <S> The Uno isn't exactly low-power. <S> It contains 2 microcontrollers running at high clock frequencies and consumes a couple tens of mA <S> A coin cell will give you 3 V, while the Uno is designed to run on 5 V. <S> Most important: a coin cell has enough energy to power the Arduino for a couple of hours, but can only supply this in small doses, i.e. a few mA. <S> That won't work. <A> As stevenvh pointed out, the Arduino Uno is not designed to run off a coin cell. <S> Two option exist (or at least that I can see): 1) <S> Adafruit's 9v battery pack comes to mind. <S> 2) Use a low power microcontroller. <S> Option #1 will work with no additional learning but will cost you in batteries over the long term. <S> Option #2 will more effort on the front side (sourcing and programming bare microcontrollers) but will result in a great many useful skills and piles of frustration. <S> Depends on what you want to get out of this. <A> Note that CR* cells (lithium) can deliver a maximum of about 4 mA; refer to the manufacturer's specifications. <S> If you try to draw more power, they may start to outgas and explode like popcorn, so try to avoid that. <S> If you absolutely must use coin cells, an alternative would be LR* type cells. <S> Those are alkaline (not lithium) and can deliver higher electrical current. <S> However, they have a smaller capacity. <S> I recommend to look at another microcontroller. <S> It's more work, but it might be worth to build your own board, e.g. with an ATtiny at a much lower clock rate <S> (you don't need 16 MHz just to flash a few LEDs), and without the overhead of the USB chip. <S> That will lower the power consumption considerably. <S> Also, you should use "ultra bright" LEDs because you can drive them with only 1 or 2 mA while getting the same brightness as a normal LED at 20 mA. <A> There are significant ways to reduce current drain in LEDs .. <S> Spend more time search for higher efficiency LEDs at low cost so that instead of 20mA 1/4W resistors you can use 2 or 3 mA with 1/8W resistors and get the same brightness. <S> What colours and how many of each. <S> Typical C of CR2032 or 2cm <S> x <S> 3.2mm is 225 mAh Computer duty factor (On/total time <S> x current x qty.) <S> = <S> average current of LEDs. <S> e.g. 3 sec / 3hr x 20mA <S> x 6 LEDS = <S> 3/(3 <S> *3600) <S> x 0.020 <S> x 6 <S> = 33 µA <S> averageDuration (hr) <S> = <S> C/ <S> A = 225mAh <S> / 33uA ~ <S> 6800 hrs. <S> If you want longer time, you can choose more efficient LEDs and run them at 10% current. <S> Such as 10,000 mcd instead of 1000mcd or even 100 mcd depending on what you got. <S> Of course that neglects power consumption of Arduino for which current is not stated. <S> (I would consider Blue and White LEDs, low cost and bright at low currents but thats up to you) <S> Lithium coin cells have low capacity but OK for low current applications. <A> I had a small project on an Atmel ATtiny2313, but I imagine similar considerations would apply. <S> My goal was to flash 6 leds (2 yellow, two white and two red) for about 4 hours. <S> I strobed (in software) them to reduce the current draw. <S> I used 2xCR2016 <S> (3v each) with a small diode (to drop to around 5V, not really necessary, but I'm conservative). <S> The CR2016 is half the size of a CR2032. <S> I had hoped to stuff both into a CR2032 holder, but every holder I tried shorted the two edges together. <S> I ended up fashioning a holder with Shapelock (not entirely satisfactory, but workable).
I doubt you can power a standard Arduino board plus severeal LEDs with coin cells for more than a few hours. Use a battery other than a coin cell.
Connecting an 80's style computer cassette to an FPGA I'm re-implementing a 1980's Microbee computer on an FPGA (see here ) and trying to figure out how to do the cassette port. Here's the schematics for the original Microbee cassette interface: (source: toptensoftware.com ) I also found this description of it in a technical manual: The cassette data output consists merely of an RC network whichaccepts a signal from DB1, pin 28 of the PIO. The signal isattenuated and then decoupled prior to sending it to the cassetterecorder MIC input. This signal appears on pin 3 of the 5 pin DINsocket. The cassette data input circuit is slightly morecomplicated. The input from pin 5 of the DIN socket passes first toan attentuator -decoupler. Following this is a CA3140 op-amp, toallow a wide range of input levels to be squared up before the signalis passed to pin 27 of the PIO, DBO. The two diodes across theinverting and non-inverting inputs to the op-amp clip any inputsignals greater than the diodes' forward voltage in either direction.The 47pF capacitor is required by the CMOS op-amp forprecompensation. My questions: What does "de-coupled" in the description mean? Would the same circuit work if connected to two of the I/O pins on a Xilinx Spartan 6 FPGA (through the PMod connector on a Nexys3) and if not, could it be adapted to make it work? First attempt, based on comments in answers, but the output resistor shouldn't be in series. I'm leaving this here for context and instructional reasons, please see the next schematic MicrobeeSchematic2 http://www.toptensoftware.com/fpgabee/MicrobeeCassettePortSchematic2.png New questions: Is the polarity of the comparator correct? For the MCP6546 , does Vss go to ground and Vdd to 3.3V? I'm not sure what to make of the "dotted out" resistor across the tape inputs in the original circuit. Incorporating feedback regarding the output of the comparator being open-drain: MicrobeeSchematic3 http://www.toptensoftware.com/fpgabee/MicrobeeCassettePortSchematic3.png What alternatives could I use for the MCP6546, which I've not been able to find in retail stores here in Australia. I can get LM311 or LM393 which, from what I can tell are similar. Will these work just as well? <Q> Decoupling capacitors are known in circuits' power supplies, where they serve to keep the supply voltage clean of (high frequency) noise. <S> But I have the impression that here removing DC content of your signal is meant, by means of a series capacitor, like C24 does for the input. <S> Which, depending on your point of view (DC or AC) can be called a coupling capacitor. <S> But there's no capacitor that does this on your output. <S> The value of C23 is also suspectively low. <S> The cutoff frequency with resistors R23 and R24 is 12 kHz, which is useless, because that will be about the frequency range of the cassette anyway. <S> I'd rather expect 5 kHz here. <S> Also the text speaks of the MIC input, but for that the output level is too high. <S> The schematic mentions the line input. <S> The CA3140 is no good. <S> Its minimum operating voltage is 4 V, and at 5 V the output high doesn't go higher than 3 V, so for 4 V supply that may be as low as 2 V, and that may not be enough for the Spartan. <S> Use a Rail-To-Rail opamp instead, or even better a comparator. <S> edit re your new questions <S> Polarity is OK, since it doesn't matter :-). <S> You have an AC signal going above and below ground. <S> Like you've drawn it the positive half cycles will make the output go to Vcc, the negative to ground. <S> If you switch the inputs you'll have the reverse, but both signals will look the same. <S> Yes. <S> I would ignore it. <S> It doesn't seem to have a function other than loading the output, and besides, if you dot it out you're asking for being ignored :-). <S> Important thing about R1: this should go to Vcc, your 3.3 V, not in series with the output. <S> The open-drain output means that there's only a FET switching the output to ground, so it can only make it low, not high. <S> The pull-up resistor will make the output high when the FET is off. <A> Series capacitors are normally called 'coupling' capacitors since they couple the ac component of the source signal to the destination. <S> Decoupling capacitors are shunt capacitors designed to prevent coupling of ac signals from source to detination. <S> In this context, C23 decouples the high frequency components of the PIO to ground so that the square-wave output becomes rounded ie approximately sinusoidal (your quoted article refers to 'decoupling' in describing the output to the tape port and so must be referring to C23). <A> The "decoupled" in this scenario probably refers both to the series capacitor that blocks DC (C24), and the C part of the RC (C23) although it should be "coupling capacitor" for C24 <S> (decoupling is also used to refer to the DC blocking function, but I think it gets confusing this way, as it usually means the "other sort" that shunts AC to ground) and "decoupling" for C23 (if anything at all) <S> The coupling cap is used commonly in audio amplifier circuits to allow one stages input to be independently biased from the previous stages DC output level. <S> Yes, as long as you supply the opamp with the same voltage as the FPGA pins (e.g. 3.3V, 2.5V, etc) rather than the 5V shown. <A> The circuit as drawn should probably work with an FPGA if IC35 outputs a 0-to-3.3-volt signal. <S> One slight caveat is that because cassette input does not have any hysteresis, it's possible that a signal which should appear as a single rising or falling edge may appear as a rapid sequence of rising and falling edges which then settles high or low a few microseconds later. <S> That shouldn't be a problem if you design your FPGA so that it ignores input changes that last less than e.g. 10 microseconds, and ignores any input changes which occur within 20 microseconds of a detected change, but if your logic tries to measure the lengths of input pulses without enforcing a minimum length it could have problems.
You should be able to use pretty much any opamp for the comparator function (rail to rail is preferable to make things easy, as Steven says, but not essential as long as you meet FPGA input min-high max-low)
How can I tell if a particular multimeter measures AC with RMS or Average I require a multimeter measuring RMS but unfortunately know little on the subject and am unable to tell which method one uses from it's description. Its states: MAX. Voltage between terminals & earth ground: 700V AC rms or 1000V DC Fuse Protection: µA and mA: F 750mA / 250V Ø5x20; A: F 10A/250V Ø6.35 x 31.8 I appreciate it says rms in the above, however would like to ask for confirmation and also if possible help understating the other values it specifies. Full spec here Thanks <Q> It is usually printed in bold on the meter itself. <S> Also I own a more expensive brother of this meter and on that one it says 'True RMS' (in bold print). <S> Third way to tell is from the specifications. <S> Again the manufacturer will be proud to be able to share True RMS properties <S> and I expect it listed high in the 'key features' and next to the 'ACV' and 'ACA' table headers. <S> In conclusion: No this is not a True RMS meter. <A> If you are dealing only with sine waves the conversion from average to RMS is constant and meters are corrected assuming a sine wave. <S> So it will be ok for sine waves such as AC power to the home. <S> But there are other options with digital scopes (DSO) and others. <S> If you need to measure current and voltage at the same time for RMS, that is different matter for a wattmeter. <S> However if it is distorted significantly, then you lose accuracy on the conversion. <S> True RMS AC measurements are equivalent to the DC equivalent power. <S> They are measured using precise thermal heat sensor methods of the energy in the signal. <S> You can expect to pay $350 for a used portable DMM with true RMS such a Fluke 87 II for complex waveforms. <S> There are many other solutions. <S> I prefer DSO's with multiply. <A> If the leads of a meter are connected to a constant DC voltage, the average DC voltage and RMS voltage will be identical. <S> The rectified average and rectified peak voltages will also be identical, but the <S> because RMS voltage of an AC waveform will be substantially less than <S> the peak voltage, a non-RMS meter which is set for AC may read a much lower voltage than it should. <S> Some meters may have AC-coupled inputs, in which case trying to read a DC voltage on the AC setting would yield a reading briefly when connected but it would fall to zero. <S> Note that an AC-coupled input would likely not improve accuracy when measuring AC, but its behavior when measuring DC would alert the operator that it was necessary to use the DC setting.
True RMS isn't printed on the meter in your example, so it won't be one. True RMS measurements is a property the manufacturer will be very proud about to share with you as customer.
Do two stage common emitter current amplifiers add or multiply? So I've seen alot of explanations on two stage voltage amplifiers and how how their gains can be multiplied together. My question is when you are using a two stage common emitter amplifier for current amplification, does the current gain from each stage multiply together or add together? I am thinking they add together because if their base, emitter, and collector are tied together, their currents must add together to form a linear relation with voltage and power. Could someone verify this? <Q> If you mean something like below, then the currents add: As Alfred mentions, this is not known as a "two stage CE amplifier" though. <S> With BJTs, the emitter resistors are needed to prevent thermal runaway. <S> This is caused by the fact that as a BJT gets hotter it passes more current. <S> The emitter resistor provides some negative feedback (higher current = more voltage across resistor = lower Vbe to stop runaway) but wastes power. <S> FETs don't have this problem and can be connected directly, so are better for parallel operation. <A> I am thinking they add together because if their base, emitter, and collector are tied together I take the above to mean that the transistors are connected such that B1 is connected to B2, E1 to E2, and C1 to C2. <S> Such a connection is not even remotely considered a "two-stage CE amplifier". <S> In a cascade amplifier, the output from the previous stage is the input to the next stage. <S> The output of a CE amplifier is from the collector while the input is to the base. <S> So, in a two-stage CE cascade, the bases aren't connected to each other and the collectors aren't connected to each other (though the emitters may be, at least for signals). <A> What you describe, with bases connected, collectors connected, and emitters connected is not a two stage amplifier. <S> In theory it would indeed add the currents. <S> But the world isn't perfect, and base-emitter voltages of the two transistors may differ slightly. <S> Then the transistor with the smallest base-emitter voltage will draw most of the base current, until its voltage levels with the other one. <S> But one transistor will draw more current than the other one. <S> A two stage amplifier could be a Darlington: <S> Here the base current of the first transistor gets amplified, passing a higher current to the base of the second, which amplifies that again. <S> So the total HFE (current amplification) of a Darlington is the product of the two separate transistors' HFEs. <S> While a general purpose transistor may have an HFE in the order of 100, a Darlington may have an HFE of more than 10 000.
The overall voltage and current gains are the products of the individual stage's (loaded) voltage and current gains.
Making a burglar alarm I am using a passive infrared sensor TMP006 to make a burglar alarm. However I notice that the data returned is not accurate enough. Are there any other ways by which I can improve my accuracy. Or should I use an ldr on which I shine a continous beam of IR light which breaks when the burglar steps in?What do commercial burglar alarms use to detect motion? <Q> The TMP006 is a PIR, but a temperature sensor. <S> This should be used in a situation where the temperature to be measured is equal over the full viewing angle. <S> That would require the burglar to be very close to the sensor, something he might not want to. <S> The common way to detect a person's presence is a PIR presence/motion detector. <S> I've used the Panasonic <S> NaPiOn <S> for this, which at the time was the smallest existing PIR. <S> It has a matrix of detection zones, which, combined with the multi-faceted lens will detect even slight movements at meters distance. <S> Use is easy. <S> It has three pins: ground, Vcc, and output. <S> The output goes high if the sensor detects a person moving in its detection field. <S> Further reading: NaPiOn design manual <A> AFAIK, LDR is not suitable for motion detection. <A> Security system motion detectors use the detection mode of the combination of infrared and microwave, i.e. well-known dual technology. <S> The microwave detection mode of the dual-technology detector is as follows: <S> According to the Doppler Principle in physics, microwave sends at a frequency; when there is any moving object in its coverage range, microwave reflects at another frequency. <S> Therefore, there is a frequency difference between the sending frequency and the reflection frequency. <S> One's volume and moving speed can be gotten according to the detected variation. <S> In combination with the infrared detected signals, the detector then performs operation processing of both triggering signals through the internal CPU chip, comprehensively analyzes relevant characteristics of the signals, and finally judges whether there is any invader in the visual area.
I'm using PIR Motion Detector, works quite well. LDRs are no use either, they detect light levels.
Running my atmega8 at 5.5V, risky? I have just received my first microcontroller, an Atmega8. I will soon be making a voltage regulation circuit for it to run at 5V, but I don't have all the parts yet. Instead, I have a 5V DC 1000mA adapter, and thought there's no reason it shouldn't work just as well. Is this a good/bad idea? Furthermore, I checked and it is actually outputting 5.48V. So I checked the Atmega8 datasheet, and it says that it will operate between 4.5 - 5.5V. I am quite close to the upper limit, so am I taking a risk with this? <Q> Put a standard 1N4001 diode in series with the power supply. <S> You'll drop the voltage down to 4.9V. <A> Yes, you're taking risks. <S> You have to take measurement error into account, and then the 5.48 V might as well be 5.58 V, which is beyond recommended operation conditions. <S> That may drop a bit under load, but for a good regulator that will only be a couple tens of mV. <S> A series diode is a good solution, but the 1N4001 is not. <S> At 1 A it may drop as much as 1 V <S> and then you have the same problem at the lower end of the operating range. <S> I would suggest to use a Schottky diode , which has a lower drop than a regular PN-diode. <S> The 1N5818 will drop maximum 0.55 V at 1 A, somewhat less at a lower current, so you'll end up nicely around 5.0 V. <S> The diode will also protect against accidental polarity reversals. <A> You should be fine. <S> The adapter will most likely reduce the voltage with load and in the datasheet under absolute maximum ratings, on page 244, the upper voltage limit for supply voltage is 6 V. <S> The limit of 5.5 V is the highest recommended voltage and in production, voltages higher than that shouldn't be used. <A> No problem. <S> People will overclock their CPUs by rasing the supply voltage a 1% at a time up to 5% to check performance and temperature rise. <S> So if it is Hot, it means you might not be able to run at maximum ambient of <S> 85'C but ok at room temp. <S> More important are noise spikes on the supply, so keep it clean and within spec. <S> with close low ESR caps. <S> Low power designers prefer to run at minimum voltage and see if it still works when slightly slower for prop. <S> delays. <S> If using an unregulated wall transformer , it will run on the high side with a light load. <A> What ATmega8 you are using? <S> is Atmega8 or Atmega8L? <S> Normally microcontroller power supply is regulated, use of Transformer based adopter is risky, as output voltages of adopter is totally depends upon input voltage. <S> If input voltage rises than its output also rises and vise varsa. <S> If you have power supply of voltages upto 9 to 12V than you may use Regulator IC 7805 for regulation of microcontroller mains power supply. <S> 7805 will give accurately 5V.
However in general CMOS margins may improve with higher voltage and speed improves too but at the expense of heat dissipation.
Optoisolate two ICs sharing same power supply I have two ICs. The former acts like an ADC, measuring the voltage in a power outlet and transmitting the result to the last. Both ICs requires 5 Volts to work. I want to opto-isolate the channel between the two ICs to protect the last IC against peaks in the grid that the former IC is measuring. Below there is a VERY simplified version of the circuit: The power supply is the classic one (voltage transformer, regulator, capacitors, etc) and the input voltage is the same as the power line: 220 Volts RMS . The power line has a transformer too (not shown). Is safe to both ICs share the same power supply? It is possible that in presence of a very large noise, the first IC affects the second in that common point? If it is wrong... how to accomplish the isolation? EDIT IC1's datasheet IC1 is a specific purpose IC to measure voltage (and current) from the power grid. The IC's datasheet has a example circuit that I pretend to use. IC2 is a microcontroller that will receive the information from IC1. The example circuit Although the circuit does not use a transformer and voltage regulator, I intend to use them to power the IC. The datasheet recommends to isolate the channel between ICs. My focus right now is discover if it is possible to use the same supply for both ICs and yet opto-isolate this channel between them. <Q> My focus right now is discover if it is possible to use the same supply for both ICs and yet opto-isolate this channel between them. <S> Notice that in the recommended circuit, the ground of the CS5463 is shown with a different symbol than the ground of the "serial data interface". <S> Also notice that the CS5463's ground is tied to line at the upper left. <S> If you connect your interface to the same ground as the CS5463 in this configuration, your entire circuit will be riding the 120 V line voltage. <S> If you do not connect your interface circuit to the same ground as the CS5463, then you won't be able to use the same power supply to power the two subcircuits. <S> If you want to power your circuit from the same supply as the CS5463, you should use the other recommended circuit from the datasheet: <A> If the two sides of the opto-isolation share ground and/or +5V power, the effect of the opto-isolation is completely negated. <S> I can not judge whether this is safe or not, but judging from the fact that you included an opto-isolator in the first place <S> I think that sharing power and groundf is a bad idea. <S> use two separate powers, and don't connect the grounds. <A> If the goal is to protect IC2 from peaks on the input I would use a resistor to limit the current and a zener. <A> Answer: not safe. <S> Question is missing the context. <S> I assume the safety meant to be the user's safety. <S> Some original design involved opto-insulated group connected to mains. <S> The next designer or hacker tries to reuse existing power source and concerned about electrical shock. <S> Certainly not safe. <S> Do not galvanically connect anything on insulated side to mains. <A> Q Is safe to both ICs share the same power supply? <S> A <S> Maybe not. <S> Depends on ground faults and miswired outlets. <S> Does it meet UL CE safety requirements for line connect to electronics ground? <S> No Supplementary design details are missing. <S> If it has human access to signals or signal ground, even with ESD it must have an earth connection, even if a floating apparatus. <S> i.e. a 3 pronged plug. <S> OTherwise double Insulation is needed. <S> You ought to protect the electronics from easy failure too with surge suppressor. <S> how you manage to protect users from stray lightning surges at say <S> +/- <S> 1500V 0-pk <S> 50uS. <S> Your resistors also need to be rated for 3kV and preferably more. <S> YOu could consider a capacitive network AC coupled and not connect Neutral to DC ground with ground current limited at 1200Vac for Hipot test and leakage current for safety tests limited to 0.5mA on any filter caps to ground. <S> If you are not planning to get UL CE certification, quit now and change to a low voltage transformer output. <S> That's a safe plan. <S> Q <S> It is possible that in presence of a very large noise, the first IC affects the second in that common point? <S> A <S> Yes <S> but the 2nd IC does nothing useful at present. <S> Common mode and stray RF noise will plague your design unless you assume there will be interference and block it. <S> Q <S> If it is wrong... how to accomplish the isolation? <S> CM ferrite choke, Differential Instrument Amp or reliable <S> Op Amp with small RF caps to ground or not is your choice if you want 3 prong plug with MOV after a 3KV series cap or resistor before divider to scale down to desired level. <S> Is this bipolar supply(+/-V) then bias to V+/2. <A> You need an isolating transformer to pass power between isolated circuits. <S> Nothing else will cut it. <S> You could use a large transformer with the 50Hz mains, or perhaps some sort of switch mode power supply circuit.
Even a 5V boost/buck type circuit could work if you find a suitable isolated low power transformer. A high impedance differential measurement like a DMM is a better approach with CMMR , LPF Surge protection, OVP, Hipot protection, leakage to ground and CM filter covered into the design.
Stand alone LCD display for sensor monitoring I am looking for a standalone (meaning self contained, enclosed, mountable to a wall etc) LCD display to monitor a process sensor. I would like to feed this unit a 4-20mA or 0-10VDC signal and have it display a number (4 characters max) corresponding to a scale I program. Does anyone have a product or supplier suggestion? I would like to purchase something off the shelf as opposed to building it, as time is a bit of an issue. The sensor is a gas detector, which feeds into my monitoring system already. However my client wants a digital display in the area being protected. The display would read 0 to 1000 (ppm) <Q> They have onboard ADC's that you can set the ADC range with resistors, and calibrate the display output with a POT usually. <S> They are also fairly affordable and definitely simple to use. <S> You can usually move the decimal point with a jumper as well. <A> There are addressable I2C bus LCD display drivers for 4 digit control that may be cascaded. <S> added <S> I2C-7SEG is designed base on SAA1064 IC. <S> Here is the off the shelf solution I had in mind. <S> I2C card with LEDs in 6 colour options .. Just add plastic filter to match LED colour in a box. <S> I2C 4-DIGIT 7-SEGMENT DISPLAY <S> $23 / pc. <S> 1.50 x 2.05 inches. <S> Display brightness controllable by software. <S> Card has all address jumpers, pull-ups and 2.5V ref. <S> Flexible operating power supply voltage range of 4.5V to 15V Suitable for 5.0V microcontroller <S> If you want an analog interface with a DAC output , use a DMM but if you have a micro and serial interface, use this. <S> I think for a process indicator, <S> you need an LED display with high contrast ratio and readability from a great distance . <A> You could use a precision DAC and ADC meter from HP to display 8 digits of accuracy programmed in short order using USB or IEEE488 off the shelf. <S> I did this for a much larger SCADA system I designed using a 128 digit display in 1979 in an HP9825 calculator, except back then IEEE488 was called HP-IB) <S> I used DMA access, ADC's DACs counters, MUX/DeMUX's PSU remote controls, with CRT dual-page auto alert on process control and human readable Finite State machine status and analog results refreshed every second. <S> What is the content of the data and how do you propose getting 8 significant figures using 4~20mA current loop? <S> You could have indicated if you wanted an digital interface or an analog interface.
What you need are these digital panel meters: Digital Panel Meter
Calculating parallel resistance of a rated bulb I have a bulb rated 110 V, 60 W and is in series with another bulb which is 110 V, 110 W. It's being powered with a 220 V source. Now, what would be the resistance of the resistor to be added in parallel to the first bulb so that each bulb will get the rated power? The way I approached this is first get the resistance of each bulb, then get the voltage drop of each bulb via current divider principle. After that, I'm stuck. <Q> I'll presume your bulbs are ordinary resistors first. <S> The 60 W bulb is R1, the other one R2. <S> Resistance can be calculated as \$ R = <S> \dfrac{V^2}{W <S> } \$ <S> For R1 and R2 <S> that's <S> \$ R1 = <S> \dfrac{(110 <S> V)^2}{60 W} = <S> 202 <S> \Omega \$ \$ <S> R2 = <S> \dfrac{(110 <S> V)^2}{110 W} = <S> 110 <S> \Omega \$ <S> Then <S> Rp || R1 = R2, or \$\dfrac{Rp <S> \cdot R1}{Rp + R1} = <S> R2 \$ <S> Filling in the values gives \$\dfrac{Rp \cdot <S> 202 \Omega}{Rp + 202 \Omega} <S> = <S> 110 <S> \Omega \$ <S> Solving for Rp gives us 242 Ω. <S> That would it be if the bulbs were ordinary resistors. <S> They're not <S> they're PTC resistors with a very low resistance at room temperature, and higher when the filament is heated by the current. <S> Operating them at lower voltages by placing two of them in series will decrease the resistance, but you'll have to measure the voltage across each of them ,and the current to know what the resistance at that voltage is. <A> As Steven states, this is only true when the bulbs act like ordinary resistors. <S> The solution is easy. <S> The voltage across the 'divider' will be evenly distributed when power at the top half and power at the bottom half are equal. <S> Power at the top half is 60W. Power at the lower half is 110W. <S> To have equal power both at top and at bottom halves, you have to add <S> an extra \$110W - 60W = 50W\$ in parallel to the existing top bulb. <S> Ohms law: \$R = <S> \dfrac{U}{I}\$ <S> and \$I <S> = <S> \dfrac{P}{U}\$ <S> Substituting the second equation into the first, gives us the familiar: <S> \$R = <S> \dfrac{U^2}{P}\$ Now fill in the details: <S> \$R = \dfrac{U^2}{P} = <S> \dfrac{(110 V)^2}{50W} = 242 \Omega\$ <A> This looks like a homework problem, so I'll give some hints and let you do the math. <S> You want the voltage to be equal on both bulbs. <S> Therefore, neglecting the thermal influence on the bulbs' resistances 1) , you need to decrease the resistance of the bulb with the lower power rating (60 W) <S> such that it is equal to the resistance to the bulb with the higher power rating (110 W). <S> This way, you get a voltage divider with two equal resistances R1 and R2, equally sharing the provided voltage of 220 V, with R1 being the parallel resistance of the 60 W bulb and your additional resistor, R2 being the resistance of the 110 W bulb. <S> Step 1: Using the ratings of the "brighter bulb", solve for its resistance. <S> Step 2 <S> : Do the same for the not-so-bright bulb. <S> Step 3: Using the formula for parallel resistances, determine the resistor needed in parallel with the other bulb. <S> Step 4: Upon successful accomplishment, you'll look like a very bright bulb. <S> 1) <S> Thermal variation of the bulbs' resistances is often neglected in homework problems, so I guess this is a safe simplification to do.
So for the bulbs there's no easy answer.
What is the definition of "cathode"? According to Wikipedia's definition , a cathode is "an electrode through which electric current flows out of a polarized electrical device". However, the direction of current flow is purely an arbitrary convention, and is in fact the opposite direction to which electrons flow in a metal conductor. Hence, this definition seems to be a bit lacking. If the definition is referring to the current carriers, then the definition might be rephrased as "cathode is an electrode through which the charged current carriers flow out" (or "in"?). How would you define this term clearly and unambiguously? Does the common use of the term "cathode" really reverse when the current carrier is positive, as suggested in the article? Edit : What actually confuses me is the phrase "Cathode polarity is not always negative" . If electrons always flow into the cathode (by way of definition of cathode ), this statement implies that the cathode can be at a positive voltage relative to the anode. Can this happen in a "simple" conductor like an electrolyte, or does this require some special circuit? <Q> Electric current is an abstract current, the flow of electric charge , not a physical current like, say, electron current, the flow of electrons . <S> But electric charge is a property of things, not a thing <S> , i.e., electric charge is always "carried" by a thing . <S> So, while an electron current is necessarily an electric current (due the negative electric charge carried by the electron), an electric current is not necessarily an electron current. <S> For example, in a salt solution, we have two species of electrically charged ions present, the positively charged sodium ion and the negatively charged clorine ion. <S> Imagine that the sodium ions are moving to the right and the chlorine ions are moving to the left. <S> Obviously, we have two ion currents in opposite directions <S> but there is just one electric current <S> and it must have a direction. <S> The direction of electric current is, by convention, the direction of the flow of positive charge. <S> So, in this case, both ion currents contribute to an electric current to the right. <S> The first term is due to the positive ions to the right. <S> The second term is due to the negative ions to the left where the negative sign numerically "flips" the contribution to the electric current. <S> Think about it this way, <S> if I told you that I was travelling at -60mph west, you'd know that I was actually going 60mph east . <S> Similarly, a negative charge current leftward is an electric current rightward. <S> So, the above is all to simply say that the definition isn't lacking. <A> Charge flow (current) is the "standard" definition (i.e. Franklin's one from positive to negative, the opposite of electron flow). <S> The cathode of a component can change depending on it's state - for instance when a battery is discharging, the cathode is its positive terminal, and when charging its negative terminal (since the charge is now flowing into the positive terminal, rather than out, and out of the negative one, so they are reversed) <A> Of course, when you switch between talking about electrons and talking about electric current the direction flips. <S> You can define cathode as "the terminal where the electrons flow into the device", but as we are accustomed in everyday electronics life to talk about current flowing from + to -, the equivalent definition in terms of current is as your Wiki link states: "the terminal where the current flows out of the device". <S> IMO both definitions are totally unambigous. <S> Their usefulness depends on the context. <A> I think that the definitions of 'anode' and 'cathode' have become rather loose over time. <S> As others have mentioned, in the case of photodiodes and zeners, current can flow into the cathode. <S> In the days when the only kind of diode was the thermionic variety, the distinction between the terminals was clear. <S> Electrons 'boil' off the cathode and are attracted to the anode, so convention current has to flow into the anode and out of the cathode. <S> When the semiconductor diode came along, the terms anode and cathode were preserved <S> but I think they are misnomers in the original sense. <S> But there is rarely (if ever) <S> any confusion <S> so I suppose it is a moot point. <A> I'd like to summarise the points raised by everyone in my own answer, because I had to pick them up from several answers (all of which I upvoted). <S> Thank you everyone; this answer is only possible because you guys explained it to me :) <S> A cathode is the electrode that the current flows out of at a particular instant. <S> This refers to the arbitrary direction of current which is a ubiquitous convention in modern electronics. <S> If the current flows out of the electrode by this convention, the electrode is acting as a cathode . <S> If the current flow at a terminal reverses direction, the terminal changes from a cathode to an anode. <S> Where the current is carried by electrons, the electrons flow into the cathode. <S> In electrolytes, the negatively charged ions travel towards the cathode, and the positively charged ions travel away from it (though they don't physically flow into or out of the cathode, not very deep into it anyway). <S> Some electronic parts have one of their terminals designated as the positive terminal, and the other as the negative terminal. <S> This does not mean that one of these is always the cathode. <S> It depends entirely on whether the current is currently flowing into or out of a specific terminal. <S> So, in a polarized capacitor that is being charged, the current flows into the positive terminal, thus the negative terminal is the cathode. <S> While the same capacitor is discharging, current flows out of the positive terminal, thus the positive terminal becomes the cathode. <S> The potential difference between the cathode and anode can be both positive and negative, and does not determine which terminal acts as a cathode.
Wiki has it right, the cathode is the terminal of a component where the charge flows out.
What are the the advantages of a switched capacitor filter over a digital filter? The main advantage that switched capacitor filters seem to have over digital filters is the potential to achieve a high dynamic range, since the signal does not have to be quantized. As discrete time filters, they share the digital filter's frequency aliasing problem, and may need multiple clocks at different frequencies as well. Digital filters seem more flexible and easy to design, and analog filters are still needed to deal with frequencies above the Nyquist limit. What other advantages do switched capacitor filters have over digital filters? <Q> You can get performance similar to an analog RC op-amp based filter using a switched capacitor topology, while avoiding the need for an ADC, DSP, and DAC on a chip. <S> Switched capacitor circuits use capacitors and switches to emulate the behavior of resistors. <S> Additionally, the frequency response is determined by the ratio of the capacitors, so even low frequency filters can be easily realized on-chip. <S> The real benefit for IC implementations is that while the absolute value of capacitances and resistances have a poor tolerance, the matching between similar devices is very good. <S> This makes it possible to implement relatively high precision analog filters on a chip. <S> In an integrated circuit, you would choose a switched capacitor filter for the following reasons: Minimizing chip area is a priority <S> You will not be doing significant digital processing on the chip <S> The output of the DSP would be an analog signal <S> Practically, you would not use a discrete switched capacitor filter (using op-amps, capacitors, and analog switches) at the board level - you would use an active RC continuous-time filter. <S> There are switched capacitor chips that can provide good filtering results with just a few additional components. <S> Using a general-purpose DSP on a board level design will require additional programming, and may not have analog outputs. <A> Another advantage is that the filter's frequency characteristics can be changed on the fly by changing the clock speed. <S> The value of the simulated reistors are a function of the capacitance and the clock speed. <S> By varying the clock speed, you can adjust the effective resistance on the fly electronically, something that is hard to do in a controlled and reliable way in analog otherwise. <S> This feature of switched capacitors can also be used outside of filters for other purposes, like electronically controlled variable gain. <A> Higher order filters (4th order and up) are implemented by simply cascading additional packages, and all the classical filters (such as Butterworth, Bessel, Elliptic, andChebyshev) can be realized. <S> with 60dB range easily at low cost up to 100KHz. <S> It is easy to make harmonic filters.
The primary advantage of switched capacitor filters is that they can be easily implemented on an integrated circuit.
Is it okay to keep a mobile phone connected to its charger, 24 hours a day, 7 days a week? I want to ensure that a mobile phone is always charged, without requiring manual intervention: e.g. disconnecting/reconnecting the charger, switching the charger on/off, et cetera). One idea would be to leave the phone always connected to its charger, which in turn would always be connected to the AC mains. How feasible / practical is this? And are there better approaches? Note that I am unable to make changes to the phone, because it is an off-the-shelf, commercial phone. But I can make changes to the circuit of the charger. Edit: This is not a specific phone model I am talking about, but potentially a phone I'd buy, for a very specific purpose. This might be lower-end Android smartphone. The phone would be left in an unattended remote property, and serve as a landline replacement (since the area isn't served by fixed-line phones). A caretaker would use it periodically to report well-being, and share some video / pictures of the place by sending MMS multimedia messages. The place has bad power supply, and thus the I want to keep the phone always charged. I do not want to hand over the phone to the caretaker, since he doesn't live on the property. <Q> Most modern phones have a charging control circuit which takes care of what you are proposing. <S> When the battery is charged, the charge control IC will terminate charging of the battery, then monitor to see if it needs charging again. <S> So all the charger has to do is make the power available. <S> Below is a flowchart from the datasheet of <S> MCP73831 <S> Li-Ion charge controller IC from Microchip: <S> You can see the various stages of the charge cycle. <S> This is a pretty basic IC (I just picked it since I've used it a few times) but does the job and is nice and cheap - many phones will have a pretty complex power management IC, possibly a custom one. <A> While all that has been said is on the right lines, one also needs to understand the high internal temperature of the battery and adverse affects when fully charged and continuing to be in that stage. <S> To that extent charging fully and retaining in that stage well not cause electrical damage to the battery but will definitely affect the capacity of battery and hence long life for to the temperature induced stress. <S> Coupled with this is a related aspect of not charging fully and not letting the battery discharge fully before charging There are a lot of articles on this at battery university apart from this here . <A> My experience tells me that rechargeable batteries have a finite life that for benign conditions is the cumulative sum of charge rate * time and discharge rate * time. <S> i.e. <S> There is almost a constant finite cum. <S> Amp-hr life in rechargeable batteries unless you exceed the rate or depth of discharge recommended by the mfg of that technology. <S> I am not talking about the Amp-hr of a single use, but the Amp-hr life of all uses is finite. <S> If you want to estimate its cost. <S> here's a test. <S> compute the MTBF of rated battery / cost of replacement and come up with a cost/hr of using the battery. <S> It may surprise you .. or not. <S> i.e. 1000x -50% discharge is close to 2000x discharges at -25% depth but this relationship gets nonlinear below 50% discharge depths and depends also on Discharge rates. <S> Here assuming C/5~ C/10. <S> So running on the charger 100% of the time should give you infinite lifetime? <S> not quite. <S> THere is a supplementary rule of thumb, that says "if the battery temperature increases for every 10'C" {from ambient heating of nearby electronics} "it's lifetime will degrade by 50%" even if not in use. <S> Quite often you will see storage of batteries in fridges because the self-leakage tends to be lower and this extends lifetime. <S> Self leakage is a temporary thermal characteristic but also becomes permanent over time. <S> The 50% reduction <S> every 10'C or "Arrhenius Equation" rule for all chemistry applies to all electronics as it does on Li-Po batteries, but there are also threshold effects of damage from over-temperature that also accelerate failure rates as well if discharge rates increase defect rates and average lifetime will accelerate, meaning that no or light use of batteries is the smartest way to extend your battery life. <S> Notice how resistance increases with age of battery. <S> THis also affects self heating and is another key indicator of a battery getting old. <S> ( Gee if never used to get this hot ) <S> Even if it is a little inconvenient to keep plugging it in. <S> So be gentle on your cables. <A> Good going! <S> Batteries are after all power units. <S> When a source is available (like you are near a wall socket) always use the source. <S> The charger usually has an extra capacity (unless your mobile is fully drained and you are charging it) and hence if the mobile is used it does not discharge the battery. <S> Better to remember that the battery life is determined by the number of cycles (especially the deep ones where your dip below 30% and recharge) and it should in principle prolong your battery life. <S> It is best to use the phone with battery between 95% (100% too is okay but not needed) and 45% for a long battery life.
Of course you must be gentle on the charge plug and remember it can fail too near each end from over-stretching and moving a sharp bend radius.
Buzzer on a computer mainboard I would like to remove the buzzer on an Intel mainboard, and replace it with an LED with a resistor. Is there a standard voltage that I can assume that comes to the two ends of the buzzer? Why was a buzzer used in the design of computer mainboards instead of an LED? Update: My buzzer is labeled HYCOM HY-05 , datasheet here . <Q> A little bit of history about the second point: Original PC didn't have a sound card and there were no complicated speaker systems we have today. <S> Instead it only had a single weak small speaker to provide sound and was called "PC speaker". <S> The output was created by programming the Intel 8253 Programmable Interrupt Timer. <S> It's counter 2 was connected to the speaker and could be used to play music or in some games made by high sourcerors familiar with the esoteric secrets of Black Magic even produce speech. <S> Over time sound cards appeared that could produce more complex sounds and that lead to use of external speakers with PC. <S> As those speakers evolved, the PC speaker degenerated. <S> Today, it's usually just a buzzer and isn't as supported in operating systems as it used to be. <S> For example, Windows 98 could use PC speaker on some computers as a normal sound output for all audio events, while new versions of Windows can only beep. <A> To answer your second question: a PC motherboard is usually placed in an enclosure, and since most of those are not transparent you would see little of the LED. <S> Also a buzzer will always signal you when you're around, a LED only when you look at it. <S> The buzzer makes more sense. <A> I'm not aware of a "standard" voltage as such, but it's pretty likely to be 3.3V or 5V (possibly 12V). <S> The easiest way would just be to measure the voltage across it when it operates, then select your LED + series resistor accordingly. <S> Bear in mind it could be driven by PWM if it has no internal oscillator, so a scope would be best to test with. <S> PWM will still work for the LED though, but the brightness then depends on the duty cycle. <S> For example, if we have a standard red LED with a Vf of 2V, and we aim for a ~10mA operating current @ <S> 3.3V. <S> This should be sufficient current for a basic indicator LED. <S> If the voltage is 3.3V we get (3.3V - 2V) / <S> 0.010A <S> = 130 ohms for the series resistor. <S> At 5V, we get (5V - 2V) <S> / 0.010 <S> = 300 ohms. <S> At 12V we get (12V - 2V) / 0.010 = <S> 1k ohms. <S> The way to test this would be to either check the PCB, find the resistor and read the value, or measure voltage as above, add a resistor of known value in place of the buzzer and measure the voltage drop across it. <S> Then do (Vsupply - Vr) / (Vr / R) = <S> Runknown. <S> For example if the supply is 5V and you use a 1000 ohm resistor and measure 4V across it: (5 - 4) / (4 / 1000) = 250 ohms. <S> Again, bear in mind it may be PWM. <S> EDIT <S> - now we have the part number, we can see it is a 5V, 50mA electromagnetic buzzer, and it is driven by a 2.4kHz square wave (not DC) <S> This is fine, just size the resistor for half that of DC to get the same brightness (as the duty cycle is 50%, it means the power is 50% compared to DC) <S> So if you size for 20mA, you will get the equivalent of 10mA. <S> This should be plenty bright enough.
Note that depending on the type of buzzer, there may be a series resistor present already so you might be able to fit the LED directly. The only remaining use of it seems to be to notify user of some low level problem which prevents computer from booting normally.
What is the difference between burden resistor and a normal one? I just came across the word 'Burden Resistor'. Is it any different from a normal resistor? If it is different, where can I possibly get one? Sparkfun hasn't got one listed. Any help is appreciated. I am trying to build a current sensing circuit . <Q> The name refers to the function, not to the resistor's construction. <S> Current transformers act as current sources and need a load. <S> A current source is the dual of a voltage source, and just like you shouldn't short-circuit a voltage source because it would cause infinite current, you shouldn't leave a current source open, as it would cause an infinite voltage. <S> The burden resistor converts the current to a limited voltage. <A> An ordinary resistor becomes a burden resistor at the moment you connect it as a burden to something else, e.g. to the output side (secondary) of a current sensing transformer. <S> I have mostly read the term in the context of current sensing devices, like current transformers or current sensing modules. <S> These devices often provide a current at their output side, proportional to the current you want to measure on their input. <S> Often, you connent an OpAmp or an ADC, both of which want a voltage as an input. <S> Using the relationship <S> U=R*I <S> , a known resistor will give you a voltage proportional to the current - and one could say that the resistor acts as a burden to the current at the output of your sensor. <S> Such a circuit has the advantage that you have some degree of freedom when it comes to scaling a given current range for a given, desired voltage range. <S> Before connecting it, it could also be a shunt or a current-to-voltage converter or anything else resistors are used for. <S> It's the same story as with a regular transistor that becomes an electronic switch or a small-signal amplifier only by the way you use it in your design. <S> Or with an OpAmp that becomes a buffer, an integrator, a differentiator or a subtracting amplifier depending on how you connect it. <A> A burden resistor is a normal one. <S> But it has a special function: typically it is used to discharge a capacitor when your circuit isn't powered anymore. <S> Take for example a computer power supply: it has capacitors connected to mains (after rectification of course), so they are charged up to several hundreds of volts. <S> The burden resistor is large enough not to affect normal use, but it will discharge the capacitors when power is switched off. <S> This makes it less dangerous to work on the power supply, and it also reduces stress on the other components (since then there is not voltage applied to them). <S> In your linked example I cannot find the word 'burden resistor'. <S> But there it might refer to the resistor which is used to measure the current. <S> it will form an additional burden on the supply lines, which then can be used to measure the current as voltage. <A> The term "burden resistance" is used to describe situations where each additional unit of current flowing through the device will increase the burden voltage by a fixed amount (e.g. if every milliamp flowing through the device would cause an extra millivolt drop, the burden resistance would be one ohm). <S> A very common means of sensing current flowing into or out of a circuit is to wire a resistor in series with one leg of the circuit, and then measure the voltage drop across that resistor. <S> In most such designs, very little current will flow into, out of, or through the voltage-measurement circuit; almost all current will flow through the resistor. <S> Generally, I've heard the term "current-sensing resistor" used to describe the physical device, and with the term "burden" being used in describing to effect seen by the circuit being monitored. <S> Note that from the standpoint of the circuit being monitored, the ideal "burden resistance" would be zero ohms, or--failing that--as small as possible. <S> On the other hand, from the standpoint of the device doing the measuring, a larger current-sensing-resistor value will, up to a point, make current measurements easier and more accurate. <S> The "purpose" of the current-sensing resistor isn't to impose a burden voltage on the circuit under observation; rather the purpose is to generate a voltage which can be seen by the voltage-measurement circuit. <S> The fact that such voltage is seen as a burden voltage is an unfortunate side-effect. <A> Burden resistors, like most have said, is tied across the output terminal of a current transformer to generate a voltage proportional to the current on the transformer secondary. <S> This is because, according to Mr Ohm, Resistance is the common PHYSICAL link between voltage and current <S> (V = IR). <S> The voltage drop on this resistor becomes a measure of the current flowing through the transformer.
The term "burden voltage" is used to describe the voltage drop caused by a series-wired current-measurement device in a particular situation. No, they're the same components as regular resistors.
Which is easier to solder: TSSOP or QFN? Which package easier to solder on home-brew PCBs: TSSOP QFN I generally use solder paste and hot-air / hot-plate. <Q> For hand soldering I'd go with TSSOP. <S> QFN pretty much requires hot air, whereas you might be able to get away with a soldering iron with a TSSOP. <S> The pitch of QFN can be smaller too, which is more difficult with home-made PCBs, but TSSOP can be small too. <S> Sometimes they have a exposed pad in the center that needs to be grounded, which makes routing more difficult. <S> One issue with QFN is you have to consider the package lying flat against the board without any gap under the package or between pins. <S> This means you can't use conductive flux since you can't guarantee the flux will be rinsed away under the package. <S> I know this because it actually happened to me. <S> A local manufacturer that specializes in small quantity hand-built boards was new to QFN and didn't think about this. <S> The boards we got back didn't work for various reasons. <S> Eventually I figured out that pins were being shorted together under the package. <S> The resistance was surpringly low, like only a few 100 Ohms in some cases. <S> What a mess. <S> Letting the boards sit in clean water for a few hours helped, but ultimately we had to remove all the QFN packages with our hot air station, clean the mess, then re-solder them with rosin flux. <S> Then the boards worked as expected. <S> For real professionally fabbed and built boards, there is no issue with QFNs, but for do it yourself situations they can be tricky. <A> If you're not soldering by hand they should be equally easy to solder. <S> Visual inspection afterwards will be easier for the TSSOP, just like putting probes on the pins during debugging. <S> On the other hand the QFN has the advantage that there are pins in both X and Y direction. <S> During reflow the surface tension of the liquid solder paste will pull the IC perfectly over the pads, even if positioned a few tenths of a mm off. <S> So the QFN will do this in the two directions, the TSSOP mainly in the length direction only. <S> If the QFN has a thermal pad they often advice not to apply solder paste over the full pad, but do so in a pattern of smaller dots. <S> That's because when heated boiling flux may cause gas cavities, which push up the IC so that pins may not properly be soldered. <S> Reducing the amount of paste for the thermal pad avoids this. <A> And Always make sure when Applying the Solder at the bottom GND PAD of the QFN to keep it as small as possible so that the QFN will remain flat on the pad. <S> That help with good solder re-flow and PINS Alignment. <A> The answer is: TSSOP <S> A QFN has pads that are underneath the package. <S> If the package is laying flat, you can only barely see them from the side. <A> On the other hand, the long external leads between the package and the board on a TSSOP or TQFP offer a longer lever for misalignment, a bigger surface to incur solder bridges and the center thermal pad (if present, and if your boards pad matches the size of the one on the chip) <S> also helps center it during reflow.
A TSSOP's leads are exposed and can be hand soldered with solder wick (and, optionally, some additional flux). IMHO, it is a toss-up because it is harder to mess up with a QFN, but harder to fix if you do...
Splicing a laptop power supply cord I'm replacing a Dell laptop power supply with an old Mac Mini supply I have laying around. The broken Dell psu outputs 19.5V and 4.6A and the Mac psu supplies 18.5V and 4.6A. I hoping that's close enough and will suffice. My issue is splicing the Dell cord onto the Mac cord coming out of the Mac psu. The Mac cord simply has a red wire and a black wire, as seen here: The Dell cord has the outer layer of black rubber, then a layer of wire mesh, surrounding a layer of white rubber, then another layer of wire mesh, then another layer of white rubber, and lastly a thin wire in the middle. Here's a picture. The two wire mesh layers are twisted up. My question is which is negative and which is positive? Here's a picture of the Dell connector: Thanks <Q> You cannot mate this connector with a two wire PSU. <S> This connector has three terminals: <S> The metallic surface outside , the surface inside and the pin. <S> The laptop uses this pin to detect the type of PSU it is connected to - otherwise it will not use external power. <S> You really should buy a replacement from Dell. <A> Have a multimeter? <S> Dell does use a 3rd wire which operates on the 1-wire protocol to send an electronic signature to the computer which allows the battery to charge. <S> I'm not sure if apple chargers use the same thing or not. <S> https://hclxing.wordpress.com/2014/02/26/hacking-a-dell-power-adapter-final-not-really/ <A> <A> Here is your answer, sir, as regards the d531. <S> I really hope this helps you.
Well the white is the sense and that will make laptop know that the right charger is connected , the open sheild cable is the power, when the big thick sheild is ground ,,, but you cant use 2 wire power instead ,,, you can use any other 3 wire board useing the same config in other power the sense can be blue like hp , or red , or grey its simple if you have a multimeter Check which terminals are positive and ground and connect them.
Are sealed lead acid batteries water-resistant? I am going on a climbing trip in the Canadian Rockies for 20 days starting this weekend. I am bringing a 12volt 7Ah SLA battery that I am going to use to charge my GPS, iPod, Camera, and Sat Phone. I ordered this Yuasa battery . Will using this in a wet environment, and possibly getting rained on be bad for the cell? Will the water be able to get inside? I figured if the Lead Acid and HCl can't get out, then water can't get in. Is that true? Also, I know that cold weather makes the life of Alkaline's and even Li batteries shorter, does the cold have a negative effect on Lead Acid batteries? <Q> Water shouldn't be able to get inside sealed lead-acid cells. <S> The terminals are not environmentally sealed, though. <S> If you backpack gets soaked, they battery could discharge through the wet cloth. <S> Cold increases the internal resistance of the batteries. <S> As a result, you lose more energy on the internal resistance. <S> You will get less charge back from the battery. <S> Max output current also decreases*. <S> At 0 0 C, you should still be able to get few amperes necessary for charging your gear. <S> ( source of image ) <S> * BTW, vehicle starter batteries are rated for Cold Cranking Amperes. <S> So, they are rated for the worst case. <A> The battery will be safe to operate in wet conditions provided it is genuine. <S> I'm not aware whether battery counterfeiting is an issue in the US but note that some low grade "sealed" batteries are not sealed. <S> Yuasa are competent and reputable and their claims can generally be trusted. <S> Operation underwater would probably be "unwise" - not liable to be a problem in your case. <S> There is an overpressure venting system which operates only when the battery generates excess pressure due to Hydrogen generation - which will not happen under normal operation due to designed recombination of gas. <S> The Genesis label on the battery pictured is due to rebranding of Yuasa (or Enersys) batteries in the US by Genesis. <S> Genesis say ( from here ) <S> The NP Genesis batteries is used in general electronics and comes in many different sizes for various applications. <S> The construction of the NP is the sealed technology, which means it is guaranteed to be leak proof regardless of the position in which the battery is installed. <S> In addition, the batteries offer the electrolyte suspension system, which includes high porosity and fiber materials that are designed to absorb the electrolyte. <S> The NP batteries have no gel or any other type of contaminants that are used. <S> In addition, the NP Genesis batteries offer a built-in design, which controls the gas generation and includes a recombination that is more than 99 percent during the float usage. <S> One of the best features of the NP is they are maintenance free. <S> There is no need to add water or check the electrolyte levels. <S> It is truly an install and forget it type of battery. <S> Here is a superb Yuasa NP series sealed lead acid battery application manual which provides much detail on the care and feeding of your battery. <A> The 12 v 7Ah sealed lead acid battery should work fine for your application.
The wet environment or mild rain won't affect the battery, so long as you don't submerge it in water! A genuine Yuasa NP7-12 battery datasheet here is designed to be operated in any orientation and is "perfectly sealed" according to Yuasa.
What dangers are there putting power through RCA connectors? I've had no luck searching Google for terms like RCA power connector, other than a passing reference on Wikipedia. I have plenty of RCA connectors, and tons of wall warts. I've got a small LED desk lamp that I want to power with a wall wart instead of a battery, but I don't have any female connectors that the wall warts plug into. So my thought was to use an adapter and change the end to be an RCA connector. If I'm putting a few volts and maybe 500mA or so, would there be any problem as far as the RCA connectors go? Obviously I'll need to reduce the voltage for the LED and I'll have to deal with those concerns, but if there's any problems with the connector I'll just try to find some standard connectors. <Q> In my experience RCA plugs make a very tight connection, and I expect the resistance to be way less than 50 mΩ, probably near 10 mΩ. <S> Even at 2 times 50 mΩ <S> (you have to count both pin and sleeve) <S> a 500 mA current will cause a 25 mW dissipation, which is more than acceptable. <S> Matt makes a valid point about mixing them up with audio plugs, though. <S> The wall-wart probably has a DC jack like this <S> Why not use a socket for that? <S> These are almost exclusively used for power supplies, so there's little chance of confusing them for something else. <S> Sockets for them are readily available. <A> The obvious risk is that someone could plug the wall adapter into an RCA jack somewhere else, potentially frying your stereo or theirs. <S> The next concern would be whether the connector can handle 500mA without getting warm due to resistance in the metal part or in a poor connection between the plug & jack due to surface dirt etc. <S> You might try it on the lab bench and give up on it if you find the connector getting noticeably warm. <S> If you have a meter that can measure resistance down to milliohms try measuring the entire assembly from the far ends of the wire to get an idea how much power it will dissipate <S> (\$P=I^2R\$). <S> It sounds like you plan to change the plug end on the wall adapter cable as well as adding a matching jack to the lamp. <S> You might as well buy a matching pair of parts from Digikey or similar <S> so you know they're rated for that much current or more. <A> There are even commercial products around that do exactly what you suggest. <S> Note the black RCA connector on this cheapo satellite receiver labeled "12V OUT =50mA". <S> It is probably used to power a relay that switches all your other home entertainment devices on or off when the receiver is on or in standby. <S> As I said: Cheapo! <S> The amount of current you can run over your RCA connection depends heavily on the exact type of connector. <S> Here 's an example of one that is specified at an amazing value of 16  <S> A. There are others I wouldn't use for more than 100 mA. <A> There shouldn't be any issues transferring power through an RCA connector, especially for low power applications. <S> The only reason I would suggest against it is that RCA connectors tend to be quite wide with their tolerance ranges and could come apart easier than you'd want (meaning your circuit loses power as soon as it comes disconnected), however, if you're not moving the connection around or putting any mechanical stress on it, you shouldn't have problems. <S> After you get it setup, I'd just double-check the connection's security and make sure neither contact is heating up, which could indicate a shoddy connection. <S> I've used RCA connectors to power two 12V Sanyo Denki 120mm DC Fans for my computer a long time ago. <S> Had no issues. <A> I've often used them at about 5A. <S> They get a bit warm towards the higher end <S> but I haven't had one melt (so far). <S> I standardised on using red ones for 5V and yellow for 12V, same as ATX wiring. <A> Easy to short the output of an RCA male cable.. not necessarily a problem if the power source doesn't mind being short-circuited. <A> I have this arrangement on a electric bike battery charging circuit. <S> What is important is that the cables used can also handle that current without getting hot enough to melt the insulation. <S> Voltage rating below 48v not a problem <A> When I was younger, I made a battery bank from a yard of sink drain pipe filled with 9 D-cell batteries, for research purposes (making stuff spark and glow). <S> For connecting this battery bank to the outside world, I used two RCA connectors; one wired as positive (outer shell and inner pin in parallel) and another wired as negative. <S> I'm unsure of the current my (rechargable) batteries were capable of pushing, but 5-10A seems a reasonable ball park estimate. <S> The RCA connectors could get warm when performing a lot of... research, but they never gave me any problems. <S> At 500mA, I think you'll be fine.
I assume they decided to use an RCA connector because it was cheapest for them, and it is quite obvious that you must be extra careful to not fry your audio or video equipment by accidental, wrong connections. The RCA connector can handle 48v and 3amp. 500mA isn't a tremendous amount of current, but keep in mind that RCA jacks were designed to carry signal, not power.
Powering LED with 9V battery I want to take an LED and power it with a 9V battery. I just don't seem able to get the math right. Taking an average 9V battery and a 10mm LED, what kind of resistor would I need and how do I know for how long the LED will run on the battery? Also, can infrared LEDs be "seen" (using a camera?) from a distance? <Q> 10 mm is not an electrical specification, you should consult the datasheet to find out how much current it needs. <S> For an indicator LED that's often 20 mA. <S> The LED will have a voltage across it, what's called the voltage drop. <S> We also need that, it's also in the datasheet. <S> The voltage drop mainly depends on the color, for a red LED 2 V is a typical value. <S> So with 2 V and 20 mA we can get to work. <S> We're going to place a resistor in series with the LED to control the current. <S> At 9 V battery voltage and a 2 V drop across the LED we'll have 7 V remaining for the resistor. <S> Then according to Ohm's Law Voltage = <S> Current x Resistance, we can calculate the resistor value as \$ R =\dfrac{V}{I} = <S> \dfrac{7 V}{20 mA} = 350 <S> \Omega \$ <S> The closest E12 value is 390 Ω. <S> An alkaline barry may have a capacity of 560 mAh. <S> Then at 20 mA it will work for about 28 hours, maybe somewhat less. <S> And yes, a camera will see IR, from how far depends on the LED's power output. <A> Use Ohm's law. <S> First you have to know the voltage drop accross the LED when lit to its desired level. <S> For typical green LEDs, that's usually about 2.1 V. Red LEDs are lower, and IR LEDs even lower still. <S> Blue and white are higher, like a bit over 3 V. <S> Let's say for sake of example you have a typical 20 mA green LED that drops 2.1 V. <S> The battery puts out 9 V, so that leaves 9V - 2.1V = 6.9V accross the resistor in series with the LED. <S> These LEDs can take 20 mA of current, but unless you expect to use it in a bright environment that will be overkill. <S> Let's aim for about 10 mA LED current. <S> Since the LED and resistor are in series, the LED current and the resistor current will be the same. <S> The question now is, what resistance drops 6.9 V at 10 mA? <S> This is what Ohm's law is about. <S> 6.9V / 10mA <S> = <S> 690Ω. <S> The standard value of 680 Ω will be fine. <S> To calculate the run time, look at the battery Amp-hours spec. <S> I rarely use them <S> so I don't remember what the capacity is <S> , so I'll use 1 A-h for example only (could be quite off from a real 9 V battery. <S> The A-h capacity is in theory the current you can draw for 1 hour from a fresh battery until it is dead. <S> You are drawing 10 mA, which is 1/100 Amps, so in theory <S> a 1 A-h battery will last 100 hours. <S> In practise less, as low as half that in cold for example. <A> Instead of wasting power with a large voltage drop across the resistor, you can also put more LEDs in series. <S> Red and yellow LEDs are typically 1.6 V, and blue and white are 3.2 V in low currents less than 20 mA. <S> This assumes modern high intensity parts are selected. <S> This means you could put red, white, and blue LEDs in series with a 9 V to 9.5 V battery as you suggested. <S> 9.2 V Battery (~ mid life), then subtract: red        1.6 <S> V white    3.2 V blue      3.2 V <S> The remainder is 1.2 V, which we want across the current limiting resistor for say 10 mA, which is half of most 5 mm LEDs rated at 20 mA. 1.2V/10 mA = 0.12 k&ohm; = 120 &ohm; 1.2V <S> * 10 mA = 12 mW or 10% of rated 1/8th W resistor <S> Naturally, tolerances of 10% on resistors and 10% on LEDs will be safe when you operate at the 50% rating. <S> A bigger resistor will be proportionally less current and last longer. <S> LEDs with a larger luminous intensity (Iv) have smaller beam width angles that use the same chip, such that Theta of 20 degrees is twice as bright as Theta of 45 degrees. <A> Something like in this video: https://www.youtube.com/watch?v=VRFmIVmhuY4 <S> Warning: Please check the safety instructions before proceeding: https://en.wikipedia.org/wiki/Laser_safety
To know how long the battery will light the LED we want to know the battery's capacity, expressed in mAh, for mA-hours. When it comes to IR LED part of your question, Your camera can see IR light whether its day or night. 9 V batteries have poor energy density for their size, and they are not a good choice for running a LED efficiently.
What is the simplest sound generating circuit? I'm relatively new to electronics, and have no formal training other that what I picked up through my electrical engineer father. I solder well, can read schematics, have assembled kit projects with a rough understanding of how all the parts work, and know basic electrical terminology and principles. Ohm's law is about as far as my electical math skills go. So while this may seem like a very basic question to a more experienced and better trained person, please bear with me. I spent a couple weeks messing around with some LEDs. I started by just hooking one up to my power source. Then, what happens when I add a resistor? What about a capacitor? what about resistors in parallel vs. series? From just playing with my breadboard, I now have an LED that blikcs randomly. Impressive? Nah...but I figured it out myself, and feel that I truly understand it. Now, I want to design a synthesizer from scratch to give myself an understanding of how specific components affect sound. Starting from the most barebones circuit that can make a noise, I want to add a pot, then some capacitors, then some 555s ...you get the idea. I just want to start with the basics and play around to see what happens. Finding that circuit is proving to be quite difficult. I'm looking for a circuit more complex than hooking a speaker directly to a battery but less complex than http://www.musicfromouterspace.com 's Wacky Sound Generator (which, while simple compared to a real synth is still a lot more complex for me to truly understand what component A vs. compoent B does). In essence, I want to find the sonic equivalent of Battery-to-Speaker and start playing with what can happen in between. Electronics golf: what can produce sound with the minimal number of components? <Q> The 555 is a good way to start making tones in a speaker. <S> I suggest you make a simple oscillator using one, before you attack projects that use several of them. <S> Also, we had a question, <S> What is the simplest way to make an oscillating signal? <S> That turned out to be an inverter gate with feedback. <A> and you create a simple square wave tone. <S> You can also filter and manipulate it to make different waveforms. <S> Consider that with oscillators at different frequencies you can create virtually every sound: that's what the Hammond organ does. <S> A slightly more complicated but extremely more versatile solution is to use a microcontroller with a quick DAC and generate tones with it. <S> Then you can do many things, from using pots to set frequency and volume, but also create loops or more sophisticated things. <A> Sound is just vibrations, vibrations are caused by "blinking" the speaker coil. <S> The only difference is instead of blinking a few times a second, to blink a few hundred times a second. <S> Whatever you did to make the LED blink, change out some capacitors with smaller ones, and stick the speaker in place of the LED. <S> It might make noise. <A> The simplest circuit, assuming it can be manually operated, can be just a battery and speaker with wire brush at one end. <S> By short circuiting, by grinding the brush against other electrode, you will create audible noise. <A> If you want something where you can easily change the sound, I recommend the Atari Punk synthesizer , as published in Radio Shack's Engineer's Notebook, by Forrest Mims. <S> It certainly wouldn't qualify as "simplest", but it is the simplest circuit that can produce something approaching music. <S> It's also a 1-IC circuit if you use the dual timer 556 package, instead of two 555's.
Super-simple solution: a Schmitt's trigger inverter like this:
Using electric motor to adjust blinds? So I'm trying to do some insane home DIY with my room blinds. I'm trying to make them adjust (go up and down) automatically. Now for this, obviously, I will need a motor. The blinds I'm working with don't require much strength to pull down, but a fair bit to pull them up (using the little string/cord), So I'll need something fairly powerful, but slow. I'm taking a look at a few gear motors on this site, but I have no idea which one would be right to use for this kind of task. Could anyone help me out? <Q> Using electric motor to adjust blinds <S> The blinds I'm working with don't require much strength to pull down, but a fair bit to pull them up (using the little string/cord), <S> So I'll need something fairly powerful, but slow. <S> Cord pull in kg ~= <S> (Torque in N.cm)/10 on a 1 cm RADIUS = <S> 0.8" dia drum Cord pull in pounds = <S> kg <S> x 2.2 <S> Bigger drum = <S> smaller pull. <S> Smaller drum =- bigger pull. <S> Torque on your chart is given in N.cm (chart image at end) <S> kg.cm ~ N.cm/10 <S> 1cm radius = <S> 2cm diameter ~= 0.8 inch. <S> So, if you have a 0.8 inch diameter or 2 cm diameter drum for the cord then the cord pull in kg = N.cm/10. <S> So a 20 N.cm motor will provide <S> 2 kg cord pull. <S> Pounds force ~= <S> kgf <S> x 2.2 <S> Kg to Pounds: <S> Double pounds, THEN add 10%. <S> eg <S> 2 kgf -> <S> 2 x2 = 4, +10% = 4.4 lbf 5 kgf = 11 lbf etc. <S> Looking at their 1st line of motors you have torques including 25, 50, 100, 300, 900 N.cm = 2.5, 5, 10, 30, 90 kg.cm <S> = same cord pull on a 1cm radius = 2cm dia = 0.8 inch dia drum. <S> = 5.5, 11, 22, 66, 198 lbf cord pull. <S> Use a fishing scale (as DeanB suggests) or tie on bottles of water or exercise weights or ... to get some idea of needed oull. <S> I'd expect 2.5 kg to be low, 10 kg to be getting OK, 90 kg to be tearing the cord off. <S> YMMV. <S> Double drum dia = half cord pull. <S> Halve drum dia = double cord pull. <S> DIY <S> Rotate a captive nut on a rod and rod moves. <S> Rotate a captive rod in a nut and the nut moves. <A> I used for this exact purpose a 4 kgcm standard RC servo modified for continous rotation. <S> Cheap, replaceable, easy to be driven from a microcontroller. <S> It was exactly this servo . <S> There are servos with more torque, if you need it. <S> 4 kgcm is enough for my blinds. <A> Stepper motors may be a good choice. <S> Counting the number of steps will tell you how many revolution did the motor make and therefore how high the blind is.
Simple pulley speed reductions from motor to rod increase overall effective reduction. You can make your own rotary to linear gearboxes using threaded rod.
Why do we still use cable for a lot of forms of data transmission? Like many people I'm often annoyed by ugly cable clutter, especially when it's long distance. In my opinion it would be ideal if cables could be eliminated altogether, so that you'd just have two corresponding plugs without the cable, which you plugin at either end and transmit their information wirelessly. Maybe that would be a little futuristic for now, but what about transporting data over a wireless computer network (or two paired bluetooth transmitters)? That's perfectly possible, and all you'd need is a little box that can convert data to a format that can be transmitted over a wireless network, and a box that converts it back to the appropriate format at the other end. Over time this technology would surely be miniaturized until it fits in a plug. (you could use this for HDMI, audio or other information for example) Why doesn't this technology exist already? Am I overlooking something, or are there some difficulties with it that have to be solved first? <Q> Wireless technology is great and can be used in all sorts of scenarios but it's complex and hard to design for. <S> Wires are in fact superior in many ways. <S> ( Taken from: Essentials of Short Range Wireless Standards ) <S> With wires: Range is not an issue - just add more cable <S> Latency is excellent - what goes in one end appears immediately at the other <S> They're transparent to data protocols and formats <S> Throughput is excellent <S> No issue with security - you know what you plug it into Interoperability is excellent, At most, you only need to change the plug Power consumption may be higher, but the cable can carry power <S> They can be specified on a single page <S> Topology is simple - it's typically one-to-one Robustness to interference is generally a minor issue <S> Backwards compatibility is normally no more difficult than changing a plug <S> There's generally no license agreement, no qualification requirements and export controls <A> Wired connections have some properties that wireless connections don't: <S> Robustness: <S> a wireless connection can be subject to various forms of interference (think to microwave ovens) and obstacles, that can affect the quality of the received signal. <S> Latency: <S> wireless connections make a large use of acknowledge signals and error checking codes, due to their lower reliability. <S> This means that you need to wait more for valid data. <S> Parallelization: while you can run 10 cables to transfer 10x signals, with wireless links <S> it's harder because you will have interference and a limited amount of channels. <S> This applies also when you have many networks in the same place. <S> Security: with a wire <S> you (almost) always know where you're sending the signal, and getting into a wired network requires at least to get access to the cable. <S> With wireless connection the thing is much harder, because signals are broadcast in the air. <S> Encryption systems are evolving, but with GPGPUs and parallelized computing it's becoming much quicker to make brute force attacks. <S> Range: <S> you know the range of a wired connection if you have the specification and a long enough cable; it's harder with wireless networks because they are subject to reflection and all the obstacles on the path, and estimating the range is mostly by trial and error. <S> Safety: this is a minor point, but there is research about the effects of RF on the human body <S> As a side note, there are some applications (think to smartphones) which are only possible with wireless connection. <S> So the odds are that both communication media will survive also in the long term. <A> What you're talking about I use every day: my PC is wireless connected with my router and can transceive data at 300 Mbps. <S> Works fine. <S> Ten years ago I used a CAT-5 cable for that (a bit lower speed back then). <S> But there's cost. <S> A few meter of wire will probably be cheaper, especially at low speeds, when there aren't that strict requirements for the cable. <S> Also, a cable has the advantage of kind of isolating the data from the mean world outside. <S> Data is inside the cable, noise stays outside. <A> Things are gradually going to wireless but at the moment cables are way better in several ways. <S> 1) <S> Speed Thunderbolt 10Gbps and USB <S> 3 4.8Gbps vs ~150Mbps for wireless n. <S> Then if you look at things like HDMI and Displayport you have 10.2Gbps and 17.28Gbps wireless <S> just simply can't push data that quick. <S> 2) <S> Interference: things are bad enough now to get your wireless router working nicely through your house. <S> Imagine every TV, game console, keyboard, mouse, external drive etc all trying to find a frequency to chat on. <S> You can try routing everything through your internet router <S> but then it is all on one frequency which has limitations on bandwidth. <S> you'd likely need one to plug it into the wall anyways. <S> 4) Range For longer distances like corporate campuses or telecom wires have the advantage of having a long range (1,000s of kilometers for fiber optics with repeaters for example) where as the atmosphere and interference will attenuate a wireless signal quickly. <A> All the answers given already are great from a design stand point. <S> But there is a political regulatory side to this story. <S> In the U.S., almost anything wireless is within the jurisdiction of the FCC (not sure about other countries). <S> Typically, this means that to stay in compliance, this adds an extra layer of complexity to design specifications. <S> As a result, it becomes more expensive either by complying, or being fined for not complying if you get caught...
3) Ability to transmit power: Particularly for USB devices you can power them with the cable you use if you don't have a cable for data transmition If you use wireless all kinds of signals may interfere with one another.
Long transmission line inductance with SPI I have a PCI 5V GPIO card which bit-bangs SPI over a 10-foot cable. The SPI clock is running at 800Khz. The cable connects to a board and the SPI lines feed directly into the SPI IC's. I know SPI is a short, board level communication, but I can't change any of that going forward. When I looked at the SPI clock and MOSI lines, I was seeing a 12V pulse on rising/falling edge that lasted for about 40ns. That tells me there is significant transmission line inductance. I can't change anything on the PCI card/cable and I am not able to slow down the drive strength of the line. I tried adding 100 ohms series resistance on the board side, but that had no effect since the inductance is still between the drive and the series resistor. An RC filter on the board side of 100 ohms, 1nF also had little effect. My next step, is to add an IC buffer that can handle the spikes and not pass them through. I just wanted to see if anyone else had a suggestion or could recommend a good IC buffer. Thanks. <Q> You are misapplying the resistor. <S> Putting in a series resistor at the destination won't help much with the initial problem. <S> Instead, you should use a shunt resistor to ground. <S> If you want to use a series resistor, it needs to be at the sending end. <S> Because the driver has a low impedance relative to the transmission line, you get a discontinuity there too, and an inverted reflection results. <S> If you put a series resistor at the driver matching the line impedance, then that is absorbed, and you eliminate the ringing caused by back-and-forth propagation of inverted reflections which is so evident on your scope. <S> An interesting case is a series resistor at the driver, and a high impedance receiver input without a terminator. <S> Initially, the series resistor and line impedance form a voltage divider, and only half the applied step goes down the line. <S> When it gets to the "open" end formed by the receiver, it reflects in phase, doubling the voltage back to the original. <S> When the reflection gets back to the transmitter, it is absorbed by the receiver. <S> Gradually the line voltage floats up to the drive voltage, as the situations becomes more like DC than like a step function. <A> Right now I have a 'good enough' solution, but I'd like get a better idea on this going forward. <S> Pic 1 is of 100 ohms in series on the PWB side. <S> As you can see the spike on the 5V clock signal dropped from 12V to 9V, but is still way too high. <S> Larger series resistance such as 200 ohms had little further effect. <S> Pic 2 is of 100 ohms/1nf filter on the PWB side. <S> I miss spoke when I said there was no difference. <S> The spike drops in voltage but is still there right at the beginning. <S> This is not a workable solution because my clock is unusable now. <S> Pic 3 is of the 100 ohm/10 nf filter on the PWB side. <S> The spike is still there and has not dropped in value. <S> Pic 4 is of the 'good enough' solution. <S> I've added a diode to the 5V rail to dissipate the spike into the rail. <S> (At the moment, I'm using a 1N4001 which is really slow, but it's all I had on hand. <S> I plan on swapping that out with a 1N4148 which is much faster as soon as I get some.) <S> As you can see, the spike is 7V and the undershoot only drops to 4V which is well above the 3.5V minimum high signal. <S> Again, this will get me there, but if anyone has any other comments, I'd love to read them. <S> Thanks to everyone for their comments and thoughts. <A> I can't even give a hint on your actual problem, but I think my comment is worth to have the status of an answer. <S> What about <S> SPI/UART converter? <S> Easy to interface, can be done on a minimal breadboard. <S> 8 bucks . <S> Sure, this will cost you around 20$, but if you replace RS-232 with 485 transceiver, you can forget about any problems related to cable length.
The problem is that the input of the receiving chip has a higher impedance than the characteristic impedance of the transmission line.
Sync video with data When I have a datalogger and I want to sync a video-file to the recording, what would be an easy method? The logger and the camera both have an internal clock, but they may not be set exactly to the same time, so I cannot use those timestamps to sync the start, and during long recordings they may drift apart. The solution seems to be to let the datalogger record an extra sync-signal, but what should this channel contain (no. of frames?) and how do I get this information from a regular camera? <Q> If the perspective is static the LED could be in the scene, otherwise some (fixed) position in the frame. <S> You trigger the LED and log this event with the datalogger. <S> Then use something like simpleCV <S> ( OpenCV vs. Matlab vs. SimpleCV ) to detect the blinking event, thus you know the significat frame numbers. <S> From there you can correlate the video data to the logged data. <A> One solution would be to feed some timestamp output from the data logger into the vertical blanking information in the video. <S> Then, when replaying the video, you can extract the timecode (with something similar to a closed caption decoder) and match the two up. <S> http://en.wikipedia.org/wiki/Vertical_interval_timecode <S> Here's an example of a device which can insert these timestamps http://www.adrielec.com/box28lit.htm <A> Often, cameras can pick up infrared, so if a visible-light LED is out of the question (i think it could be quite dim and unintrusive), IR LED might be another option.
A simple solution could be a blinking LED in the video.
How can one pair of headphones be connected to two audio sources? I'd like to connect one pair of headphones to the headphone jack on two audio sources simultaneously. I realize I can't just wire two audio sources in parallel since they'll then be driving each other. Commercial solutions appear to all involve amplification and volume control, which my two sources already have. How can I combine audio signals from the headphone outputs of two different devices while still presenting just the impedance of the headphones to each device? <Q> There are a few methods: <S> A simple passive resistive mixer is basic, but a bad solution for a couple of reasons: <S> One is that in order to keep a low impedance output you need to use low value resistors and this loads each output excessively, plus creates a voltage divider between the outputs. <S> Each output in the above example would see a 150 ohm load (e.g. the leftmost output will see R1 || (R2 + R3)) <S> So we can buffer the signal: <S> This solves the loading issue (now each output sees 3.3k which isn't as bad), but not the voltage dividing issue. <S> Say we have 3 inputs of 1V pk-pk. <S> With all three plugged in, the contribution of each output will be a maximum of 333mV. <S> This is okay (as we can add a gain of 3 to the opamp to compensate), as long as we don't unplug one of the signals. <S> If we unplug one of the signals, we change the loading on the other two and the voltage divider changes. <S> The signal voltage from each will now be 500mV. <S> If we unplug another then the full 1V pk-pk will be output. <S> So the output level of each channel is greatly affected by change of the other inputs - not just unplugging, imagine using volume controls. <S> A solution to this problem is the active inverting opamp mixer: <S> This is a current amplifier , and uses a virtual ground at the summing point to prevent any interaction between the channels. <S> The feedback resistor R1, matches the sum of the currents flowing through R3, R5, and R6 (in order to keep the inverting input at 0V) <S> This means that the output voltage is simply (I(R3) <S> + I(R5) <S> + I(R6)) <S> * R1. <S> If we remove an input, the voltage contribution from the other inputs stays the same. <S> So this is the best simple mixing circuit out of the three shown. <S> Try simulating the above circuits in SPICE to get a feel for what's going on. <S> The ESP pages linked to by Shimofuri are an excellent source of such information. <A> The value of the input resistors is the impedance presented to the devices. <S> Please check out this link from one of the best audio resource in the Web ( https://sound-au.com /Elliott Sound Products) for a comprehensive discussion on audio mixing. <A> You're looking for what is commonly known as a " combiner " (the opposite of a splitter) or in the audio world it is referred to as a "mixer". <S> You can get them for fairly cheap , but sound quality (maximum amplitude, frequency range) might suffer. <S> If you get a powered one it will sound better.
A non-inverting summing opamp circuit is the simplest mixer you can construct.
BJT, resistor, and diode work but ULN2803 does not I am trying to control some 5V relays with a mC. At first I went with using a BJT, a 470 ohm resistor, and a 1N4004 diode to control each one of the relays. Each mC output pin is 5V, 40ma. This setup worked well. I wanted to see if I could do better so I am trying out the ULN2803an driver chip. However, this sort of works. It runs for 5 seconds then the mC freeze or starts controlling the output pins incorrectly. The yellow wires connect directly to the output pins of the mC. Pin 9 of ULN2803an goes to ground, pin 10 of ULN2803an goes to +5V. Do I need resistor between the mC and the ULN2803an chip? Is the ULN2803 hooked up correctly? Is there something else I am missing? Everything works with the BJT, resistor, and diode combo. I thought the ULN2803an would be exactly the same. Any help in figuring it out would be appreciated. <Q> It sounds like you have your <S> ULN2803 wired up incorrectly. <S> Here is the pinout from the datasheet: <S> And here is an individual darlington from the IC: <S> You can see there is no Vcc pin - this is because the outputs are open collector . <S> This means you connect your load (relay coil) in between the output and Vcc. <S> This is just the same as you would have done with your BJT setup. <S> You can use a diode to protect against inductive kickback as with the single transistor, but the ULN2803 has integrated diodes for this purpose which you can use instead. <S> Effectively each output should look something like this when setup correctly: <S> The input can be driven from the micro output directly (the micro would be where the DS89C4x0 is in the diagram) or use an open drain with pullup resistor as in the circuit above. <S> Notice how the COM pin is connected to +5V to put the internal diode across the relay coil. <S> EDIT - I notice you have edited your question to change the +5V from pin 18 to pin 10 - I assume this was a typo <S> and it was like this to start with. <S> In this case, and judging from the picture it does appear that things are wired correctly as Russell mentions. <S> It's hard to know what might be causing your issue without more data - what do you mean when you say it runs for 5 seconds? <S> What is it doing during this time? <S> How often are the relays switching? <S> What are they switching? <S> Does whatever is being switched share power lines with the micro?If you have a scope, then posting a capture of the ULN2803 outputs and the +5V line would probably help. <A> From the photo it seems that you connected the 2803 correctly, but the path from the relay coils back through the 2803's flyback diodes is a bit long. <S> To check whether this is your problem you could try either wit a separate 5V supply for the relays, or with flyback diodes directly across the relay coils. <S> A long line is effectively a (small) resistor in series with a (small) inductor. <S> (Actually, there is also a capacitor, and if you need to be precise there is a large string of resistors, inductors and capacitors). <S> A lot of times you can ignore these, but in this case, there can be large current spikes that result in voltage spikes, which can affect your microcontroller. <S> If you have the chance, use 12V relays, powered from a 12V wall-wart, and use a 7805 or the like to power your microcontroller. <A> Your photo looks correct. <S> Ensure all breadboard connections are making contact OK. <S> Try reverse diodes directly across the relay coils. <S> Connect +ve lead going to top bus and then to pin 10 directly to pin 10 <S> (and or check pin 10 with meter to ensure it is high. <S> (can do as-is with no harm to IC.) <S> A + input to 2803 inputs should operate relays - disconnect uC first.
The diodes anodes are connected to each output, and the COM pin is the common cathode connection for these diodes (so you can connect this to the Vcc to put the diode across the relay coil) A ground lead to 2803 outputs should operate relays
What is the cheapest way for two devices spaced less than 10 feet apart to communicate wirelessly with each other? I'm building a musical instrument that comprises of two separate devices...one device is the master...has an accelerometer and a speaker. The master's buddy device also has an accelerometer. When the buddy tilts, the buddy device interprets the accelerometer data and then sends a note to the master. The master plays the note using instrument voice 1. The master, at the same time is processing it's own accelerometer information. Based on accelerometer data, it will play other notes using instrument voice 2. If the user moves device one and then moves device two in special ways, a flourish will play. My question is...taking into account the type/amount of data that I'm sending...essentially short control bytes, what would be the cheapest way for the two to communicate wirelessly? --CLARIFICATION--These devices ideally would be wireless and not tethered to each other. Also, these devices will be moved around freely so any line of sight method is less than ideal. <Q> I'll assume you want to do this wireless, otherwise the solution is obvious. <S> I would go for infrared . <S> The transmitter can be a small microcontroller sending a pair of bytes to an IR receiver module . <S> These receiver modules are tuned to a particular protocol. <S> You can use an RC-5 module; RC-5 transmits 14-bit at a time using Manchester encoding. <S> You can easily add a pair of bits to it, and define your own codes. <S> A 3 m range should not be a problem. <S> At shorter distances you probably won't even have to direct the LED to the receiver. <S> In a normal size room the signal will reflect off the walls. <S> Less than 5 dollar at Digikey. <S> That's far less than an Xbee. <A> Cheapest is wires. <S> Cheapest wireless is probably Infrared. <S> You don't say what the physical distance is but unaimed IR can work over 10's of feet / say 10 metres within a room due to IR bouncing happily off surfaces which are visually non reflective. <S> This can get unreliable and if lower range and/or a degree of rough aiming is possible then IR is liable to be a good fit. <S> IR transmission can be digital or analog. <S> Analog data rates of some kilobaud are easy enough [tm] with available tx/rx modules working at a carrier frequency of about 30 kHz and higher rates are possible. <S> A packet of data with say 8 data bits and some start + stop + error checking for say 20 bits total will take 20 mS to send at 1 kb/s (1000 bits/second) and 2 mS at 10 kb/s. <S> If this is received correctly on the first transmission a "latency" of about the packet transmit time exists. <S> You can judge if this is fast enough. <S> This assumes that the data link is synchronised and does not need a "preamble" to be sent to persuade the receiver data slicer to find the proper DC levels of the oncoming signal. <S> This can take significant time but is overcome wither by mumbling quietly to the other ened when there is nothing useful to send (system stays synced) or by using some other system. <S> Not hard. <S> Commonly done. <S> ICs exist that do most of the work. <S> Very low cost RF TX & RF modules <S> exist that cost far less than XBEE and are easier to use. <S> These lack the addressing and general security sophistication of XBEE but are liable to do just fine. <S> Costs may be about $US5/end and maybe less. <S> More and much more if you agree to pay it. <A> It's quite cheap, and will have excellent range. <S> I just bought a pair of transceivers for about $2.00 each from eBay . <S> The NRF24L01 is quite popular too, so I am sure you will be able to find some really great tutorials to follow. <S> For example, if you are using the Arduino, then check out this link . <A> The Xbee is great, but is relatively expensive ($30 per unit?) <S> It is also a transceiver meaning that it transmits and receives. <S> It sounds like you only need one end to transmit and one end to receive. <S> I have never used these, but I have seriously considered using them on several projects due to how simple they are. <S> https://www.sparkfun.com/products/10534 <S> https://www.sparkfun.com/products/10532 <S> They way I understand that they work <S> is that whatever(digital) signal you input onto one, <S> will be seen on the other. <S> So they are really simple too compared to the Xbee. <A> Do you want it to be wireless? <S> If so, I would look into an Xbee . <S> That is a link to Sparkfun's introductory tutorial and buying guide on them. <S> If it does not need to be wireless, then just use some sort of serial protocol. <S> Some of the simpler ones with plenty of documentation on the net include UART, SPI, and I2C. Googling <S> any of those terms combined with the microcontroller of your choice will definitely find you a good starting point. <S> Best of luck.
I've used Vishay RC-5 receivers at 15 m range. A cheap RF solution is the RFM70: You can also try 2.4 GHz wireless technology. Xbee provides for easy point to point configuration which seems ideal for your application.
Using a 5V LCD screen from a 3.3V Raspberry Pi GPIO pin I have an LCD screen which expects power from a 5V line, but I want to hook it up to my Raspberry Pi's GPIO pins which only supply 3.3V. What equipment do I need to increase the voltage from 3.3V to 5V? <Q> If you only need to send data to the LCD you can use HCT buffers. <S> HCT is TTL-compatible HCMOS, so made to work at 5V, but instead of needing 0.6 Vcc input for a high level (or even 0.7 Vcc) it can do with TTL levels, i.e. 2.4 V for a high level. <S> The 74HCT241 is an octal buffer. <S> For status and other unidirectional lines from the LCD you can use a resistor divider to scale the 5 V down to 3.3 V. A 10 kΩ resistor in series with a 20 kΩ <S> gives you 3.3 V out for 5 V in. <A> Maxim has a good app note on this here: http://www.maxim-ic.com/app-notes/index.mvp/id/3007 <S> For I/ <S> O lines make sure your chosen level shifter is bi-directional. <S> You will not be able to power your 5V LCD from the 3.3V Raspberry Pi without something like a boost converter, or use a separate power supply. <A> Since you are looking to power it, the GPIO pins are current limited. <S> You would be better off using a single 5 V power supply to power both the Rasberry Pi and the LCD. <S> It would need to supply the current to the Rasberry Pi (700 mA), plus however much the LCD needs. <A> This question was researched by user pygmalion on the RPi forums, and the findings were that for some LCDs, there is a way to switch them between 5 V and 3.3 V logic and between serial interface and parallel interface on the back side of their PCB ( source ). <S> This includes JLX LCDs based on the ST7565 LCD controller and sold on the Aliexpress.com site. <S> When you have to indicate which logic voltage you want, it seems to be an indicator that the device will be configured by the seller before shipment. <S> I just looked, and still found such LCDs around ( example ). <S> Maybe yours also has this capability.
If you want to interface 5V and 3.3V logic you will need a level shifter.
How can I find out which wires are the primary wires on this transformer? About the amp: This is from an old solid state audio amplifier with an AM/FM tuner. No digital parts or ICs were inside. It was all point to point. Unfortunately I threw out the amp and didn't write down the number and now I am trying to use the transformer to build an audio amplifier. About the transformer: On 'one side' the wires go as follows: White, Yellow, Brown, Orange, Red, Grey, Black On the 'other side' the wire go as follows: Red, Red, Yellow, Grey, Yellow, Blue, Blue My experiments to find out what the primary wires are: After reading about how to find out by measuring resistance, I found that the primary wires should be about 4-8ohms I measured all the combinations of wires on each side and applied mains to the transformer. My first thought was that the 'other side' had pairs of wires so it must be the side with the primary. To test I (very quickly) hooked up 120V to the pairs and measured the other wires with my scope. This stepped the voltage WAY up (200Vp2p was my first measurement) and buzzed a lot. Once again.. it was on for less than a second and never was remotely hot. I tried a few more wires on that side and had the same result. After doing a similar thing to the 'other side' I found that the white and grey produce approx 80Vp2p, 40Vp2p and 10Vp2p. This is the best combination I have found so far. Does this make sense? I'd like to know a little better before designing a circuit around it. Any advice or thoughts will be very much appreciated!!! edit: Really important detail I missed. The outside of the transformer says t52-131 on the first line and C-AS-QD7 on the second. It is a big hefty transformer weighing two or three pounds? (I'm bad at estimating weight) <Q> Since transformers by their nature are bi-directional, the selection of the primary side totally depends on your input voltage and desired output voltage. <S> Start with a low range DMM, and check for continuity between different leads on each side of the transformer. <S> Once you have mapped continuity, check resistance between the same leads. <S> You should be prepared for the transformer to be as complex as this: The "secondary" side may be a single coil with multiple taps, or it may have multiple outputs more like the above example. <S> Once you've reverse-engineered the coil arrangement, you'll need to determine the turns ratio between each set of coils. <S> I would NOT recommend your 120VAC test for this. <S> Start with a much lower (and safer) voltage. <S> Find a small "wall-wart" type power supply that you can sacrifice. <S> The lower the output voltage the better. <S> You want it just for its transformer, not the rectification and regulation components, so if you can find an AC-output wall-wart, you can use it's output as-is. <S> What you want is a low voltage AC source that you can use to test individual windings. <S> Note that applying a low voltage AC source to the "secondary" may result in lethal voltages on the "primary", <S> so be careful! <S> Find one set of windings to apply your AC input to, and measure the resulting output on each set of coils and on each tap. <S> Transformers are ratiometric, so the relative voltages will be the same using your low voltage AC test vs. when you identify the intended primary winding and apply 115VAC to it. <S> Doing this, you should have a good sense as to what windings are present that the relative turns ratio between each. <S> Good luck! <A> Electrician, butting in. <S> In the field, we frequently test transformer ratios as a service to industrial customers. <S> Normally you'd have an automatic or semi-automatic test set that would give you the complete characteristic of, say, a current transformer. <S> But since you don't have that, you have to get creative. <S> Using a voltage source can be very unpredictable and quite dangerous, as HikeOnPast and Martin James pointed out. <S> A quick multimeter reading from terminal to terminal on each coil will tell you which one is longer - that is, the high-voltage side. <S> Short it from end to end using an ammeter. <S> Then pass a controlled current source through the low-voltage side. <S> This can actually give you incredibly accurate results. <S> This obviously has the disadvantage that now, you need a source of ac that produce a controlled amount of current. <S> These aren't exactly just laying around, but they could be built fairly simply. <S> So, yeah, what's the point? <S> No more dangerous voltages, and no need for high voltage probes. <S> The relatively low-impedance coils will not generate any significant amount of voltage in this arrangement - as long as you short all of the other coils out. <S> Do NOT forget that part, or you will be very sad. <S> If you do this sort of thing a lot, I strongly recommend keeping around an AC current source anyway. <S> There is no better way of getting highly accurate resistance readings on low-resistance stuff, and no safer way of testing unknown transformers and coils. <A> 'To test I (very quickly) hooked up 120V to the pairs and measured the other wires with my scope.' <S> Don't do this, even for a second. <S> Apart from the danger of death by stepped-up voltages, an inadvertent gross step-up resulting from such experimentation is quite likely to result in internal arc-over, straining the insulation and resulting in either immediate, or subsequent, failure of windings. <S> Find a pair and shove on a much. <S> much lower voltage. <S> A variac would be a good start - notch up carefully and see what is happening on all the other windings.
The transformer you describe likely has multiple taps on the "primary" side, may have multiple windings on the "primary" side and likely has multiple windings on the secondary side. If you find that you have a multiple winding transformer, all of them have to be shorted out.
Why would an input pin have both a pull-up and pull-down resistor? In his answer detailing the various types of input pins, Russell McMahon leaves the following note [referring to input pins]: there are special cases where a resistor to high and low at once is useful What are the special cases where both a pull-up and pull-down resistor are required? Isn't there a current waste? <Q> I've done it several times when I couldn't figure out in advance which I really need. <S> So I would put both on the PCB and only solder down one. <S> In this way, if I was wrong I can just remove the resistor and solder the other one down. <S> These days, split termination isn't done so much but it used to be a popular form of signal termination. <S> To the unfamiliar, split termination looks like both a pullup and pulldown where the resistor values are usually less than 400 ohms. <S> For analog inputs, sometimes an input needs a DC bias. <S> This can be done using a simple resistive voltage divider-- which also looks like a pullup+pulldown. <S> Normally in this case there is also something that blocks the DC, like a cap in series with the signal, before the resistors. <S> Using both at the same time will create a conflict and the end result is not an up or down, more like a pull-sideways! <S> :) <S> But there are lots of things, like the 3 that I mentioned, that will appear like a pullup and pull down at the same time. <S> These are very common, and I know of new engineers who confuse them for pullups+pulldowns. <A> The parallel combination is set to the desired terminating impedance (e.g. 100 || 100 = 50 ohms) With many modern chips, for standards like HSTL the termination is done internally. <S> There are so many standards it can get a bit confusing at times, but there is usually plenty of documentation for use with your specific chip, for example here is an (oldish) Xilinx Virtex-4 PCB designers guide which mentions various standards and termination methods. <S> Also this link from one of the references in the link in David's answer provides a good explanation of why termination voltage can be important. <S> The example shows a Virtex-4 HSTL driver hence the mention/link above. <A> Providing so called Pull up & pull down resistors at same time is just like you are providing a steady state dc voltage input to the pin. <S> If it is an analog <S> input <S> pin <S> it may be useful but as far as digital input pin is concerned is not required. <S> Either one of the two is required as per input condition. <S> Modern day controllers have them inbuilt so that you can choose any one of them from software.
In my opinion, you never actually need a pullup and pulldown at the same time, since it just doesn't make electrical sense. The split termination mentioned can be used to make it easier for the output driver to reach OH and OL levels, by biasing somewhere in between.
What electronic component of a computer produces (sound) noise? Certain mechanical components of a computer produce noise, such as speakers, fans, harddrives and disk readers. Can electronic components of a computer (transistors, resistors, capacitors, ICs, screens, power supplies, etc.) also produce noise, or is noise limited to the realm of mechanics? <Q> Yes, components can produce noise. <S> Common noise producers are coils and capacitors. <S> Magnetostriction for coils (i.e. inductors/transformers) <S> and Piezoelectricity for (ceramic) capacitors are the reasons. <S> These effects cause the component to change shape ever so slightly, and if the applied frequency is in the audio range we can hear it as a buzz. <S> This is why you can often hear a high pitch whine in an SMPS power supply (an ATX supply is an SMPS supply) <A> Inductors and transformers work by converting electricity into magnetic fields. <S> Sometimes these fields are moving/vibrating/ <S> whatever in just the right way to make parts of the inductor or transformer to mechanically vibrate and make audible noise. <S> Capacitors are just two metal plates separated by a non-conducting material (a.k.a. dielectric) <S> so it seems like there is nothing to vibrate. <S> But, it can! <S> Some materials are piezo-electric. <S> Meaning that when they are exposed to an electric charge they change their physical shape. <S> This is how piezo-buzzers work. <S> Some capacitors use a piezo-electric material as the dielectric. <S> As the caps charge and discharge they change shape. <S> If this happens at the right frequency and power you can hear it. <S> There are probably other components that can cause audible noise, but these are the most common. <A> Acoustic noise from inductor windings can occur even when potted in epoxy if the current surges produce energy in the audio range. <S> Large Power Station transformers that handle thousands of amps in residential neighbourhoods may emit acoustic noise based on the fundamental and harmonics of resonance. <S> In some cases noise cancellation audio systems are used reduce hum and thus eliminate noise from consumer complaints. <S> Likewise microwave ovens resonate from the high peak currents in the magnetronic and vibration of components. <S> Every component has an acoustic resonance but the rigidity of placement on the assembly reduces the chances of vibration. <S> Often you may find large components firmly attached in power supplies with polyurethane blobs to prevent vibration. <S> Wire wound resistors in ceramic can be made to resonate with enough energy pulsed at an acoustic rate depending on how close to physical resonance or harmonics. <S> Since rigidity of electronic components is essential prevent fatigue, any parts which do make noise may fail more rapidly.
Aside from the obvious components (speakers, motors, fans, relays, etc.) it is quite common for inductors, transformers, and capacitors to make noise.
How does the HD44780 LCD work at the low level? I'm not asking for a driver specifically, but how exactly it works. I looked up the 2 chips that were in it. HD44780A00 and HD66100F to be exact. I'm assuming one is a display driver? And the other is a segment driver? I guess I'm looking to learn how, in this most basic terms, for instance, a pixel or a character is put on the screen. I know how to use it with libraries and such. That's simple (just follow the instructions). But I want to understand what's going on. I looked at the instruction set here . But is that just for the HD44780A00 or HD661001F? I guess I'm confused at what this instruction set is or what is it for.I guess what I'm asking is: what exactly is the process for sending a single pixel and how exactly does that work. It might be too complicated and if it is, that's cool. I'm just trying to figure out how it works at the low level. <Q> The HD44780 is a character LCD controller, which means you write ASCII codes to the LCD for the text you want to display. <S> If you want to control pixels individually you have to go for a graphic LCD. <S> The HD44780 does offer the possibility to display some limited text-based graphics, though; you can define 8 custom characters , but at 5 x 7 pixels per graphic that won't allow you to display anything like an picture. <A> LCD is basically a kind of pixels showing display. <S> HD66100F as said is 80 segment driver. <S> In a very short term HD44780 converts your ASCII code information into "What" & "Where". <S> This information is then passed to HD66100F decides "How" to show that. <A> A typical character LCD controller is designed to control an LCD up to 40 characters wide and two rows high (a matrix of 200x16 dots). <S> Wiring such a controller directly to LCD glass, however, would require that it have 216 pins connected to the glass in addition to the pins needed for power, processor connection, etc. <S> Having that many pins on a single IC package can be a bit tricky. <S> Consequently, what is commonly done is to have the matrix controller operate the 16 row wires and the first 40 column wires, and--for displays bigger than that-- <S> have it supply data sequentially to additional segment controller chips each of which will add another 40 (or perhaps 80) column wires. <S> It's interesting to note that 16x1 is a very common size of display, and 16x1 displays are often wired as an 8x2 display, but with the bottom row physically placed by the right-hand side (thus allowing use of the controller chip without any additional driver). <S> Four-line displays of up to 20 characters across are wired as two-line displays with the right-hand side stacked below the left-hand side. <S> Four-line displays with 24-40 characters per row are usually wired as two independent two-line displays stacked vertically.
The HD66100F is an 80-segment LCD driver for e.g. a 10 digit 7-segments display.
Why is there a delay in a common anode 7-segment display? I have a common anode 4-digit 7-segment display. I have each segment cathode connected to a 330-ohm resistor, and the resistor is connected to a shift register. Each segment cathode is connected to the same shift register. Each common anode is connected to a second shift register. Right now, I am using an Arduino to multiplex the display to show a number. This works great, but there's a problem. The display isn't bright enough! I assume because this is a common anode configuration, and that the shift register can only provide about 40mA of current for 8 segments (A-G and the decimal point). I have decided that I need more power. My first thought was to try to use 4 PNP transistors . I hook them up correctly, and the segments get brighter. Great! However, there is a problem. It seems like the transistor is slowing something down! There is a nasty glow of segments that are used by other digits! I have the microprocessor set to show each segment for 4 milliseconds. The datasheet claims that the transistor should switch on and off faster than that. Why is this faint glow happening? Here's what it looks like when 1111 is displayed: Here's what it looks like when 1112 is displayed: <Q> Do not upvote this answer! <S> Blake found the solution himself, but doesn't seem keen on posting it as an answer. <S> I'm just posting as a Wise Lesson for Future Generations. <S> Driving the common anodes directly he made one output high at a time, and the outputs for the not selected displays low. <S> But adding the PNP transistors inverses the logic, and then you want the selected display output low, and the others high. <S> So what happens if you forget to invert the anode drivers? <S> Say you want to display "1234". <S> You make the first digit's anode high, the others low, and you output the bit pattern for a "1". <S> Instead of the first digit showing the "1" it remains blank, and the others will show the "1". <S> Move to the next digit. <S> Again, that digit will remain blank and the other three will display the "2". <S> And so on. <S> Due to the multiplexing each digit will display a mix of the other three digits, but not the actual value for that digit. <S> Blake says this was supposed to be "1112". <S> The first three digits show the mix of "1"s and "2", while the last one just shows the "1" because that's what all the other digits are. <A> Here is a possible mechanism for the fault. <S> You say it works (dimly) without the transistors, but doesn't work with them. <S> So it sounds like the fault is in the transistors. <S> Is there some reason that the transistors might be letting some current through when they shouldn't? <S> Yes. <S> You're using a PNP transistor. <S> As you know, these transistors are on when the base voltage is lower than the emitter voltage. <S> They are off when the base voltage is higher than or equal to the emitter voltage. <S> The problem with the shift register chip is that the outputs are always lower than the emitter voltage. <S> I couldn't quite make out the part number of the chip you're using, but according to the datasheet for the 74HC595 (page 6), the outputs don't quite reach Vcc. <S> With a gain of about 100, you could find that there's enough CE current to give noticeable light output on the LEDs. <S> Something to try <S> : Add a schottky diode between Vcc and the emitter. <S> This should drop the collector voltage by a fraction of a volt, just enough to allow the shift register to fully turn off the transistor. <A> Rocketmagnet may well be on the right track: the PNPs may have some base current due to leakage by their drivers. <S> If PNP's power supply (the emitter voltage of the transistors) is the same as the HCMOS drivers (HC595?), then this shouldn't be a problem, HCMOS outputs usually stay well within a 100 mV or so of the rails. <S> If the PNPs' supply is higher then you shouldn't drive them with a push-pull output, but with an open drain/open collector. <S> In that case the leakage current of the transistor when "off" will pass through the PNP's base, and thus amplified. <S> A 2N2907 doesn't have a very high hFE, but it may cause enough collector current to show as slightly uplighting LEDs. <S> The remedy is simple: add a resistor between the base and emitter of the PNPs. <S> Then as long as the leakage current causes a voltage drop smaller than 0.6 V across the resistor all of it will pass through the resistor, and none through the base. <S> Pick for instance a 4.7 kΩ resistor. <S> Then you'll need at least 130 µA to get the first current through the base, until then all will pass through the resistor. <S> 130 µA is a safe value: it's much larger than the expected leakage current, but much smaller than what the driver can sink. <A> Multiplexing means driving one by one LED display. <S> This problem arises when there is still data on output port & you make other display on. <S> DO this - Put data on display port - make any one display on <S> - Put off all data - make display off - very small delay - ...... <S> Repeat this step... <S> Your problem will be solved. <A> Let's assume a maximum peak current of 20 mA per segment. <S> The low- and high side dirivers will each drop ~ <S> 0.5 V, the display itself will dop ~ <S> 1.5V. <S> Hence the resistor will drop 2.5, so for 20mA it must be 125 Ohm. <S> 120 Ohm will do. <S> A common shift register will have no problem with 20 mA, but <S> 8 x 20 mA (all segments of one digit turned on) is probably too much. <S> If you have 4 outputs to spare you could use PNP transistors (1k base resistor). <S> Otherwise attach the transistors to your second shift register. <S> This would ask for a low switching frequency, but you don't want to see the switching either, so ~ <S> 100 Hz (2.5 ms for each digit) might be a good compromise. <S> Your pictures show ghosting: an unwanted digit appears (dimly) superimposed on the digit that should be visible. <S> This is likely caused by swiching the rows or the columns too early. <S> When you can't switch everything in one step (note that you can do that with a cascaded shift register with separate hold register!) <S> you must disable all digits <S> activate the segments for the next digit activate the next digit <S> Omitting the first step will give you the ghosting effect.
If there is a tiny voltage difference, then you could find that a small amount of current is leaking out of the base of the PNP transistor. It is a very common problem when you are new to multiplexing. You must realise that you are doing time-multiplexing: you must divide the 'on' time evenly between the 4 digits, and the 'on' time must be much larger than the time required to switch between the digits.
Why don't capacitor's plates stick together? When capacitor plates carry opposite charges, then why don't they stick together due to attraction? They must stick since the plates have opposite charges. <Q> However this typically cannot be seen from the outside. <S> The "plates" press against the insulating dielectric that separates them. <S> In rare situations one can hear the mechanical effects of the rapid release of the charge from the capacitor: the capacitor makes an audible "clack" when the charge is released instantly - i.e. through an almost short circuit. <S> This is a common occurrence with for example high-power pulsed laser power supplies: Such a power supply stores high-voltage energy in a bank of large capacitors for a period of e.g. 1/10th of a second. <S> All the stored energy is then released in about one billionth of a second. <S> This is accompanied with a fairly noisy "clack" that originates from the release of mechanical stress in the storage capacitors. <S> - With large laser systems the discharge noise is so loud that ear-protection has to be worn in the vicinity of the power supply. <A> The plates attract each other, but the force is weak compared to the the (mechanical) construction. <A> There is no clarification what kind of capacitor you are referring. <S> But most of capacitor plates are fixed mechanically or if you are referring to electrolytic capacitors then they have insulators placed in between. <S> Also magnetic charges & electrical charges are different.
As you say, capacitor plates experience attraction due to the opposite charge.
How can I design a circuit that will turn on when a wire is cut? I'm trying to build my own cable lock alarm (for science!) and am having trouble figuring out a way to detect that a wire has been cut. The circuit has to Use no power at idle (or at least, very very little so that the batteries don't have to be changed every hour) Sound a speaker when a specific wire is cut My knowledge of electronics is minimal.. I know what capacitors, diodes, resistors and other basic stuff are and do, but I don't have a good grasp on how electricity flows in anything other than a single loop. I seem to remember once making a circuit that was something like this.. (and oh geez, I don't even know how to do a proper diagram so forgive me folks) /----------[battery]-------\| ||--------[light bulb]------|| |\-----[wire to be cut]-----/ And the bulb would only light up if the wire below was cut, because electricity always takes the path of least resistance. Anyway, this is going to be a battery operated circuit and I'm pretty sure that diagram up there is a short. I think there was a resistor involved but I don't remember where it went. If anyone can give me some pointers that'd be great! <Q> A simple circuit to do this would use a single transistor, one resistor and a buzzer. <S> Connect two 1.5 volt batteries in series to get 3 volts. <S> Connect the negative end of the battery to the emitter of the transistor. <S> Connect one wire of the buzzer to the positive end of the battery and the other wire to the collector of the transistor. <S> If the buzzer has polarity markings, follow them: positive to positive end of battery, negative to transistor collector. <S> Connect your sensing wire from the base to the emitter of the transistor. <S> As long as the wire is connected , it will short the base to the emitter and prevent the transistor from turning on. <S> When it is cut, the batteries will send current to the base of the transistor through the resistor. <S> This will turn on the transistor which means the collector to emitter voltage <S> will be very small and most of the battery voltage will be across the buzzer which will then turn on. <S> With the sense wire connected, the batteries only have to provide current through the resistor which will be about 3 volts divided by 10 kilohms or 0.3 ma. <S> Two AA batteries can provide this much current for hundreds of hours. <S> If necessary you can use C or D batteries for even greater lifetime. <S> This circuit is simply and can be easily modified to handle other sound sources if needed. <A> I would use an standard nMOSFET (such as the SI2316BDS-T1-GE3) with a 10M resistor connected between gate and the + of the battery. <S> The buzzer should be connected with the - to the transistor drain and the + to the + of the battery. <S> Connect one end of your sensing wire to the gate and the other to the transistor source toghether with the - of the battery <S> and you are done! <S> Make sure that the battery is the last component that you connect because you can potentially damage components if you insert them into the circuit with power applied. <S> If you require more info I could email you a diagram. <S> Gregory simulate this circuit – <S> Schematic created using CircuitLab <A> It's not nearly as power efficient as Barry's proposed solution (his will last ~50x longer), <S> but if you're not comfortable with discrete electronic components, it might be easier to build and understand. <S> Using a low power relay like this one , you can get about 5 days out of a pair of AA batteries or 19 days out of a pair of C cells. <S> Connect the battery to the relay coil terminals with one leg of the connection representing your "sense wire" (battery negative to one side of the coil, battery positive to one end of your sense wire, and the other end of your sense wire to the other side of the relay coil. <S> Polarity doesn't matter for most relays (unless there is an integral snubber diode)) <S> You'll have a common contact (C), and a normally closed contact (NC) that you're interested in. <S> Connect the battery positive to the common terminal, the NC contact to the positive lead of your buzzer, and the negative lead of your buzzer to the negative battery terminal. <S> Make sure that cutting your "sense wire <S> " will only remove power from the relay coil and will not remove power flowing to the buzzer. <S> With the sense wire being intact, the relay will be energized, holding the NC contacts open (not connected). <S> When power is removed, the contacts will close, powering your buzzer.
Connect one end of a 10 kilohm resistor to the positive terminal of the batteries and the other end to the base of a general purpose NPN transistor (2N2222, 2N3904, etc.). If you can live with battery life measured in days rather than weeks, you can also do this with an SPDT relay or a normally closed (NC) reed relay.
Raspberry Pi and laptop display I have a Raspberry Pi Model B and the display unit from a Dell laptop - functional, but removed from the laptop because of a broken hinge.Is there any way the Pi's GPIO pins can be used to drive the display unit directly, to function as the Pi's monitor? <Q> (You can guess the number of GPIO simply by counting the wires in your interface - likely a flex cable). <S> I don't think anyone has done this yet, it will not be easy, and there is not much incentive to do this for any particular screen. <S> So unless you are in it for the thrill (and willing to spend a lot of time on it) I would say: forget it. <A> The display almost certainly wants data at a significantly higher frequency than you can output from the Pi. <S> If it uses a standard LVDS interface then you may be able to find a cheap aftermarket controller for it that takes video inputs (this is commonly done by people making DIY projectors out of laptop display panels) and connect that to the Pi. <A> The rasberry pi has a yet-unused lcd connector which would be worth investigating, though an adapter (more than just cabling) and detailed register programming data may be required.
It might be possible, but Such displays often use a parallel interface (4, 8 or more data lines, lots of control lines) and the Pi has only a few GPIO available on the extension connector.
remove all components from a board with oven/heater? I've seen a couple of comments on the 'net that it's possible to mass-remove components from a circuit board by heating the whole board (in an oven, or over a heater) enough that the solder will melt, and the components will fall out if the board gets a sharp tap. This sounds like both a very bad idea, and a very bad idea, at the same time. Questions: How hot would the air around the board need to be? At what temperature would components start getting damaged? What components would get damaged first? Is there a reasonably reliable and safe way to do this? (I.e. one that doesn't require melting lead in an oven that must later be used for cooking) <Q> The solder used in for much of consumer electronics melts at temperatures of about 180°C. <S> So temperature-wise there is no problem using a normal oven to do the job. <S> Even at 180°C components will unavoidably get damaged. <S> Different components react to heat differently. <S> The first to suffer are typically connectors with plastic housings (e.g. to interface with a PC etc.). <S> They are extremely difficult to remove without damaging the plastic. <S> Other components tolerate heat better. <S> The lifetime of aluminum electrolyte capacitors however is likely to be reduced by repeated heating. <S> With ICs, there is less of a risk of classic thermal damage but rather due to mechanical stresses resulting from too fast heating or cooling. <S> - On the whole however, components will not suffer too much if you don't keep them heated for more than a few minutes. <S> If you want to avoid using an oven for heating, you can fix the board horizontally in a vise and heat it from below with a heat-gun until the solder liquifies. <S> Then take the board with pliers and tap it vertically on the table. <S> The components will fall off quite easily. <S> Attention: with a heat-gun it is easy to over-heat the board or heating the board too rapidly. <S> Solder in vias may be ejected outwards due to the rapid heating: wear eye-protection if you really want to do this. <S> Generally however it is not worth recovering components en masse from assys <S> : What you recover will typically be proprietary chips you cannot really use, tiny smd capacitors too small to handle, and unmarked smd capacitors and inductors. <S> - I propose you only remove those components that you really want/need. <A> That would depend on the type of solder used, different alloys have different melting points. <S> That depends on the components, connectors, or other components that have plastic bodies tend to deform if the temperature gets to high. <S> Usually the components that will fall first are the heaviest, surface tension of the solder tend to "grab" the lighter components. <S> Here solder flux would help. <S> A hot air gun could solve the problem. <A> For various values of safe, I'd also suggest the heat gun method: http://www.youtube.com/watch?v=vBjPH3BQWrU <A> My personal way for mostly THT PCB is: a) lock the board vertically, from a side, in a bench vise. <S> b) use an air gun to heat the part of the board farthest from the vise. <S> c) when the solder melts, bend with a finger (gloved!) <S> the board and let it go. <S> Almost every component will be "launched" far from the board at once. <S> d) rotate the board and repeat. <S> Obviously, kids don't try this at home :-)
Usually component datasheets have the maximum temperature allowed for reflow soldering.
Does magnetism affect SD cards? Would a strong magnet have any effect whatsoever on a thumb drive (I'm assuming not) or on an SD card? It seems unlikely, but I'm hoping someone can give me a definitive answer, since I'd rather not find out the hard way that it actually can. Assume the magnets are powerful industrial magnets, if that makes a significant difference to the answer. <Q> I've tested many card with my 1.5Kg rare earth magnet , so I can bet that magnets have no effects on flash cards or USB pen drives :-) <A> For venerable floppies, this statement holds true. <S> We placed a 99-cent magnet on a 3.5-inch floppy for a few seconds. <S> The magnet stuck to the disk and ruined its data. <S> Fortunately, most modern storage devices, such as SD and CompactFlash memory cards, are immune to magnetic fields. <S> "There's nothing magnetic in flash memory, so [a magnet] won't do anything," says Bill Frank , executive director of the CompactFlash Association. <S> "A magnet powerful enough to disturb the electrons in flash would be powerful enough to suck the iron out of your blood cells," says Frank. <A> Assuming you are talking about ordinary magnets, no. <S> If you are talking about the field strengths found in an MRI machine or a fusion research device, things start to get weird - there's the hall effect, potential for induced current due to movement or field changes, even potential for mechanical distortion and having parts ripped out of the assembly. <A>
Magnets will not, according to the gurus at PCWorld, affect your SD cards , since they are just flash media (like thumb drives).
Help with understanding Current, Voltage and Resistance Is my analogy correct: With a highway as an example, would Resistance (ohms) be the number for lanes in one direction Current (amps) be the density of cars on the road Voltage (volt) be the speed limit of the road What I find confusing is current and voltage. Current, if it can relate to density, could be a factor of voltage? <Q> Your analogy is quite good. <S> It shows however a slight misconception about electron movement in conductors. <S> Electrons in conductors are not cruising along like cars on a road. <S> It is more like bumper cars: they continuously accelerate, hit a obstacle, are stopped & deflected and begin again to accelerate. <S> Also, the density of electrons is always the same. <S> A better picture would be this:Imagine a high-way with walls on the sides so cars cannot escape. <S> The problem is, all over the road grows a forest with trees (i.e. atoms). <S> The cars are pulled through the forest by bungee cords attached to the battery at the other end and continuously keep bumping into the trees. <S> Conductor: the highway with walls and a forest growing on the road. <S> It is always filled to the brim with cars. <S> voltage: <S> the tension in the bungee cord. <S> It will not really make the cars travel through the forest faster as they still keep bumping into trees. <S> It makes these collisions however a lot stronger. <S> resistance: <S> the opposite of the width of the highway. <S> The width itself would be conductivity. <S> current: the amount of cars going through the highway in a given time. <S> Wider highway (i.e. less resistance) --> more cars. <S> That being said, there cannot be an exact analogy. <S> Even mine has issues. <S> How you best set up the analogy depends on what aspect of electricity you want to illustrate. <S> It is unavoidable that other aspects are presented in a slightly skewed fashion. <A> To check if it's a good analogy you use the relationship between the quantities as given by Ohm's Law: \$ <S> V = <S> I <S> \cdot R \$ <S> So for a given number of lanes the number of cars passing per hour should be proportional to the speed limit. <S> That's OK: if you allow twice the speed then twice as many cars can pass per hour. <S> For a fixed voltage current and resistance are inversely proportional. <S> So for a given speed limit the capacity should double when the number of lanes (resistance) halves. <S> That's not true, but may be a question of definition. <S> If we define resistance as 1/(number of lanes) it's OK again. <S> Finally, for a fixed current resistance is proportional to voltage. <S> So for a given capacity, if we double the speed limit we'll need only half the number of lanes. <S> So it's a good model if you keep in mind that the resistance increases with decreasing number of lanes. <A> The water through a pipe in a slanting or vertical orientation seems to be a better analogy as compared to yours. <S> By the virtue of having a slope or gradient, the pipe has two levels (Higher and Lower), so water or any thing would flow from a higher to a lower level. <S> These levels can be thought of as the potential levels in a circuit. <S> Due to difference in potential levels, there is a potential difference introduced which we better term as a voltage. <S> So electrons would flow between two points only when there is a difference in potential between those two points just like water in the pipe. <S> Next is current: it could be assumed as the flow of water through the pipe. <S> More the number of water molecules flowing through the pipe more is the amount of water, similarly, more the number of electrons through the circuit or two points, greater is the current. <S> Finally, resistance can be visualized as the friction offered by the pipe to the flow of water (as mentioned above by sandun dhammika). <S> If the pipe has multiple blockages or a rough or coarse surface, then it would offer a greater friction to flow of water. <S> Similarly if there is a greater resistance value associated with a circuit, a greater hindrance would be offered to the flow of current. <S> I suppose this would sort the purpose well. <A> Most analogies fall down because of the notion of physical objects flowing along a path at various speeds. <S> Electrons do not change speed! <S> But the analogies are still useful in other ways. <S> In my experience, you try a bunch of different ones and eventually discover one that makes the most sense to you. <A> Here is another 'analogy'. <S> It involves water, a firehose (or pipe), and a source of pressure. <S> The pressure pushing the water, gravity if a sloped pipe/water tower or a mechanical pump. <S> Pressure is voltage or potential difference ( <S> upper/lower end of the pipe/hose or height of the water tower). <S> The size of the fire (or, for that matter a garden) hose or of a pipe is comparable to resistance. <S> Smaller hose-pipe is higher resistance. <S> LARGER hose/pipe is lower-less resistance. <S> The volume of water able to travel through the hose/pipe is comparable to current. <S> Picture / relate the volume of water as the ability to do work. <S> i.e. fill troughs on a water wheel = <S> weight turns the wheel or volume of water available to put out a fire. <S> i.e. a garden hose (no matter the pressure) vs. a 2" fire hose. <S> Electrical current is the capacity to do work, heater, motor, ......... and burn,shock, kill. <S> REMINDER, the greater the available current (with a sufficient voltage to overcome skin resistance) <S> the more dangerous, but, once the voltage is high enough ( <S> 70V +/-) <S> to overcome skin resistance, less than one Amp, CAN KILL! <S> I suspect the vehicle analogy was intended to assist readers to visualize electron movement, but how electrons move, in my opinion, has little to do with current, voltage, and/or resistance.
For a fixed resistance current is proportional to voltage.
Are D-latches and D-type flipflops volatile? If there is a power cut to the CPU, will be registers clear or keep their memory? <Q> Normal flip-flops are volatile, in that they don't remember their state when power is lost. <S> Usually CPU registers are made from such flip-flops, which is why you need to save stuff you want to remember accross a powerdown to special memory for that purpose. <S> Since non-volatile is a important attribute, this will be clearly mentioned in any datasheet for a non-volatile memory. <S> If it doesn't say it's non-volatile, then it's volatile (data lost on power down). <S> Nowadays, most non-volatile memories are EEPROM (Electrically Erasable Programmable Read-Only Memory). <S> Flash is a type of EEPROM that you often hear about. <S> It has tradeoffs that make it cheap for large memories, usually at the expense of write speed and total number of lifetime <S> writes before it wears out. <A> They don't have a capacitor to hold charge as does flash. <A> Some flip flops and latches are specified to always come up in a known state when power is first applied, if the power voltage waveform meets certain requirements (typically it must start below some voltage and rise monotonically until it has reached some higher voltage). <S> If the power supply voltage changes in a way which does not meet that criterion, the device may or may not be reset to a known state. <S> For many other flip flops and latches, however, the behavior when when the supply voltage falls below the stated requirements is completely unspecified. <S> As such, if a latch was high when power was switched off, it may or may not be high when power is switched back on. <S> Likewise if it was low when power was switched off. <S> Some such devices are "biased" so that when they are switched on they will likely to power up in a particular condition. <S> Some others, however, are not. <S> It is sometimes possible for a CMOS latch to "remember" its state for many seconds or even minutes when the supply voltage is zero or close to it. <S> What happens, typically, is that each latch contains a pair of logic gates which are wired so that when one is on the other will be forced off. <S> On power-up, both gates will start to switch on until one succeeds, whereupon that gate will force the other one off. <S> Incidentally, it's possible to design a latch with internal capacitors that will bias its power-on state to the opposite of its last state. <S> I've never seen this done with chips, but I have seen it done with latches made from discrete transistors; such circuits can be useful for things like divide-down counters. <A> These are volatile memory.... <S> they don't contain floating gate transistors....which are used to store information in absence of power supply (in case of flash memory)
If the two gates are well-matched and neither has any residual charge, the power-on state may be largely random, but if either state has any residual charge left over from the last time the device was powered on, that residual charge may cause the latch to power up in the state it last held. They will loose the data as will all latches and flip-flops.
Does this buffer's current rating apply to each individual output, or all of them? I'm thinking of using a SN74ABT244A octal buffer in a circuit that requires the buffer to sink 20mA of current on all eight outputs under worst-case input conditions. In the datasheet, it says that I OH is -32mA, which should be enough. However, I am confused as to whether or not this applies to each individual output, or all outputs on the entire chip, in which case I would be sinking 160mA of current and severely exceeding the current rating of this chip. <Q> It's for each pin. <S> Note that a datasheet may give maximum values for supply current (Icc) and ground current as well, usually mentioned under Absolute Maximum Ratings (AMR). <S> The 74HC595 for instance gives an AMR of 35 mA per pin, but on top of that a supply current and ground current of both 70 mA AMR. <S> The 74ABT244A doesn't mention these limitations, so should be OK with a ground current of 8 \$\times\$ <S> 64 mA = 512 mA, which is a lot! <S> Since this is a higher current device it will use thicker bonding wires than usual in TTL, at least for the Vcc and GND pins. <A> If your application requires it to sink current, the rated maximum is I OL at 64mA max. <S> so it sounds like it will give you plenty of headroom in your application. <A> Each individual output. <S> The current ratings on the chip are for outputs high or low, i.e. CMOS. <S> If you are sinking that much current you won't have the output at the rail.
This is a per output pin limit
Detecting phase between square wave and sine wave signals I have a circuit that has a digital square wave input (generated by PLD, 1.8Vp) and a sine wave output (0.5 - 3.5 Vp). Both signals have 100kHz frequency, however the phase is different. What is a good way to detect the phase difference between these two signals? Phase detectors I've seen so far are for either all digital or all analog signals? Is there one for the mixed signals circuit like the one I have? Update Knowing the phase difference with 1 degree is sufficient for my application. The frequencies are always locked relative to each other and never change. The square wave drives the analog electronics and analogs produce the sine wave which has AM modulated signal in it. The amplitude of the signal is, however, very low compared to the amplitude of the carrier. Due to the production variability the analogs (include some hand-winded inductors) have high unit to unit variability of the phase, and I am trying come up with an auto-tuning method for the DSP that processes the output sine wave. <Q> Phase detection is the easiest for digital signals; it's basically an XOR gate. <S> I would convert the sine to a square wave. <S> Feed a comparator with the sine on one input and the averaged sine (LPF) on the other, so that the comparator gives a 50 % duty cycle square wave. <S> Then use a digital phase detector. <A> Since you say you have a DSP processing the sine wave, you can use a complex Fourier transform to measure the phase (you need only evaluate the DFT at the known frequency). <S> This is actually closely related to what Curd suggested about mixing - a single point DFT <S> is a type of mixer followed by integrators or low-pass filters. <S> The difference is that by doing it in the complex domain (or using an IQ mixer in the analog one) you can determine the angle of the complex output. <S> Using only the real components or only a single mixer, you cannot tell lead from lag and amplitude sensitivity would be more of a challenge. <A> If the signals are in phase the output will be positive. <S> If the signals are 180° out of phase the output will be negative. <S> For other phase differences the output will be somewhere between those values. <S> E.g. phase detection is mentioned in the datasheet as one of the applications of analog mutliplier IC <S> AD633 .
Assuming that the amplitudes of both input signals are constant (if not they could be made constant by a AGC circuit) you can use a mixer (multiplicator) as phase detector:
Just chopped a cable, is red power, black ground? I've just chopped a usb to micro-b usb cable. There are 4 small wires inside Red Black White Green Isn't it universal that Red is power and black is ground? <Q> red = +5 <S> V <S> white = D- <S> green = <S> D+ <S> black = ground <S> (Page 89 of the USB 2 specification) edit (after reading the other 649 pages) OK, that's from the formal specification. <S> Reassuring, isn't it? <S> It can even get you an accepted answer. <S> You can feel it coming: there's a but. <S> This is from page 94. <S> At first sight it seems to confirm what I said, but then there's that word "typical". <S> So not mandatory? <S> I read some more, and the answer isn't clear. <S> The word "typical" must be the most used word in the spec, and also seems to be used for mandatory specifications: There's that word again, page 93. <S> Sounds like non-binding, but the text above it does say " should be oriented to allow" (emphasis mine). <S> So "typical" seems to be used for mandatory specifications. <S> Talk about confusion! <S> Apparently there's only 1 way you can trust: measure it. <S> Compare the wire color with the pin number on the connector. <S> The pin number locations are shown in the drawing and their assignments in the table. <S> I'm 99 % sure that it will agree with the "typical" wiring assignment. <S> There's just that other 1 %... :-( <S> Further reading USB version 2.0 specification <S> (.zip file format, size 19.5 MB) <A> It is a good bet, but I would not wage my life on it. <A> I've had cheap USB cables which had those colour wires connected to the pins differently to "the spec". <S> Better to "buzz it out" I think. <A> All usb cable wiring is not same. <S> I only know Keyboard and data cable wiring, so here it is as an example:
So search on google for the wiring before you swap cables.
Questions with overhanging silkscreens in eagle cad I am currently using several footprints in my pcb design which have tPlace silkscreens that extend beyond the board boundaries, and I was wondering what the implications of such silkscreens are since they are not cropped up in the resulting gerber files? Will a PCB shop normally disregard any design elements that hang beyond the board boundaries, or will these silkscreen elements cause issues in board layout, either artificially extending the board dimensions or causing problems at the board shop where my silkscreen overlaps other boards? I am using the tPlace elements of other components on the board to determine the orientation of various smd devices, so I don't want to simply remove the tPlace layer from the cam job. Is there any way that I can crop these tPlace entities without manually editing the individual footprints, or does it matter at all? <Q> The 3 fabs, which I've worked with, did this by default without me even asking. <A> Your final DRC before creating the Gerbers should give you errors for them. <S> Your PCB shop will also perform a DRC before starting production, and should give you a call about it. <S> There may have been an error in creating the Gerbers, and they should check. <S> I wouldn't appreciate it if my PCB shop will discard the overhang without consulting me, like Nick says. <A> I never had any problems with silkscreen that extends beyond board dimensions. <S> But I guess the way that is handled depends on the PCB manufacturer, so just to be sure you should contact your PCB manufacturer in order to verify if there is a problem with that.
PCB fabs usually will clip/ignore the silkscreen which extends beyond the outline of the board in the Gerbers.
How do I design my very own ARM based processors? I have several questions about how I would design my own ARM-based CPU? How does one start with an ARM license and end up with a package ready to be soldered on to a board? What do I get from ARM (I am sure they have multiple license options to dish out - Architecture License (Qualcomm Snapdragon style) and Core License (TI OMAP style))? What tools do I need to proceed once I have 'that something' from ARM? What do I send to the fab? I believe only certain foundaries are licensed to etch an ARM core on to a silicon wafer. Am I right? As a student, can I afford to do this on an FPGA? How do I get hands on experience for something like this? <Q> Here is how companies do it: Raise about US$10 million. <S> Negotiate with ARM to get a license. <S> This will probably cost at least US$1 million. <S> Get the design files from ARM. <S> It will likely be in some form of VHDL, Verilog, or an "encrypted" netlist. <S> Design your own chip using a mix of your own logic (for the peripherals) and what ARM gave you. <S> This step will likely require some expensive CAD software and a small team of experts. <S> Expect to spend at least US$5 million and several years. <S> Get the masks made for the chip itself. <S> If you use any modern semiconductor process then this will run around US$1 million. <S> Get the chip itself made. <S> Price varies, but should be less than US$0.5 million. <S> Debug the chip you created, fix the bugs, then go back to Step 5 until you have something that you can sell. <S> Here is how YOU do it: Take a graduate level computer architecture course at your local university. <S> Take more courses in digital logic and whatever else. <S> Design a CPU from scratch in VHDL or Verilog. <S> Make your ARM-Compatible CPU work in an FPGA. <S> Don't distribute your VHDL/Verilog source code unless you want to be sued. <S> Use your ARM experience to write a good dissertation for your PhD. <S> Use your PhD to get a job at ARM, or TI, or whoever. <S> Then repeat the process using the previous 7 steps on how a company does it. <S> Ok, so this list is a little tongue-in-cheek <S> but it is basically correct. <S> The point is, don't even bother dealing with ARM directly because odds are you don't have the money. <S> And don't do anything that will get you sued by ARM either. <A> ARM has a University DesignStart Program . <S> As a student, you can only access basic Cortex-M0 material. <S> But if you are really interested, get your faculty involved <S> and then you can have access to much more design material (Verilog FPGA code, Evaluation IP, Simulations, etc.) <A> Take a look at this ARM core on OpenCores. <A> The ARM Cortex-M1 (probably the simplest of the ARM processors) is the first ARM processor specifically designed to be implemented as a soft processor in FPGAs. <S> It is optimized for the following FPGA types : Actel (M1 ProASIC3 and M1 Fusion)Altera (Cyclone-II, Stratix-III)Xilinx (Spartan-3, Virtex-5) <S> ARM itself is making a Cortex-M1 Development Kit for Altera Cyclone III although it is a little pricey at $625 from DigiKey . <S> There may be some options for getting the IP by itself (perhaps they have an academic program, someone else mentioned a university program, but that was for the M0). <S> Then you could buy a development board separately. <S> Here is some more information about the ARM Cortex-M1 on Altera . <S> Here's some information about putting a ARM Cortex-M1 on an Actel FPGA. <S> Meanwhile there is some interest in other versions of the ARM Cortex on FPGA; here is a paper from someone that implemented a ARM Cortex-M0 on a Xilinx FPGA. <A> You can now get access to the Cortex-M3 processor (and an extendable AHB/APB subsystem) through ARM's DesignStart program. <S> The Eval option provides an FPGA target (simulation is supported, with obfuscated RTL of the core, everything else in Verilog). <S> This currently targets the ARM MPS2+ FPGA, with mbed support. <S> The Pro version (only available to companies/universities who can sign a license) allows manufacture, and includes the processor core in Verilog (this covers both Cortex-M0 and Cortex-M3).
Look at the ARM instruction set and design a compatible CPU. Design another CPU from scratch. You do get all of the ARM Cortex-M1 IP though, and a license to do development (plus a free royalty grant for 1000 boards for those going into production, pretty cool).
A device that runs on AC current it's voltage inside is measured by always turning the multimeter's knob to AC voltage:same for DC right? I've bought a cheap multimeter and it's not automatic. I've to manually rotate the knob. I live in North America. AC current is used in my home. Does this mean I can always measure voltage by turning the knob to AC voltage part(to appropriate measurement amount/unit) and measure voltage at two parts of the device's circuit that runs on AC current without burning the fuse of multimeter? or is there any exception? When should I turn the knob to DC voltage? Is it when a device run on DC power source? I saw electricians right away turn the knob to AC or DC for measuring Voltage and Ampere and figure this out without any problem. So a device that runs on DC current it's voltage inside the device will always be measured by rotating the knob to DC voltage and that runs on AC current it's voltage will always be measured by rotating the knob to AC voltage. Is this true? Is this the general rule? <Q> You turn the knob to AC voltage when you want to measure a AC voltage, or the AC component of a voltage. <S> You turn the knob to DC voltage when you want to measure DC voltage. <S> "Wall" power will be AC, but inside a device this AC is usually converted to DC, which then actually powers the device. <S> Most of the time, AC is for measuring wall power and related, and DC is for measuring stuff like batteries or the power actually running circuits inside some device. <S> However, it seems your real confusion is between AC and DC voltage. <S> Surely there is a lot about that already out there. <S> Once you understand that, it will be obvious what to tell the meter to measure. <A> Your confusion is regarding two things. <S> AC versus DC, and Amps vs. Volts. <S> If you select the wrong setting for AC or DC, the worst you will get is the wrong reading. <S> But if you use the current ranges (Amps) incorrectly, you will blow the fuse. <S> Don't ever put the meter across a power source in the Amps position. <S> And it's best to not use the Amps ranges at all, until you understand how they work. <A> So a device that runs on DC current <S> it's voltage inside the device <S> will always be measured by rotating the knob to DC voltage <S> Generally it is a workable assumption that inside a device powered by DC you will also find only DC. <S> - BUT this may not always be true. <S> A device that runs on AC current <S> it's voltage will always be measured by rotating the knob to AC voltage. <S> Is this true? <S> Generally inside an AC-powered device you find a section that has AC and other sections that have DC. <S> (Olin Lathrop has already mentioned this in his answer.) <S> Electrical engineers can generally identify which parts are which by looking at it. <S> I really don't want to burn the fuse of multimeter. <S> This really is not an issue when you measure voltages. <S> Burning the multimeter (or its fuse) happens generally only when measuring currents. <S> Also, for measuring voltages, there is not really any harm in selecting "AC voltage" for measuring DC or vice versa. <S> You just will not get the correct result. <S> Given your current understanding of electricity however I would strongly caution against opening electrical devices to poke around inside! <S> Getting shocked from accidentally touching a live wire is a really poor way of learning about electricity. <S> That being said, battery-powered devices will generally be safe to open. <S> You might want to check back here before you do however just to make sure.
It is possible to generate AC or high-voltages (i.e. dangerous) inside a DC-powered device.
Sharing a pull-up resistor I have two IC chips. On one chip I have one 10K ohm pull-up resistor and on another chip I have three 10K ohm pull-up resistors. At first I was using four through hole pull-up resistors. Then I moved to an array of SMD resistor. Could I simplify the design by attaching all four pins of the ICs to the same pull up resistor? Should this be a 40K ohm resistor? Is this OK or is it better to attach each pin to a different resistor? <Q> If these pullups are permanent (ie the only connection is from the input pin to the resistor) <S> then there's no problem. <S> If not, but all of the inputs should have simultaneously the same level, then it's OK too. <S> I assume that's what you intended. <S> About the resistance, it theoretically should be lower, not higher, because when sharing the resistor the other input pins are acting as other resistors connecting that point to the ground, thus reducing the voltage at that input; but considering that today almost all chips are MOS with a very high input impedance, it makes no practical difference (for the number of pins you mentioned) <S> , so you can keep the same 10K ohm. <S> If they were TTL, then maybe you should need to reduce it to make sure the voltage delivered is recognized as '1'. <A> It depends on what the pins are doing, since connecting all the pins to the same 10k pullup means all the pins will directly be tied together. <S> This means that only one pin will be able to drive the line at a time, so if any of the pins are performing independent functions to any of the others, there will be contentions (i.e. one or more pins trying to drive the line at the same time) <S> If you have e.g. one pin as an output and all the rest as inputs that read from the output, such as in I2C (which uses "shared" pullups) then it would be okay. <S> Another similar bus is a 1-wire bus, in which a number of pins share the same pullup. <S> If you give us the details of the ICs and pins you wish to share the pullup then a definite answer can be given. <A> Alexis, if I can assume all these pins are not actively driven signals and instead just config pins, the limiting factor really is input leakage current vs input voltage thresholds. <S> Each pin has a leakage current typically in the microamp (uA) range that increase over temperature. <S> The maximum values can be found in the datasheet. <S> If a pin draws 100uA into itself and across a 45kohm pullup resistor, you would have a 4.5V drop across that resistor! <S> This is bad because even though you are pulling up to a HIGH voltage, the excessive voltage drop will be detected at the input as a LOW instead of a HIGH. <S> For example, if you pulled up to 5V, the actual pin voltage due to a 100uA leakage would be 5V - (100uA*45kohm) = <S> 0.5V and <S> your chip wouldn't work as you designed. <S> So, you need to look up both the min/max input voltage thresholds and also the maximum input leakage currents and check using ohm's law. <S> The more pins in parallel the more leakage across the shared pullup resistor! <S> This is why the pullup should be smaller as more pins are shared. <S> This principle also applies to pulldown resistors since the leakage current would now be flowing out of the pin instead of into it. <A> That depends.
If the pins are just inputs you could connect them together and maintain the 10KΩ resistor, but if there is a chance that any of the pins would be an output you will better use an individual resistor per pin to avoid that some pin that eventually turns to be an output drives the others to an undesirable state.
What is the advantage of the inverting opamp circuit over non-inverting one? Op amp circuits are designed to achieve a specific gain regardless of the differences between individual op amps. One very common circuit has a gain of -R2/R1. Here's a (corrected) schematic: Another common configuration has a gain of R2/R1+1 and is non-inverting: What I can't see is why on earth anyone would use the inverting one, except for the odd case where you actually want inversion. The non-inverting one has high input impedance without an extra input stage, and almost the same gain. Is there any advantage to the first example? Also, since the first example does not have high input impedance, it can take significant current to drive. So, often a source follower is placed before the amplifier. For the second configuration, is there any reason why a source follower would ever be necessary? <Q> The inverting configuration is capable of gains less that 1, and can be used as a mixer. <S> Here is a good primer. <S> http://chrisgammell.com/2008/08/02/how-does-an-op-amp-work-part-1/ <S> I don't know exactly why (anyone feel free to chime in), <S> but the fact that negative feedback is holding the negative input terminal at 0v means that node is a proper place to sum currents, making the mixer circuit viable (although inverting). <S> Op amps are also cheap and come in packages with more than one, so you can usually just invert something again if it's "upside down" <A> One factor not yet mentioned is that some op amps work best when the common-mode input voltage is kept within a narrow range. <S> Typically, an op amp will either not work correctly when the inputs are too near near one of the rails, or else it will have one set of input circuitry for use when voltages are near one rail, another set for when voltages are near the other, and circuitry to automatically switch between them. <S> If the two input circuits are not perfectly matched, switching between then may disturb the output. <S> Keeping the common mode voltage at a fixed value eliminates this problem. <A> In any case, inverting is not a problem. <S> We can get a positive signal just by changing the wiring. <S> Furthermore, I think using several amp stages is pretty common, and an even number of inverting amps make a bigger non-inverting one. <S> Wikipedia gives some disadvantages for the non-inverting configuration: http://en.wikipedia.org/wiki/Operational_amplifier_applications#Non-inverting_amplifier <S> I don't think that placing a buffer in the input of the second configuration provides any advantage. <A> Really, nowadays the humble inverting amplifier has almost no advantages over the non-inverting amplifier (excluding the absence of a common-mode error and, of course, the inversion). <S> But in the past, when there were no differential amplifiers, this was the only way to make an amplifier with negative feedback. <S> The generalized inverting configuration with various elements E1 and E2 (resistors, capacitors, inductors, diodes, transistors, sensors, etc.) <S> connected in the place of R1 and R2, is extremely useful. <S> There the op-amp removes the undesired voltage drop across E2 by an equivalent output voltage thus providing ideal load conditions (short connection) for E1... <S> the op-amp acts as an element with negative impedance neutralizing the positive impedance of E2. <S> See more about this technique in my wikibooks story of Voltage compensation .
It's very difficult to design an op amp in which the same circuitry handles common-mode voltages near both rails.
What development boards have good RTOS support? I'm looking for a relatively low-cost (<$50 would be ideal) development board with real support for an RTOS. It doesn't matter if the RTOS is manufacturer-supported or a separate project, but I'd like something that is solidly supported (i.e. actually works for multiple people). I've spent some time fixing broken RTOS ports and I'd rather not have to mess with that. My other requirement is that the development board has to have support for a Linux development environment. We're looking for something that is specs-wise roughly comparable to the Atmega 2560. (And, in fact, an Arduino Mega 2560 running BeRTOS is certainly one option.) To give a little more background to the question, last year we built a quadcopter from scratch (i.e. all the hardware, all the code, etc. Nothing borrowed from Arducopter or anything like that). A small budget ($400) had us stuck with an Arduino Pro (an Atmega 328-based board). By the time we had the thing flying, we were bumping up against the memory limit (due to code size) and doing everything we could to optimize so that our PID loops would run fast enough. The new goal is to redo the control system based on a less limiting micro and an RTOS. So, to summarize, the question is, what development boards fit these criteria: Approx <$50 RTOS support Compatible with a Linux development environment Thanks! <Q> A Cortex M3 will run at 75MHz and deliver over 80MIPS. <S> ARM code is dead effecient and some ARM Cortex devices include fixed point math functions. <S> If you want even more grunt, try a Beagleboard or RasberryPI. <S> As well as FreeRTOS, the latter will run Linux with Linux compiled with config_preempt_rt config option. <A> I am currently using the LPCXpresso range of boards (joined effort from the NXP, Embedded Artists, and Code Red). <S> Excellent support from both community ( http://lpcware.com/ ), NXP, board manufacturer ( http://embeddedartists.com/ ), and of course the Richard Barry and the FreeRTOS. <S> For 20 EUR you get the MCU board (100 mils spacing for fast protoyping), and you can use their or third party base board for development (base boards are basically bunch of connectors, and nice peripherals). <S> Base boards are more expensive, but worth having. <S> They are comaptible with the mbed (www.mbed.org) for REALLY fast prototyping, but I like staying with some of less expensive 'normal' MCU boards: LPCXpresso 11C24 for Cortex M0, and LPCXpresso 1343 or 1769 for M3. <S> Development environment is free for up to 128 K (actually only debugging stops there), Eclipse based, works also under Linux... <S> FreeRTOS is free also for commercial deployment if used with NXP chips (which comes handy if you used them anyway like I do). <S> Finally, check out the port made exactly for the board I have, it runs out of the box, and porting to another LPC variant is more or less simply coping the FreeRTOS cojnfiguration file and adjusting the stack sizes. <S> This beauty have also something like an eco system built on top of the FreeRTOS, sheck it out, and I can confirm it just works: http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_IO/Demo_Applications/LPCXpresso_LPC1769/NXP_LPC1769_Demo_Description.shtml <A> STM32F0Discovery will fit best. <S> Take a look at the fresh (summer 2014) technology stack: https://github.com/dobromyslov/stm32f0-cmsis-cube-hal-freertos-template Main features are: Template firmware for STM32F0 microcontroller Tested on STM32F0Discovery (STM32F051R8) <S> Makefile build from console and Eclipse CMSIS <S> v4.1 - http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php <S> STM32CubeF0 HAL <S> v1.0.1 - http://www.st.com/web/en/catalog/tools/PF260612 <S> FreeRTOS v7.6 <S> integrated with CMSIS-RTOS from <S> STM32Cube OpenOCD instant flash support with make flash Works great with Eclipse debug via GDB - see how to import project http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:eclipse2 <S> There is also a great graphic tool STM32CubeMX available for different ST MCUs quick configuration: <S> http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF259242?icmp=stm32cubemx_pron_prcube_feb2014&sc=stm32cube-pr And a similar plugin for Eclipse from STM: http://www.st.com/web/en/catalog/tools/PF257931 People says the plugin works partially in Linux under Wine: <S> https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2FSTM32CubeMX%20as%20Eclipse%20plugin%20on%20Linux%2064%20machine&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=999 <S> But I prefer the full STM32CubeMX version and run it under Windows on VirtualBox. <S> I like this convenient ecosystem and highly recommend to use it in any new modern projects.
I've had lots of success with FreeRTOS , combine this with an ARM Cortex dev board such as one from Olimex (available from Farnell) - see This Page for a list of supported devices.
ARM Programming interface and tool chain I have acquired a RM48L952 that is an ARM Cortex R4F from TI and I would like to start learning ARM development with this chip. My question is can I use any JTAG programmer to program it? Something like a Open DIY JTAG Programmer or does it have to be a brand specific one? The same applies for the tool chain, can I use gcc or do I have to use brand specific compiler? Thank you <Q> About the JTAG, you don't need a proprietary one, unless the board you have has a proprietary connector. <S> Even then, if you can discover its pinout you could make an adapter connector. <S> The main difference between open/free JTAG projects and a commercial product is that the later will probably have higher speeds, which makes a big difference depending on the complexity of the programs. <S> There are cheap commercial JTAG adapters that are parallel/serial, and somewhat more expensive ones that are USB; given the choice, I'd always prefer USB. <S> About the toolchain, it's perfectly possible to use GNU tools, (take a look at gnuarm.com) but <S> the downside is that you have to find documentation about how to interface with the device-specific hardware; also you may have to prepare a specific link script for the memory map of your device. <S> The more rare/exotic it is, <S> the less probable it is that you'll find a script already made. <S> And these link scripts can be pretty complicated. <S> If you use a commercial toolchain specifically tailored for your device, you'll find everything already set to make it work on the device. <S> I'd also recommend to buy a dev board (like this one ) for that MCU; It'll be a lot easier to make everything work if you can divide-and-conquer. <S> And having a tested, functional board is the best way to keep software and hardware problems separated. <A> e.g. yagarto or GNU ARM )for the software side of things. <S> For support look at Linux Support for the ARM Architecture and Install the GNU ARM toolchain under Linux . <A> Get the stm32f4 discovery board and work thought the examples. <S> You will have enough on your plate without trying to design a board as well. <S> The discovery has a USB ST-Link2 programmer built in and the whole thing is about 15 bucks. <S> Coocox is a pretty good IDE for experimenting because its free and unlimited. <S> Unfortunately the documentation sucks and their forum is nearly useless as nobody accept the authors seem to be able to answer questions and as they are working for free the immediacy of response is lacking. <S> That said if you are willing to work at it <S> ARM is complex to learn because unless you have a super fluidity with pointers and typedef structures etc you will also have to become an advanced C programmer in the process of learning the hardware. <S> the CMSIS peripheral library is written with advanced C programmers in mind so you won't even know what's going on till you get your c skills up to a decent level. <S> This is of course my perspective on this and may not apply.
You can use OpenOCD as a hardware programmer/debugger and the GNU toolchain ( Coocox is an easyish solution if you don't want to add Linux to your already long list of things to learn.
How do I modify a small blower motor to be variable speed? I have a small blower motor 120 v, 1.87 amps, and I want to make it variable speed. I hooked up a dimmer switch for a light bulb but it did not work very well. I went to a electronics store and they wanted to sell me a $150 item but could not tell me why the dimmer switch would not work. A friend told me I needed a variable resistor good for 0 to 3 amps not 0 to 15 like the one I am using. I have no idea. Can someone at least tell me why the dimmer switch doesn't work, in layman's terms? <Q> For an electric motor to function, it has to alternate the voltage applied to its coils twice in each turn, so the electromagnetic force can produce a torque in the right direction always, given that half the time the magnet is behind the coil (and needs to be pulled), half the time ahead (and needs to be pushed). <S> There are two ways to do that alternation. <S> For DC motors, you have to put some mechanism to do it; usually there's a set of brushes that touch the rotor to make electric contact, and the rotation itself makes the inversion happen (and there are brushless motors that use an electronic circuit to do the same thing). <S> For AC motors, since the power source is itself alternating, you can rely on it to do that, and that's probably your case. <S> A more modern dimmer will cut the power periodically for a fraction of the time, using the same base frequency (thus 60 times a second). <S> The more you turn its knob, the least the proportion of power mantained (and the least average voltage provided). <S> But you still have 60 Hz, no matter what, and so your motor still won't be throttled down. <S> To control the speed of an AC motor you'll need something that can change the voltage AND <S> the frequency provided to it, and that's a much more complex circuit. <S> What your friend mentioned is valid but is not the entire solution. <S> It is true that you have a dimmer more powerful than you need; its maximum current needs to be higher than it's required by the motor (and with a good safety margin), but if it is, it doesn't matter if it's 50% higher or 200% higher. <S> So a 15A dimmer has too much, unneeded current capacity. <S> Nonetheless, it'll perform exactly as the one you have, and won't work either. <A> Dimmers are not reducing the voltage, they ignite triac (or ssr -solid state relay) (like an electric switch) at some point of the sine wave (60Hz). <S> if they ignite at 0 deg. <S> (beginning of the sine wave) <S> the load will get the full power. <S> if they ignite at 180 deg. <S> , the load will get 0 power. <S> at 90 deg. - half the power and so on.all the dimming will be in between the 0 to 180. <S> the triac turn off when there is no current through it, so it have to get ignited in every cycle. <S> you can't see that the light is off for a part of the period, but the average of the power (and the light intensity) is less. <S> as said, motors are frequency dependent, and in order to slow it down you have to change the frequency. <S> I think that there are limits on the high and low frequency that a motor can stand. <A> Your dimmer switch doesn't adjust the voltage; it adjusts the on-timing of the existing voltage. <S> And your motor isn't controlled by voltage; it is controlled by the line frequency (assuming it is an induction motor).
A dimmer with a variable resistor won't solve your problem because it'll reduce the output voltage, but not the AC frequency, the standard 60 Hz (50 Hz in Europe) the power grid provides, and the motor rotation is necessarily proportional to that frequency.
Make the oscillator choice I am using a PIC24FJ128GA010 and I need to make an oscillator choice. If I am not wrong, two main oscillator could be used 32KHz and 8 MHz. 1. Do I really need 32KHz oscillator?2. Element 14 website shows many 8MHz but the Microchip website advice to make a clever choice. Could you please help me for this choice. <Q> It is not required for operation of the microcontroller. <S> The primary oscillator crystal can be anything from 3.5MHz to 32MHz. <S> If you want to use the PLL (phase locked loop) however, it must be between 3.5MHz and 8MHz. <S> The phase locked loop is used to generate 4x the original frequency <S> *, so you can use an 8MHz crystal and generate 4 * <S> 8MHz = 32MHz for use as the system clock. <S> * note that other versions of the PIC24 have different PLLs onboard, this one is just the simple x4 version. <S> See note 2 in table below Note that the PIC24 also has two internal oscillators, of 8MHz and 31kHz, so you can use it without an external crystal. <S> The benefits of the crystal are better timing accuracy (needed for things like USB, UART, etc) <S> The part datasheet is just an overview, for details you should refer to the Family Reference Manual (halfway down the page) <S> The Oscillator section is relevant here. <S> Selecting a crystal <S> The PIC oscillator is designed for a parallel resonant (usually AT cut) crystal. <S> Plenty of technical information on choosing the crystal and load capacitors is given in the Oscillator section above, read this thoroughly (particularly section 6.5 and 6.5.2.4). <S> Unless your applications timing is extremely demanding then the slight variations in temperature and frequency tolerance of different crystals won't matter much, if they do you would be better to look at using a TXCO or OXCO (temperature or oven controlled oscillator) <S> The frequency tolerance of a typical crystal varies between ±15 and ±100 ppm (parts per million) which is 0.01% and 0.0015%. <S> To compare to the internal RC oscillator, the accuracy is given as ±2% at 25°C, and ±5% between -40°C and +85°C which equates to ±20000 and ±50000 <S> ppm respectively (see part datasheet) <S> An excellent guide for oscillator design is the Microchip AN588 - PIC oscillator design guide . <S> If you do a search on their site you will get other useful app notes such as: AN949 - Making your oscillator work <S> AN849 - Basic PIC oscillator design <A> 8 MHz is a good start. <S> You don't need to use the 32kHz oscillator, but you can use it if you need low power operation, or you want to do timekeeping (using a watch crystal). <A> Crystal Oscillators are most important element for microcontroller, Any microcontroller use Oscillator pulses for program execution. <S> Have you read in any microcontroller tutorial about the instruction execution time cycle? <S> If you use 8MHz crystal instead of 4MHz than your controller execute your program instructions at double speed than 4MHz, Similarly 32MHz crystal has the most fastest time than all other crystal options. <S> If you are making any project that deals with ADC , I2C , LCD , USB , <S> LAN / Ethernet and or UART communication from the same controller than it is recommended to use higher value Crystal <S> , However you may get same results with simply 8MHz crystal with slow time which is very common among beginners. <S> So Why 32KHz crystal is their? <S> It is necessary if you are making any Real Time Clock (RTC) or dealing with RTC based circuits, Because from 32KHz crystal you will get one second accurate pulse, that you may use for making Clocks or any Timing Function Circuits. <S> In some microcontroller their are some extra features also present, You can use higher value Crystal on Oscillator Pins as well as 32KHz crystal on other pins for microcontroller internal oscillator calibrations, which is a advance level <A> The choice between 32 kHz and and 8 MHz will depend on your performance requirements and power requirements . <S> High performance and low-power don't go well together: you want a fast clock to perform the required actions in time, but power consumption is nearly linear with clock frequency. <S> A microcontroller will typically need ten times more power at 10 MHz than at 1 MHz. <S> So go for 32 kHz if you can afford it. <S> Also then you have two options, depending on the required timing precision: the internal 31 kHz RC oscillator is cheap, because it doesn't need external components, but is not accurate enough for a real-time clock, for instance. <S> If you need more accurate timing you'll need a 32.768 kHz crystal. <S> Those are still inexpensive. <S> Both solutions give you a low power consumption. <S> That can be because you have to sample an analog signal at a high sample rate and clock this data at several Mbps though SPI, for instance. <S> Again you have the choice between an internal 8 MHz RC oscillator, which is OK if timing precision isn't a premium. <S> Otherwise use an 8 MHz crystal. <S> You can still increase the clock frequency using the on-chip PLL. <S> Further reading PIC24F Family Reference Manual, <S> Sect. 06 <S> Oscillator PIC24FJ128GA010 Family Data Sheet
You only need the 32kHz oscillator if you want to have a low speed oscillator present for uses like the RTC (Real Time Clock) peripheral, or low speed system clock operation. Go for 8 MHz if you need the performance.
Isolating power for an infrared receiver I am using this IR receiver in a circuit, and I have noticed that sometimes the unit generates an oscillating output when it is not being activated by a remote - I am guessing that this is due to the USB power supply. I have seen other threads talking about 'filtering' the power supply with a cap and a resistor- however, could somebody explain how they come about calculating what size cap and resistor are required - and how they actually achieve the 'ripple filtering' effect? For examples sake, my IR receiver is powered by 5v, directly from a netduino - and generates output pulses (when activated by infrared) in the 0.5-4.5ms range (see image: I dont know if that information is required, but there it is). <Q> No, it's probably not the power supply. <S> It's not drawn in the block diagram in the datasheet, but the receiver will have AGC (Automatic Gain Control) to cope with big differences in signal amplitude. <S> When no signal is being sent the AGC will just see the input noise and set the gain based on that. <S> So you get digital noise out. <S> I've seen it often with Vishay receivers: a continuous stream of random pulses, but when a code is sent it's received perfectly. <S> The decoding software shouldn't have problems filtering the noise out, as it will have a much higher frequency than the signal. <S> A decoupling capacitor of about 4.7 µF with a 47 Ω series resistor on the power supply is recommended, but won't avoid the noise. <A> If your load draws current through an resistor-capacitor (RC) filter, you would see some voltage drop ( V=IR ) across the resistor. <S> You could: <S> choose the resistor small enough such that the voltage drop is acceptable. <S> use an inductor-capacitor (LC) filter instead of RC. <S> We don't know the actual spectrum of the noise on your USB bus. <S> Snippet taken from fig. <S> 2.5 here . <S> More info on power supply filtering here (towards the bottom of the page) . <A> I had a similar problem with a Vishay IR receiver.1 <S> K resistor connected between +5V and the module's +V combined with a 10nF ceramic connected between module's +V and Com resolved the problem. <S> Don't forget to install a 10K resistor between the module's output and +V.I <S> monitored the output for hours with a digital storage oscilloscope <S> and I got a perfectly clean output all the time.
However, a common power supply filter on the USB slave side consists of a ferrite bead (inductor-like), 4.7uF or 10uF electrolytic, 10nF and 100nF ceramic capacitors.
Hard drive that has the ability to "read" old data while it performs a write? Is there a hard drive (protocol command, specific model, etc.) that, while writing new data over old data, it "read"/return the old data back to the controller/OS? (Analogous to a simultaneous read-write). I've been looking up SATA/hard drisk protocol(s) in search of something that meets the criteria, but it's quite possible that I lack the vocabulary to search properly. The closest I've found is an ATAPI command for Read-after-write - which resembles the opposite of what I'm looking for. I want to "read-just-before-write" or "read-as-i-write". <Q> I wouldn't expect that such a feature could be implemented in a fashion that would be more efficient than simply alternating read and write commands. <S> If the drive has efficient buffering, the drive would likely respond to the first "read-sector" request by reading into a buffer the entire track containing that sector (the request would be reported as successful as soon as the requested sector was read, but the balance of the track would be available to honor future requests). <S> The drive would buffer the write request and report it as having completed immediately. <S> When the drive receives the request to read the second sector, the drive would either have finished reading the entire track or be in the process of doing so. <S> It would then buffer the second write request and report that as completed. <S> Depending upon the exact way the drive's buffering works, and the timing interactions between the drive and the host, the drive may or may not achieve the highest theoretically possible speed, but it should probably come pretty close. <S> I don't see how using a "read then write" command would be better than using separate "read" and "write" commands, since the drive would not be able to physically write a sector to disk until significantly after it was read. <A> Writing is performed using differential current sink into the same centre-tapped magnetic head coil. <S> A Write Enable(-) <S> logic signal disables the read path by design. <S> Read Modify Write is an Application layer possibility not supported by default in the Command set. <S> However this is something that is performed within Flash drive emulation. <S> Each OS may differ in implementation of Read Modify Write (RMW) <S> For example in Solaris , ZFS random write, 4K-aligned fs block size test shows 230x improvement compared to running RMW in f/w. <A> Usually if you write new data it means you don't need the old data any longer, therefore there's no command which does this for you. <S> If you still need the old data you'll have to perform a separate read of it before overwriting it with the new data. <A> The ATAPI, SATA, and SCSI command sets do not support a single read then write command. <S> You will have to write software that performs a read then <S> a write in sequence to get the same effect. <S> If you tell us more about your application and what problem this feature would help solve, we might be able to help you solve your problem despite this feature not being present in the hardware you are trying to use. <A> One further point: <S> the tracks are so small and the arm carrying the head follows a circular path so the read head is often over a different track to the write head. <S> Thus reading any given track just before writing it is impossible without waiting for many disc revolutions and head movements. <A> As far as I understand you probably want the old data to be read before being overwritten... <S> So its better to put a round robin scheduling while writing the data, where first a read operation is executed over the segment and soon the segment is overwritten.
It is impossible to read and write simultaneously.
Does anybody recognize this automotive connector? I'm trying to repair a wiring harness, and I'd rather pin and install a connector than splice into a junkyard pigtail. Does anyone recognize this and know where to find them? There's some serious connector-identifying wizards here. edit: I know what the usage of the connector is (camshaft for a second-gen Ford Focus). I'm trying to make my own pigtail for it, so I'll need a blank plug and uncrimped pins. That's what I'm having trouble finding. <Q> Automotive companies design most of their own connectors as custom items. <S> Keep in mind that the terminal is specific to the connector specifically, and not just the connector design. <S> It's possible that if you disassemble the original connector, and a check pigtail connector the terminals will be different. <S> If you do need to buy more than a few of these without the connected wires, then use alibaba or a similar parts search engine to find companies that make them, and get a quote. <S> You might find exactly what you need as a pigtail, and they may be able to supply you with the connector parts rather than an assembled version. <A> I have a car full of them.(Not just used on Jetronic.) <A> I don't know what it is, but it is sold on amazon.com: http://www.amazon.com/dp/B000IYHG00 <A> According to Google Image Search , it's a camshaft position sensor connector .
If you can't find one in the form you want, I suggest you buy the pigtail, disassemble the connector, and post pictures of the terminals - you may find a similar terminal more easily than a similar connector. That is a Bosch Jetronic connector.
Multiplexing Inputs on a microcontroller I have a 4 way DIL switch that I use to provide input to a microcontroller, and I need to free up a port to use for something else. Is there a way to multiplex 4 inputs into 3 microcontroller ports? I'm thinking that there may be some way to have 2 pins as inputs, and a 3rd output pin that can be driven high to read switch 1 and 2, and low to read switch 3 and 4. My current simple design is shown below, can I do this with just 3 pins? <Q> Charlieplexing takes advantage of tristate pins of the microcontroller, but it costs extra diodes and somewhat more complex programming. <S> With N IO-pins <S> you can address N(N-1) <S> switches <S> / LED's. <S> The Charlieplexing with switches <S> article describes how it works with switches and LEDs <A> What you describe is a 2-to-1 multiplexer, like the 74HC157 , which is a quad 2-input multiplexer , so 2 inputs to 1 output, and 1 select input. <S> You use two multiplexers for the four inputs. <S> Personally I find that a more logical solution for your application. <S> Connect the enable input to ground, and don't forget to connect unused inputs either to ground or Vcc. <A> As an alternative to Steven's solution you could use a 2:4 demux like this: <A> Great solution by jippie . <S> I'd like to elaborate a bit on it. <S> The schematic: <S> Three times output \$\times\$ <S> two inputs is good for 6 buttons as the schematic shows. <S> How do I activate the output? <S> Make it high? <S> Let's do it for pin 1, then diodes <S> B and F are forward biased, so we'd expect to be able to read those buttons. <S> For many microcontrollers this won't work. <S> Pressing button B will make input 2 high, but what if the button isn't pressed? <S> The input would be floating, and then you can't read anything meaningful on it. <S> I don't know about all of them, but at least a number of AVR and PIC microcontrollers only have pull-ups. <S> In that case the right way is to activate the internal pull-ups and activate the output by making it low . <S> We're not controlling buttons B and F, but A and E. <S> If button A is not pressed the pull-up will make input 2 high. <S> Press button A and you pull the input low. <S> The algorithm: <S> IO2 = input, <S> pull-up enabledIO3 <S> = <S> input, pull-up enabledIO1 = <S> output <S> , lowButton_A = IO2 (low = <S> pressed)Button_E = IO3 <S> (low = pressed)IO1 = input, pull-up enabledIO2 = <S> output, <S> lowButton_B = IO1 <S> (low = pressed)Button_C = IO3 (low = pressed)IO2 = input, <S> pull-up enabledIO3 <S> = <S> output, <S> lowButton_F = IO1 <S> (low = pressed)Button_D = <S> IO3 <S> (low = pressed) <S> As far as I know all NXP Cortex-M controllers, for instance, have both configurable pull-up/pull-down resistors. <S> For those you can use positive logic (high = pressed) if you use the pull-downs, and an active high output. <S> Note that you will read different buttons for the same output: <S> IO2 = input, pull-down <S> enabledIO3 = input, <S> pull-down enabledIO1 = <S> output <S> , highButton_B = IO2 (high = pressed)Button_F = <S> IO3 ( <S> high = pressed)IO1 = <S> input, pull-down enabledIO2 = <S> output <S> , highButton_A = IO1 <S> (low = pressed)Button_D = <S> IO3 (low = pressed)IO2 = input, pull-down <S> enabledIO3 = <S> output <S> , highButton_E = IO1 (low = pressed)Button_C = IO3 (low = pressed) <A> If you can rely upon your I/ <S> O pins to switch at the same threshold, and you don't mind disabling interrupts for a long time while you read the switches <S> (e.g. because you just read them at startup), you could use two I/ <S> O pins, six resistors, and a capacitor. <S> Wire <S> a 1K, 2.2K, 4.7K, and 10K resistor in parallel with each switch, and wire all the switches in series so that the chain will have total resistance from roughly 0K to 17.9K. Put a 1K resistor in series with that chain and tie it one end of the chain to a port pin and the other end to a capacitor. <S> The other end of the capacitor should go to ground. <S> Wire a 10K resistor from the other port pin to that capacitor. <S> To determine the switch setting, ground both port pins and leave them grounded for awhile. <S> Then float the one connected to the string of resistors and drive the one connected to the 10K resistor. <S> Time how long it takes for the pin connected to the resistor string to go high. <S> Then ground both port pins, leave them grounded for awhile, and float the pin connected to the 10K while driving the resistor-string pin high and time how long it takes for the 10K pin to switch. <S> If the pins switch at equal voltages, the ratio of the times will be the ratio of the resistances. <S> Since the 10K resistance is known, one can then compute the other. <S> It may be possible to improve accuracy slightly by using a third pin connected directly to the capacitor to determine when it is suitably charged; using the same pin for both measurements would ensure that both measurements are taken with the same switching threshold. <A> I noticed that you have an analog input there. <S> If you want to use a minimum amount of components connect one side of all switches to the analog input then connect the analog input to +V with a 1K resistor. <S> Connect four different values resistors to the other side of the switches. <S> Choose your resistors carefully to ensure that you get a different voltage regardless of how many switches are on at one time. <S> Generate an interrupt when A/D conversion value is changing or have a routine that reads the value as often as you require. <A> My approach would be to use a serial bus I2C/SPI/etc.. <S> You could run that on a 3 pins and have an input register for the switches on that bus. <S> While expensive and more bits that you need currently, the <S> MCP22017 <S> is pretty flexible. <S> Other choices with 8 bits are available if you look around.
The 74HC153 does a similar thing, but it's a dual 4-to-1 multiplexer , so 4 inputs, 1 output and 2 select lines per multiplexer. A pull-down resistor would help, but many microcontrollers only have pull-up resistors, and then you'll never read a low level. The idea is to make one of the I/Os output and the other two input which allows you to read the state of two buttons.
Designing oscillating circuit for DIY DC -DC converter Am building a power supply that uses a transformer which outputs 24v rms. The problem is it uses various sensitive components such as an LCD. I think I have thrown together a buck converter to solve this issue. However am stuck on how to drive the MOSFET since I can't use a 555 timer because I don't have a 5v rail. I have a feeling am trying to run before I can walk but hey. Ofcourse I can just buy a ready built dc-dc converter but I thought I'll have a go at building a crude DIY one. Not too bothered about efficiency. Here's what I've done but am not getting 5v. As previously mentioned the output voltage vin * duty cycle which is 5.1v. Am going to stick this into a 3.3v reg. <Q> You have shown an N Channel MOSFET, whose gate must be driven positive relative to its source to turn it on. <S> The MOSFET gate must be driven ABOVE source by typically 5V or more. <S> This value varies with device. <S> To use an N Channel MOSFET in that circuit you need to reference the 5V gate drive to +32V <S> so it swings 32/37V. Vout here <S> ~+ Dutycycle x Vin = 70% <S> x <S> 32V <S> ~= <S> 22V. <S> As David Kessner says, a P Channel MOSFET may be an easier-to-use choice here. <S> Connect source to Vcc = +32V, drain to L1 and drive gate negative going relative to source and to +32V to turn the FET on. <A> I agree with Russell and David: toss the N-channel FET and use a P-channel instead. <S> The IRF9530 looks OK <S> if we keep an eye on the gate voltage, that should be less than 20 V, and since you have 32 V in that means you can't pull the gate all the way to ground. <S> Drive an NPN transistor or N-channel FET with the rectangle wave, and connect collector/drain via a resistor divider to the +32 V. 10 kΩ on the +32 V side and 10 kΩ on the low side will give you 16 V gate voltage when on, and a few mV when off. <S> 16 V is good for more than 10 A. <S> For Q1 you can use a BC546 , for example. <S> You'll have to adjust the duty cycle of the rectangle wave to 16 %. <S> Keep in mind that this is a DC/DC converter, but not a regulator: the output voltage will vary with varying input voltage. <S> A next step may be to add feedback from the output voltage so that the duty cycle can vary to keep the output voltage constant. <S> edit I changed a few components' values after Russell's comment. <S> Total gate capacitance of the <S> IRF9530 is about 3.6 nF, and with the original 10 kΩ resistors this gave a charge/discharge time constant of 18 µs, which is much too slow for a 100 kHz clock. <S> With the current 100 Ω resistors this is 180 ns. <S> C1 gives a short base current peak to start charging the gate faster. <S> This wasn't required with the 10 kΩ resistors, as Q1 would be in saturation quickly, but with the lower load extra base current is welcome. <A> The biggest hurdle I see with your buck is that the 32V input is above the input range of the majority of control ICs out there. <S> Most power supply PWM controllers operate at 18V or lower. <S> You will most likely need a lower-power rail if you intend to use a cheap off-the-shelf controller. <S> Having a P-channel MOSFET is a good idea if you're trying a do-it-yourself approach. <S> As others have pointed out, the duty cycle for the switch will be the output voltage divided by input voltage if the buck is running in continuous mode, and will be less that that if it's discontinuous.
A buck controller for N-channel MOSFETs will have a bootstrap supply driver included, so you won't need to worry about the higher-than-the-rail supply yourself.