source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Is this the right way to mount a 2N3055 or any TO-3 form on a heat-sink? Top view: Bottom view: This is the first time I'll be using a heat-sink on a transistor. Right now these are just placed together. Is the mounting correct? <Q> TO-3 devices are typically mounted on the inside of any enclosing heat sink, rather than the outside. <S> The way you have mounted it would prevent the part from being soldered directly onto a PCB. <S> Also, there are TO-3 specific heat sinks available, many of which would take less PCB real estate and typically provide better cooling than the one you have used. <S> Heat sink selection involves required space, material (copper / aluminium / other), shape (flat / enclosing / raised), fin type, and expected thermal wattage to be cooled, as parameters. <S> Wrap-around design heat sinks also shield nearby components from the heat generated by your device, an added benefit. <A> The mounting that you show in your picture may be appropriate for your application. <S> That mounting does imply that you are using a wiring harness to connect to the TO-3 leads. <S> Do note that the devices in packages like the TO-3 are getting rather uncommon in new designs. <S> The large size of the device package makes product packaging very large. <S> When you look at the types of packages used for modern day high power designs you will see characteristics that allow for higher speed operation, smaller product case sizes, more efficient device to heatsink coupling, and fewer piece parts on the BOM (bill of materials). <A> The advantage of the TO-3 case is <1.6'C/ <S> Watt thermal resistance vs the TO-220 of <S> <1.8'C/Watt. <S> No heat sink gives you 50 to 70'C/Watt junction to ambient thermal resistance. <S> Considering your heatsink may only increase the "effective" surface area of the TO-3 by eyeball, a factor of 4, I would estimate your thermal resistance is around 12'C/Watt. <S> Now considering you got this really big low thermal impedance transistor, does it make sense to mount it on a really "high" resistance small chunk of extruded aluminum metal. <S> It would be like using jumper cables to drive 10 Watt speakers. <S> So yes I would say there is something wrong with this picture. <S> Either you underestimated the temperature rise of this 15 amp transistor or you just happen to prefer bulky parts over the TO-220 plastic cases with metal tabs and are hoping for the best. <S> You would be better off with a TO-220 and larger thermal mass and surface area. <S> The electrical insulator is necessary next to the transistor to prevent shorts since you can't really enclose a "live" heatsink as that insulates it ... read "increases the case-air thermal resistance. <S> Also the surface needs to be large enough to ensure it is also very flat as any air gap insulates the part or <S> adds 'C/Watt like Ohms Law for temperature rise. <S> For tips on cooling look at some CPU heatsinks for 100Watts <S> both passive and force air cooling and compare your requirements. <S> You can often get old ones free or cheap surplus from PC shops. <S> You can learn a lot by studying other designs. <S> There are also TO-247 NPN power transistors with insulated mounting holes. <S> But these "big old" silicon transistors are work-horse silicon power devices as active load devices and series bypass regulators, just don't try to push it to 200'C max spec and expect it to last too long. <S> If it gets too hot to touch, you might want to lower the thermal resistance or share the load.
| If the device was meant to solder into a circuit board of some sort, particularly if there were multiple devices side by side, you would place the TO-3 package inside the fin area and let the leads stick through to where the heatsink assembly can be placed down onto the circuit board.
|
Does there exist an IC that allows on-the-fly routing of signals? Do there exist ICs with N input pins and N output pins which, either via EEPROM setting or via on-the-fly control by a microcontroller, allow one to route each of the N inputs to ANY of the N outputs? In other words, for example, one might use it to connect the incoming line on Input1 to the outgoing line on Output6, and connect Input2 to Output3, and Input3 to Output1, and so on (regardless of whether the signals are SPI, or I2C, or standard digital lines, etc)... And later change up the order. If it exists, what are such ICs called? <Q> In general, a device that connects N inputs to N outputs simultaneously is called a crossbar switch . <S> If N is small enough, you might also be able to do this with some other kind of programmable logic device or multiplexer. <S> If a microsecond or so of delay between an input changing and the output changing is tolerable,a microcontroller or other processor may be the lowest-cost approach. <S> If the signals are bidirectional, such as the signals on a I2C bus, it becomes more difficult to do such routing -- when the crossbar switch is told to connect pin A to pin B, it needs to somehow recognize and possibly switch directions from millisecond to millisecond, whether it needs to read pin A as input and drive pin B, or read B as input and drive pin A.The extra logic required to do this can fit easily on a FPGA. <S> If the signals are analog audio or analog video signals, you might be able to use analog mux ICs. <S> Most of them are inherently bidirectional. <S> It's pretty easy to wire up 4 "4:1 analog mux chips" to give complete arbitrary 4 x 4 routing between 4 analog inputs and 4 analog outputs, with 2 digital control lines per output (presumably coming from some processor) to select which input it is connected to. <S> video crosspoint switch ICs are available. <S> For example, the "Maxim MAX4360 8x8 low-cost video crosspoint switch" is available for about $20 in ones. <S> (Thanks, Axeman). <S> A popular alternative to pure analog crossbar switches is systems that (1) digitize all analog inputs, then (2) run those signals through a digital crossbar switch, then (3) convert back to analog at the outputs. <S> All available ICs have limits as to the amount of power they can handle and the maximum frequency they can handle. <S> If you need to switch signals that are beyond those limits(and assuming that you don't want to develop your own custom IC),you're forced to use mechanical relays. <A> What you're looking for is called a "crossbar chip". <S> Since this is a fairly inefficient way to use silicon resources, the emphasis these days seems to be on using such chips to route very high speed LVDS signals. <A> From their web site : <S> Lattice ispGDX2 - 38 Gbps Bandwidth, 800 Mbps SERDES <S> The ispGDX2 family is Lattice's next generation in-system programmable (ISP) <S> high performance digital crosspoint switch for high-speed bus switching and interfacing with bandwidth of up to 38Gbps. <S> This family combines a flexible switching architecture with advanced high speed serial <S> I/ <S> O <S> (sysHSI blocks), sysCLOCK PLLs, and <S> sysIO interfaces to meet the needs of today's high-speed systems. <S> A multiplexer based architecture and on chip control logic facilitate the high performance implementation of common switching functions. <S> Devices in the family can operate at 3.3, 2.5 & 1.8V core Voltage. <S> The later GDX2 family was announced EOL with a last time buy on March 7, 2011 and last shipments on Dec 31, 2014. <S> These days you can implement a generalized input to output switching function with any number of different low cost FPGAs from the likes of Altera, Lattice, Xilinx and others. <S> FPGA features beyond the simple routing feature often into play because when you get right down to it selectable routing of Inputs to Outputs is rarely just this simple. <S> There is very often the need for clock synchronization, registering, buffering, level conversion, bi-directional signals and specialized gating or control signals. <S> All of these and more can be implemented with FPGAs. <A> What you actually need is a an unbuffered analog crosspoint array . <S> They come in many flavours (I2C or GPIO controlled) and configurations 12x8, 16x8 etc. <S> Take a look at this other topic that I've opened, since I couldn't find a definitive answer over here.
| As long as all the signals are digital unidirectional signals, such as the signals on a few SPI buses, a FPGA can be configured to dynamically route any of N inputs to any of N outputs. In years gone by Lattice Semiconductor has a couple families of configurable devices in their GDX and GDX2 series.
|
Can more than one device read data from GPS? I have an OSD (atmega88p inside), which is reading data from GPS through serial connection as I understand and I would like to connect second device (FEZ Cerb40) to read GPS data, wondering if that will cause any problems, may be serial device can be read only by one device at the time?Could FEZ Cerb40 work as a proxy (I mean read data from GPS for it self and then pass same data further)? <Q> You can electrically buffer and route the serial signal from the GPS to as many devices as you like. <S> This does not work for the line to send to the GPS. <S> Only one device can send to it, but any number can listen. <S> As long as the single sending device sets up the GPS to produce a stream that the other devices can interpret, then all should work. <S> Note that I mentioned buffering. <S> Only a limited number of electrical loads should be on the GPS transmit line. <S> If too many, then the line will be loaded too much. <S> This can cause invalid signal levels or low pass filter it to oblivion. <S> If the multiple devices are just additional CMOS inputs on the same board, then there is unlikely to be a problem. <S> If the multiple devices are dispersed and want to connect to a RS-232 as apposed to digital signal, then you have to consider the loading of each device. <A> In general, it is easy to have communications from one device routed to many, and harder to have communications from many devices routed to one. <S> The ease or difficulty of having multiple devices receive data from the GPS device will primarily be a function of the extent to which the data recipients have to talk to the GPS device in order to get information from it. <S> For this approach to work, it should be possible for each of your devices to identify which communications from the GPS it is interested in, and which ones it isn't. <S> Proxy devices can be useful in cases where many devices would each want to be able to issue their own requests to a common device. <S> The complexity of the proxy can vary considerably based upon the extent to which it must keep track of the common device's state or the individual devices' perception of it. <S> If, for example, once device is expecting to be sent coordinates in decimal degrees, while another is expecting coordinates in degrees-minutes-seconds, a proxy device could precede GPS requests from the first device with a command to switch to decimal mode, and those from the second with a command to switch to DMS mode, or a proxy could always request coordinates in decimal mode and convert them to DMS mode when handling coordinate requests from devices expecting that format. <S> If all devices will want coordinates in the same format, it would be easiest to simply set the GPS device to use that format and then ignore the issue, but if the devices expect different formats, each of the other approaches will have its own advantages. <A> The G-OSD II Mini OSD System with enhanced GPS module looks very interesting and specifically designed for aviation hobby market. <S> GPS modules for tracking have two types of serial ports RS232 and std logic levels. <S> Given the size of this system, there is no need for long distance communication and RS232, so std UART signals would be expected Rx, Tx & Gnd. <S> Loading on signals and ground <S> noise coupling of multiple digital systems may require the use of ferrite torroidal filter to isolate common mode noise, but I suspect you can easily monitor Rx with several devices but only control from one. <S> This UART communication is probably a primitive subset of serial ports, so there wont be any handshaking hardware signals just a 3 wire interface. <S> Setup the device for the best data rate possible without interfering with the OSD processing unless their improved version has a fully buffered UART to prevent overruns during video processing. <S> Since this is custom, and I do not have the specs, just the pictures of wiring, you can expect the GPS data to come out the serial port as a pre-defined periodic burst of data e.g. every second or on demand. <S> If it is really improved, then the information rate may support more frequent updates without being polled for data. <S> Usually for flying, you don't often need to change the data format, just want it to come with steady updates for real-time fast tracking purposes. <S> Automotive and aeronautical GPS types for commercial use would have a totally different set of requirements. <S> I believe this GPS device may be similar to almost all the APRS trackers on the market that support NMEA 0183 with 4800 Baud, but it may have a few pleasant surprises.
| If one device can ask it to output all of the information which the other devices will ever need, then you may be able to connect the GPS device's input to one of your devices, which will feed it the appropriate request(s), and while the data output gets routed to all of your devices.
|
How do I solder headers so that they always stand straight up? When soldering headers, usually single and double pins, I flip the board over so the pin rests on the surface and then solder them. They never come out straight. It would be great if someone has figured out how to do this correctly? <Q> If these are boards that you are designing, then is there something you can do to make it easier to solder header on straight. <S> If you stagger the holes like this: (image and concept from SparkFun <S> ) <S> ...then the header will essentially lock into place when you insert it. <S> Doing it this way, you probably won't even need any special soldering techniques. <S> If you're using Eagle, SparkFun's library has many pin header footprints that "lock" like shown. <A> Solder ONE PIN . <S> Reheat the solder while pushing down to make sure the element is flat. <S> When convinced, solder the rest of the pins. <S> As a last step, reheat the original joint just to make sure it wasn't moving as it cooled, which is a bad thing for a solder joint. <S> This technique works equally well for through holes and SMT. <S> I've used a PCB cradle with a foam cushioned arm that works pretty well. <S> You can hold down elements and then rotate the board. <A> If I'm soldering parallel rows of headers, I'll often put the headers into a solderless breadboard and put the board on top, and then solder the pins. <S> The breadboard keeps the headers nice and straight during soldering. <A> I have a few techniques that I use from time to time: Solder one pin while holding the opposite end. <S> Reheat the solder and straighten. <S> Use painters or masking tape to hold the pins in place, especially when the pins aren't on the board edge. <S> Again, solder one pin, then straighten as needed. <S> If you have the PCB in a vise or "helping hands", use another helping hands to hold the pins in place. <S> If you're soldering a lot of something to a board, and making multiple boards, it may be worth your time to make a jig. <S> I do this for LED's as well as various connectors/headers. <S> The jig can be wood or plastic (beware of ESD, though). <S> I use a drill press to make holes of the correct depth. <S> Populate the board with the headers, place the jig over it to hold the pins/LEDs and then turn the whole thing over. <S> The jig will hold the PCB in place as well as keep components straight. <S> This depends quite a bit on your board design, so your mileage may vary. <A> I fix components (one at a time) with school putty (the white putty that leaves no marks) before soldering. <S> WOrks very well.
| Depending on your setup, you can solder the pins in straight with no further adjustment (check before you solder additional pins).
|
Close a circuit at specific input frequency I have several very simple circuits comprising of a battery connected to a LED. Additionally I have an input signal at some frequency, which I need to use in order to control these circuits. What I need is a switch for each circuit that closes it in response to a specific frequency in the input. For example, in response to a 100Hz input circuit A closes, and when switching to 120Hz circuit B closes (while A reopens). I need it small and simple, please be gentle I'm a biologist. Thanks! <Q> The "Typical Applications" section in the data sheet gives some examples how to use it. <A> Unless you have a lot of different frequencies, I would not do a FFT. <S> Instead, multiply the incoming signal by the sine and cosine of each of the frequencies you want to detect. <S> I go into more detail at Reading frequencies without filters . <A> For the simplest hardware, an audio ADC coupled to a DSP (such as dsPIC) running an FFT-based algorithm would be hard to beat. <S> (I'm assuming all of the LEDs can be connected to a common decoder.) <S> For a more detailed answer, please provide some additional details about your situation: <S> Are the input tones pure sinewaves? <S> Can more than one tone be present simultaneously? <S> What is the amplitude of the input tones? <S> How accurately are the tone frequencies generated?
| In other words, instead of asking what frequencies are present in the signal, you ask whether any of a specific set of frequencies is present. The NE567 PLL tone decoder ( datasheet ) is an IC for exactly your purpose.
|
Does lack of MMU make any difference for applications? Generic Linux can't be run on Cortex M3 because Cortex M3 has no MMU . Okay, there're special versions of Linux that can run there. The problem is I don't quite get how this affects application software. Suppose I have some application - any user application, let it be ZIP unpacker as an example. I have it in source form and can compile it for ARM. Will it run on Cortex M3 that has no MMU? How do I know if lack of MMU will affect any given program? <Q> There are several things that an MMU gives you: Memory Protection: <S> In a multitasking environment this prevents one buggy program from affecting another program. <S> For example, if the buggy program tries to write to a memory location using an uninitialized pointer it might overwrite code or data for the good program. <S> Memory protection prevents this by putting restrictions on what memory each program can access. <S> Memory Translation: <S> The MMU does a "logical to physical memory address translation". <S> Memory is normally split up into blocks or pages. <S> Sometimes, especially after a multitasking system has been running for a while, the physical memory pages can get all mixed up into discontinuous chunks. <S> The MMU can rearrange these pages to create virtual memory chunks that are contiguous. <S> Think of this like defragmenting a hard drive, but with memory and without the time-comsuming copying/moving of data around. <S> Virtual Memory: <S> More sophisticated OS's allow for virtual memory, where the apparent amount of RAM in a system is larger than what is physically installed. <S> The extra memory is usually located on the hard drive. <S> When a program tries to access a page of memory that is not physically located in main memory the MMU informs the OS. <S> The OS then loads that page of "memory" into main memory. <S> If main memory is full, another page of main memory is transferred to the hard drive to make room. <S> The MMU and OS do this fairly quickly, and in a way that the program doing the memory accessing does not even know it is happening. <S> This was more important back in the days when memory was small and expensive, but it is still used to day for almost all major OS's. <S> MMUs are most important for multitasking systems. <A> The compiler used for the application (or more specifically, the linker) needs to produce a file that the OS loader can understand in order to accomplish this. <S> There are rarely any changes required in the application source code. <S> However, keep in mind that systems that don't have MMUs also don't have virtual memory, so the application and its data will have to fit into whatever physical memory is available, along with the OS itself and whatever other applications you want to have running simultaneously. <A> As I understand it, you need to compile your applications against the given architecture and operating system . <S> In the example of uCLinux, you would need a compatible compiler (like the one CodeSorcery offers here ) <S> and then you'd have to compile your desired applications targeting uCLinux <S> and ARMv7-M. <S> My suspicion is that by targeting uCLinux specifically, it's targeting the memory management code inherent to uCLinux that allows it to run on MMU-less microcontrollers/microprocessors.
| For single tasking systems and many embedded applications, the value of an MMU is questionable. When there's no MMU, the part of the operating system that loads application programs into memory needs to be able to "relocate" the application code to run in the region of memory assigned to it.
|
What does a TRIAC do? I'm hoping someone on here can give me a simple explanation of what a TRIAC does. To give this request some context, I'm an embedded systems software engineer, so I interface with hardware, but I have no formal training in it. I was looking over a schematic for work and I saw a bunch of TRIACs being placed, but I am not familiar with this. I read the Wiki, but it's a bit much for me. Can some one give me a basic example of what a TRIAC does and why you'd need them? EX. I know a resistor, resists the flow of electricity I know that a capacitor stores electric charge I know diode's allow the flow of current in only one direction. So like these basic concepts, can someone explain a TRIAC to me? Thanks. <Q> A triac is used to control an AC load, just like a transistor can be used to control a DC load. <S> It is drawn like a couple of diodes in each direction which are then triggered to turn on. <S> They will turn off when the current drops below a certain threshold. <S> So if you just want it on or off you leave the signal on or off and at the next zero-crossing of the AC it will be in that state. <S> You can also get fancy and turn it on only sometimes, which is where the microprocessor programming comes in. <S> Once you have a zero cross detector you can then turn it on in a "gentle" manner as well as keeping trac of percentages on/off if you are trying to reduce the power or control a speed by leaving it off for some cycles. <A> What it does is to close a contact between two terminals when a current is applied to its "Gate". <S> It will continue allowing current to flow until it drops below a certain threshold. <S> It can be seen as an alternative to the relay. <S> See also this question <A> A triac is a structure which can be seen as two transistors intertwined. <S> The transistors act as switches. <S> When the triac is fired (pulse on the gate) one transistor is switched on, which in turn switches the second transistor on. <S> Then the second transistor keeps the first one switched on, even after the pulse was stopped. <S> That way a short pulse switches on the triac, and both transistors keep each other on until the load current is removed.
| A triac is basically an electronic switch for alternate current.
|
Is the theory of operation behind my FPGA design acceptable? (This question is somewhat related to a previous question of mine.) I'm trying to use an FPGA to drive an LED strip which contains several WS2801 ICs. ( WS2801 datasheet )The operating premise of the WS2801 is simple - clock in 24 bits of data (8 bits each for R,G,B) and then leave the clock low for 500µs. This causes the WS2801 to latch the data and change the LED color. If you have a strip of multiple WS2801s in series, you clock in 24 bits * (Number of ICs) and then hold the clock low to latch 'em all up. Simple, right? So, I have created a "WS2801 Test Driver" module, clocked at 2MHz. (Datasheet claims it can run as fast as 25MHz but I have yet to test this in practice). Basically, my driver is a shift register (with a pre-loaded 72-bit value) and a counter.Why 72 bits? I wanted to test a string of 3 WS2801 ICs. In practice, I need to load in data from some kind of buffer...thing. (Any suggestions for that would be appreciated but that seems mostly out of the scope of this question.) Here's a simple block diagram: I will add a more accurate block diagram in a little bit, I don't think the clock enable is shown accurately. The clock is shared between the shift register and the counter. After 72 ticks (all the data has now been shifted out), the counters output goes low, disabling the clock output and preventing data from shifting out. This is the start of the 500µS clock delay. The clock is obviously still running the counter, which continues to keep counting. Now the counter waits 1,000 ticks and then drives the output high, enabling the output clock and serial data output. Why 1,000 ticks? - At 2MHz, the period is .5µs. To get to 500µS,we need 500/.5 = 1,000 ticks. In practice, I've found I need to add a little fudge factor - 1,032 ticks, actually. This might be due to poor clock routing or propagation delay or something of that nature. I haven't really looked into it yet. The design as implemented seems to work OK. I looked at the outputs on a logic analyzer, everything seems fine and I'm getting the colors on the LEDs that I expect. My question is: Is this a good design? If there is a better method of going about this, please suggest! If you read the link to my previous question: Does it seem like this design will integrate nicely into the bigger picture of creating an FPGA based Ambilight clone? Thanks for reading! <Q> That gate causes delay. <S> This can make the clock at the receiver come after the next data gets there, causing hold time violations. <S> Otherwise your design is reasonable. <A> What are you expecting the FPGA to be controlled by? <S> If something is going to be feeding 72 bits into it, I would think that thing may as well just drive the LEDs directly. <S> Otherwise, if you want something to test the lights, it might be good to design a test-pattern generator which could switch between a few output modes (e.g. all white, all dark, alternating light and dark, cycling black/red/green/blue (repeatedly clock out eight ones and 24 zeroes), etc. <S> Perhaps a cool looking smoothly-fading rainbow pattern might be pretty too. <A> I'll add a bit to Brian Carlton's answer. <S> Within an FPGA, it's correct; gated clocks are not at all recommended. <S> And the flip-flops will have a separate ENable input so that it's not necessary. <S> In your case, though, because your gated clock only goes to the output pin and isn't used internally to the FPGA, you can gate your clock without penalty. <S> The way to do it is to make sure the clock gating is done in the output block. <S> Assuming you're using Xilinx, instead of instantiating an OBUF for your clock output, use an OBUFT , and you'll get access to the tristate pin of the output buffer. <S> If you're using another vendor's FPGAs there will be an equally easy way to do this. <S> If you prefer to do this using inference rather than instantiation, you'll need to be sure to enable an option during compiling to push logic into IO blocks. <S> If the gated clock does actually fan-out (but you didn't show it in your diagram), you'll also need to enable an option that allows duplicate logic to be generated.
| In general gating a clock is a bad idea.
|
Transistor question and is my circuit safe for Raspberry-Pi? This is my first circuit designed from scratch (that actually does something interesting), so please be patient with the beginner's mistakes (and maybe point them to me). My circuit is the following: What the circuit does is: When switch SW1 is open, the D2 LED turns ON and the D1 led turns OFF When switch SW1 is closed, the D2 LED turns OFF and the D1 led turns ON (they switch state) Most probably this circuit has a common name (astable ?) but I don't know it. I've tested the circuit at 9V (with R1 & R2 at 470 ohms) and it workes like a charm. This circuit will be used with Raspberry-Pi's GPIO. Basically, the SW1 will be replaced by a GPIO pin. My questions are: Is it ok what I did there with Q2 by not using any resistor for the base ? Considering that the GPIO pin will create a -3.3V drop when ON and the GPIO on Rasperry-Pi has no protection (AFAIK) and the 3.3V is supplied by the Raspbery-Pi itself: is this circuit safe for my Raspberry-Pi ? I've read in some place that by drawing to much current from GPIO may brake the device, but I still didn't wrap my head around how a circuit may draw more current than what it's given :( Thank you! <Q> Put a resistor at the base of Q2 because it is required for D1 to turn on, otherwise it will suck up all the current that Q1 can provide and the voltage will not rise much more than 0.7V. <S> As it stands, Q2 will try to short the power supply when turned on. <S> Use a pnp instead, and in series with D2 and R2. <A> The major issue here as brought up already is that you are shorting your source when the switch is closed. <S> Whenever you use a npn bjt as a switch it is good practice to place a resistor on the base for current draw since \$I_c = <S> beta*I_b\$. <S> You will run into a substantial current draw through Q2 since the current through R1 is \$2.6v/100ohms = 26mA\$ and depending on what your GPIO pin sources it could lead to a big current through the base of Q2 (current division) which can lead to bigger current through the BJT causing you to fry your pin. <S> I think a better configuration would be to tie both the bases of an NPN and PNP to that pin and put the LED with a current limiting resistor in series with each BJT that way when the switch is open you will turn on the PNP and when closed you will turn on the NPN. <S> Note: always make sure you saturate your NPN. <A> About the question 1, it is not necessarily wrong <S> provided that you have a load between its collector and the positive or between its emitter and the negative, and its impedance is high enough to reduce the current through the transistor. <S> That's the main problem here: <S> Q2 is shorting the battery, which will probably result in one of two things: fry the transistor or exhaust the battery (or maybe both). <S> So my advice: put the LED and the resistor in series with Q2, not in parallel, and use a PNP transistor for Q2 instead of an NPN. <S> About the question 2, if you want to wire a GPIO to the circuit to replace the switch (i.e. connect it to the 100K resistor), I don't see a problem, the resistor is high enough to limit the current drawn from the board. <S> Of course you'll have to remove the switch, because if it is closed when GPIO is high, you'll be shorting the GPIO output to the ground.
| It could be a problem if you tried to power an LED directly from the GPIO.
|
Ways of Switching between Two Sim Cards I'm interested in building a circuit to switch between 2 sim cards, and found a design guide by GSM module manufacturer Telit. ( New design guide link here, see pg. 16+ ) In particular, "Figure 6" of this guide shows the use of a p-channel MOSFET to switch the SIM Vcc on and off, and there's a separate multiplexer for the data, clock, and reset lines. I was wondering what the alternative ways of doing this were, and what affect they might have. For example, would it be possible to remove the multiplexer and simply control the SIMs using the MOSFET, or would it be possible to use a switch on only the data line, and share the power, clock and reset between the SIM cards? I know the voltage on SIM cards can be either 1.8V or 3V, so maybe sharing the Vcc line would cause issues? <Q> That is an excellent guide and seems to cover the relevant points well. <S> After having read the guide, why do you think that you can cut corners and use simply interconnected pins? <S> It MAY in fact be possible in practice, but it is not obvious that it would be safe or reliable (even though it may be :-) ). <S> Joining the pins from two SIMS together and powering or enabling one but not the other will result in the unpowered SIM loading the lines to and from the powered SIM and may lead to phantom powering of the "unpowered" SIM. <S> Note the note on page 17 that says that fig 6 (and so probably fig 7) will not work with 1.8V supply and that the circuit of fig8 is required for use with 1.8V supply. <S> A multipole mechanical relay would meet the need. <S> With care less than 4 poles could be used (eg Vcc could be left live with proper attention to levels.) <A> As soon as you have different power voltages for the SIMs (or power at one SIM and no power at the other SIM) you can not share any data, clock or reset lines, because protection diodes inside the SIM will shorten data, clock or reset signals to the lower power voltage of one of the SIMs. <S> It might be possible to share power, clock and data lines but use separate reset lines to deactivate the particular SIM you don't want to use by keeping its reset low (active low). <S> It is possible that your "1.8 V card" not only supports supply voltage class C (1.8V) but also class B (3V). <S> In that case it can be operated also at 3V. You can find out by analyzing its ATR (answer to reset). <S> The details of power-up sequence and procedure of switching between supply voltages is described in specification ETSI TS 102 221 (can be downloaded from http://www.etsi.org/WebSite/Standards/Standard.aspx ) section "6.2 Supply voltage switching". <A> If you try to control the shared bus with VCC FETs only and leave one of the power FETs open, it will not short the signals, but... <S> Instead, toggling on any lines on this SIM (data or clock or reset going high) will cause the voltage build-up (pulses will be rectified via built-in ESD clamping diodes), and the SIM would become active (or intermittently active), which will cause bus contention during host transactions. <S> It will be a real mess. <S> The dual SIM circuit will NOT work without full multiplexer. <S> You need to follow the design guide, it is there for a reason.
| A 4 pole double throw mechanical switch would meet the need if manbual switching was OK.
|
How to calculate phase shift between two sine wavefroms I two sinewave signals with same frequency. I want to measure phase shift between two signals. There will be a small phase difference between two signals. I am using ATmega32-A micro controller and external ADC AD7798 to read the voltage of both signal. I am able to read both signal voltages using SPI communication. How to find Phase difference between two sine signals. I am using CodeVisionAVR compiler. I know that phase shift between two signals can be find out using the fallowing formula. A(t)= Am sin(Wt+/-theta). I know only amplitude(Am) and w =2*pi*f. But How to calculate phase difference between two sinewave signals with knowing amplitude and frequency. Any suggestions please. I have implemented timer functionality to get zero crossing points using the fallowing code. void main(void){ init(); //Initialize controller debug = 0; //Controls output during motor running while (1){ if(rx_counter0) getCom(); if(Command) runCom(); if(logInt > 0){ if(now){ if(!(unixTime % logInt)){ if(flag){ flag = 0; } now = 0; } } } #asm("WDR"); //Reset WD timer } // EOF "while(1)" } // EOF "main(void)"void init(void){#asm("cli"); //Disable global interrupt// Input/Output Ports initialization// Port B initializationDDRB=0xBF;// Port C initializationDDRC=0xC3;// Port D initializationDDRD=0xFC;// USART initialization// Communication Parameters: 8 Data, 1 Stop, No Parity// USART Receiver: On// USART Transmitter: On// USART0 Mode: Asynchronous// USART Baud Rate: 9600UCSRC=0x86;UBRRH=0x00;UBRRL=0x67;UCSRA=0x00;UCSRB=0xD8;//UCSRC=0x86;// ADC initialization// ADC Clock frequency: 1000 kHz// ADC Voltage Reference: AREF pin// ADC Auto Trigger Source: None// Digital input buffers on ADC0: On, ADC1: On, ADC2: On, ADC3: On// ADC4: On, ADC5: On//DIDR0=0x00;ADMUX=ADC_VREF_TYPE & 0xff;ADCSRA=0x84;//Global enable interrupts#asm("sei")}unsigned int timer_phase (void){ ResetTimer1(); //reset timer to zero while(selcase(1) > 0) { //do nothing until input channel crosses zero } StartTimer1(); //start timer counting while(selcase(5) > 0) { //do nothing until output channel crosses zero } StopTimer1(); //stop timer counting time_delay_ticks = get_timer_ticks(); //get the number of timer ticks between zero crossings time_delay = ticks_to_time(time_delay_ticks); //need to get timer ticks into time domain period = 1 / WaveFreq; //get the period from the known frequency phase_delay = (time_delay_ticks / period) * 360; //calculate phase delay */ return phase_delay;} interrupt [TIM1_COMPA] void timer1_compa_isr(void){ unixTime++; now = 1; }void StartTimer1(void){ TCNT1H = 0x00; TCNT1L = 0x00; //Start counting from 0 OCR1AH = 0x0E; OCR1AL = 0x0E; //Timer 1 reload value OCR1A = fCLK/(fOC1A*2*n)-1 REMEMBER 2 * OCR1A! TIMSK = 0x02; //Enable timer 1 output compare A interrupt TCCR1A = 0x00; TCCR1B = 0x0D; //Start timer 1 in CTC-mode (4) with prescale 1024} void StopTimer1(void){ TCCR1A = 0x00; TCCR1B = 0x00; //Stop timer 1 TIMSK = 0x00; //Switch of interrupt} void ResetTimer1(void){ TCCR1A = 0x00; TCCR1B = 0x00; //Stop timer 1 TCNT1H = 0x00; TCNT1L = 0x00; TIMSK = 0x00; //Switch of interrupt}unsigned int get_timer_ticks(void){ unsigned int i;i= TCNT1H;i= i|TCNT1L;return i;} when i run this code I am not getting any errors, But I am not able to enter any command from hyper terminal. When comment this whole function then only i am able to get output and i am able to enter commands from hyper terminal. Help me if any thing with timer function start and stop and reset and get_delay_tricks. Or any thing wrong with interrupts. <Q> Many micros have hardware that allows a free running timer to be captured based on some external edge. <S> The difference between the two timer snapshots tells you the time between the zero crossings. <S> The difference between the zero crossing of the same signal tells you the period. <S> The phase shift in units of a whole cycle is then just the time offset between the two signals divided by their period. <S> If you need this value for direct user display in degrees, then multiply it by 360. <S> However, there is no need to use degrees or any other particular unit inside the micro otherwise. <S> In fact, the most useful way to represent angles in a micro is to use the full range of whatever the most convenient unsigned integer is to represent a full circle. <S> That way angle additional and wraparounds <S> just work without any additional logic. <S> It also makes it easy to index into a table, like to get computing sine or cosine for example. <A> If your time delay is \$t\$, and the period of the sine wave is \$T\$, then $$\frac{t}{T} <S> \ <S> \ <S> = <S> \ <S> \ <S> \frac{\phi } <S> {360}$$ <S> This will give phase (\$\phi\$) in degrees. <S> If \$t\$ is negative, that would mean that the output lags the input, and positive is when the output leads the input. <S> If you can see the sine waves well enough to measure the time delay, then you also know the period \$T\$ (peak to peak time), and frequency in Hertz is <S> \$1/T\$ <S> Algorithmically, your task is tougher. <S> Your best bet is a cross correlation between the input and output to calculate the time delay, and an autocorrelation to figure out the frequency wikpedia entry on cross-correlation . <S> If you have the computational oomph, you can use FFTs. <A> You need to use Olin's idea of determining the zero crossings of the signals to get the time delay. <S> Then plug the time delay into Scott's equation to get the phase delay. <S> The following is pseudo-code. <S> I'll leave it up to you to implement each function since they should either be trivial to implement or you should already have something similar written. <S> reset_timer(); //reset <S> timer to zerowhile(get_amplitude(INPUT_CHANNEL) <S> > 0.0){ <S> //do <S> nothing until input channel crosses zero}start_timer <S> (); //start timer countingwhile(get_amplitude(OUTPUT_CHANNEL) <S> > 0.0){ <S> //do <S> nothing until output channel crosses zero}stop_timer <S> (); //stop timer countingtime_delay_ticks = <S> get_timer_ticks(); //get <S> the number of timer ticks between zero crossings time_delay = ticks_to_time(time_delay_ticks); //need to get timer ticks into time domainperiod = 1 / frequency; //get <S> the period from the known frequencyphase_delay = <S> (time_delay / period) <S> * 360; //calculate <S> phase delay <S> It's important to read the documentation on the timer you will be using so that you know how to convert from timer ticks into time. <A> If your sine waves are of equal size/voltage/intensity then the easiest way is to simply add them together, then measure the amplitude of the resulting wave. <S> If the phase shift is 0 deg <S> then the result will be a sine wave twice the original amplitude. <S> If the phase shift is 180 deg <S> then the result will be zero amplitude. <S> Phase shifts in between will result in, well, something in between. <S> If your sine waves are not of equal amplitude, or there is noise in the sine waves, then this might not be the best way to do it. <S> But if it is, then this method is super easy! <A> In short: Looking for zero crossings is very crude because it uses the least amount of available information from your signals. <S> Auto-correlation is better and is a particularly good choice for signals that are pulses. <S> Since you have sine waves <S> least squares curve fitting will give you the best result. <S> Fit each curve separately then compare the phase results. <S> This uses all the available information from both signals. <S> [As I recall (in this special case) this is equivalent to a Fast Fourier Transform approach but computationally more efficient.]
| If you know both signals are sines, then comparing the time difference of their zero crossings is probably the easiest approach.
|
How could I create two separate ground areas with Proteus? I need to design a PCB layout to a system using an isolated communication with optocouplers, what means that I need separated ground areas, each one on one side of the communication that I want to isolate. So, is that possible to do it? How could I do it in a simple way? <Q> You should not call both of them "ground" if they are isolated from each other. <S> Create the second one as its own net with a different name. <S> Vss is a popular choice. <A> As for with the LM319, two GNDs are separate - for example, pin 6 and 8. <A> You can solve your problem using the ground terminal in both sides of your schematic as the image below. <A> @borges:"Just ignore the link between them" ? <S> Terrible idea. <S> If you're going to bother using a PCB design package at all, why design your circuit such that fundamental Design Rule Checks can't be used at all? <S> That's the whole point of these programs! @OPIn <S> ISIS / schematic layout (depending on Proteus version) go to Tools -> Configure Power Rails. <S> From here you can create a zero-volt power rail and name it something suitable. <S> It is common practice to have different visual symbols for separate grounds, which removes ambiguity when reading the schematic, but you need to know how to create your own symbols first. <S> If it's just you reading the schematic <S> you can probably survive fine using the standard POWER symbols and naming them differently. <S> Proteus comes with GND and CHASSIS power pins by default; there's nothing stopping you adding a new entry to the list. <S> However, you MUST pay attention to hidden pins in IC circuit symbols. <S> A typical logic IC, let's say a 4001 or a PIC, will hide it's power supply pins from the schematic to save unnecessary clutter. <S> You need to edit the properties of any such component and find the Hidden Pins button (top right hand side of properties window) and make sure the supply pins go to the right nets.
| The point is that in the layout process you have to draw two different ground areas and just ignore the link between them as is shown in the image below.
|
how to electrically isolate a PCB from a heat sink I have a set of LED driving lights on my motorcycle that must be wired through a ground-leg pulse width modulation dimmer . The problem is the mounting bracket for the lights is grounded, so the lamp shorts to ground through the motorcycle chassis and the PWM dimmer cant dim the lamps. I had solved this issue by isolating the lamps from the motorcycle's chassis at the mounting point , but this has proved unreliable in the rain, and the brackets I had to use weren't up to the task and eventually broke. I now need to look at internally isolating the lamp housing from the ground leg of the circuit. I had hoped that when I opened up the lamp there would be a separate grounding lead screwed to the light housing that i could simply disconnect, but it appears that the housing is grounded simply by the contact between the PCB and the housing, plus the PCB mounting screws. My first thought was to just put some small rubber o-rings between the PCB and the housing, and switch from steel to nylon screws for mounting the PCB, but then I remembered that the LEDs need a thermally conductive path to the housing for cooling. So the question: how to provide a thermally-conductive, electrically-insulated mount for this PCB? I've seen mention of mica washers, some mention of electrically-insulating heatsink compound, but nothing that seemed authoritative enough to scream "answer." The PCB is probably 7cm square, and it is surface-mounted to the lamp housing/heat sink by 4 screws, one at each corner. The PCB's entire back appears to be aluminum--actually it looks more like the PCB is aluminum . More likely there is a very thin PCB laminated onto a piece of aluminum stock, pretty cool really, first I've seen like that. <Q> Typical solutions I've used are either Kapton tape : <S> Or Sil-Pad : <S> Sil-Pad 400 is a composite of silicone rubber and fiberglass. <S> The material is flame retardant and is specially formulated for use as a thermally conductive insulator. <S> The primary use for Sil-Pad 400 is to electrically isolate power sources from heat sinks. <S> If you use a sil-pad the screw will still electrically connect the componet tab with the heat sink. <A> I can't think of a reason why a dimmer module and lights cannot both be grounded to the motorcycle, and not work except that the "IQ-170 Intelligent Lighting Controller" dimmer is actually not so intelligently designed. <S> The geniuses who came up with this certainly did not have an IQ anywhere near 170. <S> They didn't consider lights that are grounded to the chassis via their mounting hardware, and rely on that for heat dissipation too. <S> A properly designed dimmer will control the V+ side of the light, and not require its ground to be lifted, which, as you can see, creates difficulties. <S> You have a very good reason for returning this thing: it is technically flawed. <S> I would contact the company for technical support. <S> Perhaps the module can work on the other side of the lights. <A> What about Chomerics tape? <S> It's non electrically conductive and very thermally conductive. <S> http://www.chomerics.com/products/thermal/phase-change/index.html <S> Kind of looks like double stick tape when it's cool and turns into a sticky goo when it's hot. <S> You might still need a clip or something to hold your heat sink down. <A> How to provide a thermally-conductive, electrically-insulated mount for this PCB?" <S> " How about electronics grade silicone , Just a thin coat.
| A solution to this is to use a shoulder washer to isolate the screw and the tab: The bracket of the lights is most likely grounded by design.
|
Is a capacitor considered a solid state device? Based on a description I read here. Solid-state electronics are those circuits or devices built entirely from solid materials and in which the electrons, or other charge carriers, are confined entirely within the solid material. I was thinking Caps are usually built of "layers" of "stuff" (paper, plastic, glass, mica), but they can also have fluid in them (electrolytic), which is not solid. The article I was reading mentioned that vacuum tubes aren't solid state because they contain/use gas, so would that be the same for a capacitor? or are they generally considered solid state devices anyway? <Q> For the 1st half or so of the 20th century, vacuum tubes (or "valves") were used for rectification (diodes), amplification (triodes, tetrodes, pentodes, etc.), and, for most of the 20th century, displays (CRTs). <S> In these devices, a space current of electrons exists between the cathode and anode, i.e., the charge carriers are transported through a vacuum <S> *. <S> In the 2nd half of the 20th century, semiconductor technology advanced and rapidly rendered vacuum technology obsolete (except for CRTs). <S> In semiconductors, the charge carriers are transported through the crystal lattice of the solid semiconductor, thus the term "solid-state" to distinguish these types of devices from the vacuum devices. <S> Generally, this is the context in which "solid-state" is used and understood. <S> In the case of capacitors, the dielectric doesn't support charge transport, i.e., there isn't a flow of charge carriers through the dielectric in a properly functioning capacitor so the dielectric falls out of the scope of the definition you've quoted. <S> *with some exceptions. <A> "Solid state" is just a marketing term which means "the amplifying, switching and rectifying components are semiconductors and not vacuum tubes or relays." <S> A transistor radio containing an alkaline battery is still "solid state". <S> Note that a "solid state relay" is not an alternative to anything in which electrons move through liquid, gas or vacuum. <S> In a mechanical relay, electricity moves through copper! <S> So "solid state" essentially means something like "semiconductor-based alternative to old-fashioned Rube Goldberg contraptions that require boiling electrons off a heated cathode, or place moving parts into the circuit". <S> In this sense, solid is perhaps no so much reference to a phase of matter, as a hint about the durability and reliability. <S> The origin may be "solid state physics", but the average consumer doesn't know that, and the term is applied to an entire device ("solid state audio amplifier"), which includes components that are not the result of solid state physics (such as wires, resistors, inductors, capacitors, ...). <A> Solid state devices are defined by the conduction properties with the physical layer being motion of electrons and holes carrying current. <S> Although diodes and caps are both considered passive devices, Capacitors are defined by the delectric insulating properties as the primary function. <S> They may be used to store energy, block DC, resonate with inductive parts whereas the leakage and series conductance are non-ideal properties. <S> Polarized capacitors may have zener diode like leakage, but their primary purpose is the dielectric properties (phase shift, time delay) rather than the conductance properties of leakage current or series losses or motional noise. <S> Devices which are not solid-state devices include vacuum tubes (thermionic emission) PTC,ICL (poly-phased conductors), tungsten filaments, (thermonic IR emitters which also give visible light), and of course Capacitors, and "batteries not included" as well ;) Devices which are considered Solid State include Liquid Crystal Displays (LCD) due to non-linear controlled polarization states of the crystal structure within the liquid, and of course LED's and OLED's. <S> The begining of "Solid State" Physics was Xray diffraction in crystalography in 1912 and SS devices were initially developed by Schlockey et al in 1948. <S> The crystalography properties for electronics are what defines "Solid State devices", even though LCD's have a liquid medium, the crystal lattice atomic properties are what defines this field in Physics and Solid State devices. <A> Now to complicate the issue ... <S> How about solid state capacitors? <S> i.e. ones that are made in a semiconductor process of Oxide growth and deposition and patterning? <S> Thats really the answer there isn't? <S> Solid state is a description of manufacturing not necessarily of what the device is or dones. <S> So a capacitor is both a solid state and a non solid state device. <S> But solid state in the early years of consumer electronics actually was used to describe how components where joined together with the first "solid state" TV's using what we today would call PCB's or PCA's or PWB's. <S> Prior to the PCB revolution component leads were soldered together and perhaps even wirewrapped in production. <S> So another use of the term.
| Solid state devices arose from solid state physics and so that use is appropriate.
|
What motion sensor to use for human breathing I need a cost sensitive, reliable, durable motion sensor to track if a baby is breathing or not. This is for use in a university challenge project I hope to win. Any advice on my options are very welcome.[edit] criteria to be followed My project should be cost sensitive should be low power Should be easy to use by untrained personel <Q> Such motion sensors are commercially available. <S> They have a transducer that takes the form of a large, flat pad. <S> This is put under the bedding, and the infant lies on top of it. <S> It is coupled to some transmitter that will activate an alarm on a receiver if the transducer stops detecting movement. <S> So, that is what the successful, commercially available product looks like. <S> A good starting point would be to survey these, get one, and take it apart. <S> In a university challenge project, you don't have to beat a product in the marketplace, but of course whatever you come up with inevitably does get compared with what is out there. <S> All products have limitations because removing all imitations means skyrocketing cost. <S> If you could find one or two limitations of the existing product and improve on them, then you have a "story". <S> Sometimes it's enough to improve on some limitations while introducing or increasing others. <S> From the point of view of a consumer who cares about the limitations you improved, and does not care about the worsened ones, this is an improvement and in the market as a whole, it represents a broadening of the available choices. <S> Do not think you have to monotonically improve something; just making different design trade-offs is interesting. <A> Sounds like a non-trivial project! <S> Especially with regards to the signal processing to eliminate breathing signal from other movement and noise. <S> Have you considered using a low-power infrared laser? <S> Think: long-distance optical mouse. <S> If you are an electrical engineer this would probably require teaming up with a physicist with basic experience in optics. <S> Advantages would be: contactless could potentially be operated from a large distance (e.g. ceiling) possibly relatively cheap if you can modify an existing optical mouse with suitable optics can leverage a PC for prototyping advanced signal processing techniques before trying to implement them in a MCU <A> A technique called " Eulerian Video Magnification " is able to amplify the subtle motions of breathing and pulse. <S> It may be enough that you can then use more traditional image processing techniques to detect if the baby is breathing. <S> http://www.youtube.com/watch?v=u-ikLvzkg5g <S> Cold air is drawn over the sensor during inhalation, and warm air blows out during exhalation.
| If attaching a device to the baby is ok, you could use temperature sensors in front of the nose and mouth, similar to how this device (NasiVent Sleep Apnea Home Test) detects breathing to diagnose sleep apnea in adults:
|
Does a switch need to be debounced when opened? Suppose that an input on a microcontroller has a pullup resistor to 5V and a switch to ground (normally open) connected to it. I know that a switch should be debounced (in my case, in software) when closed, but is debouncing when a switch is opened necessary? <Q> Yes, debouncing in both directions is necessary if you want a guaranteed single edge each time the switch changes state. <S> Fortunately, you don't need any additional hardware for debouncing if the switch is connected to a microcontroller. <S> If the micro has a internal pullup, which many do, you need nothing more externally than the switch between the micro pin and ground. <S> I find 50 ms is a good debounce time. <S> Most switches bounce for well less than that, but a few can be nearly that long. <S> But, 50 ms will still feel instantaneous to a human user, so you might as well be extra reliable. <S> The only difference is the number you count to in the firmware, so no extra cost there. <S> I usually have a 1 ms periodic interrupt for other reasons anyway, so <S> if the switch is in the same state 50 times in a row in that interrupt, then you declare it debounced to the new state. <S> Details on debounce logic in response to comment: <S> Generally you will have a global bit that indicates the official debounced state of the switch. <S> This is what any logic that needs to know which way the switch is set uses. <S> The only additional state you need is a counter, usually a single byte, in the interrupt routine. <S> Let's say the interrupt is <S> every 1 ms and the debounce time is 50 ms. <S> For each interrupt: <S> If instananeous state matches debounced state: Reset counter to 50 DoneIf instantaneous state differs from debounced state: <S> Decrement counter <S> If counter reaches 0: Declare the new debounced state Reset counter to 50 Done <A> Yeah I would use one, the mechanism is basically the same. <S> As you are breaking the contact you will have points in time where the switch is making good electrical contact as well as not making good electrical contact. <S> The same as when you are making the contact. <A> In general, yes. <S> Mechanical switches can produce electrical noise (bouncing) on both close and open. <A> Generally, yes, but it always depends on what you're doing with the digital input. <S> If you're driving an interrupt, though, most likely you should debounce.
| I've had a few systems that absolutely had no need to be debounced in either direction.
|
No silkscreen on board? How common is that? What are the advantages? I'm a young engineer and I just started at my second job. I was surprised to see that the PCBs have no silkscreen. I'm currently working on the redesign of a PCB currently on the field and I'm trying to push for the re-introduction of silkscreen on boards. Some of the responses I get are: boards are cheaper without silkscreen since there are so many 0402 components, the silkscreen won't be readable anyways there are too many vias and placing of silkscreen would be very difficult you can view where the components are on your PC In my opinion, those are not valid responses, but I'd like to know if there are any other companies out there that have similar "practice". Some of the products we produce go from 1000/year to 20K per year. But no silkscreen makes it more difficult to debug/test prototypes and field returns. <Q> Well I've made 1 million units for a product <S> and they all had silkscreen <S> and we fought over the cost of a resistor so it's not that cost prohibitive. <S> Yeah <S> I guess there is a cost associated with that <S> but it's not that much. <S> Also when you need to do rework, or when at the end of the line they are repairing boards that didn't pass testing, you want to be able to say " <S> yeah replace U1 and change R17 to 33 Ohms" without having to haul out the schematic and the layout. <S> Sure some factories will have computers with your drawings out there, and some have dirt floors ;) <S> For 402 components or vias just move your silkscreen, <S> I mean I have 201 components that are labeled properly <S> it's a matter of taking the time to do it. <S> So in short I agree with you <S> I always prefer silkscreen, the only time I don't do it is when I'm making something for a hobby for myself <S> and I'm being really cheap. <S> Even then I usually try to label the parts in copper. <S> Not saying you should do that for a real board though. <A> In my opinion, you should always use silkscreen, as it makes servicing and repairing of device much easier - which is a good engineering practice in general. <S> More specifically, speaking of argumens you mention: Production cost - well, yes, boards are cheaper. <S> A drawback as I wrote above is troubles when servicing and troubleshooting the final device as you (service engineer) are almost unable to find anything on the board. <S> 0402 components - <S> actually I'm almost sure I have seen boards with 0402 components and readable, although not perfect silkscreen. <S> So, not sure how valid this argument is. <S> Vias - correct me if I'm wrong, but I thought vias can be (and usually are) covered by solder mask which negates that argument. <S> You can view some equivalent of the silkscreen on your PC - well, yes, but as a counterargument I can say that you do not need PC when you have silkscreen. <S> I won't make a conclusion as it is gonna be too subjective, but here it is - <S> I can provide some counteraguments for each of the argument mentioned. <S> It is up to you (your boss, marketing team, whoever...) to decide whether you need it. <A> There are cases where adding silkscreen doesn’t make much sense. <S> I am currently using one of those cases. <S> A miniature single-board logic/computer OEM device that is 40x50mm. <S> The components are so closely packed together that there simply is no space for a proper silkscreen. <S> Besides, there are so many BGAs and blind vias that probing is almost impossible. <S> Note that this has nothing to do with reverse engineering (they supply all schematics and even PCB layer drawings for all the versions of the board). <S> And these boards are intended to be incorporated into products and be probed by engineers. <S> Their solution? <S> An accessible PDF of the silkscreen. <S> With our boards I normally find myself reaching for the microscope to be able to read it anyway <S> (is that a 0 or a 6 over that via?) <A> If you are cost driven company ( <S> I´m sure all are) and silkscreen is use only internally (customer never use it) it should be not use like in mine. <S> Reasons:- <S> cost driven (depends on volumes in summary, not single variants or models)- <S> good and readable documentation in PDF will allow you to follow single parts and test points,- important marking like datecode, product number, etc. could be made by opening solder mask on copper (separated island with no signal, or GND or any other). <S> At the end you and your company need to make best compromise and solution for your products. <S> Nice day! <A> Albeit unusual, if you have higher voltage than you normally encounter, I would say 1 kV <S> but your 230 V flyback may count and you are concerned about creepage over time, you may leave out the silkscreen for the entire board or just the area with high voltage. <S> This is due to the PCB having a known CTI or Comparative Tracking Index but the silkscreen does not. <S> In case your are builing an X-ray power supply. <S> If your fresh batch of PCBs are delivered just in time for the manufacturing and there is something wrong, say hairline cracks in the copper, you are in a very tight spot and I have personally seen where all the local PCB companies are called and the fastest one is selected, sent the Gerber files to and you skip the silk screen to save time. <S> Not just any time but the precious rented slot in production that you are running out of. <S> But most probably someone designed it without silkscreen just to cut cost.
| Another reason you run into a board with no silkscreen could be due to manufacturing issues. It clearly shows the locations of components and is actually easier to see.
|
AVR program behavior incorrect after disabling reset fuse I am using an ATtiny13 to drive 15 LEDs from five I/O pins (Charlieplexed). I am using ADC0 (pin1) as input from a voltage divider to provide a speed control. In order use ADC0 properly, I need to disable the reset fuse when I write the program. The problem is, the program behaves differently when the reset fuse is disabled. Instead of all 15 LED's lighting, only 9 are. The 9 LEDs that light involve all 5 I/O pins, in both polarities, so I don't believe I've accidentally changed any configuration to those pins. Here is the command line I use to flash the AVR (using avrdude on wintel) and set the fuses: avrdude -c usbtiny -p attiny13 -U flash:w:program.hex -U lfuse:w:0x6a:m -U hfuse:w:0xfe:m And the schematic: Before setting the fuses, the program works perfectly, lighting the 15 LEDs as expected. The input on ADC0 will reset the micro when the voltage drops low enough, as expected, but otherwise speed control works. Here is a chart to show how the LEDs are connected: LED # AVR PINs I/O PINs 1 5-6 1-2 2 6-5 2-1 3 5-7 1-3 4 7-5 3-1 5 5-2 1-4 6 2-5 4-1 7 5-3 1-5 8 3-5 5-1 9 6-7 2-310 7-6 3-211 6-2 2-412 2-6 4-213 6-3 2-514 3-6 5-215 7-2 3-4 After disabling the reset fuse, LEDs 1 through 9 work, 10 through 15 do not. There is a slight flicker detectable on LED 13. ADC0 speed control works through the full range, without resetting the micro. I am thoroughly confused. Can anyone advise? Edit: In case it matters, this is using an SOIC-8 package. Previously I've used a DIP-8 and not had this problem. <Q> I discovered the solution to this problem! <S> I wrote a batch file to compile the code, convert to hex, and write to the microcontroller in one go. <S> To avoid accidentally disabling the reset fuse, I wrote a second batch file. <S> At some point, I was experimenting with different optimization levels with avr-gcc. <S> My command line parameters for avr-gcc included <S> -O3 <S> in both files. <S> I discovered that this level of optimization was unreliable and caused some issues. <S> I changed it back to -Os <S> but only in the first batch file, not the second. <S> So, the code behavior change was a result of an incorrect optimization, which was used only in the script I used to also disable the reset fuse. <S> It was finally caught by an astute coworker who noticed the difference in the two scripts. <A> You have no bypass caps between VCC and GND. <S> Power supply noise is likely your problem. <A> This is a bit of a wild guess, but the following snippet from page 103 of the datasheet may be relevant. <S> See “Alternate Functions of Port B” on page 54 for description of RSTDISBL and DWEN fuses. <S> When programming the RSTDISBL fuse, High-voltage Serial programming has to be used to change fuses to perform further programming. <S> Once you've programmed the RSTDISBL fuse, you'll need to use high voltage programming to do any further programming of the device. <S> It appears you're using the USBTiny which cannot do high voltage programming.
| What may be happening is that the first programming cycle has worked as expected because the RSTDISBL fuse was programmed last in the avrdude invocation, but subsequent attempts are failing due to the RSTDISBL being programmed and preventing the part from going into serial programming mode.
|
If a wire is rated 10A, 120v AC. How many amps could I put through it of 13.8v DC? I am using a wire that is rated 10Amps at 120v ACwith a car headlight and a SLA battery. About how many amps could this wire carry before getting warm or melting of DC current at 13.8volts? <Q> Unless you're working with RF (e.g. high-frequencies, > ~100 Khz), or really, really large wire (cross sections in inches), Amperes are <S> Amperes are Amperes. <S> As such, a wire rated to handle 10 amps can handle 10 amps, independent of the voltage. <S> The voltage rating of wire generally relates to the breakdown voltage of the insulation. <S> If you were to put ~1000V on it, you might encounter issues with the insulation breaking down, and it could possibly shock or electrocute someone. <S> However, this is a safety issue, and does not affect the wires ability to carry current. <A> The short answer is the same current rating is used for low voltage based on temperature rise. <S> But if you can afford heavier cable for lower power loss, you gain with bettter %load regulation. <S> The Ampacity of wire is a function of temperature rise for sustained maximum current. <S> This can vary depending if the wire is exposed to air, in a plenum or buried cable. <S> AWG size varies depending on copper, Aluminum or Aluminum with a steel core for towers. <S> Power being transferred over high voltages and long distance, Utilities can waste 10% of the power to save on wire costs and allow a higher temperature rise such as 45'C rise or in some cases a 60'C rise. <S> In your case, I assume you selected 10A wire rated at 120Vac, which I believe is based on a 30'C temperature rise. <S> The national electric code (NEC) specifies that the over current protection device not exceed 30A for 10 AGW wire, 20A for 12 AGW wire and 15A for 14 AWG wire. <S> You should know the length of wire to determine the desired % voltage drop and pick a number between 2~10%. <S> Car lights, I read are around 4% drop 1 way in wire. <S> Here is a chart for 2 wire 10% voltage loss - Wire Length vs Amperage @ 12Vdc. <A> The current carrying capacity of a wire is related to the size of the wire and not to the applied voltage. <S> There are a variety of wire tables on the web and they are easy to find via Google search. <S> Here is one that I have bookmarked in my browser.
| You can determine the size of your wire and then reference a standard wire table to get the maximum current carrying capacity for your wire. Basically, with wire rated to 120V, you can be confident that normal handling of the wire while it's energized with 120V will be safe.
|
Connectorless MicroUSB or miniUSB on PCB: Feasible? This question extends upon " Connectorless USB on a PCB ". Our requirements are for a smaller connector than standard USB, and also 5 leads instead of USB 1.0's 4. The connector will be used perhaps twice in the lifetime of the board, for ICSP / JTAG programming / firmware updates. The product is a low-cost throwaway device somewhat like the DigiSpark . Edit: Also, the connector will be inaccessible without breaking open the enclosure, so it is production-access-only. If end-customers break open a $5 toy, well, they have earned the right to destroy or reprogram it! Cost and added height of adding a connector of some sort, such as a microUSB socket is highly undesirable. We would like to do our programming / update using a standard USB to MicroUSB cable such as is shipped with many modern smartphones, plugged into a configuration & testing board (not an actual USB port). Edit: [28-Oct-2012] It turns out that microUSB is not viable, if only because of the thin PCB required . USB 1.1 / 2.0 are not viable due to having only 4 contacts on the USB-A end: Thanks @DaveTweed! Top 5 contacts of USB 3.0 Type B cable ( image ) appear PCB friendly, so question remains open The questions: Has anyone had success using such a connector etched onto a PCB? Could you share a link please? What thickness of PCB would we have to go into production with, for such a connector to work? Is there any available reliable footprint we could use for such a connector? What else would we need to keep in mind - such as board cutting/milling tolerances, stiffness of PCB, rounding of "connector" corners, ... SOLUTION: Added here for reference. The solution that worked out best for us was a 3M SOIC narrow test clip , which has 7 contacts to a side, and a conventional IDC 0.1" cable going back to our programming board. No additional milling is required, half of a standard SOIC pad footprint close to the edge of the board, with solder bumps on the pads, works out perfectly, and the clip grips the board firmly. Varying PCB thicknesses have been tested, they all work fine. A bit of a convenience hack we added: Positioning two of the nearby components equidistant from either edge of the SOIC "programming pad footprint" ensures that the clip can be attached very quickly and perfectly aligned to the pads. In laying out the programming pad pins, we ensured that a misalignment of the clip would not cause any problems either due to shorts or problematic signal injection. Needing only 5 of the 7 pads simplified this reshuffle. Hopefully this solution would help others with similar requirements. An observation: Pogo pins suitable for 0.05" spacing worked out way too expensive compared to the SOIC test clip approach. <Q> If you use only one side, you can modify a receptacle with a shim to account for your apparently thinner board. <S> This may not be quite as suitable for very large volume as a custom pogo pin fixture, but it is likely cheaper to rig up, and the parts are more widely available. <S> For low volumes, a very simple choice (provided your programming operation is no more than a few seconds and includes a verify) can be to use a single row of plated through holes for a .100" header connector. <S> Instead of soldering a header into the board, you solder one to the programming cable (or plug it a female socket on the cable), insert the header pins into the board, and then tilt them sideways, holding pressure with your hand until the programming is complete. <A> Using pogo pins in a test fixture, as Dave Tweed mentions, is an industry standard technique for programming PCBs in production. <S> Having a custom fixture made can be cost effective for large volume runs. <S> The cables have a header conenctor on one end (to connect to a JTAG programmer). <S> The molded connector on the other end of the cable has a set of pogo pins, along with three alignment pins, that match up with test pads and alignement holes on the PCB. <S> I have found the cables useful for debug and prototyping. <S> The same pads can then be used with a custom fixture for production test. <A> The "standard" way to get production-only access for programming a chip on a board is to build a mechanical test fixture for the board that holds it securely, and use "pogo pins" positioned to access pads laid out on the board for this purpose. <S> This gives you the most flexibiltiy in terms of the layout of the board. <S> Of course, you can add additional pogo pins to the fixture to aid in functional testing of the board as well. <A> If this is for production access only, then here's a trick I used once. <S> The PCB (standard 0.062" thickness) was designed with SMT pads along one edge (both sides) so that a 2×7 0.100" JTAG header could be soldered to it, with the pins sticking out from the edge. <S> This was useful for debugging prototypes, which needed more or less constant access to the JTAG (and weren't in cases). <S> In production, the connector is omitted, and I used a slightly modified DIP clip to access the pads for the connector. <S> I just needed to bend the contacts inward a bit to get adequate friction and contact pressure. <S> Instead of the DIP clip, you could use a standard card edge connector as well.
| If you have space, edge card connector fingers would be fairly simple. Using a larger number of spring loaded pins to test a board is sometimes known as "bed of nails" testing. For a couple of recent projects, I used cables from Tag-Connect in conjuntion with a set of pads laid out on my PCB.
|
Ideas for attaching / connecting / stacking one PCB onto another with no gap What methods might be feasible for attaching/stacking one PCB immediately on top of another PCB , with the following conditions: Zero spacing/gap between the two PCBs Electrical contacts are needed, not just physical attachment Assume that the top PCB is about a third the size of the bottom PCB I'm at the early design stage of a project and am trying to survey the options first, so I'm open to recommendations of standard methods as well as any creative ideas. Note: I'm already familiar with edge castellations (AKA "half vias"), so other suggestions would be of interest. For instance, is it possible to design it such that the top PCB has pad-contacts only at the bottom (QFN/QFP style) which are somehow solderable onto pads on the bottom PCB? EDIT: To answer @Andrew's question: My purpose of stacking the two boards like this is that the Top PCB will be variable across variants of my device (in fact, variable not only in what the Top PCB contains but also size and number of contacts it has), hence the goal of having one constant Base PCB with pads onto which I can attach a variable Top PCB. <Q> This is not a direct answer to your question, but I think it's quite relevant. <S> A few years ago, we did the same thing. <S> We made little daughter boards that used edge castellations to solder it onto the mother board. <S> The difficulty was that we had components on the bottom side of the PCB. <S> These were the vital decoupling capacitors needed by the chip. <S> So the motherboard had very large vias to accommodate these components. <S> You can see several large round holes in the PCB. <S> Through the holes you can see the capacitors on the flip side of the daughter boards. <S> Since the holes are just large vias, they end up through-plated (our supplier doesn't offer unplated holes), so you have to be careful that the plating doesn't short any pads on the daughter board. <S> A few thoughts about using pads under the PCB. <S> I assume you mean something like this Telit HE910 module: Which reflow solders directly onto a PCB. <S> Notice that in the picture the gap between the module and main PCB is not zero, but certainly less than 1mm. <S> Clearly this technique works. <S> Whatever components are inside the module don't mind undergoing an extra reflow process. <S> This is because components can usually survive at least two reflows (once for each side of the board). <S> Since those modules only have components on one side of the PCB, they have almost certainly experienced only one reflow. <S> Instead of reflow, you might be tempted to use a hot plate to solder a module like this. <S> This would enable you to solder the module down without getting the components inside the module too hot. <S> However, I would advise against this method. <S> At the moment the solder solidifies, the mother PCB will be much hotter than the daughter PCB. <S> As the mother cools and shrinks, it will generate shear forces in the solder joints, and may warp. <A> Maybe not exactly what you are asking, but I suggest you to check out PiCrust for ideas. <S> They use connectors by Hirose to achieve a compact stacked design on top of the Raspberry Pi board. <S> If the board should be replaceable without soldering, this sounds like a pretty simple solution to the problem. <A> In my (admittedly narrow experience) daughter cards are usually fitted on header connectors, not directly soldered. <S> In reply to a question about Very low stacking height PCB connector , @trygvis suggested this Molex connector <S> Maybe that's of use? <S> The problem with face-to-face soldering as you describe is that this will have to be a manual process (not pick-and-place with reflow) unless you want to reflow your PCBs. <S> Also, you would need to be sure of the mechanical fixing - a few solder tags probably won't be enough - you will need mechanical fixing otherwise there is a serious risk of vibrarion fracture. <A> BG120 2.54mm <S> DIL Thru hole pin header <S> BG040 <S> You could choose single row, GCT also offer finer pitches if required, other options here . <S> -Mount <S> the SMT socket on the top PCB. <S> -Plug a thru hole pin header (from above) all the way through both PCBs. <S> Obviously the mating pin header pins should be long enough to pass through the SMT female receptacle, both PCB's and leave you enough space to hand solder. <S> -Hand solder the exposed header pins on the bottom side of the bottom PCB. <S> See sketch enclosed (excuse my awful drawing) <S> , I'm not sure if this will work for you, just an idea! <S> Note: GCT standard products available via Newark, any non standard pin lengths carry a higher MOQ (at least 1k pieces). <A> Two principal things come to mind: 1) <S> what is you describe could be used to allow describe a solder bump (BGA) type package that uses a FR-4 substrate. <S> This is not an uncommon packaging option. <S> 2) there used to be a type of tape that you could get that would preferentially enhance electrical connection through the thickness of the tape whilst minimizing lateral conduction. <S> I used to be available from 3M, but I haven't seen it in years. <S> And it's <S> conductivity was probably insufficient for your use if you need to carry 100's of mA. <S> This might give you an idea or two.
| You might consider using a combination of SMT receptacle and thru hole pin header, for example: 2.54mm DIL SMT socket
|
Name of component on output side cable of a DC power adapter? What is the name of this component (circled in red) of a charger? What are the uses of this component? <Q> It's a ferrite choke, not going to retype it all <S> but here's an article: <S> What are the bumps at the end of computer cables? . <S> Their goal in life is to reduce EMI (electromagnetic interference) and RFI (radio-frequency interference). <S> A ferrite bead is simply a hollow bead or cylinder made of ferrite, which is a semi-magnetic substance made from iron oxide (rust) alloyed with other metals. <S> It slips over the cable when the cable is made, or it can be snapped around the cable in two pieces after the cable is made. <S> The bead is encased in plastic -- if you cut the plastic, all that you would find inside is a black metal cylinder. <A> This EMI Common Mode (CM) choke absorbs noise with lossy ferrite in a cylindrical shape. <S> In this photo a DC-DC converter, it will be high permeability perhaps optimized in the 1~40 MHz range. <S> All VGA cables have to suppress the DAC video pixel noise from 40 to 300 MHz range which affects the choice of ferrite to lower permeability types. <S> There are hundreds of varieties of ferrite compounds and hundreds of varieties of cylinder shapes. <S> The method of attachment can be assembled by the cable mfg as a cylindrical sleeve, prior to plug attachment and then plastic molded casing is applied to this and the plugs. <S> Similar to the snap-on clamshell perfected by TDK, Tokin and others. <S> This is useful for all types of cables with pulse noise to improve integrity of high impedance signals as well as reduce interference of both ingress and egress for passing EMC tests. <S> Their product is precision machined and tightly clampled to avoid acoustic vibrations often requiring epoxy in other designs to avoid vibration. <A> It's called a clamp-on ferrite cable filter.
| These "bumps" are called ferrite beads or sometimes ferrite chokes. It functions as a common-mode choke, reducing the ability for noise generated inside the device being charged to be radiated from the charger cable.
|
replacing disposable lithium-thionyl batteries with rechargable lithium batteries? I have a device that takes 2 disposable 3.6 V 1/2AA 1100 mAh lithium-thionyl batteries and I would like to replace them with rechargable ones. It is a device that measures angles in wireless mode, and I only get a life span of 10 hours for 2 disposable batteries, not nice for the environment at all. I understand I need to make sure the voltage matches. But what about the mAh that it outputs to the device? Does it have to be the same? Can they be higher? I'm having problems finding an exact match...which is what brought me here. And also does it have to be a lithium thionyl chloride rechargable or can it be a different type? I am clueless when it comes to electronics... <Q> Few things to take into account when replacing the batteries, are the cells conneted in parallel (higher current) or in series (higher voltage)? <S> Does your device have a regulator and reverse voltage protection? <S> Shorting an LiSOCl will just make it warmer, shorting a LiPo cell might cause an explosion. <S> You said it is a wireless device, 2 1/2AA <S> LiSOCl <S> cells in parallel can provide a 200mA pulse, check if your intended replacement cell can provide it. <S> Self discharge: <S> LiSOCl cells have low self discharge and very long shelf life. <A> maH Is just a way of the manufacturers trying to tell you how long the battery will run for. <S> In general more maH = longer run time for you, <S> in practice there's a lot of other factors that affect run time. <S> Anyway in short if you find batteries that can do the same voltage you don't need the same maH rating to have it work, but you may get less battery life. <S> I don't know your application but lithium-thionyl batteries can supply a lot of current if they need to. <S> So there may be a reason your manufacturer picked those, or they may just have liked the battery life. <A> Lithium primary cells are intended for long life and the mAh capacity is rated for low drain. <S> However efficiency losses are poor when draining much faster, so <S> your capacity is much less than the rated 1100 mAh in 10 hours. <S> Higher loading current also tends to reduce the cell voltage. <S> The cut-off specs are often 2V but this might not be the case for your device. <S> If it has a higher cut-off, then you get a lower capacity in mAh. <S> The open circuit cell voltage of Li-Th is around 3.67V but should not drop below 3V for a new battery under pulse load and also depends on size of cell. <S> IMHO <S> I suspect you are getting less than 50% capacity in 10 hrs <S> so I estimate your average current is 55mA for 550mAh and 1/2AA cell voltage may be as low as 3.2V under load. <S> If you can shut-off your device faster between usage or look for lithium metallic oxide cells in the same voltage range of 3.6 to 3.7V and higher capacity. <S> Do not try to run cells in parallel without expert guidance and avoid water if they fail by leakage. <S> The cheaper "Li-FePO4" cells that operate at 3.2V might not be a good match for voltage, but it is hard to tell.
| Rechargeable cells have much higher self discharge and if the cell drops below a certain threshold, it cannot be used anymore.
|
Questions on some aspects of operational amplifiers I am trying to learn the theory of operational amplifiers. I am using books like Millman, Halkias and Boylestead, but I found that these books do not actually tell the following aspects of those devices: What exactly is an operational amplifier? What was the idea behind its creation? What exactly is an opamp composed of? (obviously, it isn't just a triangle which obeys whatsoever equations you write). What is the simplest answer for those questions? <Q> What exactly is an op-amp? <S> An opamp is a very simple device that does this: Vout <S> = Gain*(Vin+ <S> - Vin-). <S> The Gain is fixed for each opamp and is usually 100,000 or higher. <S> To make matters more interesting, this gain value is not very "tight". <S> The gain of a real opamp might change over some large range depending on temperature, voltage, batch, frequency, etc. <S> I would not be surprised to see this gain change from 100,000 to 1,000,000 in the same opamp. <S> Most practical opamp circuit require negative feedback to produce other gain values and to make the opamp behave more predictably. <S> What was the idea behind its creation? <S> I can't ask the guy who designed it, but simply put an opamp <S> is one of the most flexible semiconductor devices available today. <S> I am guessing that the original inventor knew this and that's why it was invented. <S> So in a sense, this question is a bit like asking "why was the wheel invented". <S> But this is a super generalization. <S> Before chips there were discrete transistors, and before that there were vacuum tubes. <S> There are circuits that are functionally equivalent to opamps that were used back in the tube days. <S> So the chips that we call "opamps" are "just" modern manifestations of those tube circuits. <S> What is an opamp composed of? <S> Modern opamps consist of transistors, diodes, resistors, and some other minor stuff. <S> Of course they used to be made of tubes. <S> The following image shows an internal schematic of one opamp: <S> Of course there are hundreds (or thousands?) of different opamps <S> so there are many different internal schematics. <S> Some of them are much simpler than this one. <S> I glossed over this before, so <S> I'll restate it here: <S> Most practical opamp circuits require negative feedback to make things work well. <S> Without feedback, an opamp works nicely as a voltage comparator. <S> For almost everything else, negative feedback is required. <S> This feedback is the source of much magic, and the reason why opamps are so useful. <S> Feedback is beyond the scope of this question/answer, but suffice it to say that this is where the important stuff happens. <A> what exactly is an operational amplifier? <S> what was the idea behind its creation? <S> From its name Operational Amplifier , it is much clear that an amplifier which can perform any operation. <S> You can perform many types of work with this. <S> Like for an example. <S> You can make a voltage comparator with this, it will give output High or Low (Depends upon your design and need) for some certain level of voltages. <S> You can make a hysteresis output for any input signal. <S> You can invert any positive signal and or invert any negative signal. <S> You can calibrate any signal with your required signal level. <S> You can use it for amplification of your input signal. <S> For an example, those signal who have very very low level changes that may be difficult for you to judge from any Meter. <S> You can use this for amplification of that signal change to your required level which can be monitor or measure through Meter or any Controller. <S> It can be use with Audio Amplification. <S> Thus their are so many applications of Operation Amplifier, May be now it is cleared to you <S> what exactly is an opamp composed of? <S> (obviously, it isn't just atriangle which obeys whatsoever equations you write). <S> All Integrated Circuits including Microprocessors, Microcontrollers, Operation Amplifiers, FPGAs etc etc are basically composed of Transistors . <S> Very common operational Amplifier <S> LM741 has been made with more than 32 Transistors. <A> In theory an OP-amp is an ideal differential amplifier with: Infinite <S> open loop gain <S> Infinite input impedance (no input current is drawn) <S> Zero output impedance <S> These properties make it very easy to reason about its behaviour. <S> Real OP-amps don't have infinite gain or infinite input impedance but the actual figures are high enough that the assumptions above still hold as approximations. <S> So it is easy to design and build the standard circuit circuits you have seen in your books: voltage follower, integrator, etc, with usually just the addition of maybe a stabilising capacitor, use of a practical load, etc.
| The op-amp itself is an integrated circuit, a chip.
|
How hot does a voltage regulator get? Since I've always did electronics through my Arduino and I feel I'm pretty much a beginner, I've never used a voltage regulator before. I want to create this circuit, but I want to hide it in my printer so I want it to work without a battery. http://hacknmod.com/hack/beginner-spy-tutorial-your-first-diy-mini-fm-bug-transmitter/ I am planning to put a 3 V voltage regulator on it, but I wonder how hot a voltage regulator can get if the maximum voltage is used. And should I be worried about the heat, as in should a try to cool it? <Q> The heat produced by a voltage regulator isn't a function of the voltage, it's a function of the power . <S> You can calculate the power the voltage reg will dissipate by taking the voltage-drop across the regulator, times <S> the current flowing through the regulator. <S> E.G: $$Power = <S> Volts <S> * <S> Amps$$ <S> In other words, if you have a 30V source, and your device is running off 3V, you have \$30V - 3V = 27V\$ across the regulator. <S> However, if your device is only drawing ~3 mA:$$27V * 0.003A = 0.081W$$ <S> You would only have a dissipation of 81 milli-watts, which wouldn't even get too warm to the touch. <S> However, if you have a 5V input, with a 3V output (giving 2V across the regulator), yet your deice is drawing 1A, you have:$$2V <S> * 1A <S> = 2W$$ <S> You have a power dissipation of 2 watts! <S> Basically, there is more involved in evaluating heat production then just the voltages <A> Given the head from Fake Name, you need to figure the temperature. <S> The parameter Theta JA, \$\Theta_{JA}\$, tells you for every Watt the part dissipates, the chip will go up that many degrees above ambient. <S> The part's data sheet will tell you this parameter. <S> JA means from Junction (chip die) to Ambient. <S> However you will probably see it get hotter since it is in an enclosed are. <S> Another one you will see is Theta JC, Junction to Case. <S> That's mainly used with heat sinked part. <S> The part's data sheet will also tell you the maximum junction temperature. <S> For regulators, that is often 125 C. <A> In this case the voltage drop across the regulator is a maximum. <S> If there is any choice, use an input voltage, that at its lowest level, is just above its "dropout" voltage. <S> i.e. the minimum the regulator can work at.
| I think it should be stressed that a linear voltage regulator, which acts as a variable resistance in series with the supply, is dissipating most heat when it is supplying its maximum current at its minimum voltage.
|
Why ARM CPUs are not used in servers and desktops? I was wondering why ARM CPUs are popular for mobile and other portable devices but not on desktop/server computers? The only thing I know is that ARM CPUs consume much less power than x86 processors. This is a good argument in favor of using it on mobile devices but also on desktop/servers. Yet it is not so widely used. Is it the instruction set or performance or smth. else? <Q> Even the fastest ARM CPUs are often slower than x86 CPUs. <S> From here (which links to this Phoronix article): <S> In a nutshell, the system with a 1 GHz TI OMAP 4460 dual core processor came out ahead of the netbook with a 1.6 GHz Intel Atom N270 chip in some of the benchmarks, and came out behind in others. <S> Power consumption is not really the biggest concern on a desktop computer. <S> Though ARM is starting to be used on servers <S> , e.g. Calxeda : <S> Founded in 2008 and funded with a $48M investment from ARM and seasoned venture capital investors in 2010, Calxeda provides revolutionary efficiency to the data center. <S> Leveraging ultra-low power technology from ARM, servers built on Calxeda’s silicon and software platform consume a fraction of the power and space of today’s best-in-class servers, enabling data centers to realize significant reduction in capital and operating expenses. <S> And recently AMD announced plans to make <S> ARM-based Opterons CHIP <S> DESIGNER AMD has announced that it will release ARM based server chips under its Opteron brand in 2014. <A> In addition to what Renan said, there weren't 64-bit ARM parts in 2012. <S> Since servers have needed more than 4 GB for some time, this is a show stopper. <S> However as pointed out by Igor Skochinsky below, it isn't quite that simple <A> Though ARM is catching up the pace quickly, IMO: <S> Intel still manages to do better on single core performance , better memory bandwidth, larger cache design, and reasonable power consumption these days. <S> One of the current i7 core can outperform best single ARM core by 3~10x(depending on application). <S> And i7/xeon is already 4/6 core per chip + hyper threading. <S> you will need 64/128/256 ARM core to match up.
| From what I see: Software compatibility (for most people, a desktop PC that can't run x86 software is a definitive no-no).
|
How is it possible to make Eagle parts containing multiple components? Is there any way to achieve the following (or something equally helpful) in Eagle? I would like to create a library Part that itself consists of multiple components pre-connected and pre-routed (by me). For example (simplified): I would create a library part called "PartX" made up of an LED and two resistors connected in series. Thus, in a schematic, when I place this PartX, I get both LED and two resistors together along with the pre-drawn nets in between. And likewise, in a board layout, I get the LED and two resistors placed according to the pre-set positions, along with the traces pre-routed between them. This would really help speed up things for certain boards I am currently designing. <Q> What you're describing can be done in the Eagle library manager. <S> Essentially, Eagle will treat your aggregate component as an integrated circuit. <S> You can create a PCB footprint in Eagle, with multiple pads. <S> For example, pads 1 & 2 are the LED, 3 & 4 are resistor. <S> Eagle allows to draw wires in the component editor. <S> When you route the rest of your board, these wires will be fixed to the footprint and will not be routable. <S> If you are going to assemble your board with a pick & place, you will need coordinates for the components. <S> Eagle will produce only one (1) set of coordinates for your aggregate part, even though it has several separate parts. <S> You would need to find a way around this. <S> But, if you'll be assembling the boards manually, you will not have this problem. <S> Other design packages (OrCAD, Altium) support hierarchical blocks . <S> At a minimum, hierarchical blocks let you reuse schematic. <S> Some EDA software supports hierarchical blocks with PCB layout reuse. <A> Creating a "hybrid" library part like that is probably not the best way to approach this in Eagle. <S> Eagle has a powerful scripting language that can be used to automate repetitive tasks. <S> Also, anything you can do in the GUI, you can also do by typing a command at the command line (although sometimes it's a little hard to figure out the specific command you need). <S> And don't forget that you can repeat a previous line of commands by simply hitting uparrow on your keyboard until you see the one you want, and then hitting return. <S> All of this applies both to the schematic editor and the layout editor. <S> (And the library editor, for that matter.) <A> This is a little old but could be helpful to other users. <S> Create a project and then create your circuit. <S> To reuse the circuit start a new project and you can import the old project in multiple times. <S> Solves pick and place problem and without scripting.
| Often, it's sufficient to edit a series of commands in a text editor and just copy them into Eagle's command line.
|
Creating a low (90-250F) temperature-controlled soldering iron (or modifying a higher temp one to get lower temps) I'm a wax sculptor and am interested in getting a temperature controlled soldering iron but I need a very low temperature range (like 100-250F). Most units come with a bottom end of 350F+. Is there a way to open up and modify one of these units easily or is it all pre-programmed in? I don't need the digital readout to report the correct temperature after any modifications but I do need the temperature control to be in-tact and working. If it's not practical is there any way to modify a non-temperature controlled to be able to get such a range without resorting to programming some chip. I know I'd have to add in a thermocouple in or on the outside of the shaft but I wasn't sure if there are ready-to-go circuits or devices that will switch on/off the device to maintain a temperature based on a thermocouple unit. (Actually, I have one of these right now but it's in the wrong temperature range and would be way too clunky as it's an external thermostat that does up to 108F for heating pads for plants, and I could i suppose weld the the probe of it onto the shaft of my soldering iron, if it did the right temperature range, but that'd be pretty inelegant). Thanks! <Q> You can get a (TRIAC) light dimmer and wire it in a box outlet. <S> Use a <25W small light in parallel to monitor the power input in case of inadequate load, and hysteresis effects. <S> You can calibrate it with power input and temperature output or set by trial and effect. <S> Although this is not regulated the temerpature could be proportional to % power input. <S> (except for hysteresis) If cooled rapidly it will return to normal temperature in a minute or so. <S> You may want the chisel edge or round 1/16" screw on tip with a 15W or 25W heater. <A> Since it is open source, it can be easily modified to handle such temperature ranges (it doesn't specify the lower end of the range). <S> All-through-hole PCBs are available for $7. <A> Since the hakko and other models did not allow for easy modification of the tip and represented a higher cost if they were to be damaged by wax getting into the inner components, I ended up using a basic weller screw-in-tip soldering iron (with a standard thread type). <S> For custom tips I can easily forge brass rod to the proper shape and then thread it. <S> For temperature control I attached a thermocouple to the outside of the shaft at its hottest point. <S> I made a silicone sheath to cover the shaft completely insulating the thermocouple and allowing me to grip the iron by the shaft itself. <S> I then hooked this to a standalone temperature controller ($25), which connected directly to the thermocouple and triggered a solid state relay to the iron itself (overkill, I think, as I don't think it will ever draw more amps than the control unit can take). <S> The whole package was very cheap and effectively keeps the temperature within 10 degrees of my setpoint in multiple use conditions. <S> Thanks to everyone for their advice.
| Dangerousprototypes has a generic soldering iron driver , which can run Hakko and Solomon irons (and clones).
|
Storing an LED's previous state even when power is removed Storing an LED's previous state even if power is removed I want to build a simple circuit that consists of 2 push buttons and an LED. I want the LED to turn on when one pushbutton is pressed and off when the other is pressed. I am pretty sure this can be done with a flip-flop. But this is not the only part. I also want the circuit to keep its previous state even if power is removed. So if the LED is on, and power is removed, I want it to be on when the power is added. Same with if the LED is off and the power is removed I want it to stay off when power is added. I think that NAND gates or something are used to store flash data, but I am not sure. I want this circuit to be only consisting of transistors and other common parts like capacitors resistors diodes crystals inductors ect... I don't want to use any uncommon integrated circuits (I only have 555 timers and some dual flip flops and some buffers and a few other really odd ic's. This may be impossible (especially with only transistors) but any information is helpful and I'm only 14 so I'm still a beginner in this stuff. Edit: I want to figure out a semiconductor way to do this. I know I don't have the parts but what would I need? <Q> You need one of these : (source: vandykes.com ) A bit retro, but meets your requirements exactly! <S> The other ways can't be done with the types of components you've listed. <A> A bi-stable switch as Dave Tweed mentioned will certainly work. <S> Another way is to use a tiny microcontroller that has EEPPROM built in. <S> There are some PIC 12 available with EEPROM. <S> The micro reads the two switches, drives the LED, and stores the last state in EEPROM, which it then recovers on powerup. <A> If the flip-flop uses only a tiny bit of current, such as if it's CMOS, you could supply power for a day or more to the flip-flop with a battery. <S> Keep the battery trickle-charged with the external power. <S> Use only external power (not the battery/supercap) for the LED and its driver, and any other circuitry. <S> A diode can keep the the memory-keeping low-current circuitry separated from the power-hungry LED. <S> BTW "NAND" in regards to flash memory isn't really the same as the basic logic gate. <S> Flash memory involves shoving charges across an insulator to an island of semiconductor or metal, and nand gates are involved in some manner to read/write the data, but I'm no expert on that. <S> Plain old NAND gates in TTL, NMOS or CMOS chips can't hold data at all.
| The point is, there are only a few ways to remember the state of an electric circuit with no power applied, and mechanically is one of the most common. A super-capacitor might work as well as a battery.
|
An idea for well-aligned component placement during PCB assembly (Note: This question is in particular for low-volume self/manual assembly, i.e., without automatic pick and place machine). Generally, stencils are used for well-aligned application of solder paste to a PCB. Suppose you were to follow that stage with a second, similar stencil but this one for part placement, where the cutouts on this custom-made "part-stencil" are made to match the dimensions of your components. Then one could place this part-stencil over the PCB, then use your vacuum-pickup or tweezers to quickly drop the components into these cutouts/slots/windows on the part-stencil thus making aligned placement easier and faster. Then you could lift the part-stencil, and move the PCB to reflow. Could one make such a part-stencil approach work, or does it have any critical issues? Is it or some similar variant used? For example, I see some issues such as the components being nudged when this part-stencil is removed, but if you play with the tolerances on the cutout slots, and set up this part-stencil slightly offset above the PCB, it might work (?) (Above idea is inspired by a comment made by Scott under this blog post ) <Q> There's generally no need to do this, because when the stuffed board is run through reflow, and the solder melts, the surface tension of the solder pulls the parts into a centered position over their pads. <S> If the centering action of the solder surface tension doesn't give accurate enough centering for whatever it is that is motivating this idea, you have a problem. <S> Because if you make your part-locator "stencil" with tighter tolerance than the solder will achieve on its own, then in reflow the solder will pull some of the parts against the locator and you will need to be very careful removing the locator to avoid damaging the parts. <S> Even with the surface tension working in your favor, some problems can still occur, like tombstoning, but this wouldn't be solved by your idea. <S> Edit <S> In that case, why not just design your silkscreen to give adequate cues for parts placement? <S> Then you don't have to design (and pay for) <S> a whole extra fabricated part that will have to be built as an expensive one-off. <A> Not all production lines are automated. <S> There are many PCB's that are stuffed by hand, soldered by hand, and you would never know it. <S> I'm not talking about the hobbyists, but the professionals that work on assembly lines that specialize in making small runs of PCBs (where it is more economical to do the work by hand rather than machine-assembling it). <S> These people have to work quickly, accurately, and produce good results-- and they deliver. <S> They don't need special guides to put the parts down accurately and quickly. <S> And as I mentioned before, their work looks as good as the machine-placed parts. <S> I would posit that if you need a stencil or other guide to place parts accurately then you are doing something wrong. <S> If the professional part-stuffers can do it with little more than a standard soldering iron and maybe an hot-air rework station, and can do it quickly enough to make a successful business out of it, then you can place the parts without a stencil. <S> I should also mention that these businesses are located in the U.S., not China. <S> I have assembled many of my own PCB's and my craftsmanship is similar to what the professional assemblers can do. <S> This includes TQFPs, TSSOPs, 0402s, etc. <S> (but not QFN and BGAs). <A> I think the idea has an implementation problem, too: How do you remove the "part stencil" after placing the parts, without it disturbing the already placed parts and/or solder paste? <S> If you add enough slop on the sides of the part stencil to solve this problem, then there's enough slop to allow mis-placed parts.
| Re-reading your question, I see you might have another idea in mind--the stencil is used as guide for hand-placing the parts, and then removed before reflow.
|
PIC16: How do I modify the configuration words? As I understand, the configuration words are different to the standard 8 bit registers. They are 14 bit wide, and they can only be accessed in "programming mode". From reading the datasheet I do not understand how to enter programming mode and then modify the configuration word. Can I modify the programming word from my C code (e.g. within the main function), or should I somehow instruct my programmer (PICKIT 3) to do some magic before the main function is reached? <Q> It has to be done by the programmer (technically this is what the PICKIT 3 is, not a bootloader). <S> You can configure the configuration words from MPLAB, or by inserting "#pragma config" statements into your C code. <S> This is preferable, as it ends up checked into source control and doesn't get lost. <S> http://www.kwantlen.ca/science/physics/engineering/APSC1299/files_for_lab/pragma_config.html <S> You cannot modify the configuration words from within a PIC program. <A> I do not quite understand how I'm meant to enter programming mode and then modify the configuration word? <S> Can I modify the programming word in my C code (e.g. within the main function)? <S> The configuration words are mapped in program/instruction memory. <S> They are mapped at an address location which is not accessible during normal device operation (it can be accessed only during programming mode). <S> These configuration bits specify some of the modes of the device, and are programmed by a device programmer, or by using the In-Circuit Serial Programming (ICSP) feature of the midrange devices. <S> So you should set these configuration bits in your code, but outside of any functions, using a compiler specific #pragma or macro. <S> From the XC8 <S> User Guide: <S> #include <xc.h>__CONFIG(WDTDIS & HS & UNPROTECT); To use this macro, ensure you include in your source file. <S> For devices that have more than one configuration word, each subsequent invocation of __CONFIG() will modify the next configuration word in sequence. <S> Typically this might look like: <S> #include <xc.h>__CONFIG(WDTDIS & XT & UNPROTECT); // Program config. <S> word 1__CONFIG(FCMEN); <S> The easiest way to set your device's configuration bits is through MPLAB X. Instructions taken from here : <S> From the main menu select Window ▶ <S> PIC Memory Views ▶ <S> Configuration Bits <S> In the configuration bits window, click on any value in the Option column and it will turn into a combo box that will allow you to select the value you desire. <S> Click on the Generate Source Code to Output button <S> The IDE will automatically generate the code necessary to initialize all the configuration bits to the settings you specified in the window. <S> This code may now be copied and pasted into one of your source files, or you may save it to its own file and add it to your project. <S> To save the file, right click anywhere in the output window and select Save As from the popup menu. <S> Further reading: <S> MPLAB XC8 C Compiler User’s <S> Guide <S> PICmicro MID-RANGE MCU FAMILY: <S> Section 27. <S> Device Configuration Bits MPLAB <S> X Wiki <A> Similar question to one I asked not long before you. <S> That thread may also provide relevant information for you: <S> How do you set the configuration bits for a PIC 16F1829 in MPLAB X?
| The configuration bits for baseline and mid-range devices can be set with the __CONFIG macro which was supported in HI-TECH C, for example:
|
Is there any definitive I2C pin-out guidance out there? Not looking for a "STANDARD" EDIT: This has been repeated several times, so putting it on top: Yes, it is well known that there is no "standard" for I2C inter-device connectors, but surely this community can formulate a list of "guidance" points for making such interconnects, based on signal behavior, noise minimization, and mitigation of risk due to wrong connections. NXP defined the I2C standard without specifying a pin-out for I2C connectors, is my understanding. The only guidance from NXP seems to be a mention of placing a Ground and / or Vss between SDA and SCL if Vss / Gnd are carried across the interconnect. Purchases of various I2C modules has left me with a variety of I2C pin-outs, and a bit of a task keeping track of the various little ribbon-cable-switching shims I've had to make for them. e.g. Mono OLED module: SCL, SDA, GND, 5V (obviously not ideal, since clock and data are next to each other. Sensor Shield for Arduino: SDA, SCL, GND, 5V (again not ideal, plus switched SCL/SDA) Color LCD module: SCL, GND, 5V, SDA (Yay!) No-name I2C repeater: SCL, 5V, GND, SDA (ouch, they switched power pins! Nearly let the magic smoke out.) So my question is this : Is there a definitive / authoritative guideline for the I2C 4-pin connector pin-out sequence to use, where both Vss and GND are to be carried from host to device? Failing this, is there any directory, however incomplete, of I2C modules / devices listing the pin-out each has adopted? Clarification: Looking for guidelines such as "put Vss closer to SCL because..." rather than a defined standard which clearly does not exist. <Q> I've recently rolled my own as far as I2C connectors go. <S> The connector itself is not very important, right now I'm just using 100mil pitch header (usually female on board <S> so it's not so pokey when not connected), but any 4plus pin connector will do. <S> Additionally, I'm using the P82B715 from TI as an I2C bus extender. <S> This overcomes the capacitance issues associated with running long I2C drops off board, which as people have been saying, I2C was not intended for initially. <S> I did try many different combinations, like in the examples you gave and I noticed absolutely no difference in performance. <S> I believe this is because I2C is relatively slow, interference between SDA and SCL is not much of an issue. <S> Basically the rise time for voltages (when interference will occur) on the bus are much much smaller than a bit length. <S> So, that may not be what you want to hear, but it does afford more options. <S> Personally I went with [VCC, SDA, GND, SCL] to be easily routed to/from this chip and also be immune to a VCC/GND mix up when plugged in backward. <A> When it was first established, the I2C (Inter-Integrated Circuit) bus was only intended to connect chips on a single PCB assembly. <S> It was never intended to be used on cables to connect multiple boards together, and therefore, no connectors for that purpose were defined. <S> The only "standard" I2C-based external interfaces <S> I'm aware of are the short-lived ACCESS.bus for connecting user interface devices to computers and the VESA Display Data Channel used to retrieve monitor information over VGA, DVI and HDMI connectors. <A> The I2C standard isn't real amenable to this sort of thing. <S> It's specified at the bus level, not the device level. <S> For example, when you'd like to plug in an I2C device, do you know by the standard whether the pullups are on the host or on the device?? <S> No. <S> Plenty of other stuff you don't know, either, like where your cable capacitances are, what Vcc needs to be .... <S> In fact, there are even I2C devices that need extra lines for interrupts and other plain old digital <S> I/ <S> O. <S> How do you add those to the standard, if you can't get agreement on how many pins you need. <S> Bottom line, if your looking for portability and stability in your interconnects, I2C and SPI aren't where you need to look. <A> Many people use some sort of connector to carry I²C signals and power between two PCBs. <S> For example, the 10-pin UEXT connector carries I²C and +3.3 V power (and SPI); the 10-pin iPack connector carries I²C and +5 V power; the 4-pin <S> Molex SEMCONN ACCESS.bus Connector carries I²C and +5 V power; a few people use the 8p8c connectors and CAT5 cable normally used for Ethernet physical layer to instead carry differential-encoded I²C signals and +12 V power ( Sending I2C reliabily over Cat5 cables )or boosted single-ended I²C signals and +12 V power (the "Pond Electronics Bus" ); every HDMI and most DVI and VGA connectors and cables carry DDC2 data over I²C; a few more connectors that carry I²C are listed at "I2C Bus Connectors & Cables" <S> Some general tips for carrying I²C signals over longer distances: "NXP Application note AN11075: <S> Driving I2C-bus signals over twisted pair cables with PCA9605" Joshua Vasquez. <S> "Taking the leap off board: An introduction to I2C over long wires" "I2C Bus Connectors & Cables" lists many general tips for avoiding crosstalk (with a scope trace showing SDA signal coupling onto SCL and causing problems), reducing external noise, etc. <S> p.s. <S> : I see that Wikipedia: I²C Circuit interconnection has linked to this question. <A> While there's no I²C pinout or connector standard, there are quite a few places I²C is used which are standardised. <S> Some that come to mind are memory modules (DIMM, SO-DIMM), video connectors ( DDC in DVI , VGA ) and SM-Bus (yes, their webpage looks like something a kid made in the mid-90s). <S> In particular, the SM-bus connector is keyed and contains only I²C and power, but SM-Bus places additional restrictions so technically <S> not every I²C device should be connected to an actual SM-Bus. <S> A few more proprietary plugs are around too, such as Lego NXT sensors. <A> As usual for any post asking about why something is[nt] <S> standardized: From XKCD <A> There is no standard. <S> There is no common practise. <S> As to issues for deciding yourself what to do: Keep the signals on one board like they were intended to be in the first place. <S> The IIC lines have fairly high impedance, are single ended, and are therefore susceptible to noise and won't terminate transmission lines well. <S> IIC simply isn't meant for going off board. <S> If you're going to go off board anyway, keep the bus short. <S> A few inches is probably OK. <S> A meter or more is really asking for trouble. <S> Keep off board lines away from noise sources. <S> Don't wrap them around a motor, for example, or even try to go near one. <S> Use a connector that can't be hooked up backwards. <S> If someone can plug it in backwards, someone will. <S> Ribbon cable is probably the easiest to use. <S> You need three wires minimum, SCL, SDA, and ground. <S> Adding power is probably a good idea. <S> In any case, make sure the ground wire is between SCL and SDA to avoid crosstalk. <S> The power wire should not be noisy, so stick it on one side, <S> it doesn't matter which. <S> After messing around with connectors and chasing potential problems, realize that point 1 was actually the only one you needed to know.
| No standard pin-out, no standard connector.
|
How to make MC34063A work as a step-up converter with 2.1V input? According to Page 7 , Table 8 in the datasheet for MC34063, the startup voltage is 2.1V typical for A series and 1.5V typical for E series. It is also said in Note 4 that the start-up voltage is the minimum power supply voltage at which the internal oscillator begins to work. I am trying to implement a 2-cell Ni-MH battery to 5V,100mA step up converter, where the input voltage varies from 1.8V to 3V. I know that there are more suitable ICs like this one , but I want to learn how to make MC34063 work in low voltages if it is possible. How can I make MC34063 work as a step-up converter with 2.1V input? <Q> Worst case, you cannot do it without 'cheating'. <S> Vin_min is <S> 1.8V and Vstart_TYPICAL is 2.1V. <S> Using the ... <S> E suffix part would be far better. <S> There are several ways of cheating. <S> Once started the IC can then self power itself from a higher voltage. <S> The switch element must of course still draw power from the 1.8V minimum battery, but that is not a problem. <S> A capacitor charged via a Schottky diode will charge to within less than 0.2V of the charging supply. <S> A Schottky diode will drop say 0.4V when discharging into modest load. <S> So: Charge capacitor to 1.8-0.2 = 1.6V. Step bottom of cap from ground to 1.8V with start signal. <S> Vcap is now 1.8+1.6 <S> = 3.4V. <S> Feed capout to IC <S> VCC = <S> 3.4 <S> - 0.4 = 3V. <S> IC will now start and Vcc can be bootstrapped. <S> Cap has to be large enough to power circuit during startup phase. <A> You're not going to have much luck with that, unless you build some sort of step-up converter to ensure that the supply exceeds the worst-case startup voltage. <S> Also note that the worst-case startup voltage isn't specified - there's absolutely no guarantee that it will even be 'close' to the 2.1V typical voltage that's specified. <S> To me, you should just do the design with a more appropriate controller. <A> The data sheet says that your appliction will "typically" work but is not guaranteed to work. <S> There's no way around that. <S> Also, the MC34063 (which I've used, too!) is a pretty old, BJT-based part. <S> It has significant losses, and will never be very efficient. <S> If you just need a ready boost converter, buy a ready-made one from Pololu , or buy a DC-DC converter module from Digi-key . <S> If you're really teaching yourself switching power supply design, then you should go look at the modern CMOS based switchers, which have much lower losses. <S> Also, the best way to learn is to read the application notes from places like Linear Technologies . <S> There's all kinds of things you need to worry about, such as PCB layout, and selection of suitable capacitor dielectric materials.
| One is to use the "Start" signal, whether push button or digital signal etc to boost a pre-charged capacitor to supply a higher initial voltage to allow starting.
|
current sensor for small currents? I'm using an ACS712 +-5A to measure DC current, but my current never goes above 1A. This causes lost resolution in the sensor, since it never measures above 1A. What are some options for me to measure low values of current at a higher resolution (~1 mA)? 1A or 2A version of the ACS712 would have been ideal, but unfortunately they don't exist. It should be isolated. <Q> Update : <S> Subsequent to posting this answer, I switched to a Melexis <S> MLX91206 linear Hall effect current sensor, with the current to be measured being passed through a coil with the sensor at its core. <S> This permitted measuring currents down to 100 mA, with isolation. <S> See this answer for more details. <S> One of my projects required high side current sensing of up to 500 mA full-scale at a voltage of 24 volts unregulated. <S> We could not find any integrated device with isolated current sensing like the Allegro ACS parts for that current range. <S> A non-isolated solution using Analog Devices <S> AD8217 Current Shunt Monitor ($2.44 single unit at Digikey) was chosen, based on this article which provided useful insight into the several options we were considering. <S> Disadvantage: <S> Unidirectional current sensing, not suitable for AC Advantages: Minimum part count, and device contains internal LDO <S> so unregulated Vcc was fine. <S> For sensing bidirectional current flow we did consider using an AD8210 Bidirectional Shunt Monitor (nearly $5 each!), but eventually just went with current sensing before the coupling capacitor stage. <S> This does introduce some error, but it was approximately linear error within our range of interest, hence eliminated in software. <S> An useful background reference was Linear's Current Sense Circuit application note . <S> Also, if someone does identify, or introduce, a hall effect isolated current sensor like Allegro's range, but for low currents, we would happily change over to it. <A> Note that those ACS devices for different current ranges only differ in the internal amplification stage. <S> This will, of course, introduce some extra noise in the measurement but this may be neglectable at the low amplification of 1:5 in your case. <A> The current sensors are very sensitive for external magnetic fields, and you can use them as such. <S> Take a ringcore, saw a slit where the ACS just fits in (flux concentrator) and wind a number of turns on the core where the current to be measured passes through. <S> You can make it as sensitive as you like by increasing the number of turns. <S> There are also small hall sensors from ASlegro available <S> very well suited for this puropose with the same output characteristics as your ACS712 wich are also low cost. <A> If you would like to integrate the sensor to MCU system, maybe INA219 module is a good choice. <S> It outputs the data thru I2C, so you don't need to ADC an analog voltage. <S> It costs $10 on AdaFruit but only $2 or $3 on eBay. <S> Other specs: <S> Voltage: 26 V Max Current: <S> ±3.2 A Max resolution: 0.1 mA <A> A little expensive, but very effective option is to use isolated power supply (like R0.25S-0505) and isolated delta-sigma modulator (like AD7400AYRWZ). <S> With some additional peripherals, or if FPGA is used- with a digital LPF, it will provide nice current sensing with high resolution and bandwidth. <S> I had such circuit with like 16 bit, 64kHz, 80dB SNR... <S> But- for about $10 per channel.
| Therefore, I think it's well worth a try to simply put another op-amp behind the ACS to stretch its expected output range to the desired.
|
Example circuit of fading tone? I'm looking for a simple circuit, preferably based on the 555 in order to get continuous configurable fading tones (chimes), just like a "door open warning". It will fade in and fade out, not very annoying. Example sound <Q> My simple way I did what you want <S> was <S> I bought a really cheap small battery power "star trek sounds" toy from a gift shop for around $1 whose sounds were like I wanted, opened it up and took out the tiny circuit board in it and connected one of the three switch wires on the pcb to the output of my circuit with a 1k resistor and connected the voltage and ground lines to a 3.3volt wire and ground from my arduino. <S> Each switch wire on the pcb makes a different sound and I easily found the one that made the sound I wanted. <S> So I got the sound done quickly and could spend time on function <S> I wanted to make on the arduino instead of spending time in doing the sound part circuit and all. <S> I know this is not a technical great answer like some are on this site <S> but I am self taught so sorry. <A> Doing this with 555 timers is possible but will require at least two and some additional analog circuitry to get "nice" sounds that aren't just amplitude modulated square waves. <S> A much simpler way is to use a micrcontroller. <S> You can either keep one cycle of the chime sound in memory or perhaps synthesize it from multiple sine waves if you want it to change over time. <S> Once you have the tone, you can multiply it by a much slower signal to get the volume envelope. <S> This would all be done digitally and the result used to adjust the duty cycle of a PWM output. <S> Then you only need to low pass filter that to get the analog signal you want. <A> You can get this effect using a simple single transistor cirucit as shown below: <S> AudioIn should be the output from your 555. <S> Voltage input should be below 5V (use a voltage divider if nessesary). <S> On the trigger input, apply a short 5V to 9V pulse. <S> This will charge C1. <S> The charge stored in this capacitor will have enough power to supply the amplifier switch built around Q1 for a while, and the output voltage will be proportional to the voltage across C1. <S> Since C1 is slowly draining over R1 and Q1 you'll get a exponential fade at AudioOut his way. <S> Note: This circuit won't work for general audio, but it's fine for square waves such as the 555 output.
| You can also add a fade-in effect by putting a series resistor in front of D1.
|
Getting coordinates of a device in a 3d space I want to make a device that knows itselfs x and y coordinates in a 3d space, for example in a room. I can move the device anywhere in the room but I just need x and y coordinates. Is there anyway doing this by using accelerometers and/or gyroscopes? If not what is the easiest way to do this? --Edit-- Here is the details. The device will be a kind of electronic pen. When I draw something to the wall with that device, I want it to be drawn in my computer screen too. The wall size is fixed. So, can an IMU give me the accurate coordinates on the wall during a few hours drawing period. If yes what should the precision or sensitivity of the IMU has to be? <Q> I actually published a paper on this a couple years back. <S> It is indeed difficult to track objects indoors with an IMU. <S> As mentioned here previously, the only practical way to do it is with updates. <S> I used passive RFID tags to update the position of my very low cost IMU (less than $100 prototype). <S> The IMU works for short periods accurately but will begin to drift, all it needs is to occasionally pass near an RFID tag that has a unique ID and location associated with it. <S> At that point not only do you know your current position, you can perform an affine transform on your previous path to get a more accurate picture of where you were. <S> Your question is a bit vague on your application (I was tracking humans), but perhaps this dead reckoning with RFID fiducial updates would work for you. <S> The paper is called "Indoor localization using pedestrian dead reckoning updated with RFID-based fiducials" if you'd like to look it up. <S> It may give you some inspiration for your own method at least. <A> Using nothing more than inertial measurement unit (IMU) built out of accelerometers and gyroscopes is one way to determine location, but it suffers from error in the estimated position accumulating with time. <S> The Apollo spacecraft had extremely precise IMUs, but it still needed to receive updated position and velocity information from radar trackers on Earth, and angle measurements to stars, to navigate accurately. <S> IMUs work great for short-term localization, but for accuracy over time, even expensive IMUs are not enough. <S> Somehow you need to measure your position relative to landmarks in the environment. <S> This is commonly done using either a laser or sonar range finder to measure distances, or using a video camera to estimate angles. <S> If you don't even know the true locations of the landmarks you are using, then the task becomes the harder " simultaneous localization and mapping " (SLAM) problem. <S> ROS provides several packages for localization and SLAM. <S> I suggest browsing through some of the demos and videos to get an idea of what's possible, and what might fit your application best. <A> Get two (or more) usb webcams looking into the room from different angles, and place an bandpass filter that only lets IR (infrared) light through in front of them. <S> Hook up the cameras to a computer and find some software that will let you grab frames as bitmaps for you to read them. <S> This works best if you can trigger the cameras simultaneously, but if the tracked object is not moving fast, this is not required. <S> Since it will be the brightest dot that the cameras will see <S> (thanks to the IR notch filters), the algorithm to track this single bright dot should not be too complicated (especially being indoors, outdoors will complicate things quite a bit (I've done this by pulsing the leds very bright in synchronism with the camera shutter, having exposure time very short, around 400us, but you don't need this)). <S> Then develop software to triangulate the position in space from the 2d location that each camera gives you. <S> This position can be sent wirelessly to your device, so it knows where it is at. <S> You also need to somehow guarantee that the marker is always visible, and this can be done by placing multiple cameras and only using data from those that can see it at any particular moment.
| Install either IR LEDS or passive IR retroreflectors on your device (and shine IR light on it).
|
Designing FPGA code in block diagrams I've briefly flirted with FPGA development in Verilog, and its admittedly somewhat slower than writing the same program on an MCU (defining pins, and their behaviour, no modules available, etc). I've therefore been on the lookout for a software that can help me design using block diagrams or something more visual. I've heard of Mathworks Simulink, and the FPGA/ASIC line of tools from Synopsys, Cadence, Mentor Graphics, etc, but since I've never had a chance to get my hands on these I don't really know how intelligent or visual they are. Have you ever heard of such a software with such a feature set? and would block diagrams have any advantages over designing textually in Verilog? <Q> I mean you still have to write code, but <S> once its written you can use the symbols to abstract and get like a block version of the entity, and graphically interface between blocks (via buses etc.) <S> Also, Would a program like LogiSim work better? <S> At least if it had some kind of VHDL/Verilog extension! <A> You can use Xilinux or Altera. <S> Both have schematic entry tools that enable you to draw logic blocks and connect them with wires. <S> But it is typically easier to do it with Verilog. <A> Here is my advice to programming FPGA's graphically: <S> Don't . <S> There are two ways to use graphical design entry: 1. <S> doing all of the logic graphically. <S> And 2. <S> doing a mixture of graphical and text based design entry. <S> It is not practical to do the whole thing graphically. <S> There are logic designs that are simply too complex to do graphically, but are super easy using VHDL or Verilog. <S> Complex state machines are a good example, but in reality most things are easier to do in VHDL or Verilog once you know the language. <S> While doing a mixed text/graphical entry is possible, it really doesn't offer much advantage. <S> Once you know VHDL/Verilog good enough to do the text based parts of the design, the graphical parts offer no advantage of speed or understandability. <S> There are other disadvantages of doing a mixture as well. <S> For starters, your design is not easily ported to other FPGA architectures. <S> You have to master two different tools (text editor and graphical design entry). <S> People who look at your design will have to understand both. <S> It is harder to use normal text based development tools like version control systems, diff, make, etc. <S> In the end, using a graphical entry is just an added pain that doesn't prevent you from having to master VHDL and/or Verilog.
| Altera has a free version of their IDE ( Quartus II Web Edition ) products/software/
|
Can I connect two outputs to supply more voltage to speaker? http://ruggedcircuits.com/html/ancp01.html I have a very basic electrical question. I cant use two Outputs and have 10 volts? I am trying to figure out how to put out different voltages to a basic speaker to make noise. <Q> Yes, you can double the voltage even if two outputs share the same ground, if you do not use the ground, but rather take as your output the voltage difference between the outputs. <S> Of course, if the outputs output exactly the same thing at the same time, the voltage difference is approximately zero, which isn't useful. <S> What you must do is invert the signal to one of the outputs, so it goes low when the other swings high and vice versa. <S> This is called bridging , and is commonly done with audio amplifiers. <S> Bridging doubles the peak-to-peak voltage seen by the load, such as a speaker. <S> As a bonus, it usually eliminates the need for a DC-blocking coupling capacitor or output transformer. <S> The reason it doubles the peak-to-peak voltage is because it uses the difference between the outputs. <S> A single output can only express a voltage from 0 to V. <S> But the difference between two such outputs can range from -V (0 - V) to as high as +V (V - 0). <S> From -V to +V, we have 2V! <S> This is just the general idea, minus the background work to determine whether, or how, this is safely applicable to your device. <S> However, you get more current delivery capability, which you can exploit by using lower impedance load to develop greater power. <S> And of course, you can always drive two speakers with two outputs. <S> Two speakers side by side with the same signal at the same volume deliver twice the power, which is 3dB louder. <A> No, you can't just connect two output to get twice the voltage, in the same way as you cannot connect two batteries in parallel to get twice the voltage. <S> What you are trying to build is a simple <S> D/A converter . <S> You can do that using a resistor network to get a voltage <S> lower than your supply voltage and an opamp as voltage follower to keep it stable under load. <S> See also this tutorial or this circuit for more information. <A> You can't double the voltage in that way. <S> If it were me, I'd create a voltage doubler: <S> http://en.wikipedia.org/wiki/Voltage_doubler <S> If you don't actually need a higher voltage, I would use a PWM (pulse width modulation) with a filter capacitor (and maybe an inductor) to create a pseudo analog output signal. <S> http://en.wikipedia.org/wiki/Pulse-width_modulation
| If you take two outputs in parallel, which produce the same signal, you do not obtain an increase in peak-to-peak voltage.
|
Replacing a custom serial port connector with a Micro-USB 2 plug I currently have a very fragile solution to connect my embedded device to a PC's serial port. This is mounted on the PCB: http://www.digikey.com/product-detail/en/DF13A-6P-1.25H(50)/H3384-ND/530681 . Its companion must be painstakingly attached to the wires of an existing serial cable, and placing any sort of strain-relieving product takes too much expertise. The wires often break off. Only five pins of the six are used. I may be able to respin the board this connector must be on. I'd like to replace it with a Micro-USB B receptacle so that I can cut open easily-obtainable Micro USB cables and mate them to a DB9 connector. Is the 5th pin actually wired on most cables? I don't know much about the USB standard. Does this seem like a decent idea? EDIT: This port is factory accessible only. <Q> The ominous Pin #5 is usually the ID Pin and does not travel through the cable. <S> If I remember correctly, this pin is usually shorted to ground, indicating a device device or open, indicating a host device. <S> In other words: This pin decides if the device which is connected plays the host or device role. <S> PJCs solution is in my opinion a good one (but requires you to change the board) <A> The reason for this is one of your failure modes: <S> If you put a USB connector on the thing, somebody will some day plug it into a USB port. <S> When somebody does, they will wonder why it doesn't work, and if the device or their motherboard sees any damage, they will be pretty ticked off-- justifiably. <S> If you still feel compelled to do this, try to make sure that both the device and motherboard won't be hurt when somebody plugs it in to a USB port. <A> For factory debug/program, I like using FFC (flat-flexible cable): http://uk.farnell.com/jsp/displayProduct.jsp?sku=1012182&CMP=e-2072-00001000&gross_price=true <S> (many many variants, that's just an example) <S> It takes up a fairly small area on the board. <S> You'll want to buy or build a small breakout PCB on the other end of the cable - you can't solder to FFC. <S> My other solution which Tom L liked is "add an FTDI chip and have it emulate a USB serial port right there on the board": <S> http://www.ftdichip.com/Products/ICs/FT230X.html <S> ; this is very user-friendly but requires adding an IC. <A> If you do use a USB connector, it would be wise to make sure that the attached circuit is designed such that no damage will occur if it is connected to a regular USB port. <S> Eventually someone will try it. <S> Ideally though, I'd recommend using a different connector altogether. <S> Consider using an RJ11 or RJ45 connector. <S> Many Cisco routers use this approach for their console connections. <S> Here's one example of an affordable RJ45-DB9 adapter: https://www.amazon.com/dp/B06XFYYXDF/
| My recommendation is to find a suitable connector that is NOT a USB connector, unless you want to build a serial-to-usb adapter. If you use the other 4 pins, make sure that no user will really use a "normal" USB cable (and they will) as your device will most likely get 5V on the power pin (which is probably not what you want). They're not much larger, and they are very commonly used for serial connections, so it will be recognizable, and off-the-shelf cables are available from many sources.
|
Different behavior of FTDI USB RS485 on different computers I use a FTDI USB-RS485 adapter cable to connect a RS-485 device to a computer. The communication is fairly simple, the computer sends periodic requests, the device answers them. On one computer (Dell laptop, Win XP) this works as expected, but with another (Fujitsu laptop, Win XP) I have some problems. Every couple of request, the device does not answer them and claims a parity error. From what we see with PortMon and an oscilliscope the requests are always the same, so should be answered. The application on the laptops is exactly the same and all drivers (CDM 2.08.24) are the same. One difference is that the problematic laptop had a previous version of the driver installed. Any hints what I should check? Edit: So wie investigated the issue a little more: 2 laptops are working fine (HP, Dell, both WinXP and Intel Centrino), three others don't work (2 Fujitsu, Sony, WinXP, Win7, all Intel i5 or i7). We measured the signals with an oscilloscope, which are sent to the device. The not working laptops send signals, which jitters around between 3-6 microsec. So we assume, the device is not able to recognize the correct bits due to that jitter. We used different FTDI USB-RS485 cables, but always same symptoms.The working laptops have a jitter of max. 1 microsec. So my question: why jitters the signal transmitted by the cable on some computers, on others not? We also contacted FTDI support, but no sufficient answer yet. Edit2: So far we have 2 working laptops and several not working. It seems older laptops with Centrino stuff work, so far no newer laptop with Intel i5/i7 CPU worked. We suspected that there's no internal clock on the adapter and the adapter uses a clock from the laptop, but FTDI support confirmed that the adapter has its own internal clock.FTDI support hasn't heard of this problem in the past and has no solution so far. <Q> I encountered exactly the same problem: FTDI based USB<>RS485 converter (brand is "DIGITUS"), running at 57600bps, working on some machines properly and on some it send bigger chunks of data very very unreliable. <S> What I found out (after wasting lots of time of investigations on grounding and bus termination), is that on fast machines it did not work, because the RS485 driver chip (not made by FTDI) did not release the RS485-bus fast/reliable enough in relation with the output of the FTDI chip. <S> FTDI is releasing the bus after each and every byte (right after the stopbit) via the TXEN port and acquires it immeditately again for the next byte (which on fast machines is already in the buffer).The workaround was, to put a delay between every sent byte and it worked. <S> Yes, pretty bad workaround. <S> Wish FTDI would give an option e.g. in the driver to adjust the TXEN timing. <A> There are two possibilities as I see it. <S> 1 <S> : You are not completely overriding the FT232 configuration settings when you open the serial interface. <S> I've done fairly extensive work with FTDI's serial interfaces, and I can tell you that it is very possible to have a serial interface based on one of their devices be in a very weird state upon initial opening. <S> Depending on how you're talking to the port (are you treating it like a serial port, or are you using FTDI's D2XX driver?), I actually had one port open in 7E1 (7 bit, even parity, 1 stop bit) mode upon every initialization, despite the fact that I had never actually used it in that configuration. <S> The defaults are stored using a whole set of registry keys, but I would recommend manually setting all the port configuration options every time you open the interface, even if you are confident the computer you are on has the correct defaults. <S> 2 <S> : The other possibility I see is more involved: <S> Basically, FTDI doesn't make USB-RS-485 devices. <S> They only make USB-Parallel, and USB-RS232 devices. <S> As such, to make a FTDI based USB-RS485 interface, you need an additional buffer IC, that is generally controlled by some of the additional IO lines on one of FTDI's USB-serial ICs. <S> I would guess that it's possible some of the ancillary control lines in your USB-RS485 interface are being set up differently on each computer. <S> For example, see this schematic of FTDI's demonstration USB-485 <S> converter : <S> As you can see, the state of CBUS2 <S> and CBUS4 <S> are involved in handling transmit/receive and receive enable respectively. <S> I can conceive (though it's pretty unlikely), that the FS485 transmit or receive enable line is being configured to use the wrong pin by the driver on one of the computers (you can set TXEN and RXEN to be any of CBUS0-CBUS4. <S> This could cause interesting issues with the 485 interface <S> IC's control lines being floating/indeterminate. <S> However, This seems pretty unlikely to me. <A> Maybe a power quality problem? <S> The chips in adapters like that are usually powered by the PC. <A> We did some more testing on different laptops (sorry for the formatting, I didn't figure out how to format a table here): <S> Laptop Type <S> | Processor <S> | Serial Comms DELL Precision M6300 | Intel Centrino | OK <S> HP EliteBook 6930p <S> | Intel Centrino | OK Panasonic Toughbook <S> CF-18 | Intel Centrino | OK <S> Roda Rocky RK9 | Intel Core 2 | OK <S> Fujitsu Lifebook S Series | Intel Core i5 | FAIL (even on USB3-ports) <S> Sony Vario | Intel Core i5 | FAIL <S> HP | Intel Core i5 | FAIL (even on USB3-ports) <S> So it seems that laptops with USB chipsets for Intel i-processors don't work, older ones work. <S> However, I bought a USB-ExpressCard (sorry, German webshop) with Renesas USB 3.0 chipset and with that the Fujitsu laptop worked just fine. <S> So using ExpressCards is a workaround for us, but I still don't know what the exact problem is. <S> FTDI support seemed to be unaware of that issue.
| You could use a usb analyzer (software or hardware) to rule out software or driver issues.
|
How can cell phones location be detected? Specifically: cell phone not connected to internet, not used to talk, just poweredon. What if it's powered off? <Q> Using triangulation and signal strength to nearby stations you can get a very accurate location fix. <S> If your phone is turned off then it won't be found (unless it is a target of high level espionage, in which case it might be communicating... <A> Even further to what Rory and Andrew said, a cellphone could indeed be detected even if completely powered-off, with battery removed . <S> Every cellphone contains multiple antennas, which are tuned, resonant circuits. <S> You could (in theory, with the proper equipment) detect the presence of a cellphone in a given direction with radar techniques, detecting a peak in reflection at a particular frequency (maybe slightly off the nominal frequency of the antenna, or where it's supposed to be more untuned/reflective). <S> And with triangulation, you could pinpoint the precise location of the powered-off cellphone (or of multiple cellphones) Science fiction? <S> Well, just consider that it's similar to the cheaper technique used in RF security tags (where absorption is measured instead of reflection)... <S> If you need an analogy, the difference between RF security tags and what I'm talking about here is the same difference that there's between radiography and backscatter x-ray imaging . <S> Of course in this way, if the cellphone is totally powered-off, you will only be able to know that there's a cellphone there. <S> You will not be able to identify the cellphone. <S> But again this is supposing there's no backdoor in the cellphone RF chips enabling them to work like an "high-distance RFID tag"... <S> Beaming high power RF to the device could give it enough juice to let it reply with an IMEI... <S> Is this even more science fiction? <S> Well, something similar it's been done in 1946 . <S> Are you really sure a proper passive, high-distance identification is not feasible with today's technology?... <A> As well as Rory's answer, many modern phones now have GPS on board and many use Assisted GPS which broadcasts the position. <S> Also remember that a "switched off" phone may not be entirely off (more of a standby ) <S> so may still be maintaining some form of contact with the network. <S> Only if you remove the battery can you be sure it is powered-off <A> If powered off you could NOT detect the IMEI. <S> End of story. <S> If were playing the 007 game, you could however bug a cell-phone, a SIM card or micro sd card could be modified to do this in theory, but you would probably need the resources of a fab to achieve in practice.
| With a very focused transmission over a short distance you may be able to detect absorption reflections, but any other wiring or electronic devices would certainly produce enough false positives for this to be unreliable even to 007 over a usable distance, you certainly couldnt detect a specific cell phone. When a cell phone is on, its radio talks to base stations, so even at a simple level, the carrier knows roughly where the phone is.
|
Controller that supports multiple LCDs, ideally up to 5 Are there any controllers that support multiple LCDs? Ideally I'd like to connect up to 5 LCDs to a single controller. The sort of LCDs I'm mainly interested in are smallish units around 320 x 240 such as this one . It would be even better if the controller was compatible with the .net Micro Framework but that's not essential. <Q> I'm assuming when you say controller, you mean a microcontroller, the confusion only arises because LCDs themselves have controllers. <S> The answer is yes, <S> the STM32F103RE would work for what you want to do. <S> It's compatible with the .net micro framework <S> and it has plenty of options to run serial displays on, be it SPI, I2C, or asynchronous serial. <S> Perhaps a display like this one . <S> Whichever display you go with, try to find one with onboard memory, you'll save yourself some headaches that way. <A> As mentioned in comments using <S> Basically they expose API calls that allow you load images from SD card, manipualte them, overlay other images, superimpose shapes and text. <S> You just need to write your own classes in .net <S> micro todo <S> what you need it to do. <S> I have bought a serial LCD from uLCD <S> - They are really great - and you can flash between firmware to give you complete control. <S> The back with the Serial port on the bottom left. <S> The LCD. <A> SPI-based LCDs can be quite fast, and it is relatively easy to interface an arbitrary number of them to one microcontroller with a small number of I/O pins and a small amount of extra circuitry. <S> For example, if you want to connect up to seven such LCDs using three I/O pins and one external 74HC164, you could wire the clock and data inputs of all the LCDs to the clock and data outputs of the processor's SPI port, wire the data input of the 74HC164 to the SPI data wire, and the clock input of the '164 to an extra I/ <S> O pin on the processor. <S> Wire seven of the '164 outputs to the chip-selects on the displays, and the eighth to the register-select input of the displays (if they have one). <S> To output data to some or all the displays, bit-bang <S> the desired bit pattern to the '164, and then use the SPI port to blast data to the display.
| Serial interfaced LCD's is a good solution.
|
7805 Regulated DC Power for two devices I need to create a circuit specifically for powering two devices.These devices include a device, which has to be powered via 5V USB and another device which has to be powered with at least 6V (all DC). Now, 12V power supplies are quite cheap. Can i simply use a 7805 regulator to power the 5V device? Does it support 12V as an input?What about the other device? I thought about using a simple resistor for this one, as current drain (should) remain constant over time.Is that feasible? How would you implement such circuit? Thanks in advance. <Q> You can use your 7805 regulator to provide a 6V output. <S> How? <S> Take a look at the datasheet: <S> The way the 7805 works makes it possible to get any voltage between Vin-2V and 5V on the output. <S> The 7805 works in such a way, to ALWAYS achieve 5V between its ADJ and VOUT pins. <S> So the output voltage is as follows:$$\frac{5V}{Vout}=\frac{R1}{R1+R2}$$ Pick R1 and R2 to get 6V on the output. <S> Afterwards, you can use diodes to drop that voltage a bit. <S> A single diode provides a forward frop of approx. <S> 0.7V. <S> You can get 6V and 4.6V. <S> Depending on your requirements maybe you can get away with 6.2V and 4.8V. <S> You can also try using diodes with different voltage drops to get a better output. <S> OR, you can use a separate regulator, since they're so cheap. <A> For the 5V device you can probably use an 7805 (don't forget the decoupling C's, two 100nF's will do fine), but you must check the (maximum) current your device consumes. <S> A reverse diode over the 7805 is also a good idea (because your device probably has a large elco at its input). <S> And when you are at it, include a series resistor at the input too. <S> There has to be a maximum, 120V will definitely let out the magic smoke. <S> If 12V is below the maximum you can indeed use as 12V supply. <S> Provided of course that it can deliver the total maximum current. <A> Yes, the 7805 does work with Vin of 12V. And the other device can be powered from the same 12V with its own regulator for whatever voltage it needs, e.g. 7809 for 9V. <S> The only thing to note is the current consumption of your device(s): <S> Those regulators produce heat proportional to the current drawn. <S> Making 5V out of 12V @ 1A generates 7W of excess heat which is too much for the 7805 without massive heat sinking. <S> At 100mA however, there's only 0.7W, which may be quite tolerable. <S> (Still gets hot though! <S> You have been warned :)). <S> Look at the datasheet for your regulators to find out what maximum current they can provide in your installation. <S> If you find that you need more current than the regulator(s) will withstand, or that you don't want the massive waste of energy dissipated as heat, you can have a look at some switching regulators, like for instance those KIM-... <S> (KIM-055 for 5V) modules they sell off everywhere these days.
| An 7805 can deliver 1A, but with 12V input it would dissipate 7W, which requires a good heat-sink. Depending on your actual requirements, you might get away with using two diodes and a 1.4V drop. For the at-least-6V device: find out the maximum input voltage.
|
Optocoupler with phototransistor base lead I'm thinking about using 4N25 optocoupler - it has a separate lead for base of phototransistor. How do I use it? I suppose I can't leave it floating? <Q> The base terminal of certain phototransistor optocouplers is exposed to address specific design requirements, such as below. <S> If those requirements do not exist, a part without the base pin might be a better choice - the latter are typically 4 or 6 pin parts as opposed to (usually) 8-pin parts incorporating the base pin: <S> Usually cheaper, less space needed on the board, and less routing too. <S> Faster switching on trailing edge of pulsed signal :For this purpose, a resistor is connected between base and emitter (or ground), of value calculated as per specific transistor and required switching time. <S> For a quick & dirty general value, just stick in a 220k to 470k resistor there. <S> Impulse noise immunity (or reduction) at output :This is required when input current suffers brief spikes or sharp extraneous rise / fall, such as due to poor power regulation. <S> A capacitor is connected between base and emitter of the phototransistor. <S> This acts in effect like a low pass filter, adding some smoothing to the input signal, and bypassing sharp spikes. <S> It does reduce signal sensitivity and introduce a delay, though. <S> For a quick and dirty value, use a 0.1 nF capacitor, though it is worth trying higher and lower capacitances, depending on adverse effects if any. <S> Current transfer ratio matching :This third function applies when multiple optocouplers are used in parallel for a design. <S> There will always be some difference in performance between parts, even from a single batch. <S> If matching them up is critical to the application, various approaches to provide appropriate bias to the base are used. <S> No quick and dirty approach in this case. <S> To conclude: No, the base should not be left floating , or it will act as an antenna, picking up EMI noise and superimposing it on the output. <A> There is not much difference than the standard BJT design and an optotransistor. <S> The base can be left floating but it will severely reduce the turn off speed since any internal base capacitance cannot be <S> discharges(which is why they gave you a direct connection to to the base. <S> Optocouplers do not have this connection). <S> The base picking up spurious EM emissions is not a huge issue with BJT's unless the CTR is very high or in critical applications. <S> You can generally use any optotransistor as an optocoupler. <S> If you want faster speeds you should tie the base to ground through an appropriately sized resistor so that the internal capacitance can discharge in time. <S> Generally this means you have to have a pull up or down resistor to provide a relatively low path to ground to either prevent spurious results from EM or to allow for discharge of capacitance in a timely manner. <A> If you have access to the base, you can use the base-emitter junction as a photodiode; iirc this is faster than using a phototransistor. <S> The current transfer characteristic is also much more linear (although for analog stuff it won't come close to servo optocoupler) <A> It could also be handy for testing maybe? <S> You might have the LV side of the equipment at your bench, while the HV side is really inaccessible in the factory. <S> So tickle the base with 5V on/off to simulate the HV side which is missing in the lab. <A> I've used photo-transistors very successfully in high-interference environments (the SUN, for example), having DC_negative_feedback to servo-out the large steady state currents, and sustain the collector in a VDD/2 biasing condition. <S> Thus for beta=100 photo-transistor, with 10Kohm resistor from collector to +5v, with 0.25mA thru the collector to cause 2.5 volts drop across the collector load, I'd pick two resistors to drop the (+2.5 - 0.6) = <S> 1.9 volts and provide the 0.25mA/100 = <S> 2.5 microAmps. <S> Given 2.5uA is 400,000 ohms per volt, we need about 750,000 ohms total, and two resistors of value 390,000 are about right. <S> The key is to place a LARGE capacitor at the midpoint of the two base-collector biasing resistors. <S> 1UF gives about 1Hertz F3dB, but you have to remember this is in a feedback loop, and the 1Hertz is modified (speeded up) by the loop gain. <S> Again, this is a great way to really reduce the impact of sunlight, and provide some attenuation of 60Hz flicker from incandescents.
| In any case, just treat any optotransistor as a normal BJT circuit, but that the input to the optocoupler has a very high impedance to the base when off(that is, no light = "floating" base).
|
Is this flux residue or the PCB is burnt? I bought a new laptop, and when I was about to add an SSD, I saw this. The store tells me it's nothing, and if anything, just flux residue from production. To me, it looks like overheating. That is; a bad connection or something is causing a lot of heat, and thus these brown and dark spots around, especially the leftmost pin, and a black area on the edge of the PCB. What do you think? Doesn't it look like it is burnt? ADDED: Let me add an extreme close up for details: http://amews.net/ExtremeCloseUp.png What about the edge - seems like it has been damaged (not a sharp edge anymore) - does that matter? What about the brown color on the connector itself ? I suppose that the connector would not be plugged in while soldering. How should flux end up there then? http://amews.net/Edge2.jpg <Q> This board was probably manufactured in a part of the world where the labor rate is low. <S> As a result, manufacturers have more flexibility in trading off costs in getting everything right up front versus having to fix a few things afterwards. <S> Your pictures aren't very good, but it looks like flux residue. <S> This is common when hand rework is performed. <S> If this is rosin flux, which is sortof looks like, it's totally harmless. <S> It's basically like epoxy or low grade amber. <S> Does the product work correctly. <S> If so, I would leave it alone. <S> If it really bothers you, try swabbing the area with a cotton swab dampened with isopropyl alchohol. <A> You've already been running it right? <S> Just run it for awhile, power down, and quickly feel this spot. <S> If it's getting hot enough to turn the PCB brown <S> then you'll know damn quick if overheating is the issue or not. <S> Additionally, you can make sure the battery and power are disconnected and then clean this spot with some isopropyl alcohol on an old toothbrush or paintbrush. <S> Flux should come right off. <A> Looks like flux residue. <S> Is the board still working fine? <A> Looks like flux, also looks like a badly installed connector :) <S> A little hard to see in the pic though. <A> I think that notebook was repaired at manufacturer's plant. <S> Manufacturer for board processing purposes uses no-clean fluxes or manufacturer can put all board into cleaning ultrasonic bath and wash out all flux residues. <S> Also we can see on photo that the corner of board is damaged. <S> It is the trace of using of soldering iron and maybe desoldering wick. <S> When one use desoldering wick, it scrubs the top layer of board. <S> And it may be damaged.
| It just looks like flux. I'd try to clean it off with some isopropyl alcohol. So such marks are usually left, when service engineer repairs board with common flux and common soldering iron...
|
Is hot glue a good insulator? I need to mount some relays that I have soldered wires to. If I place them on a non-conductive surface and use a generous amount of standard glue from a hot glue gun, will that be relatively safe? I'll be running mains level voltage through the relays. According to this aricle hot glue melts somewhere between 121 °C and 193 °C which I hope is much hotter than the relays would ever get. Is there a better way to mount these relays? Obviously using a PCB would be best, but the cost is a bit prohibitive for a custom designed PCB. <Q> There are a variety of hot glue adhesives, and there's no blanket statement that could be made to cover all of them. <S> However, I has seen industry use (ie, on the assembly line) of hot glue around the capacitors of the high voltage section in a CRT for vibration purposes. <S> The glue came into contact with many of the leads and PCB tracks in that area of the PCB, so I know that there are hot glues which are suitable for electrical use, and appropriate even for high voltage insulation, though insulation was not the primary goal in this case. <S> Is there a better way to mount these relays? <S> There are relay mounts and sockets for many styles of relays. <S> You can also get relay connectors and relays with mounting tabs. <S> These are preferable to adhesives for many applications. <S> When I've needed to mount relays in a chassis I've used zip ties and hot glue for short term and light duty usage, and metal brackets for heavy duty or long term usage. <S> I don't typically use hot glue on the bare wires and terminals themselves, and if I do I use heat shrink tubing to insulate the wires and terminals first. <A> Even if hot glue is a good insulator , you have to look for the components found in it , they maybe corrosive or harmful. <S> My experience with hot glue in the past was bad. <S> I have used it on bottom of low power (5v) PCB to insulate it from the metallic enclosure <S> this has lead mysterious failures boards after 3-6 month. <S> The material used in pcbs to hold big components in position such as transformers and capacitors is usually Silicon RTV which is specially made for electronics and contains no acids that could harm copper and tin solder joints. <S> An example can be found on digikey : <S> http://www.digikey.com/catalog/en/partgroup/rtv-silicones/32319 <S> An alternative would be to use relays or contactors that contain screw terminals for wire connection and DIN Rail mount for fixation. <A> I have used glue sticks in high (22kV and above) and low voltage electrical circuits for many years and have never encountered any problems. <S> In terms of resistance, the glue will be open circuit on an insulation tester. <S> You would need considerable heat to melt the glue sticks, so there should be no problems in terms of heat causing the joints to melt. <S> All in all, in my experience, it's a go! <A> I have used hot glue before. <S> It is a good insulator, and it is also strong for phone charging cables, etc. <S> However what I learned with boards, such as inside an adapter for my computer, is that the hot glue, when applied can melt parts of the board and cause damage. <S> So keep that in mind when using it. <S> Other than that, it is a good option in my opinion. <A> Bad experiences with hot glue in computers where applied to the 5 and 12 volt DC. <S> Eg to ensure a cable does not fall out in transit a dab if hot glue applied. <S> Within two years there is an acrid smell, huge amount of smoke, large orange glow within the computer case, severe charring, damage to the cabling and associated area. <S> Obviously there are many types of hot glue <S> so there's no standard that you can apply and state <S> it's ok. <S> Experience we've seen would be NO, unless qualified by the manufacturer for use in the area intended. <A> Other answers already mention the variety of hot glue's chemical composition, possible corrosiveness, etc.; but another harmful possibility is electrical breakdown happening during prolonged application of voltage. <S> In other words: maybe the glue's resistance could decrease (enough to short the circuit) over time under some voltage, as its composition breaks down. <S> See https://en.wikipedia.org/wiki/Electrical_breakdown <S> Thus I think, as others already said, that one must not use just any hot glue for electrical insulation.
| You can test your hot glue with a mega-ohmmeter if you have concerns about the particular formulation you are using.
|
Is noise a random process? I have some confusion in noise signals and their nature. Can any one explain how the nature of noise signals is. Is noise a random process. <Q> Adding to @Kaz's answer, noise is normally modeled as a random process. <S> Even an interfering RF carrier or hum can be modeled as a random process (random phase sinusoid). <S> The theory of random processes is very elegant and allows for simple analysis of systems with "noise". <S> Moreover, even deterministic components such as quantization or rounding errors are modeled as random processes (independent of the actual signal) in order to study system performance. <S> And these approximations are quite good in general. <A> What I've been trying to promote is a more nuanced classification system. <S> While it all can be classified as "noise" - i.e. an unwanted signal most noise specialists view things the following way: <S> Interference: <S> Signals from other parts of the circuitry or from outside sources that are unwanted. <S> Best characterized by the possibility of removal through additive or subtractive methods. <S> Emphasis on possible. <S> Ultimately fixable in design or through modification. <S> EMI/RFI effects are one example. <S> Artifacts: non-linear or mixing effects in the circuit that in some cases are like case 1 , possibly removable or in some other cases behave like case 3. <S> Third order effects in ADC's and conversion tones and spectral splatter in ADC's are examples. <S> Noise: Fundamental independent noise processes that are stationary and are characterized by probability distribution functions. <S> Typically poisson or gaussian noise processes that follow RSS (Root sum of squares) <S> addition (i.e. addition of energies). <S> Fundamentally not removable but possibly can be reduced. <S> Johnston, shot noise and telegraph noise. <S> Treating "noise" (the general term) <S> this way allows someone to understand the possibility of abatement and analysis since mathematically they are treated very differently. <A> Noise is any difference between the pure signal that is desired by the engineer, and the actual signal. <S> Well, not any difference, but a difference not related to that signal. <S> For example, an unwanted attenuation of some band of frequencies isn't noise, and neither is distortion. <S> Noise does not have to be random. <S> An unwanted periodic signal, like power line hum or radio frequency interference, are not random, but are noise. <S> What is regarded as a proper signal in one circuit becomes noise if it crosses in an unwanted way into another circuit. <S> Your question is probably about noise generated within devices, such as Johnson noise. <S> Such noise is random. <A> White noise is supposed to be having the Gaussian distribution for calculations.when you read about fading in signals which can be due to signal overlapping or distortion due to reflection the noise or the disturbance is modeled by distributions like Rayleigh or Nakagami.
| Actually the noise is a random process which can follow different probability distributions.
|
What resistor to use with this RGB LED? i have this led, and im not sure what resistor to use to drop the 5v current to an appropriate voltage and produce the appropriate current. the LED is rated at 200mA, but the data sheet says i should apply 150mA through it. my micro-controller outputs 5v i think, but im not sure as i do not have a multimeter, but i apply 5v to the vcc of the micro-controller. my questions are: what resistor should i use with this led? (i got 33 ohms as theanswer, making me thing i dont need a resistor). if i do need a resistor, would a 1/2 watt rated resistor work? the lowest value i have is 100 ohm, is that close enough? the data sheet does not explain how to solder the LED- do i just connect the b- and r- points to ground and the b+ and r+ to micro-controller outs, and if i want blue i do low r+ and high b+? Sorry about the extensive questions, i never had any formal education or experience in this field. thanks! <Q> You should use 3 different resistors, one for each color, although the blue and green have the same specs. <S> At 150mA the forward voltage for the red is 2.2v, green is 3.5v and blue is 3.5v. <S> So you should use a 22ohm 1watt resistor for the red, and 10ohm .5watt resistor for the green and blue. <S> You have a bit of wiggle room on these figures, and if you don't have a resistors that can handle that wattage you can use more than one in parallel just make sure you calculate the correct resistance between them. <S> Also I doubt your microcontroller can provide 150mA <S> (it's probably more like 20mA,) so you will probably need to use a transistor on each color so that they can pull enough power. <S> Take a look at this image for how to hook up the transistor to your system. <S> Although ignore the 12v and multiple LEDs. <S> You may also want to have each color driven by a PWM pin, so that you can alter the brightness of each color to change the overall color at will. <A> In a rush to get out of here, but hope this helps. <S> Ask <S> question and me or someone will answer :) <A> The listed maximum DC current is 150mA. <S> I would not want to push it that hard. <S> Forward voltages come from the table you listed R: (5V-2.2V)/100mA = 28 <S> Ohms <S> G: <S> (5V-3.5V)/100mA = 15 <S> Ohms B: <S> (5V-3.5V)/100mA = 15 <S> Ohms <S> Those resistors are there for current limiting. <S> If they are not there, your LED will not last long. <S> Also, 100mA is way more current than your microcontroller <S> will be able to source. <S> You'll need to add a switch to each LED in the package. <A> This answer doesn't take into consideration the lumens per mA of each color of LED. <S> Looking at the datasheet for the Cree ds-UHD1110-FKA color LED, page 2 shows the typical electrical and optical characteristics. <S> Here you will find the Luminous intensity at 5mA. <S> For this particular LED, they are: Red: 78, Green: 106, and Blue: 24. <S> So, if you drive all three colors with the same current (5mA) the brightness will be radically different. <S> Because of this, you'll have to recalculate your resistances based on this intensity difference. <S> I suggest you use a ratio from one to the other. <S> This will be a close first guess. <S> You can see later in the datasheet page 5 <S> the intensity for red is pretty linear over current, but falls off for green and blue. <S> This means, as the current goes up, red will be brighter. <S> I find it best to just pick a max current for blue (since it's the weakest) and using the graphs and intensity ratios <S> calculate needed values for red and green.
| You absolutely need a resistor, in fact, you need three.
|
Reasoning behind "neutral pin nearest the edge" rule of thumb? I've been told that there's a design rule of thumb that whenever you have a "bus" providing power and ground (for example, in an array of PWM outputs) that the ground connection is placed nearest the edge. What is the reasoning behind this? <Q> A practical reason: If you had the signals bus at the outer edge, they can be more difficult to route. <S> In addition, it does become a little bit of a ground wall at the outer edge, which is usually a good thing. <A> I was always taught that it is because the ground rail of a circuit normally runs around the outskirts of a board to help preventing any external noise. <S> This is especially important in amplification circuits for obvious reasons <S> but I suspect nowdays with <S> surface mount and multi layer boards its probably just an old habit/rule of thumb with no real benefit. <A> Ground ring around the periphery as a sort of EMI shield is what I was taught, but I understand that in a quarter century, the validity of that purpose may have worn off. <S> Pure speculation alert: <S> One possible benefit of keeping the neutral rail consistently at the outer periphery of a board is that accidental contact between two boards near the edges would not cause catastrophic short circuits. <S> There is no reference I can quote to validate this speculation, though. <A> Lots of interesting reasons from everyone! <S> I worked on a robotics team for a number of years and we always followed that rule largely so that a stray wire that was touching the grounded frame was slightly less likely to hit a positive lead. <S> With our team it was never a hard and fast rule though. <S> We did it when possible and convenient. <S> The extra benefit of that "rule" is that in a three-pin system, putting the positive rail in the middle and having a current-limiting resistor on the signal line makes it more difficult to damage the system by plugging it it backwards. <S> We actually set up one system so that it was ground-positive-ground to introduce the "can't plug it in backwards" property because it was a $400 part we were plugging in! <S> With PWM lines it's also just a matter of practicality. <S> That will match how commercial servos are wired hence why you normally just make it match so that you don't rewire all the servos yourself. <S> Anyway, no idea if this also is passed down due to EMI reasons, but that was why we did it.
| Essentially it was a small protection against having grounded things short out because the high-current positive rails were shielded by the ground pins.
|
How to make an USB keyboard work with Bluetooth instead? I have an USB keyboard ( HHKB ) which has some great irreplaceable features(That's why I would not like to buy a Bluetooth keyboard directly) and I love to use it very much. But the only improvement I expect is to avoid its USB wire. I would like to connect it to my laptop(a Macbook Air) wirelessly with Bluetooth. I have searched the Internet but found only a little pieces. I still don't know what I need to prepare and how to do it. Is there any small device which can be plug into the USB port of my keyboard and convert it to a Bluetooth keyboard? If there's not, how can I make one by myself? Thank you! <Q> You can use Handheld Scientific's adapter which is battery powered. <S> Here is a build log for a Model M.I <S> don't know if HHKB has enough free space, but one always can hack something up. <S> You can also check out adafruit's ez-key <S> , I guess it'll be fairly easy to use it, won't take up much space in the keyboard either. <A> The Arduino Micro , announced just yesterday by AdaFruit and Arduino, might be a good solution for you. <S> The new board is compatible with the Arduino Leonardo and uses the ATmega32u4, thus it comes with built-in USB functionality. <S> The size is 1.9 x 0.7 inches (48 x 18mm), with a microUSB socket at one end. <S> Note that this board is different from, and actually bigger than, the SparkFun Pro Micro , which is a mere 1.3 x 0.7 inches and also comes with the same MCU and USB functionality - <S> so <S> I'm not quite sure why the Adafruit product was announced at all . <S> A power source and an equally tiny Bluetooth module ( <S> e.g. 1 , 2 , 3 , 4 ) would be needed, and of course the functionality required will have to be coded. <S> Before going down that path, this other question is a valuable caution about 3.3 Volts v/s <S> 5 Volts in connecting up a module to any 5 Volt Arduino. <S> There are also several other, older Arduino boards of various diminutive sizes, such as the unbelievably tiny yet fully capable FemtoDuino at 0.81 x 0.6 inches (20.7 × 15.2 mm). <S> However, these require USB to TTL conversion either using a FTDI chip or otherwise. <S> None of the various ultra-tiny Arduinos seem to support USB natively, but searching deeper might prove otherwise. <A> <A> According to this guide <S> it seems kinda easy. <S> Just the 4th point is kinda tricky. <S> 4.Connect <S> the radio transmitter to the micro-controller that is attached to the keyboard. <S> The micro-controller and the radio transmitter have designated interfaces for this connection. <S> The transmitter should be configured to transmit at 433.92 MHz. <S> Radiotronix offers a wide range of transmitters suitable for this type of use. <S> The transmitter must be powered by an internal battery.
| Check out ATEN TAP CS533 bluetooth converter, you will find the device you want.
|
Using lots of slide potentiometer for computer control I want to mount a bunch (say 16+) slide potentiometers in a long project box (or other housing that can sit on a desk) that I can use to interact with software on my computer, specifically lighting software, which I would program. How could I get the output of these slide potentiometers into my computer so software could read the values? I'm thinking using a USB input. Keep in mind I'm a beginner at electronics (but I can do software). <Q> You need some kind of analog I/O board ( that basically contains ADC converters to communicate with the PC ) there is also multiple channels available. <S> You need a channel for each potentiometer ( unless you want to do some multiplexing ). <S> Here some examples . <A> If you don't want to deal with microcontroller programming: Buy a Teensy++2.0 board for $24: <S> Use the GenericHID software to connect up to 8 potentiometer wipers to the F0 through F7 <S> pins: <S> You can read the values with libhid, etc. <A> The choices for slides seem to be pots or linear encoders. <S> For pots you need a system with many analog inputs, then you need to send them to your computer. <S> Might I suggest using a MIDI over USB descriptor. <S> Many Digital Audio Workstation controllers work with this protocol, and the libraries for the PC side should be readily available. <S> In fact, if you're in a rush, you might look into the commercial availability of these controllers. <S> In the Audio Workstation world, they tend to call them "control surfaces" "Cheap" is relative. <S> About $300 gets you this , or plenty of others like it, which might have enough sliders and pots to meet your needs, and you can start to program the host side right away. <S> You also know it will work, and you don't have to worry about design. <S> This is a huge advantage (unless, of course, you're doing this for the design experience!) <S> I don't think you'll be able to build anything like what you describe for much less than $250-- assuming you own everything in your development chain already, so we're in the ballpark.
| After programming the device and wiring it up, it will connect to the computer as a HID input device. Pots would probably be the less expensive option, and probably easier to program, but you need to make sure that you get a microcontroller that can handle the job, or a separate a/d converter. USB seems like a no brainer.
|
Power from battery when primary source fails I'm attempting to design a circuit that will be powered from a 12V primary source but if the power fails then a relay switch to battery (which is maintained charged by an UC3906). The idea is that if primary source is present the MOSFET is on, activating the relay. When primary source fails the MOSFET is off and the relay go to the position showed in the schematic, the application is now powered by the battery.Do yo see this reliable? Update: I wish to ensure that no current is drawn from the battery if primary power is present and I prefer to not put the primary voltage above the battery voltage (which is already slightly above 12V), with the two diodes solution I added a pMOSFET to get it (may be D1 is not necessary now?). <Q> This circuit idea is OK if the "application" can live with a momentary dropout of its supply voltage during the changeover. <S> There are two things that cause this. <S> First the 12V primary power must drop to less than about 2V or so before the 2N7000 N-FET will turn off. <S> Secondly the relay contact switch over time will take a millisecond or two. <S> If you want uninterrupted power to the "application" during the changeover then you could consider several alternatives. <S> 1) Add a comparator circuit that detects when the primary 12V has only dropped a small amount (such as to 11.4V) and switch the relay before the primary rail fails. <S> Some charge storage capacitors on the "application side" can minimize the voltage droop there while the relay contacts are switching over. <S> 2) Use a pair of power MOSFETs to switch the voltage instead of the relay. <S> These would switch much faster than the relay and the "application side" hold up capacitors can be much smaller. <S> 3) Use just two power Schottky diodes to OR the two power sources to the application. <S> No switch over control logic required but you do lose some voltage from the sources to the application power rail. <S> NOTE: <S> In your schematic you need to add a back biased diode across the relay coil so that at the time the the 2N7000 FET turns off the inductive kick of the coil will not take out the FET. <S> Tino proposed to change his circuit to use the two diode approach as follows: <S> He questioned as to whether the Diode D1 would still be needed. <S> Unfortunately the diode would still be needed because of you look closely at the data sheet for the IRFU9024 you will note the body diode of the MOSFET.... <S> You can quickly see the problem! <A> Further to Michael's answer, I have a similar (but opposite) circuit, for trickle charging a battery from my car electrical system, for my in-car ham radio installation. <S> This uses a TL431 shunt regulator to switch the relay on or off, when the supply falls below 12V (adjustable). <S> The design is straight out of the data sheet. <S> A very similar design to mine can be found on the net , here (although that is not my blog) <S> A similar set up looks relevant here, for you... <A> Switching between backup batteries and primary supplies can be done passively with diodes. <S> The circuit can be fed from the backup battery via a diode. <S> The primary source connects below this diode. <S> When the primary voltage is present, the diode is not forward biased because the voltage from the battery is equal to the primary voltage. <S> When the primary voltage cuts out, or simply drops to 0.7V less than that of the battery or lower, then the diode becomes forward-biased and current can flow from the battery.
| You can ensure reverse bias by having the primary voltage be slightly higher than the battery.
|
Why does touching one 3.5 jack contact (in headphones) together with audio device socket's outter ring make noise? When a 3.5mm jack of headphones contacts with sound device's socket, headphones produce slight noise. Why does this happen when only one wire is connected? I thought there are supposed to be at least two contacts to make a speaker produce sound. <Q> I would guess that this has to do with a Ground Loop and the other conductor is your hand. <A> My guess is your ground is floating and full of high levels of common mode noise perhaps from a floating external charger. <S> The imbalance loading of headphone cables can be enough to induce a differential voltage. <S> The secondary has a floating ground. <S> The headphones are only connected by a single wire on the tip. <S> There is a stray reactive coupling to free space which is also coupled to the input charger cable. <S> Increasing the coupling (or lower impedance) to a common mode ground will suppress the stray hum. <S> (e.g. AC ground). <S> Also connection of low impedance load to both headphone contacts, tip & ring would suppress the stray common-mode. <A> The noise is termed as "click" or "pop". <S> That happens because of voltage potential present on the output of the power amplifier that moves the element of the headphones to produce a "click". <S> Some of the advanced audio amplifiers don't produce the click. <A> It's because one of the devices is plugged into the wall. <S> 60Hz (for the US) <S> noise is present in almost anything indoors. <S> The signal for audio on your headphones is a voltage, voltage is not an absolute measurement, it's always relative to something (which we usually call ground). <S> Usually those contacts themselves have 60Hz noise on them, but as long as it's in phase, it won't affect the audio signal. <S> If you only touch one contact, there isn't any in phase 60Hz noise on the floating contact to cancel the noise, so you'll hear the 60Hz on your device.
| When both contacts are made for the single channel of a headphone the voltage being translated to sound is the difference between those contacts. The transformer has capacitive coupling from primary to secondary.
|
Ideas for what to use as project enclosures/cases I have seen myself working on a growing number of projects over the past few months. The one thing I have started to dislike is seeing the circuit board (and often my messy soldering) after I consider my project complete. I would like to start putting my projects inside small project boxes/enclosures, but have noticed that items dedicated for this purpose are often overpriced for just a plastic box. I was wondering if people here had any tips with regards to what they use to encase their finished work. I am open to constructing simple boxes as well, which have the added advantage of being customizable. Any tips there would be appreciated as well (i.e. what material you use, overview of construction method, etc.) <Q> ( Image from Adafruit ) <S> For more examples, see a toy , an amplifier and another , a sound generator , a USB charger , one could go on all day. <S> A fringe benefit of using a metal can like the Altoids, is EMI / RFI reduction, both emission from poorly designed circuits, and from the outside into the circuit. <S> For smaller circuits, round metal shoe polish cans are popular, and again qualify as " EMI-Safe Device Enclosure ". <S> ( from Wikipedia ) <S> They're sometimes found at garage sales or the scrapyard, in a variety of sizes and designs. <S> My favorite are the ones with a double hinge, and a little metal latch in the front. <S> Back in college, I built myself a bench power supply in a big cigar box, that is still around somewhere. <S> The fringe benefit of wooden cigar boxes is protection from electrical accidents when working with main line power input to your device. <S> A third standard go-to option in cases where robustness is not a concern, is the small Pringles or other potato crisps cardboard can. <S> They're especially convenient for cutting holes in , for sockets and connectors. <S> The 2 to 3 inch height and diameter make such boxes useful for circuits with a transformer in them, such as non-switched (good old) power supplies. <S> Finally, plastic enclosures aren't necessarily expensive: You can sometimes pick up assorted sizes in lots of 5 or 10 from eBay for under 1 US$ a box, and manufacturers offer a variety of standard enclosures starting in the $3 range, probably cheaper if you search around. <A> How crazy do you want to go? <S> Here's a cheap solution I've used to make proto cases <S> http://www.firstcut.com/?awk=true <S> or these guys http://www.shapeways.com/ <S> kind of want my own maker bot but haven't justified it to myself yet. :) <A> Electrical boxes (like for light switches) can work. <S> Radio Shack sells project boxes. <S> Small projects will fit nicely into an Altoids tin. <A> These boxes in various sizes are <S> quite affordable and DIN rail mountable. <S> http://www.budind.com/view/Plastic+Boxes/DIN+Rail+Mount+Multi-Board+Box
| Another "hacker's standard" that has been around for decades is the wooden cigar box . One popular and traditional hacker enclosure has been the classic metal Altoids peppermint can - to the extent that some products and prototyping PCBs are shaped to precisely fit one.
|
Clock skew? Good or bad? So, I've been reading up on clock skew. I came across the fact that clock skew can be incredibly useful, in the sense that positive skew can be used to speed up the circuit by increasing the clock's frequency. Then why are there so many measures taken to completely eliminate clock skew? It seems to me that having a controlled amount is extremely beneficial? Are there any harmful effects of clock skew? <Q> Clock skew happens when clock edges happen at different times in different blocks of the circuit. <S> This may be due to physical distance, clock buffers or parasitic reactances. <S> Skew can be positive or negative (clock anticipated or delayed), depending on which signal is taken as reference. <S> Normally, in a synchronous network clock skew can generate errors in the data: an example are dynamic gates, where the output is pre-charged in a phase of the clock and elaborated in the other. <S> Skew may cause the propagation of the pre-charge state instead of the right one. <S> In synchronous logic, skew is considered together with latency, setup time and hold time of gates and registers to determine the maximum clock frequency that can be used. <S> If skew is not known a priori , it must be considered as a tolerance and will contribute negatively to the speed of the system. <S> Skew can also be used to delay the clock to a register, providing more time for the logic before that register to elaborate. <S> Therefore a faster clock can be used still satisfying the requirements of setup and hold time of the register. <S> This is a brief explanation and may not be clear, but you can always google or check on wiki for more details. <A> In many digital logic systems, there will be combinations of events (call them X and Y) which must not occur simultaneously. <S> The system will behave in a defined fashion if X happens before Y, and will behave in a (typically different) defined function if Y happens before X, but its behavior will will be undefined if they occur simultaneously (since most events of interest take a small but non-zero amount of time; events are considered simultaneous if any portion overlaps). <S> If events X and Y are triggered by the clock-generator pulse, it will often be necessary to ensure that the time between that pulse and X is either definitively longer than the time between that pulse and Y, or else definitively shorter. <S> Clock skew in a system will generally have the effect of changing the amount of time between the moment the clock generator starts to outputs a pulse and the times when different events occur. <S> Clock skew which would push events closer together in time is bad, and may result in malfunction if the times end up overlapping. <S> Clock skew which would increase the separation between events which are supposed to be separate is generally good, provided it doesn't decrease by too much the separation between other events which also need to be separate . <S> Many systems have a variety of interrelated timing constraints; while it might be possible to improve timing margins if one had sufficiently-precise control of timing skew, it would often in practice, given the level of control which is easily available, be difficult to improve some critical timing margins by adding timing skew without making other equally-critical timing margins worse. <S> It's generally easier from an engineering perspective to try to minimize skew than it would be to "optimize" it, so that's what implementations generally do. <A> You got it wrong that clock skew can be incredibly useful. <S> On the other hand, having a core which requires clock skew to work has many downsides. <S> You can't synthesize it for FPGAs / ASICs which don't have an extra PLL just to generate the right skew for you. <S> Changing the FPGA family alone will probably require you to reestimate the amount of skew required. <S> Modifying such core created by someone else is a nightmare. <S> The only case I would touch to skew settings is when I have a complete design for a specific chip <S> and I can't get the required clock rate by other means. <S> Think of software optimization as illustration: you can go faster by rewriting your function in assembly, but it has to be the right function (the one in the hot loop), and you lose on portability, maintainability and code reuse. <S> Premature optimization is on the top list of errors inexperienced programmers do.
| Yes, setting the right skew may help you to increase the clock rate sometimes, but the effect is rather limited.
|
What is the holding current on a triac? What does the Holding Current characteristic mean on a triac? What does this mean for switching loads less than the Holding Current? For example the Sharp S108T02 has a max 50 mA Holding Current. <Q> To answer this, consider the simpler to understand SCR instead of a triac. <S> A triac is sortof two SCRs back to back <S> and therefore can pass current in both directions. <S> A SCR only works one way but has the same issue of holding current. <S> Here is a equivalent circuit of a SCR: <S> SCRs are actually built as one integrated device, but you can conceptualize them as two transistors like this. <S> In fact, you can even make a scr from a NPN and PNP transistor like this if you just want to experiment. <S> Look at this circuit carefully and see how it works. <S> If somehow a little current were to flow thru one of the transistors, let's say Q1, that causes base current to flow thru Q2, which causes even larger base current thru Q1, which then turns on Q2 even more, etc. <S> Once a little current starts flowing, this circuit latches on. <S> Now imagine current is flowing and the gate is left open. <S> As long as the current continues, the circuit acts like a switch in the on state. <S> However, below some level of current, the cascading amplifying effect can't be sustained anymore, and the circuit switches off. <S> This minimum level of current so that the device is guaranteed to stay on is the minimum holding current. <S> This circuit only works with current flowing in one direction whereas triacs work in both directions, but the concept of the minimum current to keep the device on is the same. <A> Once you switch a relay on (whether it is solid state or mechanical) there is some amount of current required to hold it in the "active" state. <S> This doesn't imply anything about the amount of load across the relay, only the amount of load required to connect the terminals. <S> EDIT: <S> So looking at the datasheet I realized that the question you were asking was not about solid state relays but triacs. <S> The characteristics for a triac are pretty unique. <S> Essentially, the idea is that a triac will conduct AC current once triggered until the output current drops below the threshold called the holding current. <S> So in answer to your original question: your load must exceed 50mA for as long as you would like it to conduct. <S> I would recommend tracking down some reference designs using triacs, they are NOT the same thing as a solid-state relay. <A> As Mr. Lathrop notes, once a triac has been switched on, it will remain on without any further gate-signal or optical stimulus, provided a certain amount of current flows through the device. <S> If the specification had listed both a minimum and maximum holding current, that would mean that the device would be guaranteed to remain on if the current was greater than the specified maximum holding current, and guaranteed to switch off if the current fell below the specified minimum. <S> At current levels between the specified minimum and maximum, the triac could arbitrarily decide to remain on or switch off and comply with the specification. <S> Since this particular triac does not specify a minimum holding current, it should probably be regarded as being bounded by the "off" leakage current (if the level of current the device leaked when "off" exceeded the holding current, that level of current would cause the device to spontaneously switch on, rendering it rather useless). <S> If the device happens to only leak 0.5nA when off, the device could remain on with 0.6nA flowing through it and comply with the specification. <S> The device is designed to be used in AC-switching applications, such that the applied voltage will switch polarity periodically. <S> Consequently, even if the holding current happened to be a fraction of a femptoampere, the change in polarity would ensure that the device switches off. <S> On the other hand, if the voltage between the switched pins did not switch polarity but merely went down to a fraction of a microvolt, the specification would not guarantee that such a voltage would not keep the device switched on. <S> (In practice, a microvolt of forward bias would certainly be way too low to allow any current to keep flowing, but one should not rely upon that. <S> There exist other devices where the minimum holding current is specified to be significantly above zero; if one needs the thing to switch off without a polarity reversal, one should use one of those other devices).
| Essentially, this is telling you that the device which switches the relay on and off must be able to deliver up to 50mA at the switching voltage in order to keep the relay connected (or disconnected, depending on whether or not this is a normally open or normally closed relay).
|
How do I identify Pin 1 on a chip with no corner mark I am trying to identify Pin 1 of MAX3222E, the TSSOP variant (See Page 16 of datasheet ), but it doesn't have any corner mark! Could someone suggest how to identify Pin 1 in this type of situation? I don't have a high-res camera on me right now, but I do have the chip in front of me, so here's a drawing of everything I see on top (the + sign is just part of the full name MAX3222EEUP+): <Q> If you dig a little deeper on the Maxim website, there's a package drawing for this part. <S> Pin 1 is clearly indicated. <S> Note 8 says: "MARKING IS FOR PACKAGE ORIENTATION REFERENCE ONLY", which means AAAA is boilerplate text. <S> Essentially, if you can read AAAA, pin 1 is lower-left. <A> <A> Chips are marked various ways, but the conventions are pretty universal. <S> In other words, if you find one of these on a unknown chip you can rely on knowing which is pin 1. <S> The conventions are: Pins are always numbered around a chip counter-clockwise when looking at the top. <S> This comes from the old tube days where pins were numbered clockwise looking at the bottom of the tube, as you would when wiring up a socket. <S> Just like with the old tubes, there is something on the package which marks one place a bit more special than the others. <S> This is where you start counting from 1 going around the chip. <S> A dot can be in the pin 1 corner. <S> A notch can be at the pin 1 end. <S> Actually thinking back to the tube convention, the notch is really showing you where the start/stop gap in numbering is when going around the chip. <S> This is totally consistent with tube pin numbering. <S> The pin 1 corner can be shaved off. <S> This is common with packages that have pins coming out all 4 sides. <S> A band or other marking shows the pin 1 gap. <S> This is what you have in the picture above. <S> In your picture, pin 1 is therefore in the lower left corner with numbers proceeding to the right accross the bottom row, then from right to left along the top row. <S> Again, think of going around counter-clockwise when viewed from the top starting at some uniquely marked gap. <S> In your example, pin 10 is the in the lower right corner, pin 11 at upper right, and pin 20 at upper left. <A> All common TSSOP ICs seem to have pin 1 at lower left when IC is seen from above and text is correct orientation. <S> Then pins count left to right, then on above row they count right to left, like anticlockwise numbering. <S> This is seemingly also true for all other dual-row ICs as @MartinThompson has pointed out.
| The white strip on the left side of the picture looks like a similar indicator to the notch in most ICs, hence pin 1 would be on the bottom-left of the supplied picture.
|
Why does working processors harder use more electrical power? Back in the mists of time when I started coding, at least as far as I'm aware, processors all used a fixed amount of power. There was no such thing as a processor being "idle". These days there are all sorts of technologies for reducing power usage when the processor is not very busy, mostly by dynamically reducing the clock rate. My question is why does running at a lower clock rate use less power? My mental picture of a processor is of a reference voltage (say 5V) representing a binary 1, and 0V representing 0. Therefore I tend to think of of a constant 5V being applied across the entire chip, with the various logic gates disconnecting this voltage when "off", meaning a constant amount of power is being used. The rate at which these gates are turned on and off seems to have no relation to the power used. I have no doubt this is a hopelessly naive picture, but I am no electrical engineer. Can someone explain what's really going on with frequency scaling, and how it saves power. Are there any other ways that a processor uses more or less power depending on state? eg Does it use more power if more gates are open? How are mobile / low power processors different from their desktop cousins? Are they just simpler (less transistors?), or is there some other fundamental design difference? <Q> The rate at which these gates are turned on and off seems to have no relation to the power used. <S> This is where you are wrong. <S> Basically, each gate is a capacitor with an incredibly tiny capacitance. <S> Switching it on and off by "connecting" and "disconnecting" the voltage moves an incredibly tiny electrical charge into or out of the gate - that's what makes it act differently. <S> And a moving electrical charge is a current, which uses power. <S> All those tiny currents from billions of gates being switched billions of times per second add up quite a bit. <A> As SK-logic's comment points out most power is really spent on switching flip-flop rather than a steady state. <S> For dynamically reducing there are two main things you can do IIRC. <S> if whole areas of a chip are not being clocked you can potentially turn off the power for those areas completely <S> The clock tree itself is one of the largest power drains in the system, largely as it is the fastest switching part of a system. <S> So reducing the power in the clock tree itself is significant. <A> The power consumed by an electronic circuit has two components: the leakage, which is more or less independent of the frequency constant and will depend on the technology and working voltage; the switching power, which depends on the frequency (it's due to loading and unloading various capacitances, transistors and wires) <S> In order to reduce consumption, processor designers use several techniques: modifying the frequency depending on the load (this will act only on the switching power) reducing the power or even powering off parts of the circuits when they aren't needed These techniques have as a result that depending on your load, you may be better off, from the power consumption POV, either reducing the frequency or doing a "sprint" at full speed and then cutting out a subset of the circuits. <A> Running at a lower clock rate does not affect the energy required to perform a fixed task. <S> It might even increase the energy required if you account for leakage, and are able to switch off entirely. <S> Reducing voltage often saves enough power to compensate for needing to remain active for longer.
| Where a lower clock rate does save energy is in also being able to reduce the operating voltage.
|
what is solderless post I've seen metal "sticks" with a special end that let them fit snugly into a through-hole for when you want a contact but don't want to solder a wire into the hole. What are they called and where can I buy them? I think they are called "Posts" and are used for prototyping, but searching "electrical post" on Google just doesn't cut it. <Q> Are you talking about male and female header pins? <S> They "mate" with each other to form a decent connection but you still have to solder one end of them down. <S> Very useful for prototyping though as once you have soldered in the one end, the other end basically makes a breadboard. <S> Or perhaps POGO pins would better suit your needs. <S> They are generally used for flashing/testing a part that is going into production when you don't want to leave the connector on. <S> The basic idea for using pogo pins is you create a secondary board with pogo receptacles. <S> They allow for good temporary connections without any additional hardware on the primary board. <S> See the sparkfun tutorial . <S> That is what they use for their quality testing. <S> Lastly, wire wrap is a good way to make an electrical connection without the need for soldering. <A> You want pogo pins . <S> Solder the non-pointy end into a board and push the receiving board onto the pointy end when you want to use it. <S> Obviously you'll have some pattern of pogo pins and a matching pattern of smaller-than-the-pointy-bit vias (through holes) to mate with. <S> The idea is they allow some wiggle room for mating boards, all the pins don't have to be perfectly the same length. <S> I use these for test boards. <S> Make a board to match the test points on your device and build your test circuitry onto it. <S> Recently I've started using them for very small programming connectors too, seems to be working pretty well. <S> EDIT: <S> The very small Spy-Bi-Wire programming connector I made looks like this on the board <S> This is the surface pad version on a 1 mm grid, I also made a through hole version of the same size for use if I have the board space on both sides <S> (I suppose a blind via would work, if I didn't care about board cost). <S> The programmer has an identical arrangement, but with through holes for the pogo pins to solder in (but pointing out the bottom of the board). <S> The center is an alignment hole. <S> Until I find a better solution, the programmer side of this connection has a thin pin where the alignment hole is, I stick that through the target board alignment hole and clip the far side so it doesn't slide back out. <S> The surface pad version works fine if I'm not moving the board all around because it can accidentally rotate, though I've found the pogo pins usually stop at the solder mask (the through hole version doesn't have this problem). <S> I'm still trying out other variations, but like I said, this one does seem to be working out quite well. <A> While Op found what they were looking for, adding to improve the answers. <S> They require constant pressure to make contact, via internal springs. <S> They need to be held, by hand, screws, or a jig/rig. <S> They come in a variety of heads, lengths, styles, etc. <S> The other option is Press Fit Pins or Headers . <S> These are meant to be pushed into a through hole plated hole. <S> They are mostly permanent, providing good solid mechanical contact, and do not need to be soldered. <S> They can be removed, but will either damage the hole or no longer be usable. <A> I know this is a very old post <S> but I found this Solderless Headers - 10-pin <S> Straight PRT-10527 <S> https://www.sparkfun.com/products/retired/10527 <S> the obvious problem is at this site <S> it's no longer available. <S> (I'm still looking for this so if found please comment.)
| Pogo Pins , aka Spring Loaded Contacts are non permanent contacts that are pressed into a hole or pad.
|
Charge Model vs Voltage Model for Piezo Electric Sensor The following document describes signal conditioning circuits for Piezeoelectric sensors. I was interested in knowing which model should I use when designing signal conditioning circuit for piezelectric sensor. http://www.ti.com/lit/an/sloa033a/sloa033a.pdf <Q> This requires that no cable is involved as cables tend to add 20~30 pF <S> /ft. <S> Otherwise the charge model must be used and a charge amplifier is required. <S> This is how accelerometers work with cables from sensor to amp. <A> You can find some advantages and disadvantages of the approaches here: <S> Piezoelectric transducers - Endevco Tech Paper <A> Note that if you use the charge amplifier, then the cable capacitance does not impact the low frequency corner. <S> For me, this is the big difference between the two styles. <S> If a more stable low frequency corner is important, and you have cabling issues to deal with (particularly when there may be cable motion), then in many cases a charge amplifier is the way to go.
| If you can limit the load capacitance of the cable and amplifier, you can use the voltage model.
|
How does a TVS absorb voltage? I cant understand how a TVS might absorb voltage. As far as I can see, when a transient is applied to it, it becomes a very small resistor, so the transient voltage will still be on top of him, but all the current will flow through it. <Q> In an ideal circuit with a perfect voltage source and no parasitic resistance, you would be right -- even if the transient voltage suppressor (TVS) conducts 100 A of current the damaging voltage would still be present on other components. <S> It's the parasitic effects that let the TVS work. <S> There is resistance and inductance in the traces, vias, and pins, and there is capacitance at various points (bypass capacitors placed on the PCB, internal bypass capacitance on an IC, parasitic capacitance). <S> All of this means that when the voltage is briefly too high at the TVS, it will not immediately be so high at the downstream circuits. <S> Of course, if you force an overvoltage condition for long enough, it will still damage the circuits, but that would no longer qualify as a "transient voltage" to be suppressed. <A> This affords protection in a few ways <S> : If the transient is for a short duration and is within the energy handling capability of the TVS, the TVS breaks down and becomes a small resistance. <S> This will limit the voltage at the TVS for the reasons described in Justin's answer - parasitic circuit elements essentially form a voltage divider with the TVS. <S> If the transient is for a longer duration, the TVS clamps and the low resistance should draw sufficient current to blow the input fuse / circuit breaker (without blowing the TVS) which isolates the load from the source. <S> Of course, if the transient is for a long duration and is not within the energy handling capability of the TVS (or the TVS current cannot interrupt the fuse/breaker) <S> the TVS clamps and the low resistance draws sufficient current to blow the TVS. <A> TVS clamps voltage. <S> If the Maximum Reverse Current is not exceeded, the voltage will not exceed the Maximum Reverse Voltage. <S> (I'll be referring to this typical TVS datasheet .) <S> Let's look at an example of a transient, which has: has a high voltage, short duration, limited energy. <S> (ESD fits these criteria.) <S> This transient is not modeled as an ideal voltage source. <S> If you short this transient to ground through a TVS, the latter will adsorb the energy of the transient. <S> The TVS datasheet usually shows Peak Pulse Power dissipation. <S> TVS also has a rating for continuous power dissipation (which is much smaller than the Peak Pulse Power). <S> If there is a need to protect against a DC overvoltage (long duration, not just a transient), the TVS is usually used with a resistor or a fuse, which would limit the current. <S> In case of a DC overvoltage, a Zener TVS can be viewed like a regular Zener diode. <A> If the surge protector is a diode, then it has a fixed voltage drop. <S> This means that the rest of the high voltage is dropped elsewhere, namely across the source from which that voltage originates. <S> If the surge protector is a varistor, then how it works is that it develops a low resistance through which the surge current can pass. <S> This also reduces the voltage of the voltage spike if the varistor's voltage is lower than the source voltage. <S> The high voltage has to drop across the source impedance, and across the varistor. <S> This forms a voltage divider, which cuts the voltage spike according to the ratio of the varistor's resistance to the total resistance. <S> The voltage spike is not a stiff voltage source which is unaffected by the resistance of the protecting device: it cannot develop its full voltage into arbitrarily low impedances. <A> Applying high voltages to a circuit is bad because it causes large currents to flow into the circuit. <S> If the TVS is a very low resistance, the current will flow through the TVS instead of anything else. <S> Hence anything else will be protected.
| A TVS becomes a very low resistance when the voltage across it is sufficient to cause the device to break down and conduct.
|
How to make any sensor a wireless one I am try to build a wireless sensor(right now I am using an adxl335 accelerometer with an analog output) but this project should be general for any sensor that outputs analog. The issue is that I have to first convert the analog to digital to transmit it over RF(I have a 12d,12e RF series which is a four channel Rf transmitter with reciever). But the issue is if I need to convert the analog to digital then I need a microcontroller for the CS as well as clock lines. This just adds enormously to the cost of the project as well as the number of hours I would spend assembling them together and a microcontroller for each sensor does not seem sensible at all. I am wondering what is the general route taken to make an accelerometer or any other sensor that outputs anolog wireless. <Q> If all you want is to ADC the analog signal and transmit it, this may be your easiest option. <A> It is very common to take an analog signal, pass it through and ADC, into a microcontoller, and out a digital radio. <S> There are many wireless microcontrollers with integrated radios and ADCs for just this task. <S> One example is the mc13224v <S> that's on an Econotag . <S> The other option would be to transmit the analog signal directly with AM or FM . <A> You could consider an IR transmitter Receiver link and come up with your own carrier modulation and receiver or multiplex them into one channel depending on accuracy needed and bandwidth for range but must use RF for longer range. <S> If it is low bandwidth, you can configure an inexpensive TV RF modulator with an analog TV like signal with H sync and analog MUX <S> all the signals using grey as o and black white as peak to peak signal and using a synchronous analog Mux send all the channels in one line at say a 20KHz rate and use a nyquist filter on each channel to prevent aliasing noise. <S> Then use a receiver to DEMUX the analog to S&H buffered outputs Dynamic range will certainly not be as good as digital but 40dB is certainly possible with a good carrier / noise ratio. <S> With a vertical sync you might be able to watch it on TV. <S> ;)
| You may want to consider using RF transmitter/receivers that have an onboard ADC, such as the XBee series (available from https://www.sparkfun.com/categories/111 ).
|
Detecting which IR detector was triggered using one pin I have a project that has 6 IR led's and detectors. The project needs to detect when any of the 6 beams get broken, and exactly which one got broken. I would like to be able to use only one input pin to detect if any of these have been broken. What kind of hardware setup would I need to achieve this? Some more notes:Currently a high is read when the beam is interrupted.The actual breakage in the IR beam is extremely short. (A falling coin)My preferred method would be to use an interrupt if this is even possible. <Q> Edit: <S> Changed answer after clarification by OP about simultaneous presses If multiple detectors, up to 6, need to be sensed for possible simultaneous interruptions, the solution described in this posting on the Arduino forums is usable. <S> Substitute the "buttons" referred to in the post, with your high-when-interrupted lines from the 6 sensors. <S> Each detector line will connect to the resistor specified in that post, and the ADC values received will indicate what combination of detectors is interrupted: BUTTONS VALUES <S> RESISTORSbtn 1 837-838 220btn 2 737-738 <S> 390btn 3 610-611 <S> 680btn 4 318-319 2.2kbtn 5 178-179 <S> 4.7kbtn 6 <S> 91-92 10kbtn 1 <S> + btn 2 896-897 btn 1 + btn 3 877-878 btn 1 + btn 4 851-852 btn 1 + btn 5 844-845 btn 1 + btn 6 840-841 btn 2 + btn 3 821-822 btn 2 + btn 4 769-770 btn 2 + btn 5 753-754 btn 2 + btn 6 745-746 btn 3 + btn 4 674-675 btn 3 + btn 5 643-644 btn 3 + btn 6 627 btn 4 <S> + btn 5 408-409 btn 4 <S> + btn 6 363-364 btn 5 <S> + btn 6 243 <S> If you need more that 2 simultaneous interruptions detected, an alternative would be to use a key scanning IC that provides serial output, like MAX6955 or TCA8418 , then read said IC's output using an I2C read on a single input line. <A> Do you have a system clock? <S> How about using a shift register? <S> Hook up the six IR inputs to the parallel side of the shift register and the serial to your microcontroller. <S> The disadvantage here, since you only have one pin, is you'll need to continually read in the parallel inputs at a sufficient frequency and check for a one in the serial byte. <S> The one obviously indicates the sensor that fired. <S> This also works if more than one beam is broken at a time. <S> I think you can diode connect each of the parallel inputs to the parallel load clock, but I'm not positive this will work. <S> I think an extensive look through some data sheets would tell if this were worth testing or not. <S> You can always fall back on the excellent analog solution provided. <A> The hardware setup depends what your software can handle. <S> You can have 6 detectors with logic level output to preset a counter and generate a number of pulses OR a pulse width that corresponds to each coin value. <S> It could be a polled input but preferably a interrupt input that can be measured for pulse count or width. <S> Which do you prefer? <S> But more important, what are your space and budget contraints and have you considered anti-hack security protection and patent copyrights from "said light sensor and said coin in said coinbox"
| If your MCU of choice has a comparator with edge triggering on analog inputs, generating an interrupt each time the voltage rises over 0.5 Volt or so will work.
|
Can you sum and difference in a single op-amp? I want to take two independent differential signals (audio line inputs with unknown properties which may be present or not), remove any common-mode noise from each of them (they could each have different common-mode noise), then sum the desired signals together. I believe I can do this all with 1 op-amp. (Actually I want to output the desired signal differentially, so I will use two of these with inverted output polarity.) You can assume Rfeedback = Rground and all the input resistors are equal. So then I believe the output is: $$V_\mathrm{out} = {R_\mathrm{f} \over R_\mathrm{in}} ( A + B )$$ with all the common-mode noise cancelled. Correct? Are there any problems with this op-amp configuration? This page calls it a "generic linear operator": Will the CMRR be reduced by summing on the non-inverting node or anything? I did the math, and CM sources are completely cancelled out at Vout, but I feel vaguely uneasy about it. :) The input impedance of the inverting inputs varies with the signal, as explained here , but shouldn't matter as long as it's much larger than the source impedance. The common-mode impedance is the important part, and should be the same for all input pairs. If I weren't trying to do it all in one, I'd use two diff amps followed by a summing amp (followed by an inverter for the differential output). Does that method have any benefits over the single op-amp method? <Q> One potential issue I see with this approach is that since the inputs of the op amp will not remain at a fixed voltage, some of the voltage seen on the "sum" inputs of your circuit will be "visible" on the all of the inputs (sum and difference alike). <S> If those inputs are not being driven by low-impedance sources, that could pose a problem. <S> A better design in some cases, if you have the power-supply margin to accommodate it, may be to have the summing inputs feed into one amplifier wired as an inverter (with a non-inverting input that sits at a fixed voltage), and have the output of that inverter fed as one of the inputs to the amplifier that accepts all the difference inputs. <S> If your sum and difference inputs are intended to be grouped as differential pairs this approach won't be great (the non-inverting inputs will flow through two op amps while the inverting inputs only flow through one) but your original approach won't be either. <S> Your best approach in that case would be to either pass all the sum inputs into one inverting amp, all the difference inputs into another amp, and then take the difference of the two outputs, or else to pass each differential pair through its own instrumentation amp and sum the results. <S> Using a separate instrumentation for each pair would give the by far the best CMRR, but would of course require more amplifiers. <A> You have designed 3 differential amplifiers inside one Op Amp, but the CMMR will be reduced from the typical 60 to 100 dB range to 25 dB <S> or so by the mismatch tolerances of all your 1% resistors adding up. <S> Keep in mind the differential voltage at the OA input must be zero and the output in the linear range. <S> It all depends on how much CM suppression you need and over what spectrum. <A> One easy way to verify this is to compute the gain from each input to the output separately. <S> This is easy because you simply hold all the other inputs at 0. <S> If the negative gain for each channel is exactly the opposite of the positive gain for that channel, then theoretically the common mode component has been eliminated. <S> By doing this, you can see that the only effect of the additional inputs is that they act as additional voltage dividers reducing the gain of each input. <S> As long as this is properly taken into account with the resistor values, this should work. <S> I would have done a example illustrating the point, but since you didn't put component designators in your schematic this would be too confusing.
| If you use a large CM choke over all the wires, this can help significantly.
|
Arduino as modbus master with MAX485 doesn't get any response I'm having some troubles trying to query a modbus slave with an Arduino through RS485. I've already succeeded in querying a software modbus slave running on my PC through the USB/COM port using the ModbusMaster libray , hence it shouldn't be a software issue. I read about TTL and level conversions and I put on a circuit like this on a breadboard: Using the same firmware/sketch that worked for the software slave, I connected the arduino pin TX and RX to the max485 and A and B to the modbus slave and I issued several requests. I can see the signals converted by the MAX485 (CPA1114) though the oscilloscope and it seems to be right. The led on the modbus slave lights on as it sees a modbus transaction. Still, what I read as result of the request is always 0xE0 (invalid slave id) or 0xE2 (timeout). I queried the slave with the same equal request using another tool (a RS485/USB converter and CAS Modbus Scanner), and it gives the expected results, that is data 0x01 . This is the code I'm running on an Arduino Ethernet (with a display for debug purpose): #include <ModbusMaster.h>#include <LiquidCrystal.h>LiquidCrystal lcd(12, 11, 4, 5, 6, 7);ModbusMaster node(1);void setup() { pinMode(3, OUTPUT); node.begin(19200); lcd.begin(16, 2);}void loop() { uint16_t m_startAddress=1; uint8_t m_length=1; uint8_t result; digitalWrite(3, HIGH); // TX result = node.readHoldingRegisters(m_startAddress, m_length); lcd.clear(); if (result == node.ku8MBSuccess) { lcd.print("DATA:"); digitalWrite(3, LOW); // RX for (uint8_t j = 0; j < m_length; j++) lcd.print( node.getResponseBuffer(j), HEX ); } else { lcd.print("ERR "); lcd.print(result, HEX); } delay(500);} These are the request signals emitted by the Arduino, that always fail to get a data response, and the other tool, that always succeed: Arduino request signal USB/RS485 converter signal Overlap of the two signals Is there something wrong with the request signal? Am I making any mistakes in the circuit or the code? Any pointers would be greatly appreciated. EDIT: As suggested by Kvegaoro, I got it working by editing the ModbusMaster library in order to switch the D3 pin to the right status at the right moment. For doing so I used some code I found on this post (italian) in the Arduino forum. This is the edit I've done in ModbusMaster.cpp , function ModbusMasterTransaction , starting at line 746: // code edited to work with MAX485: // transmit request UCSR0A=UCSR0A |(1 << TXC0); Serial.flush(); digitalWrite(3, HIGH); for (i = 0; i < u8ModbusADUSize; i++) {#if defined(ARDUINO) && ARDUINO >= 100 MBSerial.write(u8ModbusADU[i]);#else MBSerial.print(u8ModbusADU[i], BYTE);#endif } while (!(UCSR0A & (1 << TXC0))); digitalWrite(3, LOW); // -- u8ModbusADUSize = 0; Note that the D3 pin is then hard-coded in the library so this is not a good design, if someone is going to need this would adjust it better. It works though! <Q> I think you have an issue with you line driving RE and DE because you set the D3 line high to transmit, then you issue a modbus function 3 (read holding registers). <S> After this you check if the request was a success and after this you set the D3 line low <S> and you read the response from the library buffer from the node. <S> The issues stands that a modbus transaction includes the master querying the slave and the slave responding which seems to be taken care of by the node.readHoldingRegisters() fucntion therefore the master releasing the RS485 bus should happen within this fucntion not after it. <S> this helps <A> Thank you very much!You should change in the ModbusMaster.ccp as below: // <S> flush receive buffer before transmitting request while (MBSerial->read() ! <S> = <S> -1); digitalWrite(22, HIGH) <S> ; //mantuy // transmit request for (i = 0; <S> i < u8ModbusADUSize; i++) {#if defined(ARDUINO) && ARDUINO >= 100 MBSerial->write(u8ModbusADU[i]);#else MBSerial->print(u8ModbusADU[i] <S> , BYTE);#endif } u8ModbusADUSize = 0; MBSerial->flush(); // flush transmit buffer delayMicroseconds(3650); //mantuy <S> digitalWrite(22, LOW); //mantuy <S> // loop until we run out of time or bytes, or <S> an error occurs <S> u32StartTime = millis(); <A> It exist a short interval, when the slave is in a response_waiting state and the master is not yet sending, sothe line is in undefined state because nobody drives it. <S> This may produce spurious unwanted signals. <S> You must tie the A and B lines to Vcc and Gnd with some 1k resistors. <S> This will force a defined state, even ifall nodes are idle(HiZ).
| What I guess its the problem, its that the modbus library you used is intended for RS232 as the physical layer therefore you might have to modify the library so the RS485 bus is released as soon as the master completely finishes sending the queryHope
|
Why would you attach a Diode to the base of a BJT? I was looking at a DC BJT setup for sourcing current and came accross this I have never seen a diode attached to the base of BJTs before and was wondering what it might be used for? I believe it might be used for compensation due to effects in temperature, but I haven't seen much info on this or why you wouldn't bridge the voltage at the base of Q1 with a resistor instead. Does anyone have any suggestions to why you might do something like this? <Q> It is there to keep the transistor's current less susceptible to temperature changes. <S> In the case of Q1 : Suppose that instead of having R1 and D1 , Q1base was connected directly to ground. <S> Emitter current would be: $$ I_{e} = <S> \frac{20V <S> - V_{be}}{R_{2}}$$ <S> You can see Ie is susceptible to variations in Vbe , which has a known dependency on temperature ( T ), so you might as well express it as:$$ I_{e}(T) = <S> \frac{20V - V_{be}(T)}{R_{2}}$$ <S> But with the diode, if they are matched and thermally bonded:$$ V_{diode}(T) = <S> V_{be}(T) <S> $$ <S> So now:$$ I_{e} <S> = \frac{20V+V_{diode}(T)-V_{be}(T)}{R_{2}} $$Which simplifies to:$$ I_{e} = \frac{20V}{R_{2} <S> } $$Independent of Vbe , and its variations with temperature. <A> It's a form of temperature compensation. <S> As long as the diode and the transistor are at the same temperature, the variation in the diode's V F tracks the transistor's V BE , keeping the collector current more constant. <A> The diode is there to provide roughly the same voltage drop as the B-E junction of the transistor does. <S> Often this is done with a second matched transistor in what is called the current mirror configuration: <S> Look at this closely and see how Q2 will source the came current on its collector as whatever is drawn by I1. <S> This is used in ICs without the resistors. <S> It works because two transistors next to each other that ran thru the same process are well matched. <A> The diode is used to create an accurate bias point which is about 0.7V above the common return voltage. <S> This bias point is relatively immune to changes in the supply voltage. <S> Whether the positive voltage is 9V or 20V, the top of the diode will be at 0.7V. <S> If we replaced the diode with a resistor, the bias point would not have this property. <S> Its voltage will vary with supply voltage. <S> Double the supply voltage from 9V to 18V, and its voltage will double also. <S> Why does the circuit want to keep the bias at exactly one diode drop above ground? <S> What that will do is put the emitter of Q1 (top of R2) at approximately ground potential, because of the diode drop across the BE junction of the transistor. <S> Thus the emitter is a "virtual ground". <S> It's not clear why that is important without more information about the circuit: where it is used, for what purpose, and any rationale notes from the designer. <S> That is, why can't the base of Q1 just be grounded, resulting in a bias point that is just 0.7V lower. <S> Maybe there is no reason. <S> Designers do not always do things for rational reasons, but rather for "ritualistic" reasons. <S> It looks as if the designer wanted the voltage drop across R2 to be precisely 20V. Note how R2 is specified as 4.99K, which is ridiculously precise. <S> A 1% tolerance 5K resistor could be anywhere between 4.95K and 5.05K. <S> A 4.99K resistor isn't something you can actually go out and buy, so you cannot actually build this circuit as specified, unless you use a variable resistor and use your digital potentiometer to tune that resistor to 4.99K. The -20V supply has to be just as precise for such a precise value of R2 to make sense. <S> The current through R2 (and hence the collector current of Q1) will vary with the negative supply voltage.
| The diode is effectively providing the little voltage offset that would be needed to compensate for Vbe changes with T , in order to maintain a constant current.
|
Does anyone build 100k RPM alternators? What I'm contemplating is the practicality of building a direct drive turbine-alternator (or generator) system out of an engine something like this . Based on some reasonable guesses, that would take an alternators rated for something like 50-120k RPM and a 1-2 kW. Is anything in that range built or should I assume that some reduction gears would be involved in any practicable design? If there isn't anything in that range, how close do things get? For example, if 400Hz single poll alternators are built, that would be 24k RPM which would only take something like a 2:1 or 6:1 reduction gear set <Q> For a bit of additional context: there exists a particular design of alternator suitable for high speeds, such as those obtained by direct turbine coupling. <S> Those were developed primarily for use in ICBM power supplies, where weight is of value while excess overheated gases are essentially bundled for free. <S> http://en.wikipedia.org/wiki/Flux_switching_alternator <S> It must also be noted, that first ever turbo-generator, developed and demonstrated by C. A. Parsons in 1884, was of direct drive type running at 18k rpm (with rated power of 7.5 kW). <A> I realize that this thread is dead, but just for posterity, a company in Boston, MA, Satcon technology, produced a dual turbo alternator drivetrain for an american le mans car back in 1994. <S> The budget was paid for by Chrysler. <S> The high speed turboalternator I think turned at 100krpm and the low speed at 50krpm. <S> Both of these devices ran on liquid methane for fuel, and were direct coupled devices. <S> They delivered power to an 80lbs carbon fiber flywheel turning at up to 60krpm. <S> The power was then delivered on a demand basis (the gas pedal), to the traction motor, so the flywheel in turn was a high speed alternator. <S> The traction motor was a water <S> a cooled, vector controlled, squirrel cage induction motor running at up to 24kRPM with a torque of 350 ft lbs of torque to 12kRPM, and 150% of that torque at 0RPM. <S> The project budget was originally USD35 million for 3 motors. <S> All of this technology, including the driver circuits and controls were developed and a lot of them were patented by Satcon Technology. <S> They're still around, but I'm not sure if they can still develop this type of tech. <S> The car was deemed not viable due to concerns with the flywheel. <S> In other words, the rest is practical, it's just that if the car crashed, and was turned upside down the flywheel would most likely shatter, the flywheel parts would most likely go through the housing, then through the LNG tank and through the driver. <S> In terms of efficiency, this car converted chemical energy to mechanical, to electrical (turboalterntors), then to mechanical again (flywheel), then to electrical again (to power the traction motor), then to mechanical again (traction motor) with an efficiency of over 70%. <S> It all depends what components you use and the tolerances you're willing to accept. <S> From what I remember, the electronics weighed 110lbs (managing 3.5MW), and the traction motor around 150lbs. <S> The turboalternators were tiny, and were probably the lightest part of the bunch. <S> Here's a link, but don't take what says all it says literally. <S> Satcon had at least 50 engineers working on that project, and every single part in the project required developing new technology. <S> In this article they throw the blame on Satcon, but to this day I'm amazed that the thing even worked (and it did, in the lab): <S> http://www.allpar.com/model/patriot.html <S> Here's another link: http://freepdfhosting.com/d4b2933536.pdf <A> It is possible to build a direct-coupled alternator/generator. <S> Both the alternative energy industry and US Department of Defense have been investing in this area for several decades. <S> What's attractive about direct drive turbogenerators is the extremely low power/weight ratio, even though efficiencies are awful at this scale. <S> Capstone Corp has been doing this for awhile in the 60kW class, mostly for backup power (natural gas-fired): <S> Others are working on smaller scale units - in the 300W to 5kW range, also direct-drive. <S> I have not seen much traction in the industry at these sizes, however. <S> http://www.azmark.aero/az.nsf/html/Product+Gallery+-+Power+Systems <S> Is it possible? <S> Yes. <S> Is it practical? <S> It depends on the application's ability to trade mass for cost. <A> As I understood the question, is it possible to make a turbine-generator set to run at 100krpm. <S> first what is the return from building such a set or what is the advantage of this set over the exciting ones. <S> For power system designe generators should run to give voltage and current with a frquency of 50Hz or 60Hz internationally, this frequency is related to the speed ..... <S> contin.... <S> later <A> Short addendum to the other questions: you cannot use a thrust turbine motor to generate axle power efficiently, or the other way around. <S> These are almost fundamentally different types of continuous combustion generators. <S> If you want to use a turbine to generate electric power, try finding miniature helicopter turbines. <S> These are designed not to generate thrust in the exhaust gases but to create lots of torque on the axle. <S> If all you want to do is create the most electric power in the least amount of weight and space, Wankel (rotary) engines are a great choice as well. <S> These run at 15-25krpm, which is well within the range of commercially available DC direct drive generators. <S> the size of a briefcase. <A> I think your expectations are unrealistic unless you have a government budget behind you. <S> There are better ways of getting high power from a small unit, dependent on your exact usage case, restrictions, etc. <S> There is a military pocket-sized generator that runs on diesel <S> , I can't find a link now (possibly it's discontinued or been taken down) but it seems to me that spinning things at thousands of RPM is throwing a lot of engineering challenges up that other methods would avoid, especially when you also need it to be small & light. <S> I would start with a blank sheet of paper and look at what the root problem is you're trying to solve (X amount of kWh from a device weighing no more than Y / <S> no bigger than Z) then start looking at which technologies might suit best. <S> You may end up with something completely different.
| A company called EVDrive has a range extender of this type (25kW Wankel engine+electric generator)
|
Speed control of a DC motor using variac I have a offset printing machine and it's original electrical design uses a variac device to control it's speed (RPM) value of the main motor drive. I don't have access to any electrical wiring diagram, so I need to find it's typicalwiring diagram from variac device to motor. bellow picture is the front side of the variac. I got four wires going into DC motor. And above is the backside of the variac deviceand it seems to me that, it goes through a inductor depicts as in bellow figure.What is the original purpose of that inductor? Is that a interpole motor which used toreduce the spaks on amateur brushes? Or is that for another purpose? I need to know it's typical wiring diagram. How could I simply connect a DC motorto a variac? --Thanks in advance-- EDIT: I confirm that this is a DC motor, there are 2 rectifiers like these. <Q> You can't directly. <S> A variac is a transformer, usually a autotransformer, but in either case puts out AC. <S> You could rectify the AC to make DC by using a full wave bridge if you truly have a DC motor. <S> More likely, what you have is not a DC motor. <S> This machine looks old, and considering it was intended to have variable speed, it could be a brushed motor that is commutated so as to work directly with AC. <S> Such motors do work with DC too, but always spin in one direction regardless of the polarity of the applied voltage. <S> This is just a guess, but the extra stuff on the bottom of the variac could be for automatically moving the wiper as part of a control system. <A> For safety, mechanically disconnect the motor from the printing press. <S> Some printing equipment can pretty much self destruct if run backwards. <S> AC/DC motors have brushes. <S> Speed is controlled by voltage and physical load. <S> Generally two wiring schemes are used, parallel, and series. <S> Series wired, have good starting torque, and poor speed control, so should not be started without a physical load. <S> Common series examples; car starters, vacuum cleaners, hand power tools. <S> Parallel wired, have better speed control, and lower starting torque. <S> Investigate the motor wiring. <S> An ohm meter reading of each pair of wires will help. <S> Many AC/DC motors have access to the brushes on the outside of the motor. <S> If this is the case, carefully remove one of the brushes (paying attention to how it is installed). <S> Then re-test the wiring, to identify which pair power the armature through the brushes. <S> The press manufacture may be able to help, if they originally installed the motor. <S> If all else fails, plan on parallel wiring for the motor. <S> Many armatures have very low resistance, so would draw excessive power on starting. <S> Some printing equipment starts at a lower speed, then comes up to running speed. <S> The variac may have had an automatic power reduction mechanism when powered off, so when started, it would start slower (lighter load), then come up to speed. <S> If this is a small press, the operator may just set the speed and have a start/run switch. <S> The motor wiring also determines motor turning direction. <S> Verify motor direction, before mechanically reconnecting. <S> Once connected, turnover the press by hand first, to see nothing is binding before power is applied. <A> If it is a DC motor then 4 wires DOES make sense. <S> 2 wires are for the field winding (the magnet made with DC) and the others are for the Armature (the ones that make power). <S> The Field winding will be hooked up to its own bridge, runnig full voltage all the time to maintain the magnetic field inside the motor. <S> The Armature winding will be hooked up to a (ususally) bigger rectifier and the variac and this is the driving voltage that you will use vary the speed of the motor. <S> It looks like a tiny one... <S> I use up to 5hP. Be careful with these if you run 240V because 240VDC is like 600VAC as far as arcing potential and should be treated with respect!
| The inductor may have been wired in series with the armature to reduce the starting surge.
|
Question about trace length matching patterns for high speed signals A colleague and I had a discussion and a disagreement about the different ways high speed signals can be length-matched. We were going with an example of a DDR3 layout. All the signals in the picture below are DDR3 data signals, so they are very fast. To give you a sense of the scale, the entire X axis of the picture is 5.3mm and the Y axis is 5.8mm. My argument was that, length matching done as in the middle trace in the picture can be detrimental to signal integrity, although this is just based on an intuition, I have no data to back this up. The traces in the top and bottom sides of the picture should have better signal quality, I thought, but again, I have no data to back this claim. I would like to hear your opinions and especially experiences about this. Is there a rule of thumb for length matching high speed traces? Unfortunately, I could not simulate this in our SI tool because it is having a difficulty in importing the IBIS model for the FPGA that we're using. If I can do that, I'll report back. <Q> I don't work with DDR memory, so I'll assume there's no on-chip deskewing available, and length matching is in fact required. <S> If the chips themselves are able to do the de-skewing, of course you should use that feature rather than extend the traces to do length matching. <S> But given that length matching is required, it looks like everything you're doing is done as well as it can be. <S> Mainly because, 1, you're actually doing the length matching, and 2, you're using arcs rather than 90 or 45 degree bends. <S> In your comment, you mention your concern that the serpentine shape puts the trace in parallel with itself. <S> That's a reasonable concern, but there's not much you can do about it. <S> Certainly I wouldn't suggest moving the two chips farther apart to enable separating the traces further apart --- and anyway you probably have a board space limitation to prevent it. <S> Given the spacing between traces looks like 4x or more the trace width, I wouldn't expect this to cause a serious problem. <S> Of course a simulation with HyperLynx or other good SI tool is a better way to get a definitive answer. <S> You should be able to simulate this particular issue without having models for your actual chips. <S> One thing you haven't shown is your board stack-up. <S> Without a good simulation and good knowledge of your materials, its not obvious that the propagation velocity on the inner layers is equal to the velocity on the outer layers (it probably isn't), and that strictly length matching between the layers is the right thing to do. <S> Even if you have accounted for that, you can expect some variation in materials to cause mismatch between trace delays on different layers. <A> Your intuition is correct, depending on edge speed and how close those serpentine paths are you can cause your self problems. <S> They absolutely will couple to each other like you're wondering. <S> In fact if it's tight enough the high frequency component may just couple straight through the S curves like they aren't even there. <S> The question then becomes will that coupling be a problem in your application. <S> They look far enough apart in that picture for DDR3 <S> but it's hard to tell. <S> Of course simulation of the path would always be best, but <S> I know we don't all always have access to expensive tools when we need them :) <S> You seem to be on the right path though. <S> Here's <S> Johnson <S> talking a little more about it. <A> For microwave signals you want to avoid sharp corners on tracks to avoid complex return loss effects. <S> This is why they are all smooth lines. <S> Also to improve signal integrity , you want a ground plane. <S> Then there is less sensitivity to layout differences and crosstalk as long as track length is matched. <S> You layout <S> software ought to generate equal line length on demand. <S> Many more DDR3 layout <S> considerations here are offered.
| Trace thickness needs to be calculated based on desired impedance for improved TDR response and reflection coeficient.
|
How to choose a inductor for a buck regulator circuit? I am designing a buck-regulator circuit, with possibly the MAX16974 as the regulator. I have never done such a thing before, and actually not too much analog electronics at all. I got stuck at the part where I should select a inductor. Part of the problem is that there is much to choose from (13000 total from Farnell). I got them filtered down to about a 100. But I am still not completely sure if the values are right, and the how to choose from the rest that are left. As there will not be made that many copies made, the price is not that big of a concern. After a bit of googling I found a app note form Texas Instruments concerning the selection of inductors for use with switching regulator, but I have not been able to work out some of the constants used in the equations in it. UPDATE:The regulator is going to be used on a 10-20 volt input (mostly around 15 volts). The output is going to be 5 volts with the current around 1A. I don't really now where the other specs should be. I'd like to be able to power different kinds of devices requiring 5VDC, for example a raspberry pi or charge a phone through usb. <Q> Here is a quick and somewhat dirty way to calculate an inductor value for buck regulators operating in constant conduction mode (CCM). <S> It will result in an inductance that will be close to what you would get with a more exact calculation, and will not get you into trouble. <S> What you need to know to calculate inductance: <S> Output Voltage, \$V_o\$ <S> Output Current, \$I_o\$ <S> Switching Frequency, \$F_{\text{sw}}\$ <S> L = <S> \$\frac{\text{$\Delta <S> $t}V_o}{\text{$\Delta <S> $I}}\$ <S> Make a couple of assumptions: \$\text{$\Delta <S> $I} = <S> \frac{I_o}{10}\$ <S> \$\text{$\Delta <S> $t} = <S> \frac{1}{F_{\text{sw}}}\$ <S> so <S> L = <S> \$\frac{10 <S> V_o}{I_o <S> F_{\text{sw}}}\$ for \$I_o\$ = 1A and \$F_{\text{sw}}\$ = <S> 2.2 MHz L = <S> 22.7 \$\text{$\mu $H}\$ <S> When choosing the inductor: <S> Find one that is rated for 1.4 to 2 times the output current. <S> In this case 1.4A to 2A. <S> Most standard inductors are specified for 40C heat rise with rated current, which is kind of hot. <S> Conductive losses scale by the square of the current. <S> Using a current rating of 1.4 \$I_o\$ will reduce that heat rise by half, and a current rating of 2 \$I_o\$ will reduce heat rise to 1/4. <S> Make sure the series resonant frequency (SRF) is at least a decade higher than the switching frequency. <A> The big problem I see is you haven't specified any parameters other than "I'm designing a buck". <S> If you haven't yet figured out these parameters, please do so: <S> Input voltage range <S> Output voltage <S> Maximum output ripple <S> Maximum output current Size and ESR of output capacitors <S> These all matter: <S> Inductor ripple current is often targeted as a percentage of the total DC output current Output ripple voltage is the inductor peak-to-peak current superimposed on the output capacitors' ESR The peak-to-peak ripple is also related to the duty cycle, which is \$\dfrac{V_{out}}{V_{in}}\$ for CCM mode, less than this for DCM mode (load dependent) <S> There are feedback stability implications when operating in CCM (CCM limits the maximum bandwidth you can achieve while maintaining gain and phase margin) <S> The inductor has to handle the DC current you want without saturating, and the DC loss in the winding has to be within the limits of the part. <S> EDIT: <S> Your target is 1A at 5V. <S> If you go with the '10% rule of thumb', the maximum inductor peak-to-peak current should be 100mA. Duty cycle: \$\dfrac{5V}{15V}=0.333\$ On-time: \$\dfrac{0.333}{2.2MHz}=166.5ns\$ <S> Ripple current: \$V_L = <S> L <S> \dfrac{\Delta I}{\Delta t}\$ <S> \$ <S> L = <S> \dfrac{V_L <S> \cdot <S> \Delta <S> t}{\Delta I} = <S> \dfrac{(15V-5V <S> ) \cdot 166.5ns}{100mA} = <S> 16.65 \mu H\$ <S> A larger inductor will give you smaller ripple current. <S> The opposite is true - a smaller inductor will give you larger ripple current. <S> Generally, ripple should be 1% or less of the DC level, so make sure the output cap ESR is less than \$500 <S> m \Omega\$ if you target 100mA of inductor ripple. <S> This should be easy. <A> for the MAX16974, RON measured between SUPSW and LX, ILX@ <S> 500mA Ron= 185mΩ typ, 400 mΩ max <S> So choose Rs of L to be <S> << 185 mΩ such as 10~20% of Ron or Rs of(L)= <S> 19 ~38 mΩ
| For good load regulation and low ripple, you want the series resistance of the inductor and capacitors respectively to be much less than the ON resistance of the switch.
|
Difference between a Power Plane and a Copper Fill? What is the (or is there a) practical difference between designating a layer of a printed circuit board as a power plane as compared making a polygon cover the layer and naming it the same as the power net? I'm thinking of EAGLE when I ask this question, but I think there are analogies in other ECAD tools. I know Sunstone Circuits CAM file seems to think of these concepts differently, but I'm not sure how or why. <Q> I don't know Eagle, but in other tools the difference has to do with how the gerbers are generated. <S> For a power plane, the gerbers will be generated as a negative image. <S> The gerber file will indicate features for regions or shapes where copper should be removed . <S> For signal layers, the gerbers will indicte features for shapes where copper should be retained (not etched away). <S> This can have a big effect on the size of the gerber files. <S> For a polygon on a signal layer, the gerber will usually include a long self-overlapping serpentine trace (or mesh of crossing traces) to fill the polygon area. <S> This can lead to a very large gerber file. <S> In the days when gerbers were transferred to vendors over dial-up modems, it made a much bigger difference to reduce the size of the files. <S> There can also be a subtle difference in the actual generated boards, because the features (whether positive features in a polygon, or negative features on a plane layer) must be generated by actual apertures on a photoplotter tool, selected from a limited set of available shapes and sizes. <A> I don't see how you set the difference in Eagle, unless you mean the net class. <S> I think it's a good idea to define the net classes, especially for more complex boards, the DRC is there to help so you may as well teach it how. <A> A power plane is (generally) a layer with not traces in it. <S> They are very close. <S> A trace over a power plane (i.e. in the layer above or below it) has an specific impedance. <S> That is good for signal integrity. <S> A trace over a fill is the same. <S> But a trace that crosses over the fill at the place where traces are will have changing impedance which can result in reflections and other signal integrity issues. <S> Samuel is correct for Eagle. <A> I have always considered them to be quite different: a power plane is treated as a continuous layer of copper (although it might have a small number of tracks and pads) whereas copper fill refers to an area on an tracked layer that is filled with copper and usually grounded or connected to a supply rail. <S> They are treated differently by the Pulsonix PCB software that I use, and most PCB suppliers.
| A copper fill is on layers with traces. The only difference for net classes is for rules in the DRC (and exclusion from the auto-router), for instance you can define specific spacing that you want to have between power traces (or planes/polygons) and other signals or a different minimum trace width.
|
Why do most RFiD tags use hexadecimal numbers? RFID tags store one 24-digit hexadecimal number. Why use a single 24-digit hexadecimal number? <Q> They don't. <S> They store a number which is internally represented as binary and transmitted as binary. <S> There is no hexadecimal here. <S> Humans have a hard time grasping numbers with large number of digits. <S> We therefore often represent large binary numbers in hexadecimal when intended for human understanding. <S> We have gone so far as to make the tools we interface directly to, like assemblers and compilers, interpret hexadecimal numbers for us. <S> However, none of this has anything to do with the representation inside the RFID chip, which is purely binary. <S> The following numbers are all equal: 15F4B3D2 <S> hex <S> 368358354 <S> decimal <S> 00010101111101001011001111010010 binary <S> What do you think the chance of human error is in manipulating the last one compared to the first one? <A> Technically it stores a 96 bit binary number, and hex happens to be the most convenient way to express that number to humans. <S> Digital systems see everything in ones and zeros. <S> If the number was in decimal it would have to be represented as binary in the hardware anyway. <S> There are 24^16 = 12 sextillion possible combinations of IDs, which is roughly the number of grains of sand on earth. <S> We will never run out, or at least never in the amount of time that RFiD is still a relevant technology. <S> 24 also happens to be 12 (my mistake) bytes, which is a nice number for current electronics and software. <S> ee: <S> Wowee my math was awful. <S> That'll teach me to type faster than I'm thinking. <S> Also, it appears the RFiD number is split up into categories whose length were determined by how many unique IDs the standards committee wanted to be able to support in each. <S> See this PDF <S> I found on Google for more details. <A> As a side note regarding "RFiD tags store one 24-digit hexadecimal number": There are many different types of RFID tags. <S> Mifare Classic in its initial form only used a 4-byte UID and was later extended to 7-Byte since it wasn't sufficient. <S> The newer types like Desfire (7-Byte) normally use at least 7 Bytes. <A> Binary numbers which are logically subdivided into logical bitfields are frequently written in hex or octal, because it's easy to parse out the bitfields from such strings, even without the benefit of a calculator or computer. <S> Hex numbers make it especially easy to parse out bitfields whose length is a multiple of four (octal numbers make it easy to parse multiple-of-three bitfields, but those are less common). <S> For proximity tags (predecessor to modern RFID) which used lengths of up to 37 bits, it was very common for readers to output the data as octal digits. <S> Such devices would be unable to accept hex, but have no problem with octal. <S> Even though the octal format is bulkier than hex would be, 37-bit numbers are small enough for that not to be a problem. <S> With 96-bit numbers, however, the extra bulk of using 32 octal digits versus 24 hex digits makes the former less desirable.
| Although hex is in many ways preferable, devices that expect data from magnetic cards are often restricted to using digits 0-9. e: If you're asking why it's 24-digits, I assume it was chosen because that will allow for us to keep making RFiD tags without ever repeating an identifier if we don't want to.
|
Why is there alternating current in my wall socket? Why is the standard of delivering electricity to our homes is via alternating current, and not direct? As far as I know almost every electronic device has an AC»DC converter because their internals use direct current. <Q> From Wiki : <S> Transmission loss <S> Available electric power is the product of current × voltage at the load. <S> For a given amount of power, a low voltage requires a higher current and a higher voltage requires a lower current. <S> Since metal conducting wires have an almost fixed electrical resistance, some power will be wasted as heat in the wires. <S> This power loss is given by Joule's first law and is proportional to the square of the current. <S> Thus, if the overall transmitted power is the same, and given the constraints of practical conductor sizes, high-current, low-voltage transmissions will suffer a much greater power loss than low-current, high-voltage ones. <S> This holds whether DC or AC is used. <S> Converting DC power from one voltage to another requires a large spinning rotary converter or motor-generator set, which was difficult, expensive, inefficient, and required maintenance, whereas with AC the voltage can be changed with simple and efficient transformers that have no moving parts and require very little maintenance. <S> This was the key to the success of the AC system. <S> Modern transmission grids regularly use AC voltages up to 765,000 volts. <A> Power loss in any resistive element is $$ P = <S> I^2 <S> * R1 <S> $$ <S> Power delivered to a load <S> is $$ <S> P= <S> I * R2 <S> $$ <S> We can think of R1 as being our transmission wire and R2 as being the device being powered (OK, in reality most devices don't behave like resistors, but the story remains the same) 1: <S> So, the loss (wasted power) increases with the square of the current, but the power delivered to the load does not. <S> This means, to deliver the same power, it is better to use a low current in a transmission wire at a high voltage than using a low voltage at a high current. <S> 2:It is very simple and efficient to use a transformer to convert AC from one voltage to another. <S> Converting DC from one voltage to another is costly and complex. <S> Add all this together <S> and it makes more sense to transmit power using AC than DC. <S> Less power is wasted, wasted power means wasted money. <S> Also because the currents are less, the size of the wire is smaller and lighter, this means the cost of the infrastructure is lower. <A> The main advantage is that it is much easier to convert AC to different combinations of voltage and current. <S> This was nearly impossible with DC back when the standard emerged. <S> Also large machines like motors and the generators that power the grid inherently produce AC. <S> This can be rectified with diodes or some types of communtation, but the result will still be rippling DC at best. <S> DC has advantage in power transmission since there is no capacitive and radiative loss, and the conductors don't suffer from skin effect. <S> The fact that most transmission, even the high power main lines, are AC today is evidence of the difficulty in converting to DC and back to AC again at the other end. <S> DC transmission is used in a few places today, limited to long distances and/or to transfer power between two power grids that are not phase locked. <S> The greater efficiency over the long distance makes up for the cost of doing the conversion at each end. <S> One example of such a DC line is the hydro-Quebec feeder into the New England power grid. <S> This runs for something like 1000 miles from large dams in northern Quebec down to as far as a power substation in Ayer Massachusetts not far from my house. <S> The facility to receive the DC power and convert it for connection to the local grid is not trivial. <S> Take a look at 42.5705N, 71.5242W <S> if you want to see the scale. <S> However, that is still apparently cheaper overall than paying for the power losses and more expensive cable over 1000 miles of transmission line.
| The advantage of AC for distributing power over a distance is due to the ease of changing voltages using a transformer.
|
Advice on ground plane in my first PCB I needed some advice on my first ever PCB. I am trying to build the circuit below (schematic drawn using OrCAD Capture), which is straight out of the datasheet of the flyback controller LT3748. I did some reading (including some of the posts on this forum), and decided to adopt this plan: 2-layer PCB: All components/tracks go on top, bottom layer has ground plan only All components are surface mount only. Ok so my first attempt on the PCB is below (using the ExpressPCB software). This is a class project and we must build our own transformer. We couldn't get the bobbin we wanted and so decided to just lay down the transformer somewhere next to the board and connected it through a 4-pin connector. We couldn't really mimic the layout suggested in the datasheet, as we're using only a 2-layer design for various reasons. We do realize that a 4-layer design along with a small commercial SMT transformer would have been ideal, but we're working with what we've got. So based on some of the feedback below (and thanks to everyone who commented), I've made slight improvements to the PCB (as shown below). I also have some questions: The datasheet advises to isolate or physically separate the high current ground from small-signal ground. The secondary ground is completely separate, so that's done with. As for primary, the only high-current grounds are those of Vin and R8 (the sense resistor). So, is it a good idea to connect the negative terminals of Vin and R8 with a track and then connect that track at one point to a ground plane that will have all the other small-signal grounds. The only penalty then would be that the R8 to Vin track would be quite long (since I'm using 2-layer only and wouldn't like to break my ground plane underneath, unless it is less worse than running this long track). As you see from the schematic, I'm running two tracks underneath the IC (i.e. on the same top layer). Do you foresee any problems there? My IC shouldn't get hot, as it works with small current only. <Q> It is a pretty low parts count design, but it is by no means simple. <S> Then you can determine where coupling to ground is useful and when it can interfere. <S> ( This is just learning curve info not specific to your layout)Although many students use the physical layout approach, it defies logic and when you want to understand how it works, you need to use logic in your schematics not just physical layout. <S> This is most useful when it doesn't work. <S> vs <S> When you discover the load regulation is poor due to the layout of the external transformer in relation to RFB feedback, which schematic will you follow and how will you discover why it fails in your layout. <S> Unfortunately what schematics do not show is the equivalent circuit of a ground plane and its coupling. <S> This is why a more "Logical" schematic is important and rules for small inductive loops is important and coupling to ground planes. <S> Although I concur with your aadvice given, this design will be very noisy and suffer in regulation becuase of how the boundary mode processing works inside the chip. <S> A more reliable design will use large voltage feedback thru a tertiary winding (which they use in msome aqpplications) <S> It may work, but how well is the question. <S> EMI radiation, Load regulation, Step response and ripple are important measures of performance which are affected by this clever chip's internal processing of the current waveform using the MOSFET resistance. <S> When it fails you can try to understand how it works. <S> With your schematic, all you can do is see that the parts are connected to the right pin. <S> These basics although may seem tedius to you, they are critical to getting the perfromance offered by the chip. <S> Layout is critical in this design because of the simplified external feedback of transient switching. <S> I would use a small planar SMD torroidal transformer such as the one used by Linear Technology and follow their layout guidelines. <A> Its a pretty simple circuit and the layout looks fine. <S> Something you might want to consider is the trace width going to C1 and C5. <A> I would learn from the demo boards they designed. <S> A planar SMT flyback transformer is better from Pulse is what they used with a 4 layer board with 2 inner ground planes except there is a gap between primary and secondary AC of the transformer. <S> Strong pulsed E fields are coupled between pairs of copper layers for input DC and output DC for least EMI radiation. <S> This will be several orders of magnitude quieter for ingress into your sub-board and nearby sensor wires. <S> However if you really had to go cheap on materials for this design, I would put the board far awy from sensors wires and use lots of ferrite CM chokes around the wire. <S> When you are starting, it is better to learn what works and then experiment with cost reductions for improvement later.
| It helps to understand how the chip works inside to see what pins are more sensitive to stray EMI than others before doing a layout. You do want your power and ground traces as thick as possible but depending on what method you will you populating the PCB those thick traces going to the small pads for the capacitors may absorb quite a bit of heat causing your capacitors to not reflow properly.
|
I2C - Where's the ACK I'm working on I2C master driver for interfacing a particular peripheral.The problem I have, is that when the 9th clock arrives, the slave device doesn't pull down the SDA line. I checked the signals with a scope, and everything looks like fine. the address is fine.I'm not using external pull-up resistors, I'm using the internal pullup capability of my MCU (EFM32GG). I'm not an electrical engineer, and my experience is from the software side, so this question may be silly, but is there a chance that the device can't pull down the line because the pull up drive is too high ? Can there be another explanation for this problem (except for the obvious one, that the slave chip is dead)? <Q> With the scope, you should see some sort of effect on the data line, even if the line is being pulled up too strongly. <S> It may drop only half a volt or something, not enough to be read as a zero. <S> There's also the possibility of the slave address being wrong. <S> Sometimes the address is specified as 7-bit and sometimes as 8-bit. <S> The latter will be 2x the former. <S> Free advice <S> : Write a loop to try all the addresses and stop if it finds one that responds. <A> I would guess that what you mean by "pull up drive too high" in this case would be that the internal pull-up resistor would be too small. <S> This is highly unlikely. <S> You can make sure of this by switching on the pull-up and making the pin an input. <S> Then just put a resistor from the pin to ground, you can calculate the internal pull up resistance with the voltage divider equation . <S> Remember 'large pull-up resistor' = ' <S> weak pull up'. <S> Second most likely would be the timing. <S> Check the I2C timing diagram of your slave device (should be in the data sheet) and make sure that it's being met by measuring with the scope. <S> Finally, if it is not any of these other things, you may actually have a dead slave chip. <S> Can you test another one? <A> There are two major components to make this work, the physical electrical interface and the logical data that is sent. <S> On the electrical side, the master by itself at least seems to be operating correctly if you see on a scope that the signals are good. <S> Since you haven't provided plots, we can't tell if they are really good or whether you have a misconception what good is. <S> On the slave side, yes, the pullups need to be weak enough to allow the slave to pull the SDA line low. <S> If I remember right, the IIC spec says the slave only needs to sink 3 mA to bring the line below the maximum logic low level. <S> If you are using 5V logic, for example, then this means the pullup can't be less than 5V / <S> 3mA = 1.7 kΩ, so a 2 kΩ resistor would be a reasonable choice. <S> Look at the specs for the internal pullup that you are using and make sure it can't source more than 3 mA. <S> If it can, they you can't use it and have to use a external pullup. <S> On the logical side, you have to make sure the slave is being properly addressed. <S> The IIC sequence should start with both lines high, then a start condition, which is SDA going low before SCL going low. <S> After that for each bit SDA should change to the new value, then SCL go high, then SCL low again. <S> The first 7 bits are the address, then the read/write bit. <S> For the ninth bit, the master leaves SDA floating and the slave should pull it low soon after SCL goes low. <S> In my experience, the most common cause of not getting a response from the slave is incorrect address.
| The most likely problem is a wiring issue, like swapping SDA/SCL when hooking up the peripheral or not having a common ground.
|
Fast opto-isolation with open collector output without VCC I have a two wire communication channel, with a data line and a ground line, with the data line being pulled high via a resistor on the receiving end. I am supposed to send information on this line by connecting the data line to the ground. There are also other devices on the bus which may be transmitting at other times, so the data line is not always high. The data line normally has 5V, but I don't have a separate VCC output line. I am allowed to leak 30 µA to the ground when I'm not sending and I need to sink atleast 15 mA to the ground when I am sending. Communicating on the line should be done by some isolated circuit. A simple phototransistor output opto-coupler fits the bill perfectly. One combined with a suitably selected base resistor will reach 1-2 µS switching times. However, there are a few things I do not like in this solution: If I need to sink 15 mA and still stay fast, I need to use a lot of current to achieve that: opto couplers with a high CTR tend to be slower and requiring a high CTR is problematic if one wants to have equipment that will still work in 10 years without problems. All the parts need to be selected just right to meet the specifications. If an input or output voltage is suddenly different (because a manufacturer does not adhere to specifications), it is likely that some resistor is too large or too small. It is hard to get wide enough margins for everything to deal with such events. The switching time is adequate, but I'd love to get a solution that would be really fast. Getting under 1 µs would be great, 100 ns would be splendid! So, I am wondering if there is some combination of simple components that would allow me to achieve faster, lower supply current and a more robust solution. All the faster opto isolators tend to require the VCC input or simply do not work with open collector outputs. There are some with fast switching times and supply power requirements in the µA range, so I have been toying with the idea of just pulling VCC from the data line and keeping a capacitor to tide over the times some other device is pulling the line low. This would be kind of like 1-wire bus. However, such couplers would need to be coupled with a transistor or FET to achieve the needed sink current and I am guessing that might negate all my speed advantage and make the design difficult. I also toyed with the idea of using ADuM5201, which provides isolated power as well as a high speed data link. That combined with a suitable FET might do the trick. However, such chips are somewhat complex beasts, requiring bypass capacitors, extended pads as heat sinks, large supply current at start up, and EM emission considerations. So, I am wondering if anyone has a cool solution, maybe something with modern components as I believe most of the advanced opto coupler stuff was done when many things were a bit more primitive. Thank you in advance. <Q> Unfortunately physics dictates a tradeoff with CTR and speed If you can't make it with this. <S> Change the requirements. <S> Top signal diode charges up C to become Vcc and biases the internal photodiode to the external bus voltage peak to store voltage for low duty cycle communication on the bus. <S> I assumed 5V 300 ohm termination and 100 ohm drive impedance. <S> Change to optmize as required. <S> Compute worst case CTR, factor some aging of emitter diode and include worst case temperature to ensure high SNR for signal on the bus. <S> 2nd diode and current source generator simulates the opto emitter diode not shown. <S> Phototransistor can drive impedance of your choice. <S> Sim link <A> A couple of thoughts: To make an opto's output transistor switch on hard, quickly, you need to put a lot of current into the LED briefly, but I don't know that you'd have to keep it on that hard. <S> I would think that driving the LED briefly with a higher current and then using a lower current to hold it might be helpful; if the time between cutting back on the holding current and switching it off altogether was sufficient, that reduced holding current could help the transistor switch off more quickly. <S> You may have to switch 15mA, but that doesn't mean the opto has to do so. <S> If you will only have to start asserting the output when it's high (meaning you won't have to do things like stretch pulses which originate with other devices) and won't have to hold it too long, you could perhaps use an NFET, a diode, a small cap, and two optos. <S> One opto would connect the gate of the NFET to the drain via diode. <S> The other would connect it to the source. <S> The drain would have a small cap to the source to maintain the gate voltage while the NFET is on. <S> To start asserting the output, one would pulse the opto connecting the gate to the drain. <S> To stop asserting it, one would pulse the opto connecting the gate to the source. <S> When the device is idle, one should drive the latter opto just enough to overcome any possible leakage through the former. <S> There are many possible variations on this circuit; having a "supply" capacitor may be better than having a capacitor on the gate, but putting the capacitor on the gate would probably yield more consistent behavior (since the capacitor would always start discharged when one started to assert the output, and since releasing the output would not require charging the cap). <S> Depending upon how much voltage drop you can tolerate, other approaches may be workable as well. <S> For example, you might be able to use an opto together with a BJT to form a Darlington arrangement, but use a second opto to accelerate the turn-off behavior. <S> Such an approach would have a much higher voltage drop than the MOSFET-based approach, but would eliminate any need for a capacitor. <A> The problem with high speed on an unbalanced line improperly terminated is rise time, SNR and EMI immunity. <S> The problem with optoisolator transistors is decay time and a wide range in CTR. <S> The best solution I can think of is to change the PHY protocol to bi-phase or MFM like a floppy head and connect ethernet RD TD together or just use TD in both directions to create shared half-duplex and invent your own CDMA method or use one that already exists. <S> It is also readily avail (cheap (
| It might be helpful to add some circuitry on the output side of your opto.
|
Looking for a better understanding of a kilowatt hour and trying to size an electricity supplier using it I am trying to design a fuel cell that can provide enough energy for 1 day's use a maximum capacity but I am having trouble sizing the fuel cell because I need a better understanding of kilowatt hours. I found online that the average power consumption of a house is about 8,900 kW-hr per year which amounts to approximately 24 kW-hr per day. If I wanted to design a fuel cell, would it be considered a 1 kW fuel cell? I am trying to size it. The reason I ask is that I read an article and it said "A 3 kW fuel cell ..." so i was wondering if I could just consider this a 1 kW fuel cell and then size it based on that assumption <Q> A joule (J) is a unit of energy. <S> If you lift a one kilogram weight one meter, you have done 9.8 J of work, because the weight of a kilogram is 9.8 Newtons, and a force of one Newton over one meter is a Joule of work. <S> A Watt measures work intensity or power: how much energy is transferred per unit time. <S> One Joule of work done in one second is a watt. <S> If you lift one kilogram by one meter, and you do it in one second, you need 9.8W of power. <S> A Watt is a Joule per second, J/s. <S> If you want to do the same lift in half a second, you need 19.6W: twice the power. <S> A kilowatt-hour is a unit of energy again, like a Joule. <S> We are taking Watts (energy per time) and multiplying them by time, so the time cancels out, leaving energy. <S> A hour is 3600 seconds. <S> So a kilowatt-hour is 1,000 J/s <S> * <S> 3,600 s <S> = 3,600,000 J. <S> If work is being done, or energy being transferred at a power of 1000W, and this is done for one hour, that is a kWh. <S> Or 100W over 10 hours, et cetera. <S> A 100W bulb lit for 10 hours consumes 1 kWh. <S> A food calorie (the big calorie, or the kcal) is 4200J. <S> So a 1 kWh is 3,600,000J / 4,200J/kcal <S> = 857 kcal. <S> This is about the energy in two double cheeseburgers from McDonald's. <A> A kilowatt is a measure of power primarily used to measure electric power. <S> Power is the ability to do work. <S> Kilowatt hour is a measure of energy or work. <S> It is measured by multiplying an amount of power by the time period it is being used. <S> If an electric motor draws 1 kilowatt for one hour, then it has consumed a kilowatt hour of energy. <S> You have found that the average home uses 24 kilowatt hours of energy per day. <S> That includes all of the energy of all of the electrical devices in the typical home including lighting, heating, air conditioners,appliances, televisions, radios, computers, etc. <S> However it doesn't tell you how much power the home may be demanding at any one time during the day. <S> For example, in the late evening when everyone is sleeping, the power demanded by the house will be small probably just the refrigerator, heating, clock radios, and some night lights. <S> This may be on the order of 1 kilowatt or less. <S> During the day, if the air conditioner is on and the dryer is on, the house load will be many times 1 kilowatt (an electric dryer probably draws about 6 kilowatts or more). <S> What this means is that any device designed to power a home has to take into account not only the total energy consumed (which determines the amount of fuel used by the device, whether a steam turbine driving an electric generator or a fuel cell) but also the maximum power that the house may demand at any time during the day. <S> Many electric utility companies charge not only for the total energy used (kilowatt hours) but the maximum power demand (peak kilowatts) because that determines how large their generating capacity has to be. <S> Thus you can see that a fuel cell that can provide 1 kilowatt for 24 hours might supply the total energy a house consumes but would never be able to power the house when the electric demand is at a maximum. <S> That maximum value depends on the electric devices in the home and when they are used. <S> It is possible that air conditioners, television, washers and driers, and many lights could be on at the same time. <S> Then the electric demand could easily exceed 10 kilowatts. <A> You've got the right idea. <S> (power(kW) <S> * time(h)) <S> The missing piece from your analysis is a power buffer. <S> If you looked at the typical consumption of a home plotted as instantaneous kW as a function of time, it would have a significant diurnal variation. <S> The peak draw will likely be 10kW or more -- 9kW+ more than your fuel cell can supply. <S> Where will that power come from? <S> Typically batteries. <S> There's also efficiency to consider - the efficiency of charging and discharging batteries, the efficiency of inverting the fuel cell's DC output to AC, etc. <A> If Peak/average ratio=1, you need a 1kW fuel cell for 24 hrs. <S> If Pk/Avg= 10 , you need a 10kW fuel cell
| Assuming perfect efficiency and some storage (which you don't address--more on that below), a 1kW fuel cell running for 24 hours would produce 24 kWH.
|
+ and - DC voltages Let's say an op-amp or similar device requires, say, +- 19V DC to operate; that is, there are separate pins marked +19V and -19V respectively and let's say, I just happen to have a couple of 19V laptop power supplies sitting about collecting dust. Obviously, one of the adaptors can be connected with due regard to polarity, to the +19V pin but my question is this; can the other adaptor be connected to the -19V pin with the Earth rail connected to the pin and the active rail connected to the circuit ground? I've pondered this at length and decided, given that a DC voltage is just a potential between two points, it should be OK but I'm sufficiently skeptical to get a second opinion first. Thoughts??? <Q> If you don't mind the cost of a DC to DC convertor with +15V, 0V and -15V output, then this is probably the securest way to go especially as the noise issue on two series-connected laptops supplies would be avoided. <S> Traco make a decent range and this range: - http://www.tracopower.com/fileadmin/medien/dokumente/pdf/datasheets/tel3.pdf <S> Should do the trick. <S> In particular I think the TEL 3-2023 should be ideal. <S> Several other manufacturers provide similar products. <A> Yes since the charger is floating you can connect them in series with center grounded. <S> However just because they are floating does not mean there is good CMMR <S> , in fact there is significant CM hum so if you have any high impedance inputs the CMMR of the Op Amp will be challenged by their capabaility to reject 50/60Hz hum & high frequency <S> pulses inside the chargers <S> and so you need to either suppress the CM hum by connectting the center to a real ground or use a large CM choke on both DC lines. <S> By the way, this is a common fault on Laptop external mic that get hum and the solution is the same. <A> There seems to be some confusion here. <S> Most laptop power supplies have three input connections: <S> AC Hot AC Neutral Ground <S> Every laptop power supply will be floating relative to the AC inputs. <S> However, many (most?) <S> laptop power supplies connect the output ground to the input power ground pin. <S> As such, if you break the ground connection (i.e. the third pin on the power connection), it will be floating. <S> Basically, if you disconnect the ground pin of each adapter, the output is pretty much guaranteed to be floating, at least with respect to DC <S> (AC common-mode garbage is another matter). <S> @DavidKessner's point about asymmetrical start-up time is a valid one, so it would be a good idea to put a diode in series with the + and - rails, to ensure that if one power supply starts faster then the other, you don't wind up reverse biasing the other. <S> If you do do this, it is a important safety necessity that you make sure you connect the DC ground to the wall-ground. <S> In other words, make sure that the center-point where you connect the two adapters is properly grounded to the third pin of the AC outlet. <S> This way, if one of the adapters fails, it will properly trip the AC circuit breaker. <S> If you do not have this ground, and one of the adapters fails, you could wind up with mains voltage everywhere in your circuit. <A> You are asking if you can wire the laptop power supplies in series and use the common point as your 0 volts the answer is yes. <S> However both supplies will share a common ground already through the earth ground on the AC in as mentioned earlier by others. <S> This is only true of the laptop power supplies have AC ground connectors. <S> So if they do cut them off first then go for it. <S> Ground on adapter 0 will be your 0 volts as will be positive on adapter 1. <S> Positive on adapter 0 will be +19 volts and ground on adapter 1 <S> will be your -19 volts.
| This is very much a safety necessity, as if someone wired a plug backwards, and the DC output ground was connected to the AC neutral pin, you would get mains voltage on the DC output.
|
Voltage regulator 'hiccups' when gate pin of MOSFET is touched I've been struggling with the following circuit which includes a Raspberry Pi: That's a 5V voltage regulator (with protective capacitors), and a DC motor over on the right, and an IRF510 N-channel MOSFET toward the bottom. The 9V supply is actually a plugged in 9V supply, so battery death isn't an issue. The problem in some way is stemming from the presence of the Raspberry Pi. A voltmeter is clamped and measuring voltage between A (output of the voltage regulator) and B (ground of the circuit) This voltage normally sits at about 4.94 ~ 5 volts. Now, I touch the two wires in the dashed box. This should simply kick the MOSFET over, allowing the motor to run. And it does that. Except there's a small hiccup. The voltage reading (A to B) drops momentarily to about 1.0V, the Raspberry Pi turns off, but then the voltage (A to B) comes back up, the Pi reboots, and the motor is running. I disconnect the wire and the motor stops. Everything is fine. Replace the raspberry Pi in the picture with a regular resistor and the hiccup doesn't happen. Now I would say that the most likely cause is some sudden spike in current is happening, overloading the voltage regulator's 1.5A rating. But I can't see what would be causing it. Measuring the current out the regulator when the Pi is idling gives only about 0.35 A. I can't see how touching the other parallel wire there would cause some surge in current. Furthermore, everything works fine after the hiccup! So I'd be extremely grateful for any clue as to what might be happening! Thanks for any advice! EDIT: Measuring the voltage across the power supply (where it comes INTO my breadboard)'s positive and negative terminal during the touching of the wires ALSO shows a drop from 8.98 V all the way to around 2V and then goes back up. Now I'm even less sure of what's going on! And just to clarify - this is a AC to 9VDC converter plugged into a wall outlet; the wires go directly into the + and - rails of my breadboard. <Q> Steps to diagnose / eliminate the problem: Add a 10 μF, 6.3 Volts or higher capacitor in parallel with C2 from the 7805 output leg, as close as possible, to ground. <S> Add a 100 uF, 10 Volts or higher capacitor to the 9 volt input, to act as a buffer / reservoir capacitor. <S> Add a 100 Ω resistor on the line from the regulator to the MOSFET gate, and replace the pulldown resistor on the Gate with least 1 kOhms . <S> This will reduce the current spike due to capacitance of the MOSFET gate - <S> I believe this should not be the problem, but it is a simple and useful preventive step nevertheless . <S> If the above does not resolve the issue: Use a separate 9 volt supply for the motor, your existing supply is unable to cope with the starting load (stall current > <S> > <S> operating current, usually) of the motor. <A> Motors often (always? <S> it's not really my thing) need much larger currents to start up than they need to keep running. <S> 9 <S> V batteries have fairly high internal resistance. <S> Edit <S> I just saw you are saying you aren't using a battery. <S> It could also be an issue with long wires and flaky breadboard connections, but just not enough juice is more likely. <S> So the motor (not the gate of the FET, which is what I think you were thinking) is drawing a large current to get started. <S> This is pulling the 9 V supply output so low that the regulator goes out of regulation causing all the other symptoms you mentioned. <S> The simple solution is a higher amperage supply. <S> The value will depend on the motor. <S> The value might be 10 uF, 100 uF, or more. <S> If values in the 100 - 500 uF range don't work, then you may need to consider more drastic circuit changes. <S> The only thing that isn't clear is why it doesn't happen with the uC removed. <S> You might want to try that test again --- maybe you just didn't see the glitch because with no uC, there's no way to see that the uC is rebooting. <A> Well, upon further inspection, I looked at my power supply to find that it was rated for 0.3A. <S> Since the Pi draw 0.35 on it's idle time, I can see how this could be a major problem. <S> As soon as I can get another one I'll test again, betting the issue will be resolved.
| If the supply you have is just on the edge of providing enough current, you could try adding a big capacitor, say between the 9 V positive terminal and ground. In this case I'd say your supply probably doesn't have the juice to get the motor started.
|
How to properly set up a multimeter to measure the power consumption of a computer? From what I understand, a multimeter can be used to measure the resistance in in a circuit. Multiplied by the voltage, measured in the same circuit, I would get the total power consumption. Is this correct? I want to use an inexpensive multimeter to measure the average power consumption in an appliance (computer). I was thinking that it should be possible to achieve this by connecting the "measuring hands" of the meter to the connectors in the power socket, and then over a couple of minutes measure first the average voltage and then the average resistance. Then, multiplying these values would give me an approximation of how many Watts a device is using in a given time period. <Q> A computer or other appliance power supply is not a resistive load, it is a reactive load . <S> It has a phase relationship to the incoming voltage, which is itself an alternating (AC) voltage. <S> AC voltages inherently show an "average" of essentially zero. <S> What is measured for power computation is an "effective" or "Root Mean Square" (RMS) voltage across, and current through, the appliance power feed. <S> Therefore measuring the resistance across its power supply leads will not provide meaningful results. <S> At a simplistic level, Voltage measurement could be done with a RMS voltmeter across the supply leads. <S> See this EE.SE answer for more details. <S> Current measurement would need an RMS current meter either inserted into the power line in series, or using a clamp-type non-invasive current sensor . <S> Low cost AC power line meters use a basic rectifier circuit and internal computation to indicate power consumption. <S> These are designed for specific power line types ( <S> e.g. 110V 60 Hz, or 230V <S> 50 Hz), and will deviate from precision if used on a different line frequency, if they work at all. <S> The above does not take into account Power Factor calculations, another element impacting actual power consumption calculations. <S> The proposed multimeter approach will yield nothing except possibly a damaged multimeter and the risk of electrocution if you are not qualified to work with mains voltages. <S> That would be the recommended way to go. <A> I'm surprised nobody on this page mentioned Kill A Watt yet. <S> You plug it into the wall, you plug your computer into the Kill A Watt, then the Kill A Watt displays volts, amps, and wattage within 0.2 percent accuracy. <A> Since it drives reactive power, you can't directly measure with a simple ampermeter. <S> But you still have a simple solution. <S> Use the energy meter of your house. <S> You use the digital ones, right? <S> Does it have a blinking led showing the power rate? <S> You can read how it is dependent to power, somewhere near the led. <S> For example, let's say it is 1000 blink/kWh. <S> So it is 1000/(60 <S> *60)=0.278 blink per kilowatt.second. <S> It is also 3600/1000=3.6 kilowatt.second per blink. <S> Run only the computer in the house and get the time between two blinking with a chronometer. <S> Say it is X seconds per blink. <S> It is the problem that you have 3.6 kW.sec energy that is consumed within X seconds. <S> Simply calculate the power by calculating 3.6/X (kW). <S> For the mechanical ones, you can figure it out by reading the turning rate.
| There are commercially available power meter devices that plug into your wall socket, with the appliance plugged into the device, and log or display power consumption.
|
How to amplify MCU port output? Having the following diagram, how can I amplify output from pin 3&4 to speaker, using BC547 transistor? (source: elm-chan.org ) <Q> Based on the comments and responses, your requirement seems to be: <S> Create a 2-bit DAC using 2 digital outputs of the ATTiny45 Produce an audio-frequency output by varying the 2 bits suitably <S> Hear this audio signal on the 8-ohm speaker <S> What you need is an "R-2R" network driven by the two pins. <S> From the diagram you posted: Connect R15 to Vcc, and R7, R8 and R16 exactly as shown. <S> Keep the values as per the diagram as well, 10k and 20k. <S> Leave out the other resistors in the schematic. <S> This resultant output voltage needs current amplification to drive the speaker: <S> An 8 ohm speaker with a 5 volt peak-to-peak signal will generate over half a watt of output, which is pretty loud - but will require anywhere from 100 to 300 mA of drive current. <S> The MCU's pins cannot deliver that kind of current (this is with reference to your original schematic), and even the BC547 is rated only to 100 mA. <S> If distortion of output on the speaker is not a show-stopper, you could make a Common Collector <S> unity gain voltage buffer with your BC547 to generate the speaker output you are expecting. <S> Your speaker will be the load resistor, so no separate resistor is needed there. <S> Your power rail must be able to supply sufficient current for this. <S> The output will not be a perfect 4-level (i.e. 2-bit) DAC output since we have ignored biasing, but will generate recognizable sound as per the MCU pin values generated. <A> Common emitter amplifier + Buffer (Emitter follower). <S> If you google these you'll find a site that will tell you how to make them. <S> Also, don't forget to add caps in between! <A> Depends on the speaker, and the signal. <S> If it's a piezo, that cct is as loud as it gets without more volts (or a transformer!). <S> If it's a voice coil, tell us what impedance, and how much power do you want?
| The common emitter is to amplify the signal and the buffer will simply make sure that the speaker gets most of the signal. The junction of R16 and R8 will be the DAC output.
|
Can I half the current rating when moving from 100-240V to just 230V? I am repairing a failed ATX computer power supply (PSU). It is rated 100-240V 9A input, 620W max output. Its 10 A bridge rectifier is dead, and I am able to get at most 8 A bridge rectifier as a replacement. 8 A is not 10 A, of course, but I live in Europe, we have got 230 V in mains, so my idea is simple: If the PSU is designed to work in a wide range of voltages from 100 V to 240 V without a manual switch, its 10 A circuitry is probably needed only for 100 V, but not for 230 V we use here in Europe. So I think I can safely put there 8 A rectifier bridge, or even go as low to 5 A or possibly even to 4 A without any problems. Is my idea correct? I also replaced the blown 10 A glass fuse by a 4 A ceramic one, it should be just enough for the PSU and also can help to protect my 8 A replacement bridge from possible overcurrent. My math: Originally 100 V, 10 A => 1000 VA. Now 230V, 4A fuse => 920 VA. I tried it in praxis, it seems to be fine and working (under normal conditions, not fully loaded). So this is rather a theoretic question, I'd like to understand it. Update: If somebody is interested, it is Seasonic SS-620GB (S212II Bronze) ATX PSU. Also, there is a fuse information on its printed board saying that 200-230V variants should be fitted with a 5A "H"-rated fast blow (T) fuse. I used the correct H T type. Original bridge was GBU 1006: reverse current 5 microA, forward surge current 220 A. The replacement is KBU 805: reverse current 10 microA, forward surge current 300 A. <Q> Dangerous. <S> Very dangerous. <S> The fuse is meant to withstand normal operation, start-up inrush current (which is usually higher than the max steady-state current) as well as nasty things line line dips and interruptions, brownouts, etc. <S> - you may get lots of nuisance fuse blows, especially if you draw heavy power from the PSU. <S> Never change the rating or the type of fuse - there are fast, normal, slow-blow types (among others) and were carefully chosen for the application. <S> The bridge has to withstand these same transients. <S> Blowing the bridge can do lots of downstream damage (it could take out the DC/DC converters) rendering your power supply essentially useless. <S> Furthermore, can you 100% unequivocally guarantee that no one would ever attempt to use this PSU at 100VAC? <S> Would you disable the input range switches and hard-wire the PSU for 230VAC? <A> You might get away with the 8A rectifier but you have to match other specs as well. <S> There is one (ISSm on some datasheets) which is effectively a short pulse inrush current rating. <S> For the 10A rectifier it's probably 200A, possibly more. <S> When you switch on, the reservoir cap acts as a short circuit across the mains for a moment; no transformer to soften the blow like the good old days - and this inrush current is probably worse at 230V, not better... <S> I'd pay the extra for a 10A bridge. <A> Equivalent or better is the best practise. <S> Find a pal who can mail one for you for two bucks.
| Changing parts like bridge rectifiers and fuses to lower-rated ones will not only invalidate any warranty (if there was one) but will make the device no longer safety-certified, meaning if your house burns down you have no one to sue except yourself and may even be denied insurance benefits.
|
Can I buy a motor that vibrates or pulses very precisely? I'm trying to make an item with a number of pads that will pulse individually or in sequence with a given signal. I have looked at vibration motors but these are like the ones in video game controllers - they vibrate but the duration is too long. I want to put the motor in a pad that could be worn and give a much more precise 'pulse' or 'beat', potentially at a rate of up to three times per second. Any ideas where I can find such a motor or other feedback component? Many thanks. <Q> You need a voice coil actuator (VCA). <S> It is most commonly used as the active component in most loudspeakers - a coil of wire and a permanent magnet produce an excursion proportional to current. <S> In fact, you could probably prototype your application with small, inexpensive speakers. <A> Some recent mobile phones use piezo actuators, driven by dedicated haptics drivers at various voltages (50 to 200 Volts peak to peak). <S> This provides precise vibration feedback, such as you may feel when using a Swype touchscreen keypad on some Android phones. <S> The advantages of these actuators: <S> Very small size and light weight for given level of vibration <S> feedback <S> Very low power consumption compared to vibration motors <S> Extremely short start and stop times (1.5 mS) and duration resolution Fine frequency control and wide frequency range: <S> e.g. 1 <S> Hz to 350 Hz vibration <S> No magnetic field hence no risk of erasing magnetic stripes on credit cards etc <S> While online stores like Digikey do not seem to have the really small haptic piezos, only their larger cousins, the piezo benders (coin piezo speakers), you could actually use a bender for your purpose. <S> It's pretty low-tech and not a recent development at all. <S> This article gives an outline of the various haptic feedback options commonly used, from motors to piezos. <S> To drive a piezo actuator, you can build an oscillator + voltage boost solution of your own, or use a highly integrated single-chip solution such as TI's DRV8662 <S> which pretty much takes care of everything, from PWM input through to voltage boost up to 200 Volts. <S> One of my projects incorporated a piezo haptic feedback solution using a regular peizo coin speaker, which was acceptable because a really strong vibration was not needed, just perceivable touch notification. <A> Try some sort of solenoid, or even a pulse through a small loudspeaker. <A> These vibrate silently based on an unbalanced rotor weight, but the speed or vibration is DC controlled so it is not as precise. <S> For precision, use a piezo speaker. <S> ALthough it is not silent due to harmonics, it is as precise as the wave you apply, thin and low power. <S> It depends on the effect you need, precise pulse rate tick sounds or precise silent vibration frequency with Morse code modulation done in software.
| Also, I know at least one local business that hand-fabricates their own piezo haptic actuator sheets using piezo materials bought from ebay or AliExpress. The easiest method used by cell phones is a sub-miniature dc motor with some control over the voltage and duration in software.
|
Use USB as an on-off switch I'm looking for a way to build a zero(ish) cost intervalometer for my Canon SLR using only stuff that I have or can get very cheaply (my budget is about $4). I've already managed to "build" a wired remote for the camera, which is basically two wires connected to the ground and shutter release pins of the Canon remote connector. Touching the two wires (manually or via a switch) causes the camera to click. I also have an old Android phone lying about that I'd like to repurpose for this project, since the phone is fully programmable. A requirement for this project is that neither the camera nor the phone can be modified in hardware (i.e., no soldering to or dismantling either). Since the only wired interface in and out of the phone is USB (mini-USB on the phone, if that matters), I was wondering if a modified USB cable could be built that can be controlled via the phone's software, such that the circuit with the camera is completed or broken. Mutilating or otherwise modifying the USB cable itself is OK. I'm willing to modify the software on the phone, so if this is possible, but the software doesn't support it, I'll figure it out. Can this even be done? If not, is there an alternative way of doing this without buying a microcontroller, board and other associated stuff? I'm not a hardware guy, so please be gentle ;). <Q> There's pretty much no chance you'll get all this for $4, it is not a realistic budget for this. <S> But that's not to say it's not possible. <S> Then the Android phone could use its USB API in the SDK to talk to it and issue a command. <S> When the USB microcontroller recognizes the 'take picture' command or whatever, it could flip a transistor on/off to toggle those wires you have and tell the camera to take a picture. <S> But you mentioned an 'old' Android phone, that could be a problem because only newer ones running Android OS 3.0 and up have the ability to expose the USB API to talk to it. <S> If your target phones don't run that, this isn't going to work. <S> In that case, to accomodate most Android phones, even older ones, you could do this over Bluetooth. <S> But that's going to raise your costs even more because you'll need a bluetooth module and power source for the Bluetooth, probably a battery, on top of the micro. <S> But Bluetooth modules can be very cheap, here's one for $5.50 USD <S> and they're even less in larger quantities: <S> http://imall.iteadstudio.com/prototyping/basic-module/im120723010.html <S> Otherwise an even simpler approach with no micro could be making a circuit with a photosensor such that it triggers the camera wires to cross when it detects some amount of light <S> , you could vary that with a pot/resistor. <S> Then tape/connect the photosensor somehow to your phone and program it to light up the LCD or the flash on the back (if it has one) when it wants to trigger the photo. <S> That might be do-able for under $4 <S> but it's not very elegant. <S> Good luck! <A> I don't think it can be done directly, but it would be easy with any of the simple microcontrollers like the Arduino or Teensy with an USB interface. <S> Cheaper would be an USB to RS232 adapter using a chip like the FT232 (some of the Arduinos use a chip like this). <S> The FT232 chips are normally used for text communication but they also have a couple of simple "on/off" outputs for flow control (labelled RTS, CTS, DTR etc). <S> Probably you could use a transistor to drive a relay to fire the camera from this signal. <S> Even an opto-isolator driven directly off this chip might be enough to fire the camera. <S> I haven't solved your problem, there is still some digging around to do if you go this way (e.g. will an optoisolator fire the camera?) <S> and you will either have to build or find a USB module using this chip, but at least this is a starting point. <A> Depending on the phone model and SLR model, you can use usb host mode to control a canon DSLR through its native usb connection. <S> Aside from that, some SLRs have infrared led remote sensors that can be made or bought cheaply. <S> These plug into the phone's 3.5mm audio jack. <S> There are passive and active versions (uses a battery or something else to power the leds). <S> Or you can do the same with a wired connection, either directly or with transistors. <S> As for usb on most older Android phones, if it doesn't have host mode, you can't do it without an middle man like a usb microcontroller.
| You do need a microcontroller with USB functionality (or have it bit-banged, but USB ones are cheap enough) to talk to the Android phone.
|
signal clipped despite q point is middle Why is that the output signal is clipped despite the fact that the transistor's q point is located halfway of Vcc??? here is the schematic and clipping here From my analysis, as you can see, supply Vcc is around 40 volts and the multimeter reading of the collector voltage is around 20 volts (half of 40 so the q point / quiescent point is in the middle to avoid cut off and saturation) Finally, you can also see that the output voltage swing is around 12 Volts rms (so that translates to 34 volts peak to peak, way far from the 40 volts of DC supply voltage) Ref. http://www.mediafire.com/download.php?htnopk49oj1y9sj multisim <Q> You've just discovered that the AC load line is different from the DC load line. <S> Although the amplifier swings about your DC load point, the disturbance does not follow the DC load line. <S> Generally speaking, the AC load line crosses the DC load line at the Q point, but is more steep, so it intercepts the horizontal axis at a smaller voltage than the DC load line. <S> To maximize the AC swing, you have to relocate the Q point. <S> The different slope is because AC sees different impedances. <S> The impedance of the emitter branch is different (because of the bypass resistor). <S> To AC, both the positive rail and ground look like a ground. <S> AC and DC load line video: http://www.youtube.com/watch?v=lMPPDpia2lc <A> Don't forget that there is a quiescent (no-signal) DC voltage on the emitter bypass capacitor which should be roughly 6.7V if the quiescent DC voltage on the collector is roughly 20V. The negative swing for AC signals is then roughly limited to the difference, 13.3V. Since the positive swing should be 20V, this would give a maximum peak to peak of roughly 33.3V. For this circuit, if you want roughly symmetric clipping, you'll want the quiescent collector voltage halfway between 40V and the quiescent emitter voltage. <A> As far as I can see, that poor little 2N3904 is dissipating about a watt under quiescent conditions, and rather more under signal. <S> Isn't it getting rather hot?
| The impedance of the base-emitter junction of the transistor is different for AC.
|
LUT vs. hard IP based multipliers on Spartan-3 FPGA for constant coefficient multiplication Before I get to my question, here are the specs for the board and synthesis tool I am using: Family: Spartan3 Device: XC3S200 Speed: -5 Synthesis Tool: XST My 4-bit multiplier is in my design's critical path. I would like to reduce the time multiplication takes so I can reduce my critical path and increase my clock frequency. I can use CoreGEN to instantiate LUT based multipliers, LUT based constant coefficient multipliers, hard multipliers, and hard constant coefficient multipliers (which I think might just be hard multipliers with one input hard wired). I am thinking that if I use 15 LUT based constant-coefficient multipliers (or maybe 11, can take care of cases 2,4,8 with shifting and 0,1 are trivial) that I can break this critical path down a bit. My design constraints prevent me from pipelining these multipliers; I need them to just integrate into my combinational logic path. Would this be faster than just using a hard multiplier? Or would a normal LUT based multiplier be faster than either option? <Q> According to the datasheet the hard multiplier takes between 4 and 5 ns to propogate from inputs to outputs in combinational mode. <S> You'll lose a few more 100s of ps getting to and from the multiplier to the rest of your logic. <S> If that's fast enough, then just make use of it. <S> If not, build your LUT-based multiplier by just writing some code with the * operator in it, synthesise it, place and route, and see if that's fast enough. <S> You may needs an attribute to force it to not use the hard multipliers (see the MULT_STYLE attribute in the XST manual). <S> You could even try just forcing a single LUT-based (non-constant) multiplier with that constraint and see what the result is - that's a very quick test. <S> Only if those fail should you go down the route of hand-building a LUT-based structure - and even then only if you've looked at the output of the synthesiser and are pretty sure you can beat it for some reason. <S> The synthesisers have been tuned to work out constant coefficient multipliers very well in my experience - I doubt coregen will gain much. <S> Wet finger estimate: <S> A LUT delay is ~0.7ns. <S> Assuming routing delays are of a similar magnitude, you can afford a chain of only 3-4 LUTs in the delay of the hard multiplier. <S> It seems unlikely to me that you'll achieve what you need in that depth of logic. <A> the fasteest multiplier you can use is one that performs the number of operations in as a few a clock cycles as possible. <S> Typically this would be one clock cycle. <S> To achieve this you generally have to use more logic cells. <S> The tradeoff comes down to space vs speed for this example. <S> You have not stated any space requirements so use any multiplier that achieves the result in one clock cycle. <S> If you are unsure which is faster, than write a test bench with the two in parallel and see how many clock cycles each of them takes. <A> If you want hard DSP multipliers to operate at anything like their full speed (maximise fMax) you usually need to use input and output registers located in the DSP slice. <S> This means adding a surplus register at both ends of your operation in RTL and making sure synthesis does not eliminate any bits (by propagating constants through it) or pushing it back into driving logic (say upstream RAM block gets output latches turned on). <S> This allows mapping to absorb the free reg into the DSP slice and gives the multiplier the full cycle, eliminating signal routing times. <S> This kind of optimisation is usually required when you are trying to push fMax to the maximums on the datasheets, in which case you'll need to follow the synthesis/DSP guide exactly and use the instantiation templates. <S> Hopefully they use the * operator inside so give no problem in simulation. <S> Watch async reset signal handling of the pipeline/in/out regs as those are not as versatile in DSP slice regs as general slices and can thwart your attempt, resulting in a pointless external reg being used and the multiplier inputs put into bypass. <S> Looking at the technology schematic of your design will help see what you got. <S> More generally, it's not clear why pipelining the design isn't an option for you. <S> Normally you would re-sync the rest of your signal paths to match the pipelining you've allowed to be absorbed into DSP. <S> The pipelined design still produces one result per cycle, and your fMAX will be higher as a result of reducing logic on the critical path, increasing throughput.
| Not having looked at the two different multipliers I cannot advise on which one is more suited for you application.
|
Determining the angular displacement of a steering wheel I am working on a project in which I am designing a vehicle driving simulator. In this project I need to measure the angular displacement of the steering wheel. The car in software simulator environment will change its direction based on the degree with which the steering wheel will be rotated. Can someone please guide me how can I measure the angular displacement of the steering wheel? <Q> The easy way is to use a USB steering wheel game controller. <S> If you want to use a different wheel (even a real steering wheel from the junkyard), then it's probably still easier to replace that part of the controller than it is to duplicate the sensing and force feedback. <A> There is something I am working on that <S> will need some type of angle sensor. <S> I am going to use a potentiometer. <A> Consider using an accelerometer. <S> Some well documented and easy to interface ones include the ADXL345 and the MMA7361. <S> The former is digital, and the latter is analog. <S> Essentially, what I would do is place the accelerometer at the axis of rotation of the steering wheel. <S> For example, the axis could be the Z axis. <S> If you place the Z axis of the accelerometer parallel to, and in line with the Z axis, then the accelerometer will return the angular displacement to you about the axis of rotation. <S> You can interpret the measurement in radians or degrees, as per your preference/requirement(s).
| By using a rotary encoder or, in the simplest way possible, a potentiometer, as described in this article connected to an A/D converter (the one in your microcontroller should be enough). If you're just going for a simple DIY method, then use a potentiometer that turns with the wheel.
|
Microcontroller with a long wire for digital input I have the doorbell button on my house wired into a GHI EMX dev board . The software evaluates the time of day and determines whether or not the doorbell should ring. Side Note: This was implemented as a way to deal with ding-dong-ditch pranks that I was receiving. This all works great except for one problem, the wire connected to the EMX board is around 50 feet (~15 meters) long and generates enough interference for the board to think that someone has pushed the button and thus my doorbell rings at random intervals throughout the day. Both my wife and my dog do not appreciate this (but the kids think it's great fun). I've tried fixing the problem by following the advice found in this article and implementing the following circuit: This didn't fix the problem, but I did find that putting a 3k resistor in the for 1k and replacing the .01uF capacitor with a 40uF worked a little better, but anything more than 3k causes a noticable delay when pressing the button before the bell rings. The difference for my circuit is that the board runs on 3.3V instead of 5V (which I assume makes the problem worse) and instead of connecting to ground the switch completes the circuit (i.e. two wires go between the microcontroller and switch). The wire that runs between the switch and the microcontroller is standard doorbell wire which isn't shielded or twisted. Replacing the doorbell wire with shielded wire is, unfortunately, not an option since that would require that I tear drywall off. I've looked at the following question here , but that seems to be dealing with a ADC which might be a little different from my problem. Any help would be much appreciated. Update After reading more of the documentation , it appears that although the microcontroller is powered by 3.3V it is 5V tolerant on it's I/O pins. I can adjust to a higher resistor value if I use 5V, but will this help anything? <Q> What the schematic does not show is the huge common mode 60Hz hum and <S> how the grounds are interconnected with proximity to AC lines & power line transients. <S> Your example is a good example of how not to interface long wires. <S> May I suggest in future; prefer twisted pair prefer balanced lines avoid high impedance inputs <S> prefer matched impedances <S> avoid excessive LPF ( long time constants) <S> include RF cap to suppress transients. <S> use ferrite beads (CM choke) <S> avoid ground loop (ie. <S> direct untapped connection to circuit) use contact wetting circuit ( correct polarity 10uF cap across contacts that are not gold plated) <S> prefer coax for very harsh EMI environment. <S> Since many options are not avail. <S> Do these; remove big cap on board and move to remote switch contacts. <S> (must) remove 3K(1k) series resistor and add ferrite CM sleeve or similar add small RF cap on board across input. <S> e.g. 0.001~0.01uF or any low inductance type. <S> Replace 100K with 1k~10K. <S> add large ferrite beads with multiple turns to both wires. <S> (CM filter) <S> With this solution, the switch circuit impedance will low impedance on closure and low impedance with elect-cap across switch when open. <S> CM hum will be absorbed and differential RF noise is suppressed. <S> -pullup to same supply voltage as uC with good RF cap across chip. <A> Update <S> I'm not very familiar with doorbell systems (other than a quick google) <S> so the following assumes you have at least two conductors running from your MCU to the switch. <S> The GHI EMX board you have has a 10 bit ADC <S> so you could send 12vDc (or more) to the doorbell and use a simple voltage divider so that the voltage to the MCU isn't <S> over it's 5 volt max. <S> Then on the software side all you would do is read the ADC and if the value is > 1000 (you may have to play around with this number, and 1023 is the max on a 10 bit ADC) <S> then the doorbell has been pressed. <S> It would look something like this (try not to be overwhelmed by my awesome graphic editing skills): <S> But this would require extra parts and is more effort than the ADC option. <S> Edit <S> Chris Stratton's answer made a good point about the current flow. <S> If you change the 100k pull up resistor to a ~220ohm one that may do the trick. <A> There is actually a very simple solution to this problem. <S> The key to understanding this solution is to think about why a plain electro-mechanical doorbell does not ring due to similar interference. <S> The answer of course is that it requires the actual ring power to flow through the closed circuit - interference will not couple enough power into the open circuit to falsely ring. <S> You can create a similar situation by using a low-value pullup resistor, with the doorbell button connecting to ground. <S> A hundred ohms of resistance would mean that around a 25 milliamps of current would have to flow before the microcontroller input is pulled low enough to read as a "0". <S> Long haul serial communication is often done with a 20 mA current, so 25 mA should be enough, but you can easily adjust up or down. <S> You can further reject interference by having software on the microcontroller which requires the button to be maintained closed - with no gaps - for a 100 mS <S> or so before it will be recognized as a valid ring. <S> One could argue that this method is wasting power, however the power is only consumed during the time when the buzzer is held down. <S> The resistor does need to have the power handling (thermal) capacity for the possibility of the button jamming permanently closed, but that would not be the ordinary case for figuring power consumption. <A> The 15 meters cable is acting like an antenna. <S> You need to use a feedthru capacitor (for example W2F11A4708AT1F ) in order to filter the RF interference.
| Another option that's kind of similar is to use a schmitt trigger with a higher input voltage. A simple solution may be to leave the doorbell system how it was before you started this project and just use the micro controller to kill power to the door bell speaker with a relay when you don't want to hear the bell.
|
What is a popular cheap and robust substitute for 2n7000 MOSFET for use with 3.3 Volt designs? What are the popular equivalents to the 2n7000 , for 3.3 Volt MCU circuits to switch higher voltage devices? Background: For 5 Volt microcontroller based prototypes and experiments, my go-to solution for low frequency, low side switching of 50-200 mA currents or 10-40 Volt devices driven by a digital / PWM pin, has been the dirt cheap ($0.05 retail here in India) and ubiquitously available 2n7000 MOSFET. The best aspect of using this MOSFET is, I have made a bunch of little building block PCBs with a 100 Ohm gate resistor and 10 k gate pull-down, and simply plug them in to almost anything that isn't high frequency or high load. It just works, and is almost bulletproof. If I could find any 4 x 2n7000 array parts locally, I'm sure I would make 4-channel building blocks too. When working with 3.3 Volt MCUs and boards (e.g. TI MSP430 Launchpad ) what is the equivalent easily available , robust switching solution, if any, that one turns to for non-critical quick prototyping? I currently end up using either 2n7002 , whch does not turn on hard enough, or various IRL/IRLZ parts, though they cost as much as 10-20 times as much. IRL/LZ are often unavailable off-the-shelf at the "electronic components market street" where I pick up random parts for my personal component shelves when I am not working to a BOM or a plan. The AO3422 suggested in comments to this question simply is not available locally in retail. I want to avoid BJTs for this purpose as they tend to run hotter than MOSFETs, and I create enough magic-smoke gizmos anyway. I know there isn't necessarily one correct answer to this, but good advice would, I am sure, benefit many people jumping into 3.3 Volt devices. <Q> The UM6K1N / 2SK3018 from Rohm work very well with 3.3V circuits ( <S> max 1.5V \$V_{GS(th)}\$) and are rated 100mA \$I_D\$ <S> and 30V \$V_{DS}\$. <S> They also have gate protection clamping diodes. <S> The only downside is that they're surface-mount only - you'll need to spin a small PCB to use them. <A> They are not expensive at around $0.37 per piece on eBay. <S> Even if you only use the N or the P, it is a good deal. <S> It is still much more expensive than 2n7000 <S> but even then it is a much better MOSFET than 2n7000. <S> Current is 4 to 6 amperes for each channel, not milliamperes like 2n7000. <S> I made a hbridge using it for driving a small motor <S> and it was not even warm while using BJT it was getting very hot. <S> RDSON for P channel is 0.05 ohms and for N channel is 0.035 ohms at VGS value of 2.5 volts. <A> My suggestion is Manufacturer Diodes Inc <S> DMN4800LSS-13 <S> Description <S> MOSFET N-CH 30V 9A <S> 8SOP <S> in 1K qty approx. <S> 17 cents <A> What about the 2N7002PW from NXP? <S> Basically the same device at the same price point in a smaller package (SC-70), <S> but with a lower RDSon (1 Ohm vs 2.8 Ohm) and should turn on harder according the graphs. <A> I usually just stick to 2N7000 and a bigger drain load resistor (10k or more) and it is pretty reliable as I have found out. <S> I used Raspberry Pi which virtually cannot source or sink any current (7mA max or the $35 board is toast), so my designs are usually peppered with 2N7000s and with a higher drain load, and downstream CMOS parts are pretty reliable.
| My favorite for 3.3 Volt and even 2.5 Volt circuits is SI4562 , N and P MOSFETs in a single package, with much lower Rdson for both N and P channels than the 2n7000.
|
Why is the data output of some ICs in two's complement form? I've been looking into some ICs now. Some of them have the calculated result (data) in twos complement form, placed in register to be read by other IC. What is the logic behind converting the data to twos complement form before its read? Examples are as Analog to digital converter (Page 30 Output Data Format). LINK Digital Accelerometer (Page 1 General Description). LINK I have seen similar behavior in CRC calculation for IEEE 802.3. For example if we calculate the 32-bit CRC (using x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1 polynomial) the calculated CRC is bit reversed and complemented before transmission. Well the question is why is it formatted in complement form? Can't it be read without the data being complemented? <Q> For an ADC whose natural format is offset binary, 2's complement is the natural way to represent signed numbers. <S> All it has to do is invert the MSB. <A> Most microcontrollers and microprocessors represent negative numbers in 2's complement form. <S> And many ADCs are designed for use in very time-constrained real-time systems. <S> In a CRC, I suspect the result is simply complemented (bitwise inverted, aka "1's complement"). <S> A CRC is a purely integer calculation and doesn't involve negative numbers, so there's absolutely no sense to doing a 2's complement with that number. <S> Why you would 1's complement it, I can't say, but it should make little difference to the user. <A> The question comes down to how to represent negative numbers, since positive numbers are the same in most binary representations. <S> For most cases, 2s complement is the most convenient way to represent negative numbers in binary. <S> This is almost certainly how the processor that has to manipulate the A/D reading does its math, so presenting it in 2s complement directly in the A/D makes is easy for the processor. <S> Some A/Ds only measure positive voltages. <S> Those can use unsigned binary. <S> If you don't like 2s complement for negative values, what would you prefer? <S> It seems most alternatives would cause more complication.
| Having a 2's complement format in an ADC (or other sensor) means that negative numbers are represented in a way your processor can use directly, without having to spend cycles doing the conversion from some other format.
|
How can I reduce noise from an analog signal from an Arduino? I am trying to read an analog signal from an Arduino board through LabVIEW. The sensor is an infrared phototransistor, which I have connected in reverse bias (20k resistor) to an Arduino pro mini analog input. The power and ground for the sensor are taken from the Arduino. The Arduino is then connected through an FTDI breakout board to a COM port, which I am reading through LabVIEW. I am able to view the signal on a waveform chart, but it is incredibly noisy. Instead of a single line of data proportional to the light received by the sensor, it looks like the chart is "colored in" completely underneath the signal. Previously, I read the sensor data directly from a DAQ card without any additional circuitry and got a great signal. Do I need to add something, like a capacitor, externally to remove this noise? I am a mechanical engineering student, so I'm learning as I go with the electrical side. <Q> Does your arduino use the +5V provided by the USB as power and as reference for the A/D? <S> IME <S> it is very unstable, varying for instance between 4.5V and 5.5V. <S> You could try to use a wall-wart + 7805 instead. <A> It's a bit like trying to fly a kite. <S> If you imagine the signal as only a single line it will fly all over the place. <S> If you have two lines you can control the flight without it wandering all over the place. <S> Now look at all the paths connected to power ground and signal and try to keep them close together like a pair of kite strings. <S> Instead of a tail, we use capacitors across supply + ground near the part for low impedance or shielding of the signal with twisted pair or coax. <S> If you can supply the power from the PC as well you might avoid the stray hum. <S> Now Infrared sensors are are also sensitive to 60Hz lights so <S> a test of stray light sources might be useful. <S> Since light emission is inversely squared proportional to the distance, you may also have to consider these factors of emitter power and distance. <S> Daylight blocking filters are recommended and included as black plastic on some parts. <S> Without any engineering technical details from you, I can only give you fuzzy analogies of signal shielding and ground noise from separate sources and using close wire pairs instead of a single path to guide the signal. <S> If your system is powered by a floating charger chances are you don't actually have a ground connection. <S> If this is the case, you can suppress a lot of stray noise by connecting the case to ground. <S> This low impedance shunts the stray electric fields caused by magnetic and Switched mode power connected cables that may only be shielded on the AC side. <S> Consider the VGA port fastening screw and/or the Arduino supply to ground such as your LCD monitor VGA port ground screw or simply connect the laptop to a grounded LCD monitor via the grounded video cable. <A> Figure out if this noise is really there, and if so, is it there in both situations for sampling. <S> Next, examine the sample rates in your two situations, and make sure that they are similar. <S> If you were sampling too slow with the DAQ card, you could have aliased your noise down to lower frequencies. <S> After that, you can start looking at decoupling capacitors, your grounding scheme...and possibly analog buffering. <S> There's probably an order of magnitude or more of difference between the input impedance of the arduino A/D vs the DAQ card (with the DAQ being better), so even if all else is perfect, you might be looking at two very different circuits just because of this. <S> Circuit diagrams would help a good deal.
| Preferentially, step one is to LOOK AT the signal that you're collecting with an oscilloscope, if that's possible.
|
Soldering leads/pins to SMD/SMT for solderless breadboard prototyping? Background:I just began with electronics and I'm looking to build a 12v to 5v converter circuit. My plan is to use a Murata 78SR-5 to power either an Arduino or Rasberry Pi. I'm studying electronic design on my own as a hobby so I may not have adequate circuit design as of yet, but I have noticed that there are few available for purchase capacitors with leads|pins on them which can be used on solderless breadboards. I can't find a capacitor with the specific voltage range with leads already existing for use with solderless breadboard prototyping so I turn to SMD/SMT type. Question:What details are needed to know, if soldering leads/pins to SMD/SMT capacitors or resistors practiced? e.g. temp, wire size, wire alloy, etc. <Q> When you say bread board, I'm assuming you mean solderless bread boards. <S> Soldering legs to individual SMD caps will be fairly difficult, and likely fragile. <S> You should be able to buy through-hole caps that have sufficient voltage at RadioShack, or at just about any online electronics distributor (digikey, mouser, etc). <S> Here is an example of a 50V through hole capacitor . <S> When I want to use SMD components on a breadboard, I usually attach them to a breakout board first, and then run wires or header pins from the breakout board. <S> Bellin makes many different snap-out breakout boards like this . <S> It's a little on the pricey side, though. <S> You could make your own by cutting up some solder-type bread boards. <A> A better solution may be breakout boards also called Surfboards (get it, breakout boards for surf -ace mount) from Capital Advanced , Digi-Key , and others. <S> The 6000 series is for discretes, and the 9000 series for ICs. <A> SMD resistors and capacitors (if you're talking about ceramic) are much more tolerant to temperature than SMD semiconductors; I was never able to damage any, and sometimes I'm pretty abusive; semis, on the other hand, were an easier task to fry... <S> Anyway, don't try to solder them with solder wire; instead, buy some SMD solder paste, apply a small amount on the solder points with the tip of a wooden splurge (that's what works best for me), place the resistor/capacitor over it with a tweezer and use a hot air rework tool to heat it and melt the solder. <S> Or, if you don't have a HART, use the soldering iron tip to heat the board copper of one of the contacts until the solder melts, wait a few seconds and do the same to the other contact. <S> This will take 2-3 seconds, which is tipically safe even for diodes. <S> In both cases, use the lowest temperature that can still melt quickly the solder. <S> For leaded solder, I use 390F, for lead-free 420F. <S> Even with a soldering iron, it is essential to have a temperature-controlled one. <S> Finally, the smallest SMD parts I use are 0805; smaller ones are too hard to do a quick&clean job, at least in my case (obviously this may be different for you if your handling skills are better than mine).
| SchmartBoard is another brand of adapters you could check out.
|
how to display current time I am using ATmega32-A micro controller, coding in C language and compiling using CodeVisionAVR compiler. I want to display current time, I have tried with "time.h": int main(void){ time_t now; time(&now); printf("(percent)s", ctime(&now)); } but it seems this compiler and hardware won't support time.h . I know that all AVRs don't have a RTC/calendar in them. Is there any other way to display current time. I am very new to programming micro controllers. Can any one help me with some examples. I don't want to add external hardware to the existing board now. I am displaying information on the PC (hyperterminal) using USART communication. Is there any possibility that I can get current time from PC? if there can you explain about it a little bit? <Q> No ATmega32 AVR has an RTC/calendar built into it AFAICS. <S> Assuming that the reference is to an external battery backed RTC on the AVR board, there isn't any source for the current time on a board without an RTC chip. <S> At best, the bootloader you use with the microcontroller may keep data on many milliseconds have elapsed since the board was powered on - within the tolerance of the clock source and allowing for any occasional missed timer interrupts. <S> If you do have an RTC chip configured on the board, with the correct time set up on it, there might be a suitable RTC library for that chip. <S> Such a library would typically provide hour() , minute() , second() and other time retrieval methods for your code to use. <S> The generic time.h <S> C header does not ship with, and therefore is not supported by, AVRdude or Arduino, apparently. <S> There is a good tutorial on using AdaFruit's RTC breakout board, here . <A> This is not only a question of a built-in RTC or not. <S> it would require a proper operating system to be fully supported. <S> In the case of time handling, one needs for example proper timezone handling. <S> And a CSV file containing data for a single timezone (e.g. UTC) is about 10k in size - and a proper C library would need to know about all timezones world wide. <S> Then we talk about 1MB CSV file . <S> So you need a separate RTC. <S> A good candidate would be the DS1307, for which there are several breakouts available. <S> A good tutorial of how to interface it can be found here . <A> The ATmega32-A has three build in counters, and you can configure TIMER1 to function like an RTC (this is probably possible with the other counters too). <S> There are several things you need to do to set this up and ensure error free operation: <S> Configure TIMER1 <S> to generate an interrupt every second by adjusting the clock prescaler and count compare value. <S> This will require TIMER1 to be in "Clear Timer on Compare Match" mode, and you will need to enable the generating of interrupts on a compare match. <S> Add your Interrupt Service Routine (ISR) to the interrupt vector table, enable global interrupts, and disable interrupt nesting. <S> The ISR that services the interrupt you generate should increment a space in memory that you reserve to keep track of seconds. <S> Depending on the application, you might want to make this space 1 or more words wide. <S> In your C code, make sure this space in declared to be volatile: volatile unsigned long sec_count; <S> Finally, at start up, you need to initialize the space in memory you reserve with the current time since some event (normally the UNIX epoch) in seconds. <S> You already have USART setup, so you could get the initial value from your computer, or, alternatively, you could have the user input the initial value. <S> After you have the initial value, your microcontroller will be able to keep track of time independently. <S> I would write utility functions, like day() or hour() , that convert your "seconds since a certain event" into wall clock time. <S> The manual will help a lot with all of this: http://www.atmel.com/Images/doc8155.pdf <A> time.h is not available in your case. <S> You will need to read the AVR's documentation on how to use the RTC, or use an external RTC if your device doesn't have it. <S> You suggest to use the time received from the PC to set the clock; this could work, but without RTC it might start drifting and you will need a way to keep it updated (e.g. an interrupt every second).
| time.h is part of the C standard library (e.g. glibc), which is not completely available on AVR (or any other MCU).
|
Software suggestions for electronic simulations? I am a beginner in EE engineering and want to use a software where I can analyze signals or even motor speeds, power electronics ect. But the Spice programs looks so boring and detailed for me. Maybe it is because I'm new. Is there an interactive easier software where I can for example feel like I am really using an oscilloscope on the screen?I would appreciate your suggestions. <Q> Renan hit most of the big ones. <S> I like to use this site when I want to throw together a quick circuit. <S> It lets you see the scope in real time and is pretty intuitive, not to mention web based. <S> However, it's no substitute for a real simulation package. <S> This question has (kind of) been asked before, you could see if this question has any that suit your fancy: Good tools for drawing schematics <A> Both are commercial - and get quite expensive if you add some optional features. <S> I don't know of any free/open-source simulators with real instruments; that said, LTspice is one of the most used freeware simulators available and has a large userbase (thus lots of documentation, examples etc...), but it has a bit of a learning curve. <A> You could try: apt-get install qucs http://qucs.sourceforge.net/ <A> I also like Faltad's Java applet as you can choose from many small scale projects and export them as a http <S> link <S> Wait a few seconds.. <S> Right mouse can edit any part and add scope traces then stack them, add passive active parts etc. <S> then add wire jumpers, move parts. <S> It is very intuitive, quick and easy. <S> Start with the built-in examples here Index <A> SIMextric is really nice. <S> One of the most annoying aspects of spice (or any other backend) <S> simulators is parameters the simulator exposes to facilitate convergence. <S> This has been mostly been eliminated with SIMextrix http://www.simetrix.co.uk/site/demo.php <A> @user16307: Since you have mentioned "motors" and "power electronics" I like to direct your attention to "POWERSIM" from www.powersimtech.com". <S> This simulation package is really easy to use and it has its focus on power electronics. <S> If you visite the mentioned website you can download a working demo version which is limited (as far as I know) to circuits with not more than 35 parts in total. <S> Remark: <S> The program has a lot of good tutorial examples onboard.
| There's Multisim and Proteus , which is the closest you can get to real instruments.
|
How to hand drill PCBs? Drilling 300 holes in fibre board is tedious, difficult to do neatly and prone to snap bits. What simple methods and tools are available to the home user to drill PCBs effectively? In my case it's only going to be used occasionally and then on a kitchen table. Apparently a Dremel won't be accurate enough. <Q> What Olin said. <S> You can get PCBs for <S> $1/sq inch qty. <S> 3 if you don't mind waiting a couple of weeks. <S> If you do mind waiting, then you'll have to spend some money. <S> A carbide 0.030" diameter drill bit wants to turn at least 20,000 RPM to cut cleanly and it can't dwell in the hole. <S> That means that you need to drive it straight down and immediately straight up. <S> You WILL NOT be successful doing this solely by hand. <S> So, what can you do? <S> If you really don't have the room for even a benchtop drill press that takes up less footprint than a laptop computer, your options are limited. <S> Dremel sells (or used to) a cheap small drill press holder for their mini tools that's a bit smaller than a regular drill press. <S> However, it does not maintain alignment very well, so expect to break at least one bit per 300 holes. <S> They also had a small 4" scissor table that would move the workpiece up and down against a fixed tool. <S> That worked a lot better, but I think it was around $100. <S> The Proxxon tool mentioned above looks really good <S> You can try making your own drill guide out of wood: a block of wood sandwiched between two other pieces so it moves in a straight line and that will work, but I'm guessing you don't have the tools or the woodworking skill to build something that precisely. <S> In any case, it will be very slow and tedious. <S> Seriously, this is one of those cases when you really are better farming the job out. <A> It'll work for a few boards if you're patient and have enough drill bits. <S> This little one from Proxxon and some carbide bits would be a step in the right direction with 8500rpm top speed, but below 1mm even faster would be better. <S> Just to clarify I'm not endorsing this specific model (though it looks OK), but it's an example of what you're looking for. <A> Unless you want to build a CNC for drilling, your best bet is a small drill press and patience. <S> I find that audio-books are an excellent supplement to tedious otherwise mind numbing tasks. <S> Additionally I've found that 0805 or 0603 surface mount packages for basic passives are simple to hand solder and cut down on fabrication time considerably. <A> For small boards (not quite 300 holes!), I have used a thumb drill: this one . <S> This is a pen-like instrument with a small chuck which can hold drill bits. <S> You rotate it with your fingers. <S> Though it came with drill bits, I bought a separate set which is both in smaller sizes needed for circuit boards and in an indexed container. <S> You don't want to mix up sizes. <S> Using it would be a little time consuming for 300 holes, but you can use very thin bits without the risk of breaking (if you are careful). <S> It is like knitting or doing a crossword puzzle: you can do this anywhere, for instance while waiting for something or someone, or riding transit. <S> Any "down time" that you would otherwise waste. <S> 300 holes are done sooner than you think. <S> In any case, that tool is indispensable when you're replacing through-hole components, for re-drilling a hole which is constricted by remaining solder that won't wick out, or for widening a hole by a mil or two that was incorrectly sized. <S> DIY circuit boards are time-consuming. <S> You get a fast turnaround time compared to mail order boards, but the cost is not really low unless you pretend that your time is worth nothing. <A> With patience, the Proxxon Micromot 50/E drill/grinder set with power supply and drill stand MB 140/S . <S> The quality of Proxxon compared to Dremel is apparent in the video Drill stand review: <S> Dremel 220-01 vs. Proxxon <S> Micromot MB 140/S <A> $77 if you can find a store get extra drill bits with thick shank and short bits. <S> http://www.harborfreight.com/garage-shop/stationary-drill-press/5-speed-drill-press-38119.html <S> Overall dimensions: 23 <S> " H x 17" W x 7" D Or buy this
| If you're looking for a drill press for this purpose, remember that the smallest drill bit sizes require the highest spindle speeds, a general purpose drill press won't run fast enough to be ideal.
|
What would be the cheapest way to get video signal? I have an OSD that I would fiddle around with till I'll get new camera. For OSD to work, I need PAL video signal, it may be anything, like black only. I was thinking may be test video signal generator would help, but those things are way too expensive for such task, may be it is possible to make something simple using arduino? I don't have any analog video source at home, like VCR, my notebook does not provide S-Video. <Q> You can use an Arduino to output NTSC/PAL Video. <S> See: http://code.google.com/p/arduino-tvout/ <S> I have used this <S> and it does work, easy to set up too. <A> Simple board cameras are pretty cheap, and many are available in PAL or can be configured to it with a change of a strapping resistor on the board. <S> With a DAC (possible an R2R ladder) you can generate PAL in an FPGA. <S> There are various simple video game kits, such as the YBOX based on a Propellor chip, which output video. <S> Not sure if they do PAL with the stock firmware, but it could probably be modified for that if someone hasn't done it already. <S> Using a general purpose micro, a common trick is to get the clock speed to some multiple of the colorburst frequency, and then work out all the timings in relation to that. <S> You can output a square wave at various phases (then use a passive low pass filter) to make colors. <S> And if your goal is only to make some color bars or a bounding rectangle on the screen, working it all out in assembly language and counting cycles is within reason. <A> S-Video to VGA/RCA adaptor cable which looks like this: <S> Configure external video port as PAL TV. <S> Then use your computer to generate video Dozens of LCD test patterns here <S> freeware with DPT.exe
| If you place a want add in a local publication you could probably pick up an old video game system quite inexpensively.
|
Is there a way of telling if the connector is male or female on a schematic? For example, in the RS232 here: or here: <Q> Here's one general guideline. <S> It applies to connectors on the outside of the instruments. <S> If the connector supplies power or signal, it's usually a female (F). <S> This is done prevent shorting the signal (to something in the outside environment). <S> A female pin is harder to accidentally short than a male pin. <S> One can figure out from the schematic what's input and what's output. <S> A mnemonic for this rule is Source Side Socket (SSS). <S> I would deduce that DB-9 connectors on your schematic are F. <S> The common use of RS232 is for talking to PCs (directly or through USB-to-RS232 adapter). <S> Connector on the PC side is M. <S> Typically, the cable is <S> F-to-M. So, the connector on the other side is F. <A> No. Different people draw schematics differently. <S> Sometimes it is obvious, but usually not. <S> In the examples you gave, it is not obvious. <S> When it is marked, it is usually a text note next to the connector. <S> Or sometimes it is in the part number, like "DB-9F" for a female connector. <A> The definition of jack and plug is a common source of problems. <S> Basically, the jack is the female part and the plug is the male part. <S> "CONNx" could be either I think, but I'm guessing it's the male connector looking at the schematic, as the female symbols tend to have filled circles. <S> It's a bit of a minefield ;-) <A> Unfortunately the guy who drew yours doesn't seem to have used any of them: Draw the symbol in a way that indicates the polarity. <S> Use a standard for the designators, for example "J1" is a jack, "P1" is a plug. <S> (Like in David's example, "DB-9(f)") <S> That said, for some connectors there isn't even a perfect way to describe the part: the outer shell might be an "outie" while the inner pins are "innies" so that the male/female, jack/plug designations are somewhat ambiguous (you may know there's a standard for whether to desgnate by the shell or the pin, but does everyone who has to read your schematic know the standard?). <S> Then only the part number gives a totally clear spec. <A> Either add description 25P or 25S or 2x10S 1x20Por use standard arrows -- <S> > <S> pin , <S> ---- <S> < socket <S> This should not be confused with Plug (floating) P1, P2, P3 and Receptacle (fixed J1, J2, J3) which can either use P or S contacts or both.
| Include some indication like "m", "f", "j" or "p" in the annotation describing the connector. There are many ways to indicate the polarity when drawing a schematic. Officially, the reference designator for jack is "J" and and the designator for plug is "P". Give a part number for the connector so that at least you can look it up.
|
Storing An Led's Previous state when power is removed with eeprom now A while ago I asked a question about having 2 push buttons, and an LED and you set the led to an on or off state with the two buttons, and then remove the power, and when turned back on, the led should stay in the state that was set when the power is on. I realized that I couldn't do it with any of the components that I had, and the best solution was a mechanical 2 button switch. Now I have the 24c00 EEPROM chip, 40 and gates, 40 or gates, 60 inverters (not gates), a few 555 timers, 4 NAND gates, an 4 NOR gates (I am not counting the amount of chips, just the total amount of gates). So now with EEPROM, I know that with its floating gate MOSFETS, it can store electrons by tunneling, so I am wondering if there is a way to store an led's previous state with these components. <Q> The EEPROM that you listed can hold a value without any power, but the problem is that it has a (relatively) complex input/output protocol (I2C) compared to the other parts you have on hand. <S> I think you will find that there are very few methods for storing data that are both persistent while power is removed, and electrically simple enough that you could build it with the parts you have. <S> Given your requirements, a toggle switch is still probably the simplest method for storing a state, followed by some arrangement of latching relays. <S> For example, you could get Texas Instrument's Launchpad board for around $5. <S> But , many microcontrollers have built-in storage that would be more than adequate for storing the state of a LED. <S> You could "fake" your requirements by making a small, 1-bit memory cell (SR-Latch) and powering just the latch with a coin-cell battery. <S> When you remove power, you would then only remove the power to the LED, not the SR latch, and this could last a long time. <S> You would need to use low-current parts (CMOS), but this would be a very easy method as well. <A> If you insist on doing this with the components you (mostly) have, try making your own "floating gate" 1-bit store. <S> Take a smallish MOSFET and wire its gate to a large capacitor. <S> To start with, just use another pushbutton labelled "Store" to connect the cap to the Led's state (not the LED itself but the 0V or 5V supply that drives it) and figure out how to "read" the FET - possibly drive another LED. <S> Try different capacitors (the biggest ceramic you can get, plastic/foil ones used in speaker crossovers go to 10uf and more with low leakage, etc.). <S> How long is your memory reliable? <S> If you can get one of those 1 Farad supercaps, so much the better... <S> [edit] if the FET is configured as a "source follower" you can measure its source voltage periodically and see how much of the stored charge has gone... <A> I would look into getting some type of small microcontroller so you can communicate with and utilize the EEPROM that way. <S> PIC is a good place to start if you are just learning to program. <S> This book really helped me a lot.
| If you wanted to store the LED state on the EEPROM you purchased, then the easiest way to interface with that device is to use a microcontroller. With the components that you have listed, you will not be able to build a system that will remember the state of a LED after power-off. Electrolytics get HUGE but have high leakage so they probably won't be useful.
|
Know any hardware for the PC to act as USB_device? We manufacture electronic devices. Some of them has USB_host functionality. In order to test them for this functionality, we need another device (maybe pseudo device like PC) to act as the USB_device. Currently, we only support MassStorage class devices but we are not comfortable with the idea of inserting a USB memory to our device for Q/C operation. There won't be any feedback to our automation system and we want to be able to test other kind of devices. Is there some kind of hardware that we plug into a PC and with its certain API, that device acts as a USB_device. We will have to implement the needed protocol by utilizing this API and we are OK with this. Any chance ? <Q> The Facedancer lets you emulate USB devices with host-side Python code. <A> If you cannot derive sufficient information from its log output, you can always modify the source code to instrument it with extra reporting. <S> It's possible the board might be capable of running your entire test apparatus, if not, you'll need to use some other interface such as ethernet or a serial port to report back to your main testing computer. <S> For a simpler setup, almost every USB-capable microcontroller has a mass storage reference design / code example available. <S> And most have a serial port which you could use (possibly via a USB-serial converter) for reporting results back to the main testing computer. <S> If you want more detailed quality metrics than works/doesn't work, you'll probably need a USB bus analyzer, either by itself or inline to monitor interaction with a microcontroller or embedded-linux based mass storage emulating device. <A> For Q/C you want to anticipate any environmental stress your product will see and look for defects that may be acclerated by those stress factors. <S> It may have failed already simply due to solder. <S> Those are easy to find. <S> I suggest in addition to USB device emulation you consider some HASS testing as well to include vibration, lower voltage margin as well as fault injection. <S> As for simulation the USB interface <S> specs worst case timing could be applied. <S> I cant vouch for any direct USB emulation experience here, just TE/QA test philosphy. <S> A crossover cable can connect USB to USB but emulation depends on which functions give the biggest fault coverage for devices that you want to emaulate. <S> If the design was thoroughly tested (DVT) then mechanical flaws may be all you need to test. <S> Ref
| If you need to test the mass storage mode, your best bet may be an embedded linux board with a USB device interface, and using the gadget file storage kernel module.
|
Methods of sliding PCB in straight line on drill press I use a drill press like the first one in the linked answer at home for drilling my PCBs. If there was a way of sliding a PCB along a straight line left-to-right (or front-to-back) it would make drilling holes which are in a straight line much faster. Do such slider systems exist without big costs? Or is there a design someone can share for making one? If there could be a system which also has ratchet-type stops every 0.1 inch, and which is equipped with a "latch" to switch between left-right and forward-back, that would really help. <Q> However, you will then encounter a problem familiar to users of real machine tools, which is the need to align the row with the machine axis. <S> By the time you go for ratcheting you may just want an X-Y table, though exercise some care to get inch or metric screws with a lead-per-turn closely related to your spacing. <S> If you don't do that, you'll likely want to add a digital readout or even servo/stepper drive. <S> And then you need to learn about managing backlash. <S> There's a reason machine tools are expensive... <A> A cross-slide will work for you as well. <S> I have one on my christmas list. :-) <A> The first part of what you ask for is just called a "fence", and it can be as simple as a bit of wood with two slots in it. <S> Use wingnuts or some other quick release clamps so you can move it to a new row position easily. <A> Late but I think still relevant. <S> Centre punch the board by hand. <S> Once the pads are (lightly) centre punched, the drill bit will find it's own position. <S> Just use some delicacy and stay away from lump hammers or you'll crack the board. <S> I find my go to hammer is a tack hammer, used surprisingly enough for knocking in tacks. <S> You could use a guide /fence, but if you have several packages to drill lines for, you'll spend for ever trying to line the thing up properly. <S> Then there's all the clamping and bolting to the drill press. <S> Heavy or very accurate drilling would be done on a x/y table or cross slide. <S> They're expensive and you're back to all the lining up and clamping issues again. <S> Unless you're press fitting a mechanical component into the pcb, you don't need more accuracy than what, 0.25mm? <S> Very few components have absolutely rigid pins so they will tolerate some slack in the hole placement. <S> You should easily achieve the required accuracy by hand.
| Look at the extrusion 3D printers for cheap linear shafting ideas, using either rollerblade bearings at right angles, sleeve bushings or even sleeve bearings.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.