source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
What happens to the printf statements on a cross compiler for embedded devices? What happens to the print statements on an embedded tool chain where the micro controller has no display attached to it? Does the program crash? What about all the other several c dependencies when we use the standard header files on a microcontroller with features that a modern computer does not have? <Q> Depends completely on how the libraries are set up. <S> They may be output via SCI, they may be silently swallowed, they may even cause an undefined reference error on link. <A> To use functions like printf , you have to attach STDIO (standard input/output) to a stream first . <S> I linked to the stdio library for AVR 's. <S> In my opinion it is mostly a compatibility thing from the PC world (or for lazy programmers) and for most microcontrollers (considering RAM/ROM size) <S> you are using a very heavy tool with large memory footprint to accomplish a relatively simple task. <S> Most of the time you are better off by writing your own routine to do exactly what you need. <S> Remember that printf(); is an extremely powerful command and linking it into your code links all its functionality in, not just the single (few) <S> thing(s) you actually require. <S> I believe on AVR, just including <S> a printf sets you back about 1 or 2kB of flash, which is a lot on a 2 or 4 kB device and the AVR libraries are pretty well optimized. <S> Notice that not all std... <S> libraries are 'useless', some of the functions in stdlib.h are still very useful, like eg. <S> the ultoa(); which compiles pretty neat and small code. <A> E.g. if you're developing on the MSP430 with CCS, you can printf() over JTAG (which is better than nothing if you have no other debug interface). <S> With mspgcc it will give you an undefined reference (and then you could implement your own printf() over UART, for example). <A> If your printf statements are sending text to a serial port, the program won't know or care whether or not there is a terminal connected to the serial port.
| Depends on the libraries you're using.
|
shorting a remote control pushbutton with GPIO and a transistor I'm trying to control my garage door remote with a GPIO pin from my Raspberry Pi. Instead of driving a relay, it would be much easier to just short the pushbutton on the remote. Is this how I should do it? Do I need a protection diode and if so, where should it go? Does it matter that the 3.3V GPIO pin is referenced to a different ground (Raspberry Pi ground) than the remote ground? Would also appreciate guidance on transistor to use and resistor value. UPDATE; More info from comments by OP:After checking, you're right, the pushbutton simply shorts the circuitry to the return path of the 9V battery. My main concern is the 3.3V being referenced to GND while everything on the remote is floating. <Q> To eliminate any possibility of surprise, and to generally make things more robust, I'd suggest using an optocoupler like 4N25 . <S> simulate this circuit – <S> Schematic created using CircuitLab <S> With this arrangement, you don't need to worry about how to combine the separate grounds of the two systems, because their grounds simply aren't connected. <S> Also, if there's a problem on either end, the optocoupler may isolate the fault to one side, and is cheap to replace, where a Raspberry Pi or garage remote is not. <S> Depending on exactly what the garage remote is, you may need to add another transistor to handle additional current, because the 4N25 has an absolute maximum of 50mA. Q1 is one way to do that, and general PNP transistor you can find will work in this application. <S> This arrangement formed by Q1 and the output transistor of the 4N25 is called a Sziklai pair . <S> One potential disadvantage of this solution is that when the transistor is on, the remote (represented by U1 here) will see only about \$8.2V\$, where it would have seen the full \$9V\$ had these transistors been replaced with a mechanical switch. <S> This is because you lose \$0.6V\$ from the emitter-base drop of Q1, and another \$0.2V\$ from the collector-emitter drop of the 4N25. <S> However, I doubt this will be a problem in practice. <A> Right idea, wrong execution. <S> Assuming your diagram of the remote is correct (I have no way of verifying and there could be a lot of different configurations), you want to use a PNP transistor. <S> The NPN as emitter follower that you show won't work because the blue block will only see the 3.3V digital level minus the B-E drop. <S> That leaves a problem as to how to turn on the PNP. <S> Here is a simple way: Q2 will sink about 2.7 mA when the digital signal is high. <S> Figuring Q1 should have a gain of at least 50, that will allow the block to draw up to 130 mA, which is probably a lot more than a garage remote draws. <S> Adjust R1 accordingly if more current is needed. <S> However, are you really sure the button simply applies power to some block? <S> That could make sense if there was only a single button, but is probably incorrect if there are two buttons, like open and close. <S> My first guess would be that power is always applied and the button shorts some line to ground, although there could be a lot of different configurations. <S> Added: <S> You now say that the pushbutton doesn't turn on power to the unit, but shorts some line to ground. <S> That makes more sense. <S> In that case, this circuit should work: <S> The grounds of the remote and the computer need to be tied together, but there is no problem with that. <S> The remote is a single isolated device, so there is nothing wrong with tying one of its nodes to some external reference. <S> I see that others are making a big deal of this, but that is silly. <S> There are cases where you want to isolate a switch like this, but when the device itself is arbitrarily floating as it is in this case, adding isolation is just a knee-jerk reaction or to satisfy religious beliefs. <A> The idea behind your circuit is fine, the implementation requires some improvements: simulate this circuit – <S> Schematic created using CircuitLab <S> You have two choices <S> , I like the left circuit best: <S> LEFT : <S> Short the switch and move the NPN transistor to the low side of the battery. <S> This is most common way of controlling a load from a microcontroller. <S> RPi's ground and the remote's ground are shared. <S> RIGHT : <S> This may be tricky if an RPi has an on board voltage regulator. <S> You need the 3V3 power supply rail of the RPi here. <S> Also for this reason I would go for the left; it is more robust, simpler to implement. <S> Actually I like Olin's solution better than the right circuit too. <S> Any cheap general purpose small signal transistor will work. <S> For left NPN eg. <S> : <S> BC547, BC548, 2N3904, ... <S> For right PNP eg. <S> : <S> BC557, BC558, 2N3906... <S> There are really lots and lots to choose from. <S> Depending on your geographic location other part numbers may be more common. <S> Just walk in a shop and ask for an equivalent of the ones mentioned above. <S> \$\text{h}_\text{FE}\$ <S> or \$\beta\$ <S> > <S> 100 <S> \$\text{V}_\text{CE,max} <S> > 15\text{V}\$ <S> \$\text{I}_\text{C,max} <S> > <S> 100\text{mA}\$ <S> I'm guessing that you want a TO-92 package, which is reasonably easy to experiment with. <S> Price indication in a regular shop when sold per piece? <S> I'd say € 0.20 again depending on geographic location. <S> The resistor can be pretty much anything around 1kΩ-10kΩ\$ and 250mW carbon film or better. <S> Similar price as the transistor in regular retail. <A> First, yes, the grounds need to be connected together if you're using direct galvanic connections like a transistor. <S> Second, why worry about the remote? <S> The garage door opener should have a manual trigger, which is just a regular pushbutton on a wire. <S> You can drive this with a transistor, or with a small relay that you in turn drive with a transistor or optocoupler.
| If you really want use the contact for the push button, which may mechanically easier to implement, then you need an PNP transistor and you want RPi's Vcc and the remote's Vcc interconnected. An optocoupler is probably safer.
|
Is the neutral wire considered safe? If the neutral wire carries current, why do many people believe that it's safe? I've heard "You can touch the neutral wire/bar in the breaker box and not get shocked. Only the hot can hurt you." If the circuit is complete and current is flowing, can't you receive a shock? <Q> When everything is working correctly, it should be at most a few volts from ground. <S> However, and this is the big gotcha, if there is a break in the neutral line between where you are and where it is connected back to ground, it can be driven to the full line voltage. <S> Basically in that case you are connected to the hot line via any appliances that happen to be on in that part of the circuit. <S> Those can easily pass the few mA it takes to kill you. <S> This is not supposed to happen, but since failures can be lethal and costly, a extra layer of safety is built into the protocol and rules. <S> It is irresponsible and needlessly risky to consider the neutral line safe. <S> This is why modern appliances either have two prongs and everything is insulated from the user, or three prongs and anything conductive the user can touch is connected to ground. <S> In some past cases there have been appliances with polarized 2-prong plugs, but those are seriously frowned upon today. <S> I don't think you're going to get UL approval for such a device unless it is fully insulated, in which case you shouldn't need a polarized plug. <A> On a non degraded correctly wired installation the neutral wire is safe because it is at the same potential than the ground terminal. <S> It is true that it carries current but because there is no voltage difference from ground there is no current passing through when you touch it. <A> Consider the small appliance with dc transformer power supply such as TV and all appliances that have adaptor or dc transformer. <S> And refer with illustration given by this link . <S> It shows that the primary coil in line 1 is connected to line 2 nothing less and no bargain. <S> The line 1 is a hotline and line 2 is neutral or common line which was actually connected each other. <S> That’s the main reason why the neutral wire is not safe to touch due to the current voltage flowing from one line to another and when can we touch the neutral wire while working? <S> In The Philippines we usually connect the Neutral wire to the ground rod, purposely to make it zero volts wire or the green wire serve as ground should be connected to the appliance. <S> As long as there is a turning coil of wire on your appliance in that particular circuit, the Neutral wire will not be safe to touch unless there is an intimate relationship with the ground. <A> It depends. <S> Under normal conditions the neutral is at close to earth potential <S> but if the neutral goes open circuit then it can rise up to live potential and shock you. <S> Similarly live and neutral could be reversed at some point in the supply system. <S> So the question then becomes "is the risk of a dangerous voltage on the neutral due to a break in the neutral wiring acceptable?". <S> That is a question that is impossible to answer in the general case as it depends entirely on the circumstances. <S> On portable appliances I would always unplug before working. <S> I would not consider plugs and sockets and thin flexible cables to be reliable enough to rely on the neutral remaining at earth potential. <S> On the other hand in the UK it is normal practice to work on circuits of an electrical installation where the neutral is not isolated. <S> I don't know what practices are in other countries. <S> Going even further many power distribution systems combine the functions of neutral and earth. <S> So do electrified railways.
| The neutral is NOT safe to touch.
|
Are there any microcontrollers with integrated H bridge for DIY servo? I want to build my own servo system. It will get a PWM as input then move an object according to this input. I have a motor, potentiometer feedback, microcontroller with separated H-bridge. Since I need a lot of these I want to use an IC with both H bridge and microcontroler on same chip. Like the one we find in servos. Are this chips available for sale, or are they made by servo manufacturer for their own use ?Are the PID parameters (Pi, Di, Ki) inside changeable ? Question edited after Wouter van Ooijen comment. <Q> [PLEASE NOTE: <S> The question was altered AFTER I answered! <S> Check the original post before you get cranky and down-vote! <S> Sheesh! ] <S> The motor driver you selected doesn’t have any “brains,” it is merely a device to control the speed and direction of the motor depending on the input control signals. <S> A (very) simple servo control system diagram: <S> The project you’re developing is one of those you work bassackwards on. <S> You know the load to drive, then you must select the gearbox, motor and position feedback device. <S> (A potentiometer might be fine for very light use, say 100 operations a day, maybe 20 days a year, but will wear down to the nub rapidly if used 100’s times a day for months on end! <S> You’ll be looking at a magnetic rotational position sensor or optical position sensors ( http://en.wikipedia.org/wiki/Rotary_encoder ) – something that will not wear out in a couple of days!) <S> Next comes the “brain.” <S> A microcontroller (or equivalent device, the "MCU" in the datasheet you provided) that will compare the input [control] signal (where you desire the output to land) to the actual position of the output shaft. <S> The “brain” calculates the difference between the input and actual position then orders the motor controller (h-bridge/amplifier) which way to turn (and in some instances, <S> the speed to get to that position) <S> known as PID ( http://en.wikipedia.org/wiki/PID_controller ). <S> [ I do not know of a single integrated circuit package (IC) containing both a MCU and h-bridge. <S> SEE EDIT BELOW FOR LINKS: ] <S> EDIT: <S> http://www.jrkerr.com/index.html http://www.jrkerr.com/pssc_bd.pdf <A> There are some (expensive) components like FreeScale Semiconductor's MM908E625 <S> HC08 (Motorola compatible) microcontroller, which are purpose-built precisely for the kind of use expressed in the question. <S> The headline description of the MM908E625 is: " Integrated Quad Half H-Bridge with Power Supply, Embedded MCU, and LIN Serial Communication ". <S> To quote from the tech note: ( all bold marks are mine ) <S> Features <S> High-performance M68 <S> HC908EY16 core 16 KB of on-chip flash memory & 512 B of RAM Internal clock generation <S> module <S> Two <S> 16-bit, two-channel timers <S> 10-bit <S> ADC LIN physical layer Autonomous watchdog with cyclic wake-up <S> Three <S> two-pin Hall effect sensor input <S> ports <S> One <S> analog input with switchable current source Four low RDS(ON) <S> half-bridge outputs One low RDS(ON) high side output 13 micro controller <S> I/ <S> Os <S> In short, this is perfect for bidirectional control of up to 2 low power (500 mA) <S> DC motors or one stepper motor via the dual integrated H-bridges. <S> A PID can be implemented in the microcontroller core, it has ample memory and a 32 MHz internal clock, more than enough for a PID. <S> The PID can incorporate rotary position input from up to 3 Hall Effect sensors. <S> Also, Back EMF detection is built in, which allows improved motor control. <S> My preferred use for the ADC would be temperature input, allowing over-temperature shutdown to be implemented. <S> Sample code is available from FreeScale for basic PID functionality, including BEMF and encoder sensing. <S> Some more advanced open source PID implementations for the HC08 cores are around, though I am not aware of any already ported to this device. <S> Will porting be complicated? <S> Not really. <S> It is worth contacting FreeScale for samples, and to check whether they sell an evaluation board as well. <S> For other, similar products, try keywords like integrated core and H-bridge . <S> Note: <S> Using a part like this, sourced at low volumes, is unlikely to be cost effective compared to sourcing even off-the-shelf hobby servos, since servo manufacturers enjoy economies of scale. <S> Update: <S> If actual PID is not required and simple comparator-type actuation against position encoder input is sufficient, there are other cheaper options. <S> However, these will typically not allow soft-actuation ( <S> slow start / slow stop / overshoot tuning). <S> Mitsubishi <S> M51660L , a single DC motor (or solenoid) driver for servo applications. <S> $3 apiece on eBay. <S> Infineon <S> $4 apiece on eBay. <A> I don't know of any microcontrollers with the H-bridge built in, but there are some, like the pic 18fxx31 line that have some enhancements to make motor control systems easier. <S> These tend to have quadrature encoder interfaces built right into them <S> so you don't need interrupts to handle every increment and noise handling is dealt with. <S> They also have enhanced PWM modules that are designed to make some of the trickier aspects of H-bridge control easier (though I personally haven't had to use that aspect)
| TLE4206 , another single DC motor (or solenoid) driver for servo applications.
|
Decrease a voltage from 24-27VDC into 18VDC using a 7812 and a bunch of other home supply parts I have one 7812 1A linear regulator, bunch of resistors and zeners at home. My input voltage is 27VDC from two 12V lead batteries. Desired output voltage is 18V and themaximum current consumption of the connected device will be 100mA. I'm considering using a zener diode at the GND pin of regulator. schematic: https://www.circuitlab.com/circuit/ue4t8a/elsov_linear_regulator/ What adjustment current trought the GND pin on regulator I have to expect? Do i need the 1uF capacitor when using lead batteries? <Q> All 7812 implementations I know of have a current to ground < 10mA. <S> I don't see a reason why that would change when you lift the ground pin using a zener. <S> However, zener voltage is definitely not constant with temperature. <S> Be sure to take this effect into account and determine whether compensation is required when using a zener diode as a voltage reference. <A> Power dissipation (Pd) from the load itself will be (27V-18V)*100mA = 900mW. <S> The regulator itself is not 100% efficient, so it will draw current as well; thus, adding more heat output. <A> In this case, you should use adjustable voltage regulator as LM317 , that you can set the output voltage with a range between 1.2 V to 37 V. <S> It have the same package as the LM7812, the TO-220. <S> The output voltage will be: Vo = <S> 1.25 V.(1 + R2 / R1) <S> + Iadj. <S> R2 <S> In the pin 1 (Adjust) should have a tension of 1.25V typically. <S> So, to get an output voltage of 18V, the R1 = 240 ohms and the R2=3.3k ohms, and you got a output tension of 18.6V supporting a current until 1.5A in the output.
| I think you should move away from a linear regulator because of the heat dissipation. Try to upgrade to a smps and use something like an adjustable AP1501 from diodes inc ( link ).
|
Looking for an inexpensive button that can withstand hits from a baseball bat At work, we're decomissioning a pile of servers. However, they are all virtual, so we can't celebrate office-space style. However, I was thinking - if I could hook up something that acted like a button to a keyboard, so it registered as the enter key, I could script the destruction of the effigy server with the launching of commands to destory the real one. So, what can I use as a button here that will take a good 30ish whacks or so before breaking? Would a piezo sensor glued to a metal plate work? Would I need extra circuitry? Or is there a place I can find a cheapish, large button that I could hook up? I can handle the soldering, but otherwise, my EE knowledge is fairly weak, so please consider added simplicity over absolute minimum price. Budget for this is probably around the $20 mark. <Q> Two pieces of metal separated by small slices of foam rubber at the corners make a cheap and simple heavy-duty pressure switch. <S> Attach wires to the metal <S> and you're good to go. <S> Copper flashing from the hardware store would work, but might not last long enough. <S> The next problem is how to get the data into the PC. <S> By reading the state of the flow control lines you can determine whether the switch is on or off. <S> Don't have a serial port? <S> A USB to serial converter will take care of that. <S> This link has an example of how to connect the switch and read it. <A> Why does it need to be a button? <S> If your intention is to mock the destruction of a server, why not destroy a real one, and detect that destruction? <S> It shouldn't be too hard to find some old hardware that deserves destruction anyway, so you can get rid of some trash and <S> destroy your virtual servers with one bat. <S> This could be accomplished any number of ways. <S> You could simply set up a real computer, and script it to ping the VM host periodically. <S> When you stop getting pings, consider it destroyed. <S> For a lower level approach, you could solder wires to the opposite sides of the case. <S> As long as the case is intact, it will look like a closed switch. <S> When it has been smacked sufficiently, the case will come apart and then it will look like an open switch. <A> I'm posting this as an answer rather than a comment because of length. <S> However, my knowledge of these components is limited, so this may not be a budget-friendly or easy solution. <S> Rather than finding a robust, durable button, my suggestion is to look for a load cell , force plate , <S> accelerometer or dynamometer — a sensor which is designed to measure impact and force. <S> A load cell is a transducer which you can mount behind or between tough materials so you can measure large forces. <S> Most load cells are very expensive, so unfortunately I don't know if you can find one for your specified budget of ~$20. <S> There are accelerometer-based devices which people interested in martial arts, boxing, etc. <S> can attach to a punching bag, and use the data to measure how hard they hit. <S> One search for such devices led me to flexible force sensors . <S> Assuming you can find a suitable device, however, you can get a lot more benefit out of it than a button. <S> If you read the data from the sensor as your friends and you smack the hell out of it, you could use the data to determine the amount of "virtual damage" you to do the server. <S> Plus, you'll probably learn something in the process!
| You might even hold a sort of contest to see who can do the most damage (cumulative force). There are any number of ways to do this, but the simplest is by connecting the switch to the data control lines on a PC serial port. Also a sensor attached to a durable material will provide a larger (and probably more creative) target than a button.
|
Can the atmega168 bootloader be installed with arduino uno? I have an arduino unu (pre-made) with the atmega328 and an atmega168. I am wanting to make a second arduino out of the 168. I don't have a USB programmer. The chip came out of some servo contorller board so I am guessing the arduino bootloader is not already installed. Is it possible to program with my uno, and if so how? Connection to the arduino instead of the computer when sending sketches is fine as long as I can disconnect it from the uno for use. <Q> You can use an Arduino as a programmer for other chips. <S> The sketch is called "ArduinoISP". <S> See these pages: http://arduino.cc/en/Tutorial/ArduinoISP , and http://arduino.cc/en/Tutorial/ArduinoToBreadboard <S> Basically, you power the target processor and connect to its in circuit programming programming pins. <S> For a AtMega168 select the board type of "Arduino Diecimila or Duemilanove <S> w/ ATmega168" as the target. <S> Here is one important tip. <S> You have to disable the auto-reset of the programmer that occurs when the serial port is opened. <S> Do this right before you select "Burn BootLoader" in the IDE. <S> I have seen putting a specific pullup value on it as well as a big cap on the reset line. <S> I had a breadboard Arduino <S> so I just disconnected the reset line. <A> The IDE will select the corresponding bootloader as specified per the .\arduino-1.5.2\hardware\arduino\avr\boards.txt. <S> If you program using the ISCP then for a UNO it would get .\arduino-1.5.2\hardware\arduino\avr\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex <S> where the 168 would use <S> .\ATmegaBOOT_168_diecimila.hex <S> in the same directory. <S> You may also wish to use other compatible bootloaders such as optiboot .\arduino-1.5.2\hardware\arduino\avr\bootloaders\optiboot <A> i'm posting this incase <S> there's somebody who'd be as desperate as i am to get an old s3v3 to work using an arduino uno hooked up to a pc. <S> been at this thing for months, and just can't imagine how frustrating it was. <S> my main objective was to bootload the old s3v3 with a new uno i had for a few months, then upload a blink sketch. <S> i basically followed the steps from these two sites over and over. <S> apparently the board selection just made all this work, and i think my s3v3 had a corrupted bootloader or something. <S> http://arduino.cc/en/Tutorial/ArduinoISP <S> http://arduino.cc/en/Tutorial/ArduinoToBreadboard pin connections; <S> uno === s3v3 5v == <S> = <S> 5v <S> gnd --- gnd d10 --- reset d11 --- d11 d12 --- <S> d12 d13 --- <S> d13 <S> procedures; <S> (im using arduino ide 1.0.1) <S> -load <S> the arduinoISP program from samples into the uno. <S> -after <S> loading the arduinoISP sketch, set this: tools > programmer <S> > arduino as isp <S> tools <S> > <S> board <S> > <S> arduino nano w/ atmega168 . <S> <---this was a eureka moment. <S> -then click on tools > <S> burn bootloader <S> -after <S> the bootload is done, open the target sketch, -setup <S> some kind of indicator, like blink, etc.(i setup a blink function on pin 9, so <S> i'd know the upload worked.) <S> -click on file <S> > upload using programmer. <S> I've tried numerous troubleshootings from various sites, including the tip to put the uno board's reset to low using a ceramic cap, nothing just worked. <S> i was almost giving up into buying another board, until the setting just worked. 0_o <A> There is an easier way to do this. <S> I just have bootloaded atmega 168-20PU with arduino uno. <S> I used old IDE <S> Ver1.05. <S> I tryed to bootload it with Tools/Board>Uno, and it gave a Yikes!Invalid device signature, and so i started with different board settings going from Arduino BT w/ ATmega168, <S> and it did not worked, then to Arduino Mini w/ ATmega 168, and finally the one that worked for me <S> was Decimila od Duemilanove w/ATmega168. <S> Bootloaded successfully. <A> Invalid device signature: change the Device Signature in the "...\arduino-1.8.5\hardware\tools\avr\etc\avrdude.conf". <S> Search for "168" and change the last"0x06" in a "0x0b" in the signature line "signature = <S> 0x1e 0x94 0x06". <S> After this procedure I was able to burn the bootloader and writing sketches into my ATmega168P by using "Duemilanove/Diecimila" as target. <S> To show the expected signature vs. the right signature during upload goto File - <S> > Preferences and set check box "verbose output during upload".
| You need to program it with the corresponding version of bootloader to match the 168 or 328 chips.
|
How to perform a frequency response test in a tube amp output transformer? I have an output transformer, which is a clone from an original Fender 5e3 transformer, I would like to know how it's behavior in typical frequencies. How can I perform such test using instruments like osciloscope and frequency generator, is It even possible? <Q> You can use a signal generator and oscilloscope. <S> Set it up like this: - Connect the scope's 2 channels to A and B with the scope inputs grounded at the commoned point of the transformer and signal generator. <S> One channel (A) of the scope verifies that what you are inputting stays constant and you note down the value (p-p) on the scope channels connected to (B) <S> This test only works at small input levels but if you are trying to compare two transformers it'll work fine. <A> This is probably better as a comment as I'm speculating and have not done so myself, but it was too long <S> and I invite comments because I want to learn as well. <S> Output transformer properties depends on the power it is transferring as well due to saturation of the magnetic field in between the windings, I would assume that the output transformer was chosen to avoid driving it in saturation for the amp specs, but even then, the relatively high currents in the output stage would potentially drive it into a non-linear regime as the transformer gets off the ground magnetically speaking. <S> Even if it doesnt get near saturation, the heat dissipated can change the frequency response as the amp warms up. <S> Additionally, guitar amp designers like to chase "tone" and it may be intentionally driven near saturation to exploit the skewed frequency response. <S> If you have both transformers on hand <S> I would just suggest to pump your frequency generator through the amp to see the relative difference between the two transformers, however since tubes are distinctly non-linear in their frequency response (and used for music for their characteristic "tone" due to this response) <S> it wouldn't be that useful if you just had the one transformer on hand <S> Otherwise, building a very clean amp setup with silicon with a linear frequency response (or close to it) outputting a similar power to the tube amp to drive the transformer would be the best practice I would assume. <S> However if you don't have an amplifier on hand you will have to spend time and money building one. <A> What I did to test some valve output transformers was rough and ready .My <S> audio sig gen had been modded earlier with an emitter follower to test speakers .I <S> back to back connected my two transformers <S> so things were 8 ohm to 5Kohm and back to 8 ohm .I <S> then run the low output impedance gen into the composite 1:1 audio transformer .I <S> connected a 8R2 9 Watt resistor aggregate made from 9 series parallel 8R2 carbon film resistors .I was not sure about the inductance of my ancient junk box wirewound resistors .Anyway <S> I put one scope probe on the input and one on the output and swept the gen from 20Hz to 20 KHz .
| If your generator is good You could test the baseline frequency response by pumping the generator through the transformer and sweeping the frequency in the audio range, if you don't have a spectrum analyzer you can do this point by point and measuring the signal amplitude on the output stage as you modulate the frequency.
|
Can a permanent marker be used on a PCB without damaging it? I need to cover up a line of text on the silkscreen of some PCBs and I'm not sure of the best way to do it. I've read that removing the printed text with a chemical will likely damage the boards, so covering it up seems like the best option. Can something like a Sharpie permanent marker be used on a PCB's silkscreen without damaging the board? <Q> Yes. <S> Some PCB fabs even use markers to mark good and tested boards. <A> It can however act as etch resist, so don't use it on a board you want to etch unless this is desired. <A> Of course you can use it. <S> Any marker and any color. <S> Covering the silkscreen with any kind of label work too. <S> In my company we use a black sharpie to cover the old PCB versions and/or correct them when a new update is released but the boards keep coming with the older version silkscreen. <A> To be really technically correct to the point of pedantry (or even punctiliousness) you should compare the data sheet / MSDS for the marker pen and the PCB and work out if they are compatible. <S> I'd be willing to take on trust that an Edding, Staedtler or Sharpie marker will probably be fine, but not any old marker pen which could have anything in the ink, from something that might damage the board over time to something that might become conductive over time. <S> As an example, Edding 8404 markers are specifically designed for Aerospace component marking.
| Permanent marker ink is non-conductive and won't damage the traces or the solder mask. I have done it many times and never ever had a problem.
|
How to make a wired input IR demodulator? Objective: I'm trying to make a wired infrared input for a microcontroller. Incoming signal would come from a remote control device that has an IR emitter output jack. I believe that all I need is the demodulator and perhaps schmitt trigger portion since the incoming signal will be well controlled and will not contain IR noise or variations in level. notes: I've found a few older ICs that were designed for use with a separate diode and seem that they could fit the bill but are not available any more. I also found a Vishay line of apparently current devices (VSOP584) that could work but are very tiny and I'm not sure that I could fab one up in a way that would survive. I have to think that a relatively easy to build circuit could demodulate the signal since it's wired and doesn't suffer most of the issues that a real IR input would have. I think I have 3 options: A) use an ir emitter coupled to an ir receiver inside my device. B) keep searching for an IC that will do the demodulation. C) design a demodulator (perhaps try with a basic envelope detector). Any suggestions on which option I should take? <Q> Something like a tsop31238 IR 38Khz receiver should do the trick (transmission range about 40m). <S> Most handsets modulate the IR at 38kHz when sending out the code. <S> Its a nice three legged device and contains all the circuitry you need to make an easy interface. <S> ( <S> +V, 0V and data out). <S> Inside the 'cap' is the IR 38kHz receiver wired to a suitable socket (say a 3 pin 3.5mm jack socket). <A> For the most common devices the signal should be a 36-38kHz Square Wave carrier with a duty cycle of 1/4 to 1/3. <S> The carrier is modulated by 100% ASK modulation, which means the carrier is simply on or off. <S> Now what is tricky here is that you need to be able to detect as little as 20 carrier cycles as a short "on" segment, but nevertheless a simple RC lowpass filter (using a buffered input) plus a schmitt trigger with the right thresholds (and sufficiently high imput impedence to avoid loading the Lowpass filter) can in theory work. <S> A proof of concept CircuitLab simulation that focuses on the tightest timings (shortest pulses used in the NEC encoding) is available at https://www.circuitlab.com/editor/c8u3p7 (press F5 to run the last saved simulation). <S> In a real circuit your input is probably not 5 volts, and may be sensitive to load, and you would probably not construct manually a schmitt trigger using a pair of opamps, but this does show an potential approach. <S> If this is a one off, I would approach it by emprically determining the RC values with the help of a scope. <S> An IR LED coupled with a premade receiver module is still likely to be easier though. <A> I'd suggest figuring out what the output waveform is, and then having a microcontroller decode it "directly". <S> For example, depending upon the IR format, you may be able to use a counter and a timer tick. <S> If during a timer tick the counter hasn't changed, see how many counts have arrived since the last tick where the counter hadn't changed. <S> That will tell you the "length" of the pulse. <S> Some schemes just use long and short pulses; others require measuring the lengths of gaps as well. <S> In any case, decoding a signal intended for an IR-LED is apt to be easier than decoding a demodulated signal that's actually sent via IR, since the latter is apt to be much noisier.
| To create a wired option from a standard universal control make a end cap to go over the controller.
|
Cannot find GND on 7 Segment Display Datasheet I'm trying to use a 7 Segment Knightbright LED Display, however, after careful study of the datasheet, I'm unable to find what I believe should be the GND pin to power a segment! http://www.circuitspecialists.com/content/52077/SA03-11EWA.pdf Could anybody please help point this out to me. <Q> the segments you want to light up. <A> from the datasheet <S> This is a common anode 7-segment character. <S> It has a common high side and individual low sides. <S> The device driving this character would sink the current through the LEDs, which need to be lit. <S> There are common cathode 7-seg characters out there too, if you positively need to have common GND. <S> Have a look at a datasheet for another family of 7-seg characters . <S> It shows both common anode and cathode. <A> That's the schematic from the datasheet. <S> Seems 3 AND/OR <S> 14 can be used as the Common Anode.
| According to my interpretation of this datasheet, pins 3 and 14 are the common anode pins that you would have to connect to the positive rail, and then pull down (to ground)
|
Any ARM based microcontroller with integrated WiFi? I am looking for a ARM based low cost SoC with an integrated WiFi, tried different search engines and still not been able to locate one. I would like to know if anyone knows of such device that has an integrated WiFi controller that only needs and external antenna. I may choose other architecture than ARM, but I would prefer to stay with the CPU architecture that I already have a working SW development environment. ---- Update July 27 -----I have found a device that has an ARM Cortex M3 plus WiFi interface, the name is Imp , they are selling a small break outboard with their IC here http://smartmaker.com/en/home/602-electric-imp-002.html The problem with this one is that all communication with that device MUST go through their servers. Now, the question is if there are any other companies who have such a product with an open interface rather than a closed one like Imp! Update 2 REALTEK seems to have created the perfect low cost module for this and the modules are widely available on e-bay and AliExpress like this one: http://fr.aliexpress.com/item/RTL8710-WiFi-Wireless-Transceiver-Module-SOC/32666025289.html The module is sold between $2 and $4 depending on quantity and shipment. RTL8710 is based on Cortex M3 and has between 512k and 2M memory available. There a very well written page about RTL8710 on Hackaday: http://hackaday.com/2016/07/28/new-chip-alert-rtl8710-a-cheaper-esp8266-competitor <Q> It seems like all the low cost designs will be a 2 chip solution, either with Broadcom's WICED device: <S> http://www.broadcom.com/products/wiced/wifi/ <S> Or as @boardbite mentioned, TI's CC3000 Thank you guys for all your help. <A> About low-cost, it depends of what you consider it to be. <S> Their prices are around the range of the BeagleBone ($60), plus the cost of the WiFi module (around $15). <S> If you need REALLY low-cost, it's better to buy the ARM and the WiFi module separately. <S> There are more low-end ARM processors that are much cheaper than that, and you'll find good WiFi modules at the same $15 price point. <S> They usually communicate via SDIO, so any ARM processor with SD <S> /MMC interface can be used. <A> Integrating an analog module into the same chip as the CPU core is very difficult (if not impossible) <S> so I don't think anyone does it. <S> Most of the WiFi modules out there are actually shielded mini-boards with CPU and analog circuitry in separate chips. <S> These CPUs usually have been 8051s in the past, but more and more modules switch to Cortex-M3, so in theory you don't need any external CPU and just use the one in the module. <S> However, programming them might be <S> tricky - most manufacturers don't give any details about programming the core and just provide a black box interface (SDIO, SPI, UART or USB). <S> You would have to skip modules with SDIO interface - they usually require the host to upload firmware image before they can be used for networking.
| Technexion has an OMAP-based module, with one variant having WiFi built-in: TAO-3530W. Compulab also has a similar option with another (related) member of the OMAP family.
|
What sensor to use for sensing azimuth & altitude of satellite dish? Instead of using a motor encoder, what electronics sensor I could use to know the position of a satellite dish? In this case will be the Azimuth and Altitude of the dish (2-axis). Magnetometer, Accelerometer or Gyro? any particular model I could get in eBay or Sparkfun? <Q> A stationary object may use an accelerometer to reasonably accurately determine which direction is down (or, conversely, up) without needing any sort of reference other than a large nearby planet. <S> In theory, a sufficiently-precise gyroscope could also determine which directions were north and east without needing any sort of reference other than being affixed to a large nearby planet which is turning on a north-south axis, but I doubt that any commercially-available electronic gyroscopes would achieve that level of precision. <S> If you have a base whose alignment is fixed, and merely wish to measure position relative to that, potentiometers can be pretty good. <S> When they are used in a ratiometric fashion, they can be relatively precise and also immune to changes in temperature, humidity, etc. <A> why not try a rotary potentiometer. <A> If this is a DIY project you might want to use an optical encoder like Agilent AEDR-8300. <S> It is the same sensor principle which is used inside of a relative rotary encoder, but you can print the reflector stripe yourself. <S> This is just a white/black 2bit gray code. <S> So you can create much better resolutions without a gearbox. <S> No drift, no worries. <S> Okay, maybe sunlight, rain, ... <S> but I think the optical way is fairly robust. <S> edit: <S> You don't even have to print a gray code pattern. <S> A black/white stripe is sufficient. <S> See the datasheet . <A>
| An RVDT (Radial Differential Voltage transformer) might offer a better resolution than a rotary encoder, however it requires a more complex circuitry.
|
LED as 230V AC indicator Answers to other questions here (e.g. 1 ) show capacitors used to drop AC voltages to levels suitable for a LED. I've seen much simpler circuits such as the one below simulate this circuit – Schematic created using CircuitLab Assuming it's in a suitable enclosure, are there significant drawbacks or dangers to this circuit compared to others? <Q> The types of AC powered LED drivers I've seen use a capacitor to drop the voltage/limit the current and to that extent it uses less "real" power. <S> The circuit you've drawn will (for normal 1.8V LEDs) pretty much dissipate 1W so it will get a little warm. <S> I guess the inability to pack some punch is the main drawback. <S> The current into the LED is about 8mA every positive cycle so you don't get much light out compared to the heat. <S> I don't think there are any dangers (other than those you excluded) <A> As far as I can tell, Christmas tree LED lights are essentially this, with many LEDs in series to increase the diode's combined forward voltage to something closer to the AC voltage, reducing the voltage across R1, and thus the power. <S> They also seem to include half the diodes in anti-parallel, so for each AC half-cycle, half the LEDs are lit. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This means a very low efficiency. <S> The LED is also on only half the time, and when it is on, has high ripple current. <S> And, it blinks at 50Hz, which to me, is very noticeable and annoying. <A> The circuit defined here gives a 8mA current and the resistor wattage should be atleast 2W for safe operation. <S> P=I2.R (0.008x0.008x27000=1.72W)
| LEDs get less efficient as the instantaneous current increases , so this further reduces efficiency. The obvious disadvantage of this circuit is the power lost in R1.
|
What happens with Source and Drain when I use PWM on the Gate of a MOSFET? I see some people using PWM to control the Gate of MOSFETs, what happens in the MOSFET when you use PWM on the Gate ? If I use Arduino to PWM the Gate of the MOSFET, will it control the voltage between the Drain and Source or it will only turn on/off very fast ? <Q> The gate of a MOSFET is basically a capacitive load. <S> The FET's drain current is controlled by the gate to bulk voltage. <S> For discrete FETs the bulk is often connected to the source terminal internally. <S> This means the problem of driving a FET gate can be modeled as charging a capacitor. <S> So you can archive both cases described in your question. <S> This is used for example in switch mode power supplies. <S> If the PWM output can only drive low currents, the gate capacity together with the line resistance will form a low pass filter. <S> You can increase this effect together with a resistor from PWM output to gate, to implement a very cheap form of digital to analog converter. <S> The duty cycle of the PWM controls the average gate voltage. <S> For this mode you must consider there is a minimum gate voltage (threshold voltage) to archive an effect on the drain. <A> If you pick the right N channel MOSFET for the load and you have the load in the drain up to V+ and the source connected to 0V then applying PWM inputs to the gate (with respect to source) will effectively cause the FET to act pretty much like a switch opening and closing. <S> This is an approximation but for low switching frequencies it's not a bad one. <S> It's never as clean-cut as a switch of course <S> but it can be reasonably approximated to one. <S> When the "contact" closes it has "on-resistance" which can be as low as 1 milli-ohm on some FETs. <S> When the "contact" opens there will be a little bit of leakage current but probably not much more than 10uA. <S> When it switches, it doesn't do so instantaneously and this is where there can be a significant amount of power loss. <S> The "contact", over a few micro-seconds or in some cases a few tens of nano-seconds gradually changes from high impedance to low impedance. <S> Parasitic capacitances make this worse generally and you need to "drive" the gate quite hard to achieve decent efficiency. <S> The space-mark ratio that you drive the gate with multiplied by the power voltage (V+) roughly tells you the average voltage applied to the load. <S> Thus, if your supply is 12V and you drive 40:60, then the average voltage on the load will be approximately 7.2V i.e. the FET in "on" for 60% of the time. <A> Controlling the voltage between the drain and source (\$V_{DS}\$) and turning on/off is the same thing . <S> When \$V_{DS}\$ is at its minimum: <S> channel impedance is at minimum, \$R_{DS(on)}\$ in the datasheet <S> channel current is at maximum, usually limited by the load connected to the transistor gate voltage is significantly higher than the threshold voltage <S> \$V_{GS(th)}\$ <S> the transistor is said to be on <S> When \$V_{DS}\$ is at its maximum: <S> channel impedance is at maximum channel current is at minimum, some very small leakage current specified in datasheet gate voltage is below the gate threshold <S> \$<V_{G(th)}\$ <S> the transistor is said to be off <S> This is because power is the product of voltage and current: <S> $$ P = VI <S> $$ <S> When the MOSFET is on or off, there is high current, or high voltage, but not both. <S> Thus, the power in the MOSFET is low, it doesn't get hot, and less energy is wasted. <S> When the MOSFET is between states, there is significant current and voltage, so power in the MOSFET is high, it gets hot, and battery energy is wasted. <S> The switching speed is limited by the gate driver's ability to sink or source current to charge or discharge the capacitance of the gate. <S> There are, of course, some applications where a constant voltage between minimum and maximum is desired (for example, linear amplifiers), but these must be prepared to deal with the power load and heat that results.
| If the PWM output can drive large currents the FET gate can be charged quickly and it will turn the drain current on or off with a high slope. In most PWM applications, it is desirable to have the MOSFET on or off, but not something in between.
|
Need to intercept USB data stream going to printer I have a label printer connected to a PC via standard USB 2.0 A to B cable. What I need in terms of functionality is a USB Y cable that would send the print data stream down both cables simultaneously. I know.... I know... these cables don't exist, and due to the characteristics of the USB com protocol, it's not as simple as splicing in another cable. However, I know there must be a way to create a redundant data stream. REQUIREMENT: The printer must still generate a label and the 2nd data stream will be routed to a PC and captured for logging purposes and further processing. Due to security issues, I wont be allowed to touch the computer or printer, therefore whatever solution I use must reside between the PC and Printer. References: Present question is similar to this previous one . <Q> Since you can't modify the printer or the pc, a networked printer setup is out of the question. <S> So you need a USB Protocol Analyzer . <S> Those are a few hundred dollars a piece. <S> Enjoy. <A> For a specific known device, you do not necessarily need a generic test instrument - you could, with sufficient knowledge of it's operation, use a microcontroller with both USB host and device ports to man-in-the-middle the traffic by pretending to be each end to the other and passing traffic between the two emulations. <S> That drops the unit cost to the $20-30 range, but likely increases the software development cost substantially... <S> It also changes the failure mode from "failure to capture" to "failure to print" <A> You can't touch the computer during printing? <S> Or can't touch it ever? <S> No "man in the middle" hardware is required. <S> Check out options like Free USB Analyzer or USBlyzer. <S> From the Free USB Analyzer site: Program installs the filter driver between the USB host controller driver and the device driver and then monitors all USB Request Blocks (URBs), displaying them to the user in easily readable format. <S> This Free USB monitoring and analyzing software utility is designed for <S> effective intercepting, capturing and decoding of communication traffic generated by any USB application passing through USB interfaces to and from devices connected to local or remote PC.
| If you can install USB logging software on the host PC, you can capture all the incoming and outgoing USB traffic.
|
Creating a Logic Gates Background I've arrived to a dilemma in my personal project where I'll need to design a circuit like the following: The logic makes sense to me, but I found that I am unsure in what nature would it be best for me to implement a gate in my circuits. Let's take the NOT gates for instance; I thought making a NOT gate would involve one single transistor: However I read an article that criticizes this approach, saying it is crude. Instead it offers this insane thing: The article states that it "maximizes voltage gain", but doesn't explain how very well. The article also goes on to explain how the circuit works, which I admit is clever, but I don't see the advantage of this over the single transistor method. The above circuit also seems like overkill. Is the single transistor method no more than an academic exercise? The Actual Question What's a real, practical way to implement small logic in circuitry? In the case of the NOT gate, I have the single transistor, multi transistor and IC approach. Integrated circuit inverters however sell only in arrays (that I can find), so this also seems like overkill to me. To me, the most pragmatic approach is the single transistor, but I'm unsure if this is a correct assumption. <Q> Where it falls down is that its not particularly fast switching or useful when you come to design integrated circuits. <S> The 'replacement circuit' is the basis of a ttl logic gate. <S> (7400 series) which has subsequently been replaced by CMOS circuitry which at some point in the future will be replaced by something else. <S> If all you want is <S> a simple (single) NOT gate then <S> the single transistor could be way to go. <S> It all depends on the requirements of your circuit (speed, voltage range, logic levels etc.) <S> The main problems are; (1) fanout - how much current can you take from the output without lowering the output voltage too much. <S> (2) Logic level tolerence (noise margin) - What value of voltage constitutes a '1' or a '0'. <S> In a one transistor circuit anything over 0.6V would be seen as a '1'. <S> The saturation of the transistor may be 0.3V <S> so it doesn't leave much of margin for error. <A> Assuming that you refer to the gates in the circuit you show: the best way to implement those is to leave them out. <S> Option 1: <S> Connect the Dout directly to the gate of the mosfet, and invert the logic within the rest of the circuit (presuming it is a microcontroller). <S> To 'disable' the output, drive the gate low. <S> Option2: <S> Again asuming you are driving the bus from a microcontroller, just connect the pin directly to the bus, not FET needed, and switch the pin between low (for a low output) and high (for a high or disabled output). <S> The best solution uses 0 components.... <A> Inverters are available in single gate parts. <S> The part numbers often contain "1G04", as in SN74AHC1G04 . <S> 1G04's are available in several logic families, including AHC, AUC, and LVC. <S> For TTL levels instead of CMOS levels, I think you want an AHCT1G04. <S> There's also 1G06 for a single inverter with open-drain output, and 1G14 for a single inverter with Schmitt-trigger input. <S> Generally an IC gate will be cheaper, smaller, and faster than the discrete transistor/resistor solution. <S> The performance parameters will be guaranteed by the datasheet with much less design/analysis work required for the user. <S> Some cases where you might want to use the discrete implementation: <S> You need to have control of the pull-up resistance <S> You need to source or sink very high currents (more than the 5-24 mA offered by the standard parts).
| First off - don't believe everything you read - the single transistor may be crude but it works.
|
Can I use a 3-wire AC adapter in a DC circuit? I am reading through the excellent book Make Electronics and am in a chapter that suggests getting an AC adapter, cutting off the connector at the end and stripping the rubber outer coating back to expose the two conductors inside. When I did this with an AC adapter that I had laying around in the house, I found three wires inside instead of two. One was black, another red and the third yellow. After googling a bit, I am guessing that the black is negative, the red positive and yellow neutral? I could be wrong, though. But, can I use this 3-wire setup to feed DC power into my circuit? And if so, do I use all three wires? <Q> Read the label on the power supply and it should be no surprise there are three wires. <S> Note that this supply doesn't put out a single voltage, which would require two wires. <S> The label clearly shows that this supply puts out 5 V and 12 V, hence it needs at least three wires. <S> Usually when a supply puts out multiple voltages, they have a common ground, which is also the case here. <S> That is why there are only three wires instead of four. <S> Use a meter to see which one is 5 V and which one is 12 V. <A> Black is most likely common ground, red might be 12V DC and yellow may be 5V DC - but that is guesswork. <S> Red and yellow might be the other way around. <S> Use a multimeter to check voltage from black to red and from black to yellow. <S> It sound like you'll only need black and one of the others - depending on what voltage suits the circuit you want to provide power to. <A> You are correct, that RED & Black usually denote Positive & Negative. <S> If the end you cut off has only two connections then the third wire must have been tied to either the RED or BLACK at the "load" end of the chord. <S> This is a configuration sometimes used to compensate for voltage drop in the chord by measuring the voltage as near to the load as possible and sending that measurement back to the regulator in the power "Brick". <S> If you still have the cutoff end, you could measure the resistance between the different wires in hopes of getting a clue, or if that is unrevealing - try disassembling the cutoff end for some physical evidence as to the connection. <S> Do not connect this to your project until you are sure of the proper arrangement.
| Black is almost certainly the common ground.
|
Overcoming a wire's internal resistance? Let's say I have a very sensitive device that needs EXACT voltage. Let's say that the voltage it requires is 5 volts. Now let's say I'm running the aforementioned voltage over a wire with an internal resistance of 20 ohms. How many volts do I need to put into the wire to ensure I get 5 volts out? Based on my rudimentary understanding of Ohm's law, I would say 5 volts / 20 ohms = 0.25 , so I need 5.25 to overcome the wire's resistance. No idea if that's right or not though. Edit: The current drawn will be anywhere from 1 to 2 amps. <Q> Regulation is required with a dynamic load If you do not know the current (load impedance) <S> a priori (before-hand) and if this current is not constant from the moment your device begins operation to the moment it ceases, you will need to employ active regulation to achieve this. <S> That is, you will need a circuit element that will monitor the load voltage and adjust the source voltage in response to maintain the desired 5V load voltage. <S> Here's why... <S> The problem is that Ohm's law applies to static conditions. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You do not know the load impedance and you also do not know the source voltage. <S> The load current is specified as a range (1A to 2A). <S> If the current could be determined, and it is constant, you could solve it this way: $$V_{wire} = I_{device} <S> * R_{wire}$$ <S> We want to know how much voltage to apply at V_source to overcome <S> V_wire... <S> $$V_{source} = <S> V_{device} + V_{wire}$$ <S> So... If current is 1A, the source voltage must be 25V. <S> If the current is 2A, the source voltage must be 45V. <S> That's a big range and driving through a 20 Ohm resistance (which is a lot for a wire) will result in large changes (20x !!!) <S> to the requisite source voltage for small changes in the source current. <S> Good luck with your project. <S> Cheers. <A> You bring a lead back to the power supply that samples the load at <S> it's pin <S> (i.e. after the wire resistance). <S> What is important is that this kelvin connection should NOT support any current so that is doesn't suffer any IR related voltage drop. <S> You now have a measurement basis from which you can drive your supply into the load (say at your referenced 5.25 V) and dynamically overcome the main power supply wire resistance. <S> The issues are that you require another wire and that wire may pickup stray fields/signals and generate noise. <S> However, this is a very common approach. <S> Look at any power supply that has a "sense lead" input. <S> Here is a snip from an Agilent website: <A> Your key phrase is: The current drawn will be anywhere from 1 to 2 amps. <S> You cannot put more volts into one end of the wire, when the current varies, and expect to get a constant voltage out the other end. <S> Using ohm's law for 1 amp and 20 ohms says that you will have a 20 volt drop across the wire-- <S> and you'd have to put in 25 volts to get 5 volts out. <S> But for 2 amps you will have a 40 volt drop and you need to put 45 volts into the wire. <S> So let's say that you put 45 volts into the wire, but only draw 1 amps. <S> There will be a 20 volt drop in the wire and you will get 25 volts out the other end. <S> The solution is to redesign the end with the "very sensitive device" to be not so sensitive.
| Your best options here are to use a heavier gauge wire (wider diameter, or run more wires in parallel) which will lower the wire's resistance or a point-of-load voltage regulator which will stabilize the voltage independent of current Rather than make your device less sensitive (maybe not possible) or remotely regulating the power (placing a regulator closer to the sensitive load - again maybe not possible) the "old-timey" way of doing this is through using a kelvin connection.
|
Logic design for FPGAs using C I am well aware about programming processors and microcontrollers in C. But can C code (not SystemC) be used for logic design for FPGAs? Are there any specific software tools for this purpose? <Q> Here is a list of the more popular software tools: C-to-Hardware (Altera) C-to-Hardware Compilation Technology <S> (Altium) <S> C-to-Silicon Compiler <S> (Cadence) <S> C-to-Verilog (Nadav Rotem, free and open sourced) <S> Cascade <S> (CriticalBlue) <S> Catapult-C <S> (Calypto) Comrade <S> (Hagen Gädke) <S> CyberWorkBench <S> (NEC) Daedalus <S> (Leiden University and University of Amsterdam, free and open-source) <S> DIME-C <S> (Nallatech) DK Design Suite (Mentor Graphics) <S> eXCite <S> (Y Explorations) <S> FpgaC <S> (John Bass, free and open-source) <S> GAUT <S> (Philippe Coussy, free and open-source) Impulse CoDeveloper (Impulse Accelerated Technologies) <S> Mitrion SDK PE <S> (Mitrionics) <S> NISC <S> (University of California, free) <S> ROCCC <S> (University of California, free and open-source) <S> SPARK <S> (University of California) <S> SpecC <S> (University of California) <S> Synphony <S> (Synopsys) <S> Keeping track of them is made difficult by the fact that these companies regularly swallow each other whole, change names or discontinue products entirely. <S> It looks like for all tools, the C code needs to go through an intermediary HDL stage. <S> So the design will be translated into Verilog or VHDL, and these tools facilitate the transition before it is finally put into hardware. <S> But remember, Verilog and VHDL themselves are intermediary stages. <S> Even the netlist is intermediary. <S> The final stage will be a proprietary binary file which reconfigures the FPGA. <S> Designing in C will have its own challenges and trade-offs . <S> But the answer to the question is a resounding yes, logic design in C can be done. <S> A nice introduction to C-to-FPGA was written way back in 2005. <S> Wikipedia has a nice list of HDLs and tools. <S> Currently, there are also tools for languages similar to C, C++, Java, Python and Ruby. <S> Please comment if I missed a tool and I will add it to the answer. <A> No, FPGA's cannot be programmed in C. <S> Over the years there has been various attempts at a C-Like language, but these have either not caught on failed outright. <S> Even for the ones that "succeeded" I would not call them real C. <S> You could not, for example, take a pre-existing code intended to be compiled for a processor and recompile it for an FPGA and expect it to work. <S> Use VHDL or Verilog <S> , you'll be much happier. <A> If your goal is to run a system ON the FPGA running C, you might try installing a CPU core. <S> However, this negates the purpose of the FPGA. <S> Verilog and VHDL are designed such that you create a structure, not a list of instructions.
| Yes , it is possible to do high level logic (HLL) design using C or C-like languages. Using C for programming FPGAs would be a rather poor design choice, since C is designed for iterative programs, not logic arrays.
|
Is simple voice synthesis (just digits 0-9) possible with Cortex-M0+ with 4kB flash? I'm working on a little side project with the LPC810 (Cortex M0+ 32 bit ARM MCU, 8 pin DIP package, 4kB flash, 1kB SRAM). I need a UI to convey to the user a temperature setting. I only have about 2 pins spare to implement the UI.... so using LEDs is going to a challenge. I had an idea of using just one pin to drive a speaker or peizzo buzzer and convey the temperature in speech. Just the digits 0 - 9 in english is all I need. Storing 0-9 in PCM is out of the question with so little flash. So I was wondering is anyone aware of open source code that would allow for very high compression of a small dictionary of words what would be light enough on CPU/RAM to work with a Cortex M0 class MCU? (I have a strong hunch this is plain out of reach of low end Cortex M0 MCUs without external memory). <Q> While this may not be a complete, independent and ready-to-use answer, but I think you can get some neat ideas, implement (or port) <S> it on Cortex-M0. <S> Here I assume that from a computation power and resource standpoint, a Cortex-M0 has more to offer, than the popular Atmel 8-bit <S> AVR (ATmega328P) running on an Arduino. <S> Here are 2 projects, that manage to use the PWM pin of Arduino and an RC-filter circuit to play out synthesized speech. <S> Of course, we are not looking at hi-fidelity audio, but something that is recognizable. <S> Also do note, that apart from the need for a PWM capable pin, your micro-controller might be very busy during the synthesis, <S> so much so that, it might spend most of it's cycles doing it. <S> Software PWM would put further strain. <S> Now for the 2 projects: Cantarino Port of Webbot's speech synthesis to Arduino PS <S> > <S> Personally, I've not implemented them, but looked at them for a project. <A> I need a UI to convey to the user a temperature setting. <S> I only have about 2 pins spare to implement the UI.... <S> so using LEDs is going to a challenge. <S> Use the two pins as I²C Bus, and connect a GPIO expansion chip like MAX6956, which has 20 output pins in a 28-pin DIP package. <S> That is enough for a few 7-segment displays, and you can connect more than one expansion chip to the bus. <A> A small amount of training might be required to recognize the beep patterns (among other things, if you're using a positional notation, knowing how a zero would be conveyed) <S> but if all temperatures are positive it may not be too hard to define beep sequences for values 90-10 and 9-1. <S> +90: XXXXX--XX--XX---+80: <S> XXXXX--- <S> X-X-X---+70: <S> XXXXX-X-X---+60: <S> XXXXX-X-+50: <S> XXXXX---+40: <S> XX--XX--+30: <S> X-X-X---+20: <S> X-X-+10: X--- <S> Each "X" represents 50ms on and 50ms off, while each "-" represents 100ms off. <S> For values 9-1, use the same cadences as 90-10 but a different pitch. <S> The cadence patterns above could easily be stored in an array of 16-bit integers. <S> The sequences above are chosen not just to allow counting, but also to be recognizable as patterns. <S> Counting <S> straight non-rhythmic pulses up to nine can be a bit difficult, but arranging the things to be counted into rhytmic grouping can help a lot. <A> If board space is not a limitation, A port expansion + few counters (74HC161 or similar), external sample ROM and a DAC can implement this without requiring much code space.
| It may be possible to write code that would fit in 4K that would produce vaguely-recognizable speech for the digits 0-9, but it would probably be easier to define beep patterns for them.
|
Transistor circuit to toggle motor on/off not working (Arduino) I've been trying to create a simple transistor circuit with a 2N3904 that will toggle a geared DC motor on and off without drawing power from the arduino - I've followed the schematic seen in the 2nd image. (Breadboard view) (Schematic) The circuit isn't behaving as I expect it to. For testing purposes, I've been feeding the 5V from the arduino into the base pin (before the resistor) to activate the 'switch' of the BJT. This only powers the motor when I have a low valued resistor at the base (~10ohms). When I use 1k resistor, the motor does not turn on. Also, I have used a digital pin set at high to attempt to power the base pin and toggle the motor on/off, but this does nothing, regardless of the value of the resistor. Perhaps my circuit is incorrect? All I want the circuit to do is turn the motor on and off when I feed it a high signal from the arduino. Notes: The red wire coming into the node at the top is from a 9V battery. The ground bus on the breadboard has both the arduino ground and battery ground connected to it. <Q> Your motor that you linked to is a 4.5V 190~250 mA (No Load) motor. <S> At 9v, the current probably increases. <S> You are overdriving it by 200%. <S> And any load/weight will cause it to increase in current requirements as well. <S> Stall current is probably 10x that at least. <S> The Transistor you are using is a 100mA standard, 200mA Absolute Maximum . <S> One of those motors by itself without any load, can easily kill that transistor. <S> The base resistor is calculated as (Base Voltage - Base-Emmiter Voltage) / <S> Current required . <S> Base Voltage is the Arduino pin, so 5v, Vbe depends on the collector current which is 200 mA here, so typically 1V. Current required is calculated as Collector Current (200mA) <S> / Hfe (From datasheet, 10~30). <S> On the safe side, lets go with 10, so 200 / 10 <S> = 20mA needed at the base. <S> (5V - 1V) <S> / 20mA or 4V / <S> 0.02A <S> = 200Ω resistor. <S> A 1kΩ resistor would only allow 4mA at the base, which times the Hfe of 10, would only allow 40mA at the collector, probably no where enough to tun on the motor. <S> TLDR: You need the protection diode, your 9v power source is too high, and your transistor is too weak for the motor you are using. <S> And you need a bigger resistor at the base because the motor requires more current then you are figuring. <S> A common 2n2222 transistor with a 470Ω resistor would do much better. <S> Edit <S> : Not making the pin an output also puts a damper on things. <S> Answer, Arduino pins default to input. <A> The most likely explanation is that the motor needs more current than the transistor wants to deliver. <S> Have you measured the motor current? <S> For that matter, it may be that the motor requires more current than your 9V battery can supply. <S> Have you run the motor directly off the 9V battery? <S> The second most likely is that back EMF from the motor has popped the transistor. <S> Substitute a small incandescent bulb for the motor, and see if you can shed some light on the subject. <S> Put a reverse-biased diode across the motor. <S> I'd probably grab a 1N4001 or something similar. <A> You may have invested too much faith into the transistor. <S> When I look at the datasheet for the 2N3904, it has a max collector current of 200mA, which is what your DC motor is getting. <S> DC motors are high current devices, try to find out the current needed to turn this motor. <S> The collector current of the transistor will be a function of the current to the Base of the transistor. <S> Remember that B*I(b) = <S> I(c). <S> When you use the 5V pin from the Arduino, you are connecting directly to the output of the on-board LDO. <S> This will be much better suited to drive your DC motor, which is why this pin will work (Higher base current equals higher collector current). <S> However the Arduino can only output a max of 40mA per I <S> / <S> O pin, I haven't checked the max current of the LDO <S> but I'm sure it's much higher. <S> Here's the schematic for reference: <S> Arduino Schematic <S> Anyway, the most pragmatic advice I can give is that your transistor should only be used to drive little toy motors. <S> If you have a DC motor of value, it is necessary to be using a relay or a more robust transistor. <A> For what it's worth, I think that N-channel MOSFETs with logic level gates are much easier to use than NPN transistors for these kinds of driving. <S> A one kiloohm resistor would work fine for the base, as there's only a small amount of charge needed to make the MOSFET conduct, and then it will draw basically nothing. <S> The BS170 (similar to 2N7000) comes in a 500 mA version that's great for general purpose experimentation, and you can buy 25 for a few bucks. <S> The IRLB8721 N-channel MOSFET is great for driving bigger things (easily over 10 Amperes without heat sinking) and is about a buck each. <S> For good measure, you probably want a 220 Ohm resistor into the gate of that, to turn it on nice and quick.
| You are missing the protection diode across the motor, that can easily kill the transistor.
|
Does an inexpensive screw terminal "expansion strip" exist? I've got a messy security panel that needs cleaning up badly, as I need to connect another PCB for remote access and can't get the wires to reliably stay in place: If you look at the black, red, green, and yellow terminals, they already have three separate wire (pairs) connected! So far, a terminal strip like this is the only solution I can come up with. However, I'd have to add an additional bus bar across the terminals that need to share a signal, which just adds to the size of the bar needed and is a little inconvenient: There's always Phoenix Contact terminal blocks like the following: However, at over $10 each from Digikey, it's a pretty expensive (though elegant looking) solution. I guess I'm looking for something like the following photochopped image? Note that I'd like a bus bar that connects the columns of terminals... Can anyone suggest other options? <Q> A Punchdown block would do nicely. <S> None of those wires seem high gauged, and some look like they were puled out of cat 5 anyway. <S> Other names for these are 110 Blocks, 66 Blocks, M-Blocks. <S> They are used for telephone, voice (Cat 3) and data (cat 5/6) wiring. <S> Also used in alarm system wiring. <A> This terminal block from Phoenix is only $1.07 under 10 CNT. <S> You could get a few of these and a section of DIN rail. <S> http://www.digikey.com/product-detail/en/3044076/277-2026-ND/2051190 <S> PDF for 3044076 Series <S> It can also take from 26AWG to 12AWG. <S> Most of your wires look to be 26AWG (or similar). <S> Example Terminal Block Jumper <S> I am also a fan of Ferrules <S> but they are definitely not required in a stationary one insert application. <S> The following is a link to a Ferrule Kit. <S> Example Ferrule Kit <A> My first suggestion is to use crimp terminals (ring or fork) on the wires, rather than just putting the bare wires under the screws. <S> See http://www.parts-express.com/cat/solderless-crimp-terminals/435 , for example.
| Dont forget the jumpers to jump the blocks together that you want to match. There are jumper things for use with the barrier terminal strips you show, that can bridge adjacent terminals. There are many less expensive ones, this is just one i found quickly on digi.
|
How do I choose the correct op amp to amplify a high frequency sine wave (>500kHz) I am working with ultrasonic transducers (12mm diameter, 500kHz). With my present physical setup, the transmitter is excited with a 3.3V p-p sine wave. The receiver is showing a nice clean sine wave with around 20mV p-p. I want to amplify this output signal to around 10x the amplitude (~200mV) or greater. I have investigated op amps for this purpose, and have learned that op amps have "slew rates" and "bandwidths". I could not find any clear reference material on how to choose the correct op amp parameters for my specific application. Can anyone provide some pointers on this? <Q> Very roughly, the bandwidth of the closed-loop circuit will go down in proportion to the gain of the circuit. <S> Put another way, many op-amps can be characterized by a constant "gain-bandwidth product", meaning gain <S> x bandwidth is some constant value, with gain trading off against bandwidth as you adjust the feedback in your design. <S> So if an op-amp advertises a bandwidth of 1 MHz at gain of 1, then you can expect a bandwidth of 100 kHz at gain of 10. <S> Or, put in a way that's more useful to you, you want to look for an op-amp with bandwidth greater than 5 MHz (for gain-of-one configuration). <S> You probably want to add some margin, because the specified bandwidth is for a 3-db drop from the low-frequency gain. <S> So to get full gain at 500 kHz, you will need an op-amp with gain-of-one bandwidth somewhat above 5 MHz. <S> A 10 or 20 MHz spec might be a good place to start, for a minimum. <S> But 100 MHz devices (and higher) are readily available, and would allow you to control the bandwidth with external components, so you might prefer that route. <S> The constant gain x bandwidth rule goes out the window if you start talking about current feedback op-amps. <S> But for 500 kHz, you shouldn't need to go there. <S> Finally, if the performance matters to you, simulate your circuit and check the AC performance (for bandwidth) and transient response (for slew rate limitations) before finalizing your design. <A> You need to pay attention to two things- 1) <S> the GAIN BANDWIDTH PRODUCT, and 2) the SLEW RATE. <S> Gain-bandwith product is a first-order approximation that the product of the gain and bandwidth is near a constant. <S> Thus, for your 500kHz application, with a gain of 10, you need a gain-bandwidth product (assuming one amplification step) of 5MHz. <S> If you want to split this into two gain stages (which MIGHT be feasible) of around 3 each, you'd be looking at around 1.5 MHz. <S> I tend to add about 20% to the spec as a habit. <S> Next, if you examine slew rate, you need 200mV out at 500kHz. <S> Thus, the peak rate of change 0f a 200mV sinusoid at 500kHz is 0.2V*2*pi*500k, or about 630KV/sec, or 630V <S> /ms. <S> You need a slew rate bigger than this <A> Gain bandwidth product, slew rate and noise are all important. <S> I plugged these (and a few other) values into Linear Technologies search engine and up came three offerings: <S> - The picture is more to demonstrate the website and how easy it is to focus in on what you might want. <S> I preselected the "low noise" op-amps and asked for: - GBW = <S> >10MHzSlew rate = <S> > <S> 5V <S> /usIsupply <= <S> 5mAVsupply = <S> > <S> 5V <S> I also added a few more touches like selected rail-to-rail output and single supply just to narrow the field down. <S> I think the top choice looks good the LT6202. <S> This should take you to the same selection page. <S> LT6202 is worth a consideration <S> AND I'd also take a look at Analog Devices website and all the usual ones like TI and Maxim.
| As for slew rate, you simply need to calculate what is the slew rate of your desired output signal (take the derivative of the sinusoid, and work out the actual rate of slope in V/s), and choose an op-amp that offers a higher slew rate than that.
|
PCIe: Who's in charge here? I want to construct a matrix of smart boards that receive ethernet packets, decode them, and place the decoded results onto a memory "matrix" for other boards to process and re-transmit. Given the available technologies, I suspect PCIe is the way to go. I have a couple of questions for you all: 1) Who controls the PCIe bus? I suspect its the (PC) motherboard processor at a high level, and the PCIe controller at a lower level, but its not clear. 2) Is PCIe designed for lots of small transfers, or a fewer number or larger transfers? I suspect the latter, as the former would kill the motherboard cpu... What do you think? <Q> Yes, it is the motherboard processor is the main controller. <S> Specifically the CPU or the "North Bridge" is the master of the PCIe bus. <S> This is the same as PCI. <S> However a PCIe device can access memory, but it needs to first request the bus from the PCIe master. <S> Some PCIe chips can do DMA where they handle transfers by themselves. <S> This is common for network cards. <S> However there is overhead, so it will provide more throughput with larger transfers. <S> EDIT: <S> PCIe tops out at 5 Gb/s/lane for PCIe Rev 3. <S> It tops out at 16 lanes. <S> That's a total of 80 Gb/s for a single card. <S> That's nowhere near 1 Tb/s, let alone > 1 TB/s. <S> Your goal is going to be difficult. <S> But then I don't think you would want to use PCIe for a > 1 TB/s Ethernet switch. <S> That's > 800 10 gigabit Ethernet ports. <A> This sounds a lot like how high-throughput routers are designed. <S> One of the main problems in router design is exactly the "memory matrix" or "cross-bar backplane" that you describe. <S> The large companies in the space (Juniper, Cisco, F5, etc) do not use PCIe for this purpose. <S> I think a better interconnect might be HyperTransport (which is AMDs solution to the same problem that Intel later developed as QuickConnect for.) <S> Note that in a PC, the PCIe bus sits "after" a HyperTransport bus, and thus HT has lower latency and higher throughput than PCIe can get to RAM (which in turn sits on the other end of the CPU these days.) <A> Once configured, the northbridge, and any other PCIe switches, can do most things without having to involve the CPU. <S> PCIe is really designed for transferring lots of data at a time using DMA. <S> It can do single-word transfers, but it slows down a lot when doing that. <S> Also the read latency is huge (~2 uS), so if you can't accommodate that with large packet sizes and DMA then total system performance can really suffer. <S> If throughput is even a minor issue, then you really need to plan on using DMA to move all of your audio.
| The "North Bridge" (a.k.a. motherboard chipset) is ultimately in control of the PCIe bus, with a lot of interaction with the main CPU and the BIOS/OS.
|
Replacing a 12v battery (model A23) with power pack I have a fan RF remote which runs using the a small 12v A23 battery . Note this is not 23 Amps but the battery model. They can provide something like 50mAh and are quite small. I am hacking the remote for use with a home automation system however have been unable to run it free of the battery. I have tried connecting the battery terminals up to a 12V 2A power supply however it blew up the remote (capacitors I think) and made a burning smell. I had a few of them so assuming I must has used the incorrect polarity I exploded another remote. I am totally at a loss why I cannot run this from a power back, and the only working theory I have is a minimum power draw for my 12v 2Amp supply? Does anyone have any other ideas? Should I risk my last remote on a smaller power pack, say a 12v 600mAh? <Q> Older transformer based power supplies only have the stated voltage close to the stated current. <S> If you measure the 12v 2 Amp or the 0.6 A supply with nothing connected, is it still 12V? <S> Also, even newer switching supplies have a minimum current for stable operation (Typically 10%). <S> That means the 2A supply might need atleast 200mA draw to have a regulated 12v. <S> The 23A is essentially 8 coin cell batteries in series. <S> It is 55maH capacity, and it's internal resistance is unknown. <S> This internal resistance acts like a resistor in series with any connected load, so current would be limited. <S> This is why you can connect an typical LED to a 3v coin cell without a resistor, and not blow the LED. <S> It simply can't provide too much current without it's voltage sagging (voltage droop). <S> A generic datasheet for a generic 23A shows that with a 100Ω load (for 0.3 seconds testing), the battery voltage drops down ~4v from 12v to 8V. <S> That's only 12v <S> / 100 =, or 120mA draw. <S> Basically, what happens is that the battery itself acts like a resistor, preventing high current draw and dropping <S> it's voltage as current draw increases. <S> A remote could have been designed around this fact, as a way to protect the remote. <S> Or your power supply is a unregulated/badly regulated supply . <S> Since the caps blew, this might be the case. <S> Caps normally blow because of high voltage. <S> Test them first, if the 12v 600 mA is 12v without a load, try connecting it to a remote with a 100Ω resistor in series. <S> This should limit it somewhere between 120mA to 10mA draw (depending on how much voltage the resistor drops). <A> The 12V supply requirement for your remote seems to imply that this may be an RF remote. <S> (Most infrared remote controls run on a pair of AA or AAA cells and so this helps support this conclusion) . <S> There are advantages to this including: <S> The technique reduces component count and cost. <S> Less components can lead to smaller size. <S> The circuit works over a wider range of battery voltage as thebattery discharges. <S> In your case you may need to put a current source circuit between your power supply and the remote module to limit the total current to the transmitter. <S> One way to evaluate the voltage versus current draw for your transmitter is to use a variable lab bench power supply that supports adjustable current limit. <S> Set it initially to a very low setting. <S> Then slowly increase the current a step at a time and note the current and voltage at the inputs of your module. <A> As an alternative, try a 9v battery. <S> I just put my garage door remote on a benchtop supply and tried it on various voltages. <S> It did just fine at 9.6 and 9v. <S> All the way down to 7.0v just fine. <S> That was enough to make me happy <S> and I'm about to solder a 9v battery connector in parallel to the A23 (in case I want to go back to 12v A23) and will mount an external 9v low-self-discharge NiMh battery to the remote.
| RF remote transmitters often times use the series resistance of the battery to limit the current into the final output stage of the transmitter instead of using some other circuit design to do this limiting. I've also seen multiple instances of garage door remotes and wireless security system door sensors that operated in RF mode and used these very small 12V batteries. No doubt, a 7.2v NiCad or NiMH pack would also work or two LiIon or LiPo cells for 8v.
|
Voltage drop assumption on diodes (LEDs, etc.) I've always wondered why is it valid to assume some voltage drop (different from the junction voltage drop) on diodes or LEDs from the power up of a circuit. It simplifies the analysis, but it's unclear to me why it is a valid approach. For example, in the question Capacitors charging in a DC circuit , the assumption is a drop of \$2V\$ across the LED. What is the explanation? <Q> Diodes have very steep output characteristics - there are almost no current below some voltage value, and after this voltage is reached the current increase is very steep: <S> This steep increase in current at \$V_d\$ essentially means that no matter what current you'll force through the diode, the voltage will not vary much from \$V_d\$. <S> You can argue that for very large currents the voltage can increase by a significant amount, but in practice this will not happen. <S> What will happen is that when the current increases over a nominal diode's current, the diode will be permanently damaged (short-circuit, open-circuit or some other bad effect). <S> Due to the above reasons, if the diode is present and is conducting - it will have a voltage drop of magnitude <S> \$\approx V_d\$ across it. <S> Now, you may ask: " <S> But how do we know a priori that the diode is conducting?". <S> Good question. <S> We really can't know this a priori , but we can ASSUME that this is the case and perform an analysis of the circuit. <S> After the analysis is done we must ensure that all the voltages and the currents in our circuit are consistent. <S> If they are - our assumption was correct. <S> If, on the other hand, we find that the voltage drop (as follows from the analysis) on the diode is below its \$V_d\$, then it is a contradiction and our assumption was wrong - <S> the diode is in cut-off region of operation and behaves as an open circuit. <A> Here is a table take from wikipedia on the voltage-drop of different LEDs: <S> You can see that for some reds, oranges, yellows, and some greens, 2V is close to the value. <S> I suppose if you were making a circuit with ultraviolet LEDs you could assume 3.5, or 4V. <S> Now if you actually know the forward voltage drop on the LEDs you are using, it would make a lot more sense to use that value. <S> Going off of what echad said, the constant voltage drop model is the simplest one, and speeds up analysis. <S> In reality, voltage drop on diodes have an exponential relationship. <S> Also, there are several different models for analyzing circuits that contain diodes. <S> Taken from a textbook I use at school, <S> Microelectronic Circuits 6th Ed, by Sedra and Smith : <S> Graphical Analysis of the Exponential Model, using a load line Constant Voltage Drop Model <S> Now this is for plain silicon diodes, but the same math holds true for all diodes, just the parameters are slightly different and the drop for LEDs comes out different based on how they are manufactured. <A> There are several ways to model the diode forward characterstics, one of the simplest forms is the Constant Voltage Drop Model Other than that, there's also The Exponential Model Piecewise-Linear Model <S> What makes the constant-voltage-drop model useful is <S> it allows speeding up the analysis of circuits. <S> However you are exchanging quality for time. <S> The exponential model gets you the most accurate answer out of the these three models. <A> It's simply a rule of thumb. <S> Whether the approximation is good enough or not is a function of the question you're asking, why you're asking it, and how accurate do you need the answer to be. <S> For example, often when approximating for LED's, its because you're trying to limit the current so you don't damage the LED, and you're almost shooting for an order of magnitude estimate (well, a tad better than that). <S> Indeed, if you need better, you can parametrize the diodes I-V curve, or do a load line, but these aren't necessarily numbers that you know very precisely <S> (sort of like beta for a transistor, so good electronic designs work even though such parameters can vary substantially. <S> As others have pointed out, the rule-of-thumb voltage drop differs for different colors. <A> It is a valid assumption because of how, or more precisely what, LEDs are composed of. <S> From decades of manufacturing LEDs in a common way , with a common material that we have full understanding of, simplifications and assumptions of how they work are good enough for most Practical use. <S> Your average Red led has a 1.8V to 2.0V drop, based on the semiconductor material used to construct it. <S> Blues tend to be 3.2V. <S> This is the same reason Ohm's Law is used, even though it doesn't take into account Johnson–Nyquist noise or Temperature. <S> This is why Newtonian Physics are still used, even though they are slightly flawed and are largely superseded by Relativistic and Quantum Physics. <S> For most practical, simple uses, approximations are fine. <S> Using a diode or led with a 1.8v drop when you calculate for 2.0v drop won't affect most circuits, unless that 0.2v difference is so important. <S> Same reason me pouring in 2.2oz of butter for my pancake mix instead of <S> exactly 2.0oz won't turn my pancakes into mush. <S> It's close enough that the slight variation won't matter. <A> It's a valid assumption because it's close enough to true that the difference is negligible in many cases. <S> See for example this graph from LTL-307EE : <S> Notice <S> that the voltage axis starts at \$1.2V\$, and over the typical operating range of the diode, the voltage only varies about \$0.6V\$. <S> This is mostly due to the internal resistance of the diode , which in this case is about \$13\Omega\$. <S> If you are going to put this diode in series with a \$4.7k\Omega \pm 1\%\$ resistor, then the \$13\Omega\$ resistance of the LED is quite insignificant compared to resistor you've added, which might deviate \$\pm47\Omega\$ from the nominal value of \$4700\Omega\$. Put another way, that \$13\Omega\$ of resistance from the LED represents a \$0.28\%\$ error in your calculations.
| It's a valid approach just for general cases simply because most LEDs happen to have a forward voltage drop near that value.
|
full load primary and secondary currents of a transformer Why does the question mention "full load currents", what if there isn't such currents, would the transformer function differently? What are the full-load primary and secondary currents of a 25000/240-V, 50-kVA transformer? Assume that the 25000-V winding is the primary. <Q> kVA ratings correspond to full load conditions. <S> By full load is meant the load (obviously, on secondary) which would make transformer transfer it's rated power from primary to secondary. <S> For example when 50 kVA is on full load, it would be transferring 50 kVA from primary to secondary. <S> If primary voltage on full load is 25000 V (as in your case) then primary current should be (50*10^3 / 25000) ampere. <S> If transformer is under-loaded, primary (and hence secondary) currents would be less than full load values. <S> For e.g. if transformer is on half-load (means load connected at secondary is half the full load), then it would drive exactly half current than full load current. <S> Say your full load current is 'I' ampere <S> then you half load current <S> would be 'I/2' ampere. <S> If transformation ration is 'k', then half-load secondary current would be 'I/2k' ampere. <S> If transformer is over-loaded, then it may damage winding and/or insulation. <S> However, if we neglect such effect (and you shouldn't neglect it in practice) then, transformer which is on double-load will be drawing twice the full load current in both, primary and secondary winding. <A> Use basic formula: $$P = 1.732 \cdot V \cdot I$$$$I= {P\over(1.732 \cdot V)}$$ <S> For primary H.T: <S> $$I = {{50 \cdot 1000}\over{(1.732 \cdot 25 \cdot 1000)}} = 1.15A$$ <S> For secondary L.T: <S> $$I = {{50 \cdot 1000}\over{(1.732 \cdot 240)}}=120A$$ <A> The question is asking what the currents would be at full load. <S> If the load is less than full load, then so too are the currents. <A> When the transformer is "unloaded" you won't have voltage drops across the windings. <S> These voltage drops are caused by the resistance of the windings, and are a reflection of the current flowing through them. <S> You can expect the output side of a transformer to exhibit a higher no-load voltage than its under-load voltage. <S> I'm speaking generally, there are other causative effects, e.g., transformer efficiency.
| Now coming to your primary question, if there isn't such currents means that there isn't such load on secondary that can fully load transformer.
|
Does combining two separate transformers double the voltage? Can I wire the outputs of two separate transformers to get twice the voltage? I have two separate, identical transformers from neon signs. Both put out 6000 volts at 30 mA. I would like to use 12000 volts for my project. <Q> In theory, yes. <S> providing you get the phase correct. <S> It would effectively be a 6kV - 0 - 6kV transformer. <S> Would I do it - NO. <S> There is a good chance that the winding insulation will break down and the magic blue smoke will escape - even assuming a 50% safety margin they are not designed for that amount of voltage. <A> Yes, it is possible. <S> However, note that there are two ways to "wire the outputs together", parallel and series. <S> In series, the voltages add at the same current. <S> In parallel, the currents add at the same voltage. <S> With your two 6 kV 30 mA outputs in series, you would get 12 kV at 30 mA. <S> In parallel you would get 6 kV at 60 mA. Note also that the transformers will have a polarity. <S> The output is AC, but you can think of swapping the leads as causing a 180° phase shift. <S> If you connect the outputs in series but one of them is swapped, then you get 0 (to the extent the two transformers are identical and driven identically). <S> Yet another issue is that for the series connection to work as intended, the outputs need to be isolated. <S> A basic transformer secondary is isolated from the primary, but there could possibly be something like a ground connection between one side of the primary and one side of the secondary. <S> This is unlikely since the 6 kV would be much safer if it were completely isolated from the power line and ground, but it could be worth checking the transformers with a ohmmeter between primary and secondary. <S> Of course they must not be connected to anything except the ohmmeter at that time. <S> Then there is the issue of what the insulation between the primary and secondary can take. <S> There will be a 12 kV AC difference from one end of one transformer to the other end of the other transformer. <S> However, both transformers are driven from the same power feed, so the insulation capability between the input and output side needs to be bigger if you connect the two to add their output voltages. <S> That kind of insulation requires deliberate engineering, so very well may not have the extra margin to support a series connection. <A> I have seen a friend of mine using five microwave transformers (2.1kV - 350mA) secondaries in series. <S> The output did effectively become 10kV nearly, but the windings started to arc together. <S> To solve this issue, we he used the glue gun stick to fill all the gap between primary and secondary. <S> It made the problem OK till 8kV transformer but the one with 10kV output still sparked. <S> I would recommend you re-wind these transformers ( if possible ) in the cascaded transformer shape or find alternate transformers. <A> <A> Put the primaries in parallel with complimentary polarity. <S> On the secondaries, both feed separate rectifier circuits feeding common filter capacitor bank. <S> Make sure they are in-phase with respect to the rectifier circuits they are feeding. <S> Both transformers must be identical.
| I think two transformer rectifier output D.c can be connected in series together, howeever if the output rating of one transformer is more then reverse current can flow in the lower rated transformer resulting in damaging the insulation.still the performance will improve abruptly.
|
Securing electrical cables to holes in enclosures? Suppose I would like to insert data-cables of varying diameters -- e.g., a cable of 5 mm diameter -- into the 6 mm diameter hole of a plastic enclosure. The wires within the cable are terminated via soldering to a PCB inside the enclosure. What methods are used in the industry to ensure that pulling the cable won't make it slide in and out of the enclosure (thus preventing damage to the wire connections to the PCB inside)? Some options that I have considered: Two small lengths of thick heat shrink tubing placed around the cable, both just inside and just outside the wall of the enclosure. If the tubing is wide enough, then it will block the cable from sliding. This could work but may have to use too many layers of tubing and also the fit just by friction alone may not be strong enough. Apply a thick layer of rubber-compatible adhesive in a circle around the cable, both just inside and just outside the wall of the enclosure. The glue blob would act as sort of a bolt/washer. This is too messy in practice, and probably not usable professionally. Use rubber-and-steel-compatible adhesive to place two bolts around the cable, one just inside and one just outside the wall of the enclosure. The problem with this is that it is hard to find an adhesive that bonds well to both rubber and steel. <Q> There are a few industry approaches to this. <S> The first is molded cables. <S> The cables themselves have strain reliefs molded to fit a given entry point, either by custom moulding or with off the shelf reliefs that are chemically welded/bonded to the cable. <S> Not just glued, but welded together. <S> The second is entry points designed to hold the cable. <S> The cable is bent in a z or u shape around posts to hold it in place. <S> The strength of the cable is used to prevent it from being pulled out. <S> Similarly, but less often seen now in the days of cheap molding or diy kits, is this. <S> The cable is screwed into a holder which is prevented from moving in OR out by the case and screw posts. <S> Both of those options are a bit out of an individual's reach. <S> The third is through the use of Cord Grips or Cable Glands , also known as grommets . <S> Especially is a water tight fit is needed. <S> They are screwed on, the cable past through, then the grip part is screwed. <S> These prevent the cable from moving in or out, as well as sealing the hole. <S> Most can accommodate cables at least 80% of the size of the opening. <S> Any smaller and they basically won't do the job. <S> Other options include cable fasteners or holders. <S> These go around the cable and are screwed or bolted down (or use plastic press fits). <S> These can be screwed into a pcb for example. <S> Cable grommets are a fairly hacky way of doing it, as they are not designed to hold onto the cable. <S> Instead they are designed to prevent the cable from being cut or damaged on a sharp or thin edge. <S> But they can do in a pinch. <S> As can tying a knot, though that mainly prevents pull outs, but might not be ideal for digital signals. <S> Pushing a cable in doesn't happen too often, so you might not worry about that. <S> Similar to the second method, is using two or three holes in a pcb to push a cable through (up, down, up), then pulling it tight. <S> This moves the point of pressure away from the solder point and onto the cable+jacket. <S> The other industry method is avoiding all this in the first place, by using panel mounted connectors (or board mounted connectors like Dell does for power plugs, yuck). <A> "Strain relief" or "cord grip" is the magic phrase for Google you are seeking. <S> Here's a selection from McMaster-Carr : <S> Cheaper devices might use gobs of glue or knots in the cord, in combination with a simple grommet, depending on the anticipated stress, cost, safety, and regulatory requirements. <A> You want a cable bushing like this: <S> The bushing wraps around the cable and goes into a hole of a certain size. <S> The hole is slightly undersize for the bushing and cable combination together, which forces the bushing into the cable and forces the bushing into the hole so that it won't slide out. <S> Many consumer devices use this bushing for power cord entry. <S> But it is available for cables of other sizes as well. <S> The one pictured is Digi-Key part RP465-ND. <A> YOu are looking for a (probably undersized) grommet <S> You can also tie off chasis ground wires or other unused wires to take the stress away from the signal solder joints
| once inside the enclosure there are a variety of ways to secure the cable, a cable tie on the inside and outside will keep it secure enough to stop sliding completely what the grommet friction won't do.
|
Resistors within a Darlington transistor I've been considering replacing a 2N3904 and TIP31C with a TIP102 in one of my circuits (PWM LED dimmer), and have noticed in the TIP102 schematic resistors leading from each of the bases to the emitters. My current circuit doesn't have these, and I was wondering what purpose they serve and if my circuit should have them regardless. <Q> Those resistors are to speed turn-off. <S> The base-emitter junction has some capacitance, which is made apparently larger in an inverting amplifier configuration by the Miller effect . <S> To turn the transistor off, this capacitance must be discharged. <S> When the base drive is removed, there is no path to discharge this capacitance of the right transistor, because the reversed-biased base-emitter of the left transistor prevents it. <S> If you are making a discrete Darlington pair, including at least R2 isn't a bad idea. <S> If you don't require switching to be too fast, then you may find the transistor switches off fast enough without it, but I'd include R2 unless I was trying to shave every penny from the cost. <S> There are no hard and fast rules for calculating what these resistors should be, but the example you provided gives some typical values. <S> If you make them smaller, turn-off will be faster. <S> If you make them too much smaller, all the input current will go through the resistors, leaving none to drive the transistors. <S> The voltage across R2 is limited to 0.65V <S> by the forward biased base-emitter junction, so current will be: $$ I_{R2} = \frac{0.65V}{R_2} <S> $$ <S> and you can get some idea (just an idea; for an accurate model I'd simulate or build and measure) of how fast turn-off is affected by calculating the time <S> constant formed by R2 and the right transistor's input capacitance: $$ \tau = <S> R_2 \cdot C_{eb} <S> $$ <S> The calculations for R1 are largely the same. <S> However, it should be larger, for two reasons. <S> Firstly, the left transistor doesn't need as much help to turn off, because its base capacitance can be discharged by whatever is driving the transistor; there is no diode in the way as with the right transistor. <S> Secondly, making R1 smaller shunts more current away from the left transistor's base, where it would be multiplied by both transistors. <S> Thus, decreasing R1 decreases gain, because more of the input current is multiplied just by \$\beta\$ <S> instead of \$\beta\cdot\beta\$. <A> There are various reasons for the resistors. <S> The two already mentioned are to speed turn-off and to guarantee the device stays off when not driven. <S> Another reason is to overcome internal leakage. <S> Generally the leakage of a single transistor is low enough to ignore. <S> However, the leakage of the first transistor is multiplied by the gain of the second, which could make it significant in some applications, especially at high temperature where leakage is higher. <S> The resistor around the second transistor causes the first transistor to produce some minimum current before the second will turn on. <S> This can be adjusted to exceed the worst case leakage of the first transistor. <S> Note also that for low output currents, the second transistor could turn on just from the current thru the first resistor. <S> In this case, the B-E voltage and the C-E voltage of the overall device will be lower than for a pure darlington. <A> There are two purposes to those resistors. <S> It removes a floating state. <S> Like if a microcontroller pin is in a high-impedence mode. <S> Which configuration is better for pulling down an NPN transistor's base? <S> has a very long discussion on the use of pull-down resistors on a transistor base.
| As Phil has mentioned, one is to aid in fast shutoff of the transistor. These resistors provide a path for this discharge current. The other is two ensure the pin state incase the base pin is not being driven.
|
How to properly wind coils for a solenoid? I need to wind a small electromagnet "solenoid?". About 3cm high and 2~5cm wide running at 5V/0.5A. This magnet will be put into a desk bell so it pulls the clapper down and rings the bell. I have found ready made solenoids that push out but not pull. So I am attempting to make my own magnet and I have wound several different types of screws, nails and bolts with different types of wire. And now I have noticed a problem with precision :) I can wind a massive coil and it will work but how do I wind a small yet powerful coil? I can't really find a laymans explanation on what diameter core cable to use and how many windings. In general the more windings the stronger the field which is common across all articles I read. I found an article where somebody says that the windings should be wound in the same direction (clockwise layer, clockwise layer...etc) to create a truly stronger solenoid but all articles say just wind them back and forth (magnet?) Can somebody in general suggest what kind of core material and diameter would be the best and if winding the coils in the same direction will actually help. Also is there any difference which way the ends are pointing or do both sides emit the same field? At the moment I have PCB with 3 1000uf caps in parallel to the coil that is triggered by a transistor. I will be using aTiny that triggers the transistor maybe 0.2seconds and I need a jolt of magnetic power to pull the clapper down and release instantly. simulate this circuit – Schematic created using CircuitLab -EDIT This is a project that somebody got working using USB power and winding his own coil. He uses a darlington transistor? Does that influence the coil somehow? I only have a normal transistor. The gap there has to be about 1.5~2cm so the clapper can smack the bell. I have the same bell. He reckons he used 2m of cable to wind the coil... I used 3.5metres and wound it much much neater than his.. BDX53B Darlington transistor 1 x 2200uf 10v cap YouTube -EDIT2 I ended up using a 5v solenoid. Removed 2 capacitors and used the pushing end of the solenoid to kick the clapper out. And DING! It works like a charm. I have no idea how the guy made that electromagnet pull down the clapper?! <Q> Windings that are side by side that carry current in opposite directions cancel each others magnetic field - you need to wind the electromagnet so that current travels in the same direction in all turns of the coil. <S> There is no sensible argument for doing differently. <S> The strength of the magnetic field is related to number of turns and ampere's flowing. <S> For the same number of turns wound on a longer solenoid the field reduces with solenoid length. <S> These are your only options other than to use superconductors! <S> Fewer turns can be compensated by greater current or reduced solenoid length (stacking turns). <S> Here's a calculator you can use to estimate field strength <S> and it uses a field value called permeability and <S> this means you can check on various materials and choose one that gives the highest strength BUT for household coil making a piece of iron is fine. <S> You can also enter the diameter of the coil. <A> Use a soft iron core rather than "screws, nails and bolts" which are probably steel, the high permeability will help concentrate the magnetic flux from your coil. <S> Best to wind with enamelled wire, this is bare wire painted with an insulating coating. <S> Plastic coated wire is too thick to make a good electromagnet, all the insulator area is diluting the effect of your coil. <S> Get the spiral as tightly wound as you can and the entire coil should spiral in the same direction (clockwise). <S> Your 'aTiny' microprocessor will probably need some help driving a coil. <S> Where do you get '0.5A' from? <S> Look up any of the motor driver circuits online that can sink that load. <S> Capacitors alone will not help. <S> Make sure you have a flyback diode to protect the driver. <A> Of course all of the turns on the bobbin of an electromagnet are in the same direction. <S> The "back and forth" refers to the distribution of the windings along the length of the bobbin. <S> A bobbin that takes many turns of wire can be wound very neatly and systematically, or randomly, in terms of the pattern of the distribution of windings. <S> It doesn't really matter; differences in the winding pattern are in the area of audiophile cork sniffing, with regard to inductors that carry audio. <S> For instance, some electric guitarists look down upon machine-wound pickups, insisting they can hear a different response from hand-wound pickups (hand-wound meaning that a machine is used to spin the bobbin and count the number of turns, but a person feeds the wire by hand, controlling the winding pattern). <S> Even if it were true that the winding pattern matters in audio, for the purposes of making an electromagnet, all that matters is the number of turns and their cross-sectional area, not the winding pattern.
| Don't use bare wire as the current will flow across the coils (short) rather than around in a spiral.
|
How to synchronize two microcontrollers to micro-second accuracy? I need to synchronize two micro-controllers so that they can measure the speed of propagating waves. The time delay measurements need have microsecond accuracy (error less that 1/2 of a microsecond). I have two micro-controllers ( ATmega328 ) which use a 12MHz crystal. They are both equipped with Bluetooth transceivers. The Bluetooth transceivers send and receive packets with a jitter of ~15 millisecond. I hope to synchronize the micro-controllers using the Bluetooth transceivers, or some other creative method. I have tried synchronizing them by touching them together, but I need them to stay synchronized for about 10 minutes, and their clocks drifted too fast. Maybe if it was possible to accurately predict the clock drift, this method would work. How should I go about achieving this synchronization? <Q> I don't mean to rain on your wireless parade. <S> You've ran into a tough but unexpected requirement. <S> Something like that warrants re-evaluation of the whole system design. <S> 1st <S> thing that comes to mind is to clock both units off one oscillator. <S> You have Bluetooth communication, which hints that the range is on the order of 10m. <S> You could connect your units with RG174 coax cable or an optical fiber, which would carry the clock. <S> 2nd , there are precision oscillators. <S> In order of increasing precision and cost. <S> TCXO (temperature compensated crystal oscillator). <S> 1 to 3 ppm drift, typically. <S> OCXO (oven controlled crystal oscillator). <S> Drift on the order of 0.02ppm. <S> Some OCXO have drift down to 0.0001 ppm. <S> Atomic clock ( Rubidium standard , for example). <S> I'm mentioning atomic clock mostly to give a frame of reference. <S> More on that here . <S> 3rd , precision oscillator trained with GPS. <S> Every GPS satellite has several atomic clocks on board. <S> Usually, there are plenty of GPS satellites in view. <S> GPS is used for precision timing a lot (less known usage compared to sat nav). <S> Most GPS receivers have a 1PPS output (one pulse per second), which provides timing accurate to 50ns. <S> To have a 0.5μs drift over 600s (10min), your clock (the 12MHz clock in your present design) should have drift less than 0.0008ppm. <S> But if you can correct the timing error every so often from an low drift external source, the requirement for the drift in the clock can be more relaxed. <S> If you can correct every second, then your clock could have a 0.5ppm drift. <A> GPS modules with 1pps outputs are readily available and inexpensive. <S> It isn't really necessary to discipline the CPU's oscillator to the GPS (e.g., with a PLL). <S> You can often use the combination of a hardware timer on the microcontroller, along with a software counter for its overflow events, to create a CPU cycle counter of arbitrary width. <S> It can be tricky to deal correctly with rollover events, both of the hardware counter and the software counter, but in the end, you can have, say, a 32-bit counter that counts at the rate of the CPU clock (giving high resolution) and rolls over with a period longer than the intervals you're trying to measure (e.g., 429 seconds @ 10 MHz). <S> You can use this counter to timestamp different external events. <S> If one of those events is 1-pps pulses from a GPS receiver, then the basic long-term accuracy of the CPU clock becomes a don't-care. <S> The only thing that matters is its short-term stability. <S> You can save GPS timestamps in a FIFO buffer, and compare the timestamps of other events to the values in that buffer. <S> Since you know the GPS pulses are exactly one second apart, you can find the exact time of any other event by interpolating. <S> Suppose \$GPS_n\$ and \$GPS_{n+1}\$ are the CPU-clock timestamps for two successive GPS pulses. <S> You also know the actual (atomic clock) times associated with each of those pulses (from the GPS messages), \$Time_n\$ and \$Time_{n+1}\$. <S> If \$Ext\$ is the CPU-clock timestamp for some external event you want to measure that falls between \$GPS_n\$ and \$GPS_{n+1}\$, its exact time is: $$Time_n + \frac{Ext - GPS_n}{GPS_{n+1} - GPS_n}$$ <S> Finally, if you have this setup running on two separate systems, each with its own GPS receiver, you can compare the times calculated for various events on the two systems with high precision (typically on the order of ±100 ns), even if the CPU clocks of the two systems are not synchronized. <A> I have implemented a wireless clock synchronization for microcontrollers before, but only with millisecond accuracy, which was good enough for the application. <S> From my reading, this paper explains microsecond synchronization quite well: http://www.math.u-szeged.hu/tagok/mmaroti/okt/2010t/ftsp.pdf <S> Essentially, if you have knowledge of the transmission event and the arrival event of a radio packet on the transmitter and receiver respectively, you have a common observable event (assuming you ignore the propagation time of the radio wave) between the 2 systems that can be used as a reference. <S> The other neat feature mentioned in the paper is clock-skew estimation using linear regression. <A> Check out the Bluetooth Clock Synchronization Protocol (CSP) which is an optional part of the Health Device Profile (HDP) <S> The sections in that document that are relevant to CSP are 2.1 & 8. <S> I haven't yet had a chance to try it myself <S> but, as far as I can tell, BlueZ (the official Linux Bluetooth protocol stack) just added support for the HDP , including support for CSP. <S> So even though it doesn't sound like you'll be running on a platform that supports the BlueZ stack, but maybe the code will at least provide a good reference implementation.
| As long as you can "timestamp" external events relative to the CPU clock, it's relatively straightforward to interpolate the time of your wave transmit and receive events between any two PPS events.
|
How are these LCC module pads laid out? It seems like there's something missing. I can't figure out how the rows are spaced relative to each other. The pitch is 1.257mm. The distance between the centers of 17 of them is 20.112 -- that doesn't really add information. What about the 22.578? It seems to be measured from some arbitrary point within the pad to the same point on the opposing pad. The B diagram doesn't show what that point is. It looks like it might align with the right side of the smaller pad in A. If so, that would mean the pad in B could be considered split into a rectangle of length 1.5 (with the rounded 0.4 bit tacked on the end), and the distance between the rectangles (ignoring the rounded part) is 22.578. That spaces opposing rows, and adjacent rows are placed by centering. But this doesn't seem to fit on a grid -- 22.578/1.257 = madness. Am I missing anything here? (And why would someone design something like this?) The module itself looks like this: <Q> The outer dimension provided (22.578 mm in this case) is the size of the square ceramic or plastic body of the intended part. <S> The rounded portions of the footprints provide the touch points for the LCC contacts, which extend beneath the body, as well as to the sides. <S> There is a reason LCC parts will often not fit into a sane inch or mm grid: Typical applications of LCCs use a spring-loaded socket, with either through-hole or surface-mount contacts underneath: <S> ( Source: Wikipedia ) <S> The socket's own pins are generally either single or double row at each side, usually fitting (in your part's case, for instance) a standard grid, say 50 mils. <S> Hence, to allow for the edges of the chip carrier, the chip itself would need to be marginally smaller, but the sprung contacts take care of it. <S> This concept breaks down with newer parts, because the drive for ever thinner sides on chip carriers means that someone will invariably crack the materials strength challenge, and come up with something just-a-bit smaller to save board space. <S> This usually doesn't matter much, as a board designer using a PLCC would perhaps also need to deal with 50 mil grid parts, even 1 millimeter grid parts, and occasionally "just because I felt like it" pitch parts, so a bit here and there is taken in stride. <A> The "B" drawing indicates that the inner end of the pad has an 0.4 mm radius. <S> It appears to me that the 22.578 measurement is between the centers of that radius on the two rows of pads. <A> The pitch is 1.257 mm, the distance from the the end pad measurement point and the center-line of the row /column center-line pads is 1.233 mm (this should have been shown). <S> 20.112 + 2 <S> * 1.233 = 22.578.
| It's very simple: All measurements are relative to the center of the radius on the inner R0.4 mm (the dot in sub section B).
|
uC -> wire -> LED in metal enclosure. ESD/EMI protection I need to blink a LED with a LPC micro-controller. Enclosure is solid aluminum. LEDs will be on a separate PCB 20cm away from uC PCB and protruding from the metal enclosure. What would be the simplest reliable ESD/EMC protection strategy? I am considering transient suppressors, ferrite beads, resistors, but I am not sure whether all is necessary and at which side of the cable (maybe at both sides?) I should be protecting. Thanks in advance! <Q> Neither LEDs nor microcontroller outputs have exposed ESD-sensitive MOSFET gates. <S> If your LED box contains MOSFET drivers then you may need protection there; there are dedicated chips strictly for ESD protection, or you could examine discrete logic chips where the manufacturer has designed the chip for increased ESD protection (e.g. Fairchild Semiconductor's 74HC/HCTxx series) <A> I had to deal with similar setup where an LED is protruding from a metallic non-grounded front panel. <S> By shooting at the panel with an ESD pistol the shortest path for any spark would be over the metallic LED socket to one of the LED pins. <S> I and added a 5V TVS diode between right where the LED is connected to the PCB and the current limiting resistor, which should clamp any voltage spike directly to ground. <S> But i don't know your exact setup. <A> I would use uC >zenner > transistor > clamp zenner > LED , but maybe it is an existing design <S> already also it depends of the application of the device i/e automotive or industrial require a more robust protection than household.
| If your aluminum enclosure is grounded, additional protection may not even be necessary.
|
How to solder wires on to this power barrel plug? I got this power barrel plug. http://www.digikey.ca/product-detail/en/PP3-002A/CP3-1000-ND/992136 It doesn't have any hole for me to put a wire through. The wire just goes into the hole for approximately 0.5cm. How am I suppose to solder this? I also tried crimping it, but it flatten the tube and causes the centre pin to touch the bottom pin. Also I found it really hard to solder even on the bottom pin as the solder doesn't really stick to it. I wonder if anyone could give me some suggestion on how I can attach wires onto this barrel plug. <Q> Tin both wire ends first. <S> Fill the middle cup with solder, and stuff the (stripped) positive wire in while the solder is hot. <S> Push the negative wire through the hole from inside to outside up to the insulation, and solder the wire to the outside of the contact towards the plug. <S> Crimp the arms around both (insulated) wires. <S> Screw the cap on (and oh yeah, don't forget to put it on the wire before soldering anything). <A> I admit that this type of plug is almost impossible to solder well. <S> The center pin is not much of a problem, just strip a very short patch of one wire (center wire of course, if you have a coax-style cable) and solder it. <S> The alternative is to fold the unsoldered wire back to the clamping flaps, and solder it to the flaps. <S> Then you can crimp the flaps if you want, but they are too flimsy to add much mechanical strength. <S> You can also try to crimp the flaps over the wire and not solder it, but I think that will not be reliable in the long term. <S> Crimping and then soldering is likely to melt the isolation of the wrong wire too. <S> But the best alternative is to forget about using this type of plug. <S> Get a prefitted plug+wire (there are some sources), or salvage a leftover wallwart. <A> Also I found it really hard to solder even on the bottom pin as the solder doesn't really stick to it. <S> It sounds like you need a better soldering iron or technique. <S> If you can get it hot enough, and the surfaces are clean (use flux, or at least flux-core solder), <S> the solder will stick. <S> There are plenty of resources, here and elsewhere on the internet, on soldering: How to clean my soldering iron tip or how to determine that it's beyond repair? <S> Soldering Iron Maintenance <S> Which soldering iron tip should I use? <S> What are the best Electronics Soldering Techniques? <S> All of this can be summarized as: <S> cheap tools give cheap results <S> you are soldering something big, so use a big tip the tip and your part and your wire must be clean <A> I always cut the crimp flaps, solder the wire on the flat part and cover it with heatshrink. <S> I used to assemble guitar pedal boards <S> so i have done a few of those. <A> Firstly, you need a holder like a "helping hands" with two alligator clips to hold the barrel plug and the wire in position so that you can concentrate on manipulating the solder wire and the iron. <S> Even if there is no hole for the center conductor wire to go through, it can just be brought into contact with the terminal and soldered on. <S> Prior to bringing in the wires, coat the plug's contact surfaces with solder. <S> The issue of the solder not sticking should be overcome by fluxing the plug's contact surfaces liberally, and using a higher wattage unregulated soldering iron (40W to 60W rather than your 20W used for PCB work), or cranking up your regulated iron. <S> Larger parts like plugs have a lot more thermal mass that sucks away heat, which in turn lowers the temperature at the tip and extends the time required to make a joint. <A> Here is a video tutorial for how to solder a male barrel connector that I made. <S> I am absolutely not an expert and am probably breaking a lot of the rules of soldering, but it took a lot of trial and error for me to finally figure out how to do this in a way that I was happy with both functionally and aesthetically. <S> Having the right equipment makes a HUGE difference. <S> For me this means: <S> A fine-tipped soldering iron <S> Helping hands <S> Clean equipment <S> A very thin gauge of solder that melts/bonds quickly (this allows me to skip the tinning step) <S> Hope this helps!
| For the outer tab you can heat it for some time until solder flows over the desired place, then press the pre-tinned wire onto the soldered part and let it merge.
|
Does higher resolution of LCD/LED display mean higher energy consumption for the very same matrix size If two mobile devices being compared have exactly the same LCD/LED screen (matrix) size and exactly the same battery, will the one with higher resolution have higher battery consumption and thus will require to be charged more often? For example -- two Kiano tablets: Kiano Core 10.1 , 10 inches, 8000 mAh, 800x1200 resolution, Kiano Core 9.7 , 10 inches, 8000 mAh, 1536x2048 resolution. Two devices, the same screen size and battery, resolution nearly twice . Which one should consume battery faster (in any), if both are used in the same way? Which assumption is more correct: Second device will consume battery faster, because it has much more pixels to power. Battery consumption in case of both devices will be quite similar. Second has much more pixels, but since overall screen are a is the same, they're much smaller and therfore will use less energy to power. I'm a beginner and layman (if not -- ignorant) in this area, so I'm much more convinced to the first assumption. But then, the fact that hardware producer decided to equip both devices with the same battery, though different resolution, that would support second assumption. Forgive me for asking in a wrong place (if so). But it is really hard to determine, where questions about mobile devices hardware should be asked on Stack Exchange network. I've seen this , this and this -- non of the answer says, where to ask such question. Both SuperUser and this site FAQ and both says that a question asked in an incorrect place, if it covers: "electronic devices, media players, cell phones or smart phones, except insofar as they interface with your computer". Bot non if these two sites expains, where such questions should be asked. <Q> Power consumption is a function of many factors, besides resolution. <S> However, I think it's fair to say that most of the power of an LCD screen goes into the backlight. <S> So as a first order approximation, screens of similar size will have similar power requirements. <S> But also consider other factors: a higher resolution screen will have more spaces between pixels, and thus, may have less area that's transparent to light, thus making the backlight less effective. <S> Also, especially among phones, many of the screens are transflective . <S> Meaning, they are a compromise between a transmissive display, illuminated by a backlight (works well in low ambient lighting) and reflective, illuminated by ambient lighting (works well in the sun). <S> A screen can't be good at both. <S> A very reflective display can turn the backlight off in the sun, but in low light will need a much brighter backlight because the display isn't as transmissive. <S> A very transmissive display won't need much backlighting in low ambient light, but in the sun will have to crank up the backlight to overpower the sun. <S> So, when comparing two displays, the conditions under which they are compared matter. <S> Also, a display isn't of much use unless it has something to display. <S> It's a reasonable guess that a higher resolution display is paired with a more capable graphics processor. <S> It may be that this additional processing power comes at the cost of higher electrical power. <S> Or, the higher resolution phone may be newer, or cost more, and thus be able to process graphics more efficiently. <S> Or, it could be that a manufacturer included a higher resolution screen as a marketing gimmick and actually didn't beef up the graphics processing to effectively use the additional resolution in all cases. <S> It's anyone's guess. <A> I expect the high-resolution display to use slightly more, but roughly the same amount of power as the lower-resolution display. <S> Most of the power consumed by the display in a tablet like this goes to two primary components: the backlight and the LCD. <S> Typically the backlight consumes very roughly 75% of the energy going to the screen. <S> Most tablets like this one have a CCFL tube backlight; some of them have a "white LED" backlight. <S> It doesn't change the answer for this question -- given either kind of backlight , that backlight will consume exactly the same amount of power no matter what LCD is placed in front of it. <S> Turning the "brightness" down can save a significant amount of energy. <S> As you probably already know, the "liquid crystal display" (LCD) such as the ones in the tablets you mention act as shutters -- they either let the light through, or they block the light, or something in-between. <S> They typically consume the other 25% or so of the energy going to the screen. <S> Some of that energy goes to keeping the liquid crystals "open" (or "closed").A cluster of 4 pixels requires exactly the same power to keep the liquid crystals "open" (or to keep "closed") as a single pixel 4 times the size. <S> Some of that energy is lost due to parasitic capacitance of the INO transparent "wires" on the screen. <S> The total row capacitance and the total column capacitance is about the same for the two screens, so the amount of energy required to update a row (charging and discharging every column line across the entire screen) is the same. <S> However, the higher-resolution screen has more rows to update, so assuming the same full-screen update rate, it requires more power. <S> As a side effect of the screen having a higher resultion, the CPU and the CPU-to-display bus will have to do a little more work dealing with more pixels. <S> There are a few things that require more energy for the higher-resolution screen. <S> So I expect the high-resolution display to use slightly more, but roughly the same amount of power as the lower-resolution display. <A> Think about how much light is needed to come from each display per square centimetre or square inch - this of course is a vast generalism but if the higher resolution screen (the same size) pumped the same power into each pixel it'd be a lot brighter. <S> Does it need to be brighter? <S> Maybe, if folk have complained that the lower resolution screen is dim! <S> I suspect that the higher resolution screen need only consume the same power as the lower reso screen because it is bright enough. <S> There is of course small print - more pixels needs more column/row drivers and these aren't 100% efficient <S> so maybe there is a tad more power in the higher reso screen <S> OR maybe they have boosted the efficiency of the LEDs a tad.
| Yet, a higher resolution screen is likely to be newer, or more expensive, and may utilize different technologies that improve the backlight efficiency or effectiveness. So the things that use up the most power use exactly the same amount of power no matter what the resolution. So, I don't think your question is answerable, in the general case.
|
Any benefits from implementing CSA versus just using multiplication symbol when synthesizing? I am synthesizing some multiplication units in Verilog and I was wondering if you generally get better results in terms of area/power savings if you implement your own CSA using Booth Encoding when multplying or if you just use the * symbol and let the synthesis tool take care of the problem for you? <Q> If your synthesis tools are any good then you should use the * operator, set reasonable constraints, and let the tools do the heavy lifting. <S> This is particularly true for FPGAs, which may very fast and dense multiplier cells. <S> The Xilinx Spartan-3 series, for example, has some very nice 9x9 multiplier cells. <S> If you insist on writing logic equations for your own CSA multiplier the synthesizer may not be able to infer that you really want a multiplier, and the result would use lots of LUTs while the multiplier cells sit idle. <A> Let synthesis tool decide. <S> In fact, given the very broad optimization strategies present in today's synthesis tools, the best you can manually get in terms of performance/area/power is the same (and there is good chance that your manual implementation will be worse). <S> The only scenario (in my opinion) when you won't let synthesis tool to take care of multiplication is when there are standard libs/modules for multipliers available (libs in ASICs, modules in FPGA). <S> This approach is sometimes used in critical parts of the systems (critical in terms of performance/area/power). <S> These cells are tailored for a particular usage (at layout level) and there is no chance that RLS will do better than that. <A> Unless you are setting some internal nodes of your Booth encoding multiplier as outputs, the synthesis tool will derive the low-level logic. <S> Since the input and outputs of the two approaches are exactly the same, a good synthesis tool would optimize them in the exact same way, and the result would be no different. <S> The only way you could force the synthesis tool to implement a booth multiplier is if you divided it into multiple blocks and disabled boundary optimization.
| Unless you are interested in the intermediate results of multiplication, there will be no high gains in manual approach.
|
Can a diode fail to open position? I know a diode can short out and fail closed. Is it possible for a diode to fail in the open position, and what would cause this to happen? <Q> A diode fails closed due to overvoltage. <S> This is called punch-through . <S> This is is the principle used in ESD diodes. <S> If they can't handle the voltage the PN juntion fails and short to ground, protecting any circuitry after them. <S> On the image you see a small black dot where the voltage went through the junction. <S> eg: <S> *Second picture added that shows this better on a BJT. <S> A diode typically fails to open happens due to over current. <S> This is called metallization burnout and can occur from things like EOS (Electrical Over Stress). <S> Image shown bellow. <S> Over current causes excessive heating and literally burns the metal away. <S> As mentioned above this is easy to demonstrate on LEDs as their current carrying capability is much lower than rectifier didoes. <A> Diodes fail open all the time. <S> Sure, they are of the light emitting variety, but they are still diodes. <S> Why do they fail open? <S> Thermal Runaway, cause by increased voltage increasing the current through the led junction, causes Heat to literally fry the diode junction. <S> It then goes poof, no more junction. <S> It physically can't conduct any more electrons. <S> This is separate from the led bond wires melting or breaking. <A> A diode will typically fail open if one of the bond wires from the leads to the actual semiconductor opens like a fuse. <S> To verify the contention made in a recent answer to another question, I applied a high voltage pulse without current limiting, using a capacitor bank, first to a couple of no-name LEDs, once forward and once in reverse bias, and later did the same to a couple of 1n4148 diodes. <S> All the diodes failed open. <S> The LEDs were more spectacular, with the cases cracking open, but the 1n4148 diodes failed with the same end result. <S> So yes, a diode can fail open. <A> By "fail open" I assume you mean fail in such a way that it doesn't conduct in either direction. <S> It is possible for a diode to fail open. <A> As far as I know, the only way for a diode to fail open is when it fails destructively, i.e.: <S> Leads or bond wires get destroyed <S> (this very often happens with LEDs, which have comparatively long and thin bond wires from the lead to the silicon/sapphire) For Schottky diodes: the metallization-silicon interface gets heated beyond the range of temperatures where they thermally match, and heat stress peels them loose <S> For low and medium energy situations, the dominant failure mode of diodes is to fail closed. <S> Open failure is usually a subsequent event, not a seperate failure mode. <A> Sure. <S> Just a little while ago I pulled an IN749A Zener out of a Tektronix T922 oscilloscope. <S> It had been said to be a failure-prone part in this scope <S> and it affected triggering, which is what's jacked up <S> so that's why I went after it first thing. <S> I pulled the diode and went at it with a DMM, and sure enough it was reading many megohms in both directions. <S> In the circuit it sits in series with a 620-ohm resistor between the -8VDC supply and ground, and the node in between the two is apparently used as a 4.3V reference <S> so the diode is reverse-biased into its Zener voltage drop all the time. <S> I guess this poor IN749A could only live for so long like that (the scope was built in 1977) <A> I repair and design vintage electronics and every failure mode ends up being weird. <S> Just pulled out 2 1n4002 diodes out from a bipolar power supply of a 1970's Maestro ps1a phaser that looked to be slowly cooking for a while. <S> The positive 12v supply would only show .7v <S> under load of the op amp and transistor circuit (which probably has a failure yet to be found) <S> but when isolated worked properly +12v and tested properly except a varying forward drop off voltage. <S> .5 <S> to .6v on my DMM. <S> After pulling them out and testing new ones sussessfully, I tested the forward resistance at 100k. <S> Hope this helps.
| I've applied too high a voltage to a diode and had it fail open.
|
Voltage regulator for 0.1mA load, with lowest possible power draw I want to make a circuit that will provide 2.05V regulated DC from the li-ion battery voltage range of inputs (3.3V - 4.1V). The load is almost nothing, approximately 0.1mA. However, this regulator must be extremely low-power-draw, ideally not drawing more than 1mW. Any suggestions for the simplest possible circuit that can accomplish this? <Q> There are lot of Low Quiscent Current regulators available on market. <S> CHeck the specifications of GND current, Quiscent Current. <S> One of them are 1. <S> ADP160/162/161 <S> - 560nA2.TPS780xx series - 500nA there are other regulators with 1uA Quiscent Current like NCP551/NCV551, some from microchip also. <A> The parametric search on the web sites of several of the usual LDO manufacturers would yield some options. <S> For instance, Texas Instruments <S> TPS76201-Q1 : <S> Adjustable Output Voltage: 0.7 V to 5.5 V 27 uA Quiescent Current at 100 mA load <S> 1 uA Quiescent Current <S> if the enable pin is driven high <S> The typical application circuit is simple as well: <S> At the stated operating conditions, power dissipation in such linear regulators is: P = <S> (4.1V - 2.05V) <S> * 0.127 mA = 0.26035 mW in a worst-case calculation. <S> P = <S> (4.1V - 2.05V <S> ) * 0.1 <S> mA <S> + (4.1V * 0.027 mA) = 0.3157 <S> mW <S> in a worst-case calculation. <S> ( Thanks, markrages , for the correction ) <S> Still well under the 1 mW power budget specified in the question. <A> Another LDO for consideration is STLQ50 . <S> The STLQ50xx is a BiCMOS linear regulator specifically designed for operating in environments where very low power consumption is required. <S> Its very low quiescent current (3 µA) results in extended battery life, making the device suitable for applications which have very long standby time. <S> Key Features 2.3 V to 12 V input voltage range <S> 50 mA maximum output current <S> 3 μA <S> quiescent current Available in 1.8 V, 2.5 V, 3.3 V, 5.0 V and adjustable voltage 200 mV dropout voltage at 25 mA output current Internal thermal protection Available in SOT323-5L package, and SOT23-5L package (upon request) <S> The very small SOT323-5L package option is nice, we use it in one of our battery powered products.
| There are several low quiescent current adjustable output low drop-out linear regulators that meet the criteria given in the question.
|
Convert 320VDC to 220VAC or 48VDC voltage using 220VAC (UK) UPS? I've got access to 12 flexible Solar Panels - 320VDC each Main voltage is 220VAC (here in the UK) and also might buy an electric engine running at 48VDC . Would a 220VAC Uninterruptable Power Supply (UPS) be able to step down the 320VDC to either 220VAC or 48VDC for use on a boat? I'm thinking of connecting 12 panels in parallel and use either: Double-conversion UPS to deliver 48V by bypassing the conversion from the battery back to 220V Line-interactive UPS to deliver 220V directly from the 320VDC. The question is would the UPS's surge protection be able to deal with the high voltages? (Keeping in mind the sun isn't real bright in the UK). Also with regard efficiency will there be a lot of power loss in the system? I don't really know how surge protection from overvoltage works in UPS's and assume it uses some kind of buck conversion...is it true? I'm guessing that the surge protection circuits might struggle with continued voltage overload. Does anyone know if this would be the case? The question is: Will the UPS's be able to reliably deliver either 220VAC or 48VDC? Here are the specs for each individual panel: Open circuit voltage(Voc): 429V Optimum power voltage(VMP):319 V Short circuit current(Isc): 0.39A Max operating current(IMP): 0.288A torrence:+_5% Maximum system voltage: 1000V THERMAL CHARACTERISTICS: (-25 ° C to +90 ° C) Temperature coefficient ɑIsc +0.08%/ ° C Temperature coefficient ɑVoc -0.35%/ ° C. Temperature coefficient ɑPmax -0.15% / ° C. Over-current Protection 30mA <Q> Solar energy from solar panels, when not being able to be consumed at the rate at which it's being produced (almost always the case), has to be either of the following: - stored (usually in a battery) or - fed back to the grid (e.g. a grid-tied system), or - dumped into a dummy load (usually just beefy resistor packs) to convert the energy to heat the energy has to go somewhere. <S> So it sounds like what you're interested in using the UPS as the battery bank, but your UPS system probably is designed internally to only charge its batteries from A/C power, where as your solar panels will give you D/C. <S> then the A/C back to D/C within the UPS <S> (and eventually you might want to go back to A/C for your appliances running off the UPS). <S> What you might try instead (although this is hardly trivial) is to disassemble (carefully) and try to tap into the battery banks of the UPS directly and figure out what voltage it works at (likely 12, 24, or maybe 48 volts DC). <S> You could then theoretically step down your solar panel's output using some kind of custom (or off the shelf, it anyone knows of one) DC-DC converter, then you can feed that into a battery charger, preferably an MPPT type one. <S> Those kinds would adapt the incoming power to what would be most suitable to charge the UPS batteries to do maximum power point tracking (what MPPT stands for) and reach upper-90% efficiency. <S> Or if possible (and i don't know <S> if it is) re-arrange <S> the solar panels such that they don't give you 320 volts <S> (are you sure you don't mean watts?) but give you a lower voltage at a higher current rating. <S> Otherwise you'll likely be hard-pressed to find a battery charger that accepts 320vdc to charge the batteries of your UPS. <A> Internally a lot of UPSs (and other high power mains devices with non-resistive loads) use 315Vdc internally, this is because of the rules on power factor correction (PFC) for mains connected kit. <S> Often the simplest and cheapest means of achieving PFC is to convert the AC to DC at a high voltage using a DCDC (this is called Active PFC). <S> The output voltage is this high voltage bus passed through a second DCDC or DCAC converter. <S> Also, even non-PFC 'off-line' power supples often simply rectify the mains AC into DC at the front end, so you could just find an off line UPS that uses such a circuit. <S> So, if you find a UPS that uses a Active PFC front end, theoretically you could just connect the DC output of the panels direct to the bus, bypassing the PFC. <S> However, I would seriously not recommend doing this because without a circuit diagram it would be impossible to know what might go wrong and cause a fire or risk of electric shock. <S> Also, the output of the panels, though nominally 320Vdc would rise and fall, this might put stress on the circuit that was not designed to operate over such a large range compared to what normally comes out of a mains socket. <S> Bottom line: <S> If you need to get AC from solar panels I would recommend using kit designed for the purpose. <A> A 230VAC, that's "AC", input is quoted as 230V "RMS". <S> That means a (sinewave) peak value of230 x 1.414 Volts which is approx 325Volts. <S> AC enters the SMPS through a filter and is rectified (turned to DC) and thatvoltage (325-ish minus a coupleof volts across the rectifier) is stored on a "reservoir" capacitor. <S> I suggest that an input of 325V "DC" would amount to the same thing. <S> Theonly caveat I can see is there isa 100% duty cycle on 2 of the rectifier diodes which may be problematic.(You could upgrade the diodes?). <S> The off load output (or open circuit) of 429V cannot be ignored as SMPSspresent a low/very low impedancewhen not supplying a load so you would have to use a power supply that takesan input of AT LEAST 305VAC(429 x 0.707) AND can operate below 225V though SMPSs usually have quite arange of operating voltage. <S> I don't envisage a problem with voltage spikes as the system wouldn'tproduce them. <S> The maximum paneloutput is 429V and is a feature of the construction of the device. <S> Thesupply could only "surge" up to that levelif there was enough light and no load on the SMPS. <S> Of course you really have to look closely at the spec and graphs as therecan be hidden pitfalls in the actualoperation of any device.
| You could theoretically (but maybe not very practically) use an inverter to convert your D/C to A/C (if one such inverter existed with such voltage levels input/output specs, wouldn't really surprise me though), and then feed that A/C into the UPS (since the inverter would essentially just give you a normal wall outlet to use), but that would probably just be rather wasteful (e.g. not efficient due to the D/C->A/C in the inverter and
|
Pseudorandom bit generator: analogue circuit for microcontroller digital input I want the most cost effective way for a basic pseudorandom number generator in a microcontroller. I will use the PIC16F54 which has extremely limited resources. I am thinking about using noise with simple analogue circuitry to generate random 1's and 0's at one of its digital inputs. The degree of randomness is not critical. However, the level of EMI noise that the circuit will be subjected to is unknown, besides the fact that it will be in a residential setting with little or no shielding. Are there any particularly simple low-cost circuits that could be used? Or should I simply focus on some basic algorithms? (There will be one random seed generator: a push switch, after which the algorithm could do its thing. I should probably ask on Stack Overflow for some simple algorithms). <Q> Make sure the ADC pin is not pulled high or low. <S> Using the differences eliminates any specific bias on the ADC pin, and provides a random sequence of zero-biased values. <S> Depending on bit depth required, add up a series of such values if necessary. <S> The method lends itself to easy experimentation, so you can know pretty quickly whether the approach is providing sufficient entropy to meet requirements. <S> If greater entropy is needed, connect an open wire to the ADC pin to provide greater sensitivity to external electric fields. <A> You ask for an analog solution, but digital uses even less resources! <S> I'd recommend implementing a linear feedback shift <S> register on the microcontroller to generate a psuedorandom bit sequence, and break the sequence up into appropriate chunks. <S> This will take a few bytes of memory, and some shift and logical operations. <S> The math is well understood. <S> You need to select your feedback bits carefully, and the more bits you spare for this purpose, the longer your pseudo random sequence will be. <S> THIS LINK has the good feedback bits for up to 33 bits. <A> Transistors can generate some very "good" noise. <S> https://mywebspace.wisc.edu/lnmaurer/web/minirng/minirng.html <S> This is a fine example but the idea is that if you don't fully bias a transistor, it will output noise. <S> I haven't tried his particular circuit but I don't see any problems with it. <S> Noise diodes are actually the best for these types of noise sources but are trickier to screen and probably overkill for your application.
| Given that the degree of randomness is stated as not critical: One random number generation mode that takes minimal resources is to read an open ADC pin within the code, and use the difference between one reading and its previous as a random number source.
|
Overflow detection in a CSA (Carry-save Adder) How do you detect overflow when you have a CSA? I have 3 16-bit two's complement inputs and a 16-bit output and I'm wondering how do I detect overflow? <Q> In a carry-save adder there are three inputs and two outputs. <S> Many different output-pairs represent the same number. <S> Carry-save adders have no carry-propagation overhead, so they are good for adding together many operands at low latency, but the cost for that speed is that you don't really know anything about the result (even whether it is positive or negative) until you add the final two outputs together using a "normal" adder (e.g. ripple-carry, carry-select, carry-skip, or carry-lookahead.) <S> I know of no way to determine overflow just by looking at most significant bits ( <S> like you can in an adder that carries.) <S> For example, here's an example that overflows in 3-bit 2's complement (3+3-2 = 4). <S> 0 <S> 1 1 <S> (3) 0 1 1 (3) 1 1 0 (-2) <S> ----- <S> 1 1 0 <S> (-2)0 1 1 (6) And another with all the same most significant bits that doesn't overflow: 0 1 1 (3) 0 1 1 (3) <S> 1 0 1 <S> (-3) <S> ----- <S> 1 0 1 <S> (-3)0 1 1 0 (6) <A> I had to dig back into my 68HC11 manual to figure out where I was going wrong in my answer. <S> So! <S> The answer is to look at the sign bits of both the inputs and the results. <S> If you add two positive numbers and the result is negative, you'vehad an overflow. <S> If you add two negative numbers and the result is positive, you'vehad an overflow <S> The addition of a negative and a positive number can't overflow <A> The addition will overflow if \$C_o = S = 0\$ and \$C=1\$, i.e., all positive numbers in, but the sum can not be represented in the corrsponding two's complement represenation (although you way actually end up with a positive number at the end caused by double overflows) or \$C_0 = S = 1\$ and \$S=0\$, <S> i.e., all negative inputs but too high magnitude <S> (but it may still result in a negative number because of double overflows). <S> The overflow in the final addition (carry-save to non-redundant form) is detected as usual (comparing the two final carry bits, <S> if they are different there is an overflow, as we will see, checking signs is not feasible). <S> Example 1: 011 <S> 011 +011----- 011 <S> carry 011 sum Overflow as \$C_o = 0, S = 0, <S> C = 1\$ <S> 110 <S> +011 <S> ---- <S> 001 <S> Here, another overflow happens at the end (although this is not detected since from a two's complement perspective <S> \$-2 + <S> 3\$ does not overflow) <S> so a positive number is obtained despite the overflow. <S> Example 2: 010 <S> 010 <S> +110----- 010 <S> carry 110 sum <S> No overflow as \$C_o = 0 <S> , S = 1, <S> C = 1\$ <S> 100 <S> +110 <S> ---- <S> 010 Correct answer! <S> However, it appears as an overflow has happened looking at the two's complement addition. <S> This can be solved by replacing the sign-bits as \$S' = <S> C_o\$ and \$C'= C <S> \oplus S <S> \oplus C_o\$ (this will also make the carry-save represenation shiftable) leading to 000 <S> +010 ---- <S> 010 <S> and no overflow detected (which is correct). <S> Example 3: 011 <S> 011 <S> +111----- 011 <S> carry 111 sum <S> No overflow as \$C_o = 0 <S> , S = 1, <S> C = 1\$ <S> 110 <S> +111 ---- <S> 101 <S> No overflow detected here <S> neither, although there is one. <S> Replace the sign-bits as discussed above: 010 <S> +011 <S> ---- <S> 101 <S> Now, since the incoming carry to the final stage (1) is different from the outgoing (0) <S> there is an overflow detected, which is of course correct since \$3 <S> +3-1\$ is out of the \$[-4,3]\$ range possible <S> All this is suggested and discussed in "Carry-save architectures for high-speed digital signal processing" by Tobias Noll.
| You can detect overflow after the CSA using the two most significant carry-bits, denote \$C_o\$ (the bit that is discarded), and \$C\$, and the most significant sign-bit, \$S\$.
|
Why is flyback air gap needed for energy storage? Why do so many sources say something along the lines "since a flyback transformer stores energy, an air gap is needed"? I have seen this reasoning in textbooks and app notes. I thought air gaps cannot store energy and I thought also a flyback transformer stores energy with its inductance, and an air gap reduces inductance so I would think it also reduces an inductor/flyback's ability to store energy. Where am I confused? <Q> Unlike a forward-topology transformer (where the primary and secondary windings are conducting at the same time), the flyback transformer must store energy during the primary switch on-time, delivering it to the load during the primary switch off-time. <S> A forward-topology transformer doesn't need any gap since the peak flux density is a function of the applied volt-seconds only; the power being delivered 'through' the transformer isn't a variable (other than its effect on duty cycle). <S> It's only the magnetizing current that moves the core along its hysteresis loop, which doesn't pose any saturation risk if everything is well-designed, since the primary and secondary ampere-turns cancel each other out. <S> A flyback transformer doesn't have the ampere-turn cancellation benefit of a forward converter, so the entire \$ \frac{1}{2}LI^2\$ primary energy moves the core up its hysteresis curve. <S> The air gap flattens the hysteresis curve and allows more energy handling by decreasing the permeability of the core. <S> You will of course need to add more turns to get your desired inductance compared to no-gap, but you avoid core saturation. <A> The term "Flyback Transformer" is a little misleading and its more useful to consider it as coupled inductors rather than a transformer because the action is quite different with a conventional transformer energy is going into the primary and out of the secondary at the same time it does not store energy. <S> With a "Flyback" transformer energy is first stored then released. <S> Taking some things we know about inductors $$v = L \frac{di}{dt} = <S> N A \frac {dB}{dt}$$ <S> Where v is voltage, i is current, <S> N is turns, B is flux density and A is the effective magnetic area. <S> Also $$H = <S> \frac <S> {N \ i}{l} \Rightarrow i = \frac {H \ l}{N} <S> $$ <S> where H is the magnetic field strength, N is turns and l is magnetic path length <S> Finally permiability $$ \mu = \frac {B}{H <S> } \Rightarrow H = \frac {B}{\mu} <S> $$ <S> Thus $$ <S> i = <S> \frac{B <S> \ <S> l}{\mu <S> \ <S> N}$$ <S> Now we can calculate Energy $$$$\begin{align}Energy & = <S> \int{i <S> \ <S> v} \ dt\\ & = <S> \int{\left( \frac{B \ l}{\mu \ <S> N} \right) <S> \ <S> \left <S> ( N A \frac {dB}{dt} \right)} \ <S> dt\\ & = \frac {A \ l}{\mu}\int{B} \ dB\\ & <S> = \frac {A <S> \ <S> l}{\mu}\frac{B^2}{2}\\\end{align}$$$$ <S> The energy storage is therefore only possible in the air gap and is proportional to be air gap volume and the square of the flux density. <A> Contrary to what most people think, including yourself, most of the useful energy is stored in the gap of the core. <S> For the case of ferrite, the gap is distributed between the tiny metallic particles so it too has as an effective gap used for calculations. <S> This gap linearizes the BH loop and increases the current handling before saturation.
| The key point here is that without an air gap an inductor will saturate if you try to put any current through it so inductance will fall and you can't store any energy.
|
What are some design concerns for off board SPI communication? Overview: I am communicating among 3 custom pcb boards with dspic33's on them using SPI. I have a master and 2 slaves, but I am sending both the slaves the same data (and letting them choose what to pay attention to). Hardware setup: The two slaves have built in BLDC motor controllers and the Master is controlling these motor controllers over SPI. The wires are run about 3 feet from the master to each slave and the headers are typical .1" pitch through hole SAMTECH headers. Each motor controller has it's own 3.3 volt regulator that runs the dsPIC/LV electronics. I use one motor controller regulator(lets call him A) to also power the SPI master DSPIC. To the other motor controller(lets call him B), I just run the SPI lines and ground from the master. The SPI clk is running at 100KHz Getting to the point (Finally): With no motors running this all works fine, all data comes through as expected to both slaves. However, when I start up the motors, Bslave no longer gets the correct data. He is either picking up extra clocks or dropping them, I am supposing do to the extra noise. In any event his checksums start failing. Aslave works like a champ no matter what. 1) Would you expect that all these devices need to be ran off the same 3.3 volt source? If so, can you convince me by talking about the longer inductance loop and black magic such as that. 2) Do you have any kind of rule of thumb as to how fast I can expect to be able to run the SPI clk and have success with a hardware setup such as above? <Q> Carefully consider your grounding scheme. <S> Don't run data and clock on the same twisted pair. <S> Use galvanic isolation if needed. <S> Other than that <S> , there are no rules of thumb that I aware of. <S> SPI was designed for (1) short range communication, usually within one PCB and (2) in the environment with not a lot of EMI. <S> Perhaps, the only buses that perform worse than SPI in presence of EMI are I 2 C and 1-wire. <S> There are buses, which were designed for long range communication in the presence of EMI (RS-485, CAN, Ethernet). <S> It's possible to extend and ruggedize the SPI. <S> Here's an application note , which shows an SPI bus with differential lines. <A> SPI is no different than any other electrical interface. <S> and you can run it a reasonable distance. <S> What's a reasonable distance, it depends on what you are doing with it and how well you can control the various factors. <S> Can you run it 3 feet? <S> Certainly. <S> Should you? <S> Well, there are better things to use. <S> You can also run SPI, but use the differential signaling over the cable like RS-4xx. <S> This will use up more wires, but those are the breaks. <S> You can also do normal RS-485, using a UART and the like. <S> I personally have ran SPI over 1 foot cables, inside a chassis, at rates up to 32 MHz with no issues. <S> I have also ran I2C over 4 feet at 100 KHz in a high EMI environment and SPI is a whole lot better than I2C-- <S> so it can be done. <S> But if you don't pay attention to the details then you can easily run into problems. <S> But honestly, you need to pay attention to the details regardless of what you use. <A> I've run SPI (2MHz clock) about 5m from 1 box to another box <S> and I didn't hesitate in designing the clock and data to be balanced output. <S> The (custom) cable between the two also used twisted pair and screen on both data and clock . <S> I also sent isolated power to the remote box via dc-to-dc convertors. <S> I didn't have enough time to get this one wrong so possibly my solution was an overkill <S> but hey, it worked. <S> My reasoning behind this decision is that I didn't want "current consumption" spikes going down the screens of the twisted pair. <S> The screenes were not connected to ground at the PC sending end. <S> Treat digital signals like precious analogue signals to get the best performance - always have your screen terminated at the receiving end and if you must (for whatever reason) terminate grudgingly (as well) at the send end. <S> It was for transmitting 128 channels of low speed analogue signals to a break out box from a PC. <S> I suspect, that if I'd needed to I could operate this at 20MHz clock. <A> There are a few ways to minimize the effects of noise on your signal lines. <S> The easiest way is to route a copper plane or a copper trace adjacent to your signal traces. <S> This minimizes the inductance of the traces and loop area. <S> At high frequency the return currents like to run a least impedance path adjacent to the signal lines themselves. <S> I assume you have a common ground between your circuits but <S> this may be causing problems for high frequency signaling if your common ground is simply a "power" ground connection between the circuits. <S> It will cause a very large loop area for the signal currents which may enable a lot of noise injection due to stray magnetic coupling. <S> If you can, connect a extra ground connection between the grounds adjacent to the SPI signal lines in addition to keeping a copper ground plane or trace routed adjacent to the lines inside the boards as well. <S> It may make a world of difference in how susceptible your circuit is to the motors.
| Pay attention to the usual signal integrity issues (shielding, loop area, impedance, signal termination, etc.) As others have pointed out, there is RS-4xx that could work well. Shield the data lines, if it helps, and ground the shield properly.
|
How much current can my 74HC595 handle on each output pin? So, I've been checking out the datasheet and I've gotten pretty confused... At the top it claims that 6mA drive at 5V but farther down in the absolute maximum ratings it says that the outputs can be up to 35mA. So, my question is, how much current can each output pin of the chip take? I'm using it for a controllable line of LEDs and I need to figure out what resistor value to use. <Q> What it means by 6mA at 5v, is that at 6mA, the output voltage level of that output will be fairly close to 5v (or VCC). <S> The more current you source out of an output, the lower that voltage will be. <S> This is called Voltage Droop, or Sag. <S> Same goes for sinking current, with the voltage level rising, so instead of it being 0.0 or 0.1, at 20mA it might be 1v. <S> Notice that at a VCC of 4.5V, Voh (Voltage Output High), at Ioh (Current output high) -20µA (or -0.02 milliamps, the - indicating sourcing current) <S> the typical is 4.499 volts. <S> While at -6 mA, the typical is 4.3? <S> Your output just lost 0.2v with only 6 mA of current draw. <S> Anything more, and that drop will increase an untested amount. <S> Some datasheets actually have a graph for this. <S> This one does not. <S> Ex. <S> At 35mA, you might not be able to light an led. <A> Under "Absolute Maximum Ratings" the datasheet gives 70 mA for the maximum continuous current through the Vcc or GND pins, so I would limit the individual output currents to less than 1/8 of that, or 8.75 mA if it is possible that all channels may be driving in the same direction at any time. <S> Under "Electrical Characteristics <S> " it gives the ouput voltage for 7.8 mA, with 6 V Vcc and 5.2 mA at 4.5 V Vcc, so I'd try to stay under ~6 mA with a 5 V Vcc. <A> Page 27 of SCLA007A, "HCMOS Design Considerations" , "Drivers for LEDs and Relays", states that "[the recommended] operating source or sink current for HCMOS devices is 5.2 mA. <S> Several SN74HC gates can be tied in parallel to drive LEDs and relays. <S> " Limiting current to that amount per gate will be safe.
| So you can draw more than 6mA, up to the max Io output current of 35mA (plus or minus) on a single output, but the voltage level will change to the point where it might not be useful to you.
|
Is this a bidirectional buck/boost converter I found this interesting IC on Linear Technologies site, but I don't understand if it, or its development board, can both boost input voltage to output and buck output voltage back to input. http://www.linear.com/product/LT8705#demoboards Board: http://www.linear.com/demo/DC1924A I want to use it (or whatelse) to connect a 500F/2.7V supercapacitor to my 60V electric scooter, which do not have regenerative breaking, hence I must use the battery to recharge it.I just need a 5 seconds boost every some minutes. <Q> I don't understand if it, or its development board, can both boost input voltage to output and buck output voltage back to input. <S> LT8705 is the IC and using LT8705 is the evaluation board/development board is DC1924 <S> Power Control Switch <S> Datsheet shows a simplified diagram of how the four power switches are connected to the inductor, VIN, VOUT and ground. <S> Figure also shows the regions of operation for the LT8705 as a function of VOUT -VIN or switch duty cycle DC. <S> The power switches are properly controlled so the transfer between modes is continuous. <A> TI has some buck converters which can, as you mentioned, buck down in forward path and boost back in the reverse path. <S> TPS54320 is one of them. <S> However, what you really seem to need is a buck-boost converter as you would want to use all the energy stored in the supercap by draining the voltage all the way close to 0. <S> For that, you should be able to reconfigure most run of the mill buck converters in the way this app note tells us: http://www.ti.com/lit/pdf/slvu243 <S> I am not sure if the IC discussed in the app note <S> is capable of bidirectional power, but if you take care of the modified control loop, you should be able to use TPS54320 for what you want. <S> The same set of switches, control loop should automatically regulate the rail of the motor drive supply. <S> And also provide a shunt energy buffering circuit. <A> "The LT®8705 is a high performance buck-boost switching regulator controller that operates from input voltages above, below or equal to the output voltage." <S> A buck boost concept is not that much different than regenerative braking. <S> in both cases a full H bridge is used. <S> In the buck-boost charger, the voltage can be higher, lower or equal and transfer current to the battery. <S> By using the desired charge profile (fast,slow,float) it will supply the required higher average output voltage than the open circuit battery voltage. <S> It then controls the average voltage and current by sensing both and regulating with the correct Mosfet switches according to the profile selected (fast, slow) to change the PWM duty cycle. <S> Now the re-generative brake does <S> a similar thing except the rear brake would be supplemented with dumping the motor energy rectified and regulated back into the battery. <S> There are limits to battery current, just like fast accelerating and fast charging, age the battery faster, you might be able to replace the use of the rear meachanic brake with an electronic break, but also perhaps not without limits. <S> But let's think about the energy you want to use. <S> Ecap=1/2 <S> C*V ^2 <S> = 1/2 500F * 2.7^2 <S> = 1822 <S> Wh * efficiency of conversion. <S> Ebattery charger= <S> 60?V <S> * 5?A <S> * 3?h = 900 <S> Wh <S> So both methods would be very useful to incorporate Ecap and re-gen charging, but losses can be significant.
| .It can work as both boost and buck converter and can generate output voltage above, equal to or below the input voltage.
|
Are DC link capacitors suitable for use with AC? In looking for high-value (33uF) film capacitors for use with AC, I've come across a number of "DC link" capacitors. Can they be used with AC assuming their DC voltage rating exceeds the AC RMS and/or P-P? <Q> The DC voltage rating is the same as the ac peak voltage (not RMS or p-p) <S> and you have to make sure you are using a non-polarized capacitor for ac signals. <S> Don't use polarized capacitors i.e. electrolytic or tantalum. <S> Read the data sheets. <S> It's a short answer but a suprisingly big subject <S> so if in doubt post a schematic. <A> Since the datasheet for that capacitor specifically says "Installation: <S> Any position",it is a non-polarized capacitor that is suitable for both alternating ("AC") and constant-polarity ("DC") <S> applications.(As I could have guessed just from the description "film capacitor"). <S> Capacitors that are directly connected to mains voltage should meet safety and flammability standards -- these are often called "X capacitors" and "Y capacitors".(See <S> " <S> Why only 500VAC rating for this Y-capacitor? <S> "; Wikipedia: capacitor RFI/EMI suppression ; and Wikipedia: filter capacitor mains filtering for a few details). <S> There are several ratings in the datasheet that you must make sure are not exceeded in your application. <S> 900 VDC seems more than adequate for household line use. <S> Irms rating and Ipkr: you must somehow arrange things to keep the actual current less than the rated current. <S> Or you must pick a capacitor (or some arrangement of capacitors) that has a rated current greater than the actual peak current. <A> AC application to DC link capacitors raise the issue of construction in relation to electrostriction akin to magnetostriction in large transformers operating at high frequency. <S> Electrostriction is the movement of dielectric materials in a changing electric field which can invoke extra stresses within a capacitor. <S> In some cases, extra stresses can occur if frequency and mechanical properties co-alighn to cause mechanical resonances which in turn can fatigue mechanical parts such as connections. <S> I would suggest that the capacitor manufacturerr be consulted for particular applications.
| In particular, DC voltage rating: for AC applications, you must pick a capacitor with a DC voltage rating greater than the the AC peak absolute voltage (typically half the AC P-P voltage).
|
How do emergency stop buttons work? When using emergency stop buttons and kill switches, are they designed in such a manner in which their role is more physical, such as interrupting a power supply (apparently in some of the models, like the one pictured, the button has to be turned before operation can resume), or are they just basic big red pushbuttons that are simply coded to wait until they're pressed. <Q> The answer is yes! <S> All of the above! <S> The bottom line is that pressing the button should stop things in a safe way. <S> Sometimes this means that they just cut power. <S> What type of controller? <S> Well, that depends on the machine and what is required (and is beyond the scope of this question). <S> Most exercise treadmills, for example, have an emergency stop. <S> Sometimes it is just a large red button. <S> Sometimes it is a clip+string that attaches to your clothes and when it is pulled (because you lost your balance) <S> it activates. <S> When it activates, it tells the MCU inside the treadmill to stop the belt. <S> It doesn't cut power, it just stops the belt. <S> But I have also seen whole computer rooms that are attached to a single red button. <S> Pressing the button will cut power to absolutely everything in the room, including all of the servers and the air conditioning. <S> Amusing Story: <S> I once worked in a computer department with just such a button. <S> The button was mounted on the wall in such a way that if the door to the room was opened too far it would hit the button and shut down power to everything. <S> After this happened one time too many we put a wire cage around it. <S> Fingers could still get in to press the button, but the door wouldn't. <S> Some emergency stop "buttons" <S> are the kind you PULL, not push, to activate for just such a reason. <A> Emergency stop buttons are nothing more than a NC (normally closed) <S> pushbutton that has mechanical plastic or metal tabs and grooves internally such that when you push it (interrupting the circuit) <S> , it is held in that position until you twist it. <S> They are designed to be large, hard to miss, and easy to push; qualities you want when you have that scary experience of having a powerful machine pulling your tie into the Rollers of Doom™. <A> To add on to the other answers an interesting source of information is the DARPA Urban Challenge rules. <S> This is a competition with lots of large moving vehicles all working at the same time. <S> The DARPA E-Stop is a wireless device that allows officials to remotely pause or disable a vehicle. <S> The E-Stop manual is here . <S> The official rules are here . <S> The most interesting except is: E-stop RUN mode enables the vehicle for autonomous movement. <S> E-stop PAUSE mode brings the motion of the vehicle to a prompt stop, with brakes applied to hold the vehicle even on a slope. <S> The vehicle should be ready to resume forward motion when the E-stop re-enters RUN mode. <S> E-stop DISABLE mode brings the vehicle to a prompt stop and shuts down all propulsion systems while actively applying and maintaining the brakes. <S> The transmitter: <S> The receiver: <S> Each vehicle also had to have at least one manual actuator on both sides of the vehicle. <S> You can see two of these on the driver side of the Carnegie Mellon vehicle (one is above the drivers door, and one is above the rear wheel): <A> There are a few more important aspects of the emergency stop button attached to machine tools and other dangerous things. <S> As JYelton says, they are designed to interrupt power. <S> (As such, several in different places can be wired in series. <S> Thus if your hands are busy, a knee or a foot or a supervisor can operate another one) <S> But they typically do not interrupt power directly; they interrupt power to a breaker, which drops out, and that cuts power to the machine. <S> Then a separate "make" button (usually green) is required to restart the machine. <S> The breaker may also be arranged to trip out on overcurrent or other causes. <S> But loss of power (such as a temporary power cut) will also cause the breaker to drop out. <S> This is important : such an arrangement is called a "NVR switch" (No Volt Release) and it prevents the machine from restarting unexpectedly when power is restored.
| Other times, when just cutting power is not the safe thing to do, they hook up to some type of controller that brings things to a halt in a safe way.
|
Drill files from Kicad for PTH and NPTH I have a board in Kicad that uses a mixture of plated and non-plated through holes. It generates two drill files for these. However, manufacturers seem to expect only a single file. If they don't support NPTH, how can I generate a single file? Can they be safely concatenated? <Q> In KiCad, in the dialog for generating drill files, there is a checkbox "Merge PTH and NPTH holes into one file." <S> As others have said, it may be only certain fabs (e.g. OSHPark) that require at most one drill file. <S> Another gotcha is that in the KiCad footprint, in the pad for a NPTH hole, you must insure that the size of the pad is same size as the drill size. <S> (KiCad won't let you specify "None" for copper layers.) <S> Otherwise, 1) KiCad generates copper under and surrounding the hole in the Gerbers, and 2) the fab algorithms will see a thin ring of copper around the hole, and proceed to plate the hole, despite that the type of the pad in KiCad is "NPTH". <A> You can't simply concatenate them as they have a structure even though they are text (or are binary files for EIA ones). <S> It would be very easy to write a simple tool in a language such as Python to merge them, or use a CAM tool which can easily do the same. <S> A requirement for only one file and no more is very uncommon. <S> On many occasions I've been asked to produce two (or more) drill files, but the file requirement varies between manufacturers, some want separate PTH and NPTH others don't. <S> I just send both files and let the manufacturer worry about it. <S> If you mess with it after production and make a mistake it's then your problem, not theirs. <S> Once they get your data, they do an import using a CAM tool (Computer Aided Manufacture)All CAM tools <S> I've ever used allow you to load more than one drill file. <A> In US manufacturing, any hole with a copper pad gets plated, and any hole without copper on both sides is unplated.
| The answer from OSH Park, where I ended up going, was this: I can do both, they just need to be in the same file.
|
Build an WiFi IP camera with webcam I have a USB webcam and a WiFi module which it can convert Serial data to WiFi and vice versa. The question is can I simply convert the data coming from the webcam to serial with a USB to Serial IC (like FT232R ) and then hand it over to my WiFi Module? <Q> Not even close. <S> USB-to-Serial ics are usb peripherals (slaves), like the web cam. <S> Without something in between, like a usb host (i.e., a computer) you could not get the two to talk. <A> Simply put, no. <S> The bandwidth required for a webcam will be much larger than you could sensibly put over serial. <S> OK <S> I know you can get >2MBaud of out an FT232R (with a suiteable RS232 Line driver), but that will still absolutely prevent video and make still images slow. <S> Fundamentally the USB Camera is a device and must connect to a USB host. <S> The WiFi module (from the information you give) is not a USB host. <S> (I only say probably as you didn't give the make/model of camera, <S> so I don't know if suitable software is available for the Pi) <A> No, you can't do it that way. <S> You will need a USB host that interfaces to the webcam and sends the data over Wi-Fi. <S> This would be quite simple to do with a Raspberry Pi if your webcam is supported by Linux (those days, most are, I believe).
| If you obtain a Raspberry Pi , you could probably use that as it is a USB host to which you can connect your camera and an ethernet (or your WiFi) module.
|
Guidelines for determining shock hazard of capacitors I'm looking for guidelines on how to identify capacitors which have the potential to cause pain, injury or death due to electrical shock if not handled correctly. I recently purchased a "getting started with electronics" kit from Radio Shack. It contains an electrolytic capacitor of 1,000 µF and 25 V. I'm assuming this particular capacitor doesn't have the potential to cause such harm because it was included in an introductory kit. However, at what point does a capacitor have the potential to cause pain, injury or death due to electrical shock? Ideally, I'd like links to reference material on the subject. <Q> First, it is not the capacitor that can harm you, but the voltage and charge stored in the capacitor. <S> So all capacitors are safe when uncharged, which is what they are when you buy them. <S> To do harm to your body, the voltage across the capacitor's terminals must be high enough to cause a harmful effect on you. <S> There are no hard rules for at what voltage things become harmful, but a common 'rule of thumb' is that DC up to 48 Volt is considered low voltage. <S> So a capacitor charged to a voltage below 48 V is fairly safe. <S> That does not mean that a capacitor that is rated for 25V is necessarily safe: it is guaranteed to work to 25V, but it is not guaranteed that it won't work up to let's say <S> 70V. <S> And it also does not mean that a capacitor that is rated for 1000V is harmful: it is only (potentially) <S> so when charged above 48V. There is another form of harm: a capacitor with a very large capacity, charged to an otherwise safe voltage, can cause a very high current when its terminals are shorted. <S> The sparks and heat can harm you, and the capacitor itself could explode. <S> No need to worry about this effect with you garden variety capacitor up <S> to below let's say 1.000 uF, but shorting a capacitor is something you should avoid nevertheless. <A> Electrolytic capacitor of 1mF? <S> Well, maybe it can cause you some inconvenience if it explodes with burning electrolytic liquid in your face, but really, nothing to worry about. <S> I'm sarcastic, but I admire your wisdom - <S> the most of us just did things and learned it the hard way. <S> Another thing you might want to avoid is touching the pins of a fully charged cap when you're wet. <S> Few sources show that the resistance of your body (let alone finger-to-finger) may get down to a few \$k\Omega 's\$ in such a conditions. <S> Based on the nominal voltage of 25V, this may lead to a current of tens of mA, which this capacitor may sustain for up to a fractions of a second (\$Q=CV, I=\frac{dQ}{dt}\$). <S> This won't kill you (unless your heart is very sensitive), but it might be very painful. <S> In general, 1mF capacitor is a BIG capacitor. <S> In general, all electrolytic capacitors are dangerous bastards if not handled properly. <S> It may be said about all capacitors, but electrolytics are special in that they may actually explode. <S> They also very sensitive to reverse polarity voltages - the + terminal is usually distinctively marked. <S> Add the above two statements, multiply it by the fact that you are new to the field, and you'll get the answer to your question <S> - try smaller capacitors before you plug this monster anywhere. <A> Whether a capacitor can cause injury is mostly related to its voltage rating. <S> If it is not designed or rated to store high voltages, then it won't have enough voltage potential to create a current in a human touching it. <S> Think of it like a battery: You might have a very large current capacity in a battery <S> but if it is only 3 volts, it is extremely unlikely to ever create an appreciable current in a body that is many megohms. <S> There are many questions about what voltages/currents are required to cause pain and injury. <S> From these you may notice that "high" voltage (for human contact purposes) is generally defined as somewhere around 48 volts. <S> (You can still get shocked from 12V, but given special circumstances.) <S> The next factor is the capacitor's charge capacity. <S> The charge capacity will dictate how long the current is capable of flowing. <S> In other words a small value (say less than a microfarad) would result in a very brief shock, whereas a large value (a few microfarads or more) could result in a higher energy discharge, causing a more severe shock, burns, etc. <S> Extremely high voltage capacitors (1KV+) can actually charge from static in the air, and as a safety precaution they are usually stored with a conductor shorting the terminals. <S> Be extremely careful with any such capacitor. <A> The true dangers of high voltage capacitors is MULTIPLE CAPACITORS. <S> I have seen some people building their own railguns by plugging in over 100x 9v batteries to a capacitor bank of of almost 20 or more can sized capacitors that can operate at 450 volts. <S> That is when things get really dangerous. <S> When discharged the energy from the capacitor is so intense it can make the areas where all the wiring and rig components are attached to each other explode.
| If the stored charge is at a sufficient voltage to create a current, then any capacitor can be dangerous.
|
Is RFID the right solution I'm an industrial designer with limited knowledge of electronics and was looking for some help. I am in the process of developing a dementia care product. The idea is to manage the access residents have to each others rooms, currently they can wander in and out of rooms sometimes; sleeping in beds, trying on clothes and moving possessions around. This causes distress to residents confrontations between family and care home owners as well an extra work for carers and staff. It is not acceptable to lock the rooms as residents cannot use keys so it would be seen as an infringement of their rights. I am considering using RFID UHF technology to trigger an electromagnetic door lock when a resident approaches their own door. Based on race timing systems, I am considering placing an antenna under the carpet in front of the door which reads a unique passive tag placed under the insole of all their shoes and slippers. There are the following considerations: Each tag must be very cheap ($0.50) and almost disposable, so no batteries. Residents may not always wear their own clothes but tend to always wear their own footwear around the home. This is not a security device and only intended to improve the current situation. Dementia sufferers will not be able to wear bracelets or lanyards. They will not be able to swipe a card. Although RFID UHF technology appears to be the best solution, before I 'plough on' does anyone have ideas for a more appropriate technology? <Q> This is probably going to sound all wrong but my cats are micro-chipped and they find it easy getting in and out of the chip-detecting cat-flap. <S> So here's where I redeem myself, find a source of the chips and attack the problem that way. <S> I'd be guessing <S> but I can't see them being big prices. <S> Apparently, they are the size of a piece of rice so fitting them in a shoe is going to be a minor problem. <S> It looks like the MCRF355 is a good candidate for the electronics heart. <S> It's likely though that you'll be using 13.56MHz rather than UHF. <S> Yes, they need to be passive to keep cost down and be unobtrusive. <S> MCRF200 runs between 100kHz and 400kHz and maybe a decent solution too. <S> This link also covers the MCRF250. <S> Humans too <A> I think RFID is common in similar situations. <S> My mother's home issued me an RFID fob that works the front door <S> so I get to come and go as I wish. <S> If the patients could carry a fob or a card to tap a pad by each door, then you would be done. <S> Failing that, essentially disposable sensors in slippers might work. <S> If the reader part was under the carpet and couldn't be moved, no exposed wires, nothing the cleaning staff need worry about, that might work. <S> Would staff wear the special shoes or have some other means of moving about? <S> Quite frankly it sounds to me like you are trying to be innovative as hell and still respect patient rights and dignities. <S> So I wanted to say +1 for that. <A> RFID does provide an easy solution to your particular issue as it doesn't require easily-lost and fiddly keys or cards/codes. <S> In short - for keeping wandering old folks in their own rooms, great, but don't use it to secure the front door or the company safe. <S> For a few thoughts on the risks associated with RFID, and anything else IT/Security related, start reading here: Risks Digest .
| However, I would be very wary of using RF-anything for "proper" security (EG preventing malicious intruders), the security holes are numerous and hacking this stuff is only getting easier and more popular.
|
Why is this laptop adapter grounded? This adapter is clearly not capable of delivering a null, a power and a ground to the laptop because the connector only has two surfaces. The adapter itself is plastic. So why is it grounded? (Note that this is not specific to this particular brand or model, I see many such adapters.) I was thinking that maybe on DC side the adapter the ground and the negative is connected but isn't dangerous to connect power to the ground? At another point, say the bathroom you touch a pipe which is connected to the same ground and poof, shock. <Q> In the U.S., we refer to the three pins on the AC plug as Hot, Neutral, and Ground. <S> Sometimes the Ground is more accurately called a "Safety Ground". <S> Doing this makes it easier to pass regulatory testing approval (EMC, ESD, Etc.). <S> Some people complain that when laptops are placed on their bare laps, they get a tingling sensation where the screws of the laptop touch their skin. <S> Having those screws connected to the safety ground of the AC plug mostly gets rid of that issue. <S> Also, even if the safety ground is not connected to the ground conductor of the DC jack, it could be providing some additional safety benefits inside of the power supply itself. <A> The third pin on the DC power connector is to allow the power supply to communicate its specifications to the computer so the computer knows how much power it can draw. <S> Some use a resistor to indicate the current draw and others send a digital signal over the extra pin. <S> The extra pin can cause issues with third party/generic power supplies. <S> The negative on the connector may be connected to AC ground. <S> This grounds the laptop, which can be a good thing or a bad thing. <S> If the laptop wasn't grounded, the decoupling capacitors (to clean up radio frequency noise) between hot and ground and neutral and ground on a 3 prong AC plug based laptop supply would form a capacitive voltage divider which would cause the laptop to float at around 60V <S> (120V divided by 2) with weak current - this will give you a little buzz when you touch it. <S> Grounding the laptop, however, can cause ground loops when connected to other devices that are also grounded. <S> When high current devices such as motor drivers and two way radios are connected to computers, the voltage drop between the external device and its own grounded power supply can easily result in a 1V at potentially high current being injected into the USB or other ports on the computer through the ground and/or as common mode on the data lines. <S> Connected to audio equipment or test equipment, you may get hum. <S> Floating the ground on the laptop allows you you to ground the laptop externally in accordance with your grounding needs for the overall system. <S> If the laptop power supply has a 3 prong plug, there is a good chance it will ground the laptop while a 2 prong plug should not. <A> That looks like a Dell power supply in that case the center pin of the connector goes to a memory device within the power supply (a Dallas Semiconductor One-Wire device) that is interrogated by the computer so it can determine what power supply is connected. <S> The computer then knows how much power it can consume - it also can refuse to charge or only run at low speed if it determines it is not a certified power supply. <S> Be careful about probing the center pin with a voltmeter - if you short the center pin to the inside of the barrel it will destroy the ID memory device and cause the computer to think that the power supply is not certified (been there done that :-(). <S> You can read more about how it works Inside the Dell Power Supply <A> The ground in most electronics is primarily used as an RF shield around the device. <S> This keeps noise out, and emissions in. <S> In the case of a DC powered, low voltage device the ground is usually tied to the DC negative input.
| On the DC Plug going into the laptop, the ground conductor is usually (but not always) connected to the Safety Ground. It also reduces leakage current through the "isolation" barrier inside the power supply.
|
What is the optimal way of clearing solder from surface-mount PCB pads for rework? Say I have an assembled PCB with a QFP package on it. This device gets damaged and I need to replace it. Getting the device off is straightforward, but now all the pads have solder blobs on them. Is there a standard way of cleaning these pads off, so the replacement device will sit flat on the pads again? <Q> There are several ways to manually remove solder For SMD components (and in general too) <S> I find desoldering braid (solderwick) the best option. <A> You can use solderwick or a suction gun. <S> Solderwick is probably the easiest. <A> I usually add a little more flux to the wick <S> so when you heat it up, a lot more solder gets removed. <S> Also if your doing through-hole vacuum solder removal is the easiest. <S> Hope <S> this answers your question. <A> My experiences attempting to desolder stuff with generic own-brand wick were sufficiently bad that I avoided wick for years, I could never seem to get the stuff to suck up the solder. <S> Then I moved to a different research group and started using wick from the likes of multicore and servisol (and admittedly also a better iron) and it was much better. <S> It is important to fully melt the solder (you should see the wick change colour as the solder is wicked up) and to remove the wick from the board while the solder is still fully molten. <S> Ideally removing iron and wick together. <S> I recommend leaving the wick attached to the roll so it cam be easilly manipulated while hot. <S> If you let the wick cool too much before removing it you can easily rip pads off the board. <S> Suction tools can be handy for removing bulk solder without wasting a load of wick or resorting to bashing the board on the table but are not so good for getting groups of small pads flat and clean.
| I would use solder wick for surface mounted soldering.
|
Need help with circuit design for current measurement of car starter Okay I want to make a simple circuit to measure high currents coming from my car battery, and I think I have something that might work, but I'd like anyone who knows more about this to point me in the right direction. I read car starters can pull hundreds of amps, and so for the sake of this design, I just assumed my car will max out at 200A during ignition. It might be higher, but I have a small car (Ford Escort) and I think if it goes over 200A for a brief bit it will be okay. My design is to use a shunt resistor to get a reading of the high current. It's a 200A, 75mV scale shunt from Digi-Key, here . So I want to take the voltage on the shunt, feed it into an op-amp, and scale it to max out at 5V for an arduino. Here's what I came up with . If you slide the resistance all the way to the left, the load (modeling the starter) will drop to 0.06 Ohms, which is what I'm estimating the starter to be to draw 200A from a 12-V battery. .06 = 12/200. Then if you slide it to the right, it mimicks normal operation, for current draw for the rest of the car, and will go as high as 12 ohms, pulling 1 amp. You can see the output of the op amp maxes out at 5V, and the power on the shunt maxes at about 15 watts. So obviously this circuit design looks like it could work in theory, but what I want to know is if there's a better way to do this? Or if the circuit can be improved? Or if it would even work at all? <Q> A shunt resistor is not a good idea in this case due to the high current. <S> 60 mΩ for 200 A is ridiculous, as even a few seconds thinking about it would have told you. <S> 200 <S> A <S> x 60 <S> mΩ = 12 V, which means all the voltage would be across the resistor with none left for the starter even if it could somehow draw 200 A under those conditions. <S> Clearly that can't work. <S> Second, the power dissipation is way out of range. <S> 200 <S> A thru 60 mΩ dissipates 2.4 kW! <S> At this current, I'd look for a hall effect current sensor. <S> Those sense the magnetic field caused by the current. <A> Your circuit link was bizarre <S> but I think I got the idea: - This is the nearest I could find and this works <S> but yours won't (very accurately) because you've put all the gain into your one and only amplifier (equiv to A1 with R2 and R4 at 67kohm and R1 and R3 at 1kohm). <S> Think about what the output will be when no current flows i.e. the input voltages are the same. <S> Theoretically it will be 0V but a 1% change in the value of one of these resistors will generate a large error voltage on the op-amp output that gives you a false reading because the common-mode rejection ratio of A1 totally relies on perfect resistor matching then, imperfections are multiplied by gain (=67) <S> This is why the circuit I've shown works a lot <S> better - errors in the matching of the 1st stage will be multiplied by a gain of 0.1111 (approximately) i.e. there will be minor errors for a 1% mismatch in resistors. <S> A2 does the main amplification and is set for a gain of 250. <S> Overall, gain is 27.78 and smaller than yours <S> but A2's gain can be increased. <S> Should you still have common-mode problems <S> there is this: - Other related TI products. <S> I'm also aware the Linear technology produce a bundle of high-side current monitors. <A> This sensor has the amplifier built in to it and the signal out can directly connect to an analog input on the Arduino board.
| The resistance you'd need to keep the voltage drop low and the dissipation reasonable would be so low that it would become highly impractical. I would recommend looking at an Allegro hall effect sensor .
|
Extracting the Square Root of a Voltage I'm trying to discover a circuit that will produce a voltage which is some factor of the square root of the input voltage. I.e. \$V_{out}(t) = K\sqrt{V_{in}(t)}\$. The factor K is irrelevant. I looked at the circuit at the bottom of this page . The problem is it uses a MOSFET and the formula predicting the output requires various parameters \$\mu_n, C_{ox}, V_{th}\$ (some of which I imagine vary greatly even among devices of the same model, and some of which I wouldn't know how to find from the data sheets) I'd like to find an alternative circuit which has a consistent and predictable output, before I purchase the necessary components. When I say K is irrelevant, I just meant that I can later amplify the output by a constant factor if needed. It needs to be consistent and predictable though. <Q> An easy approach would be to use an analog multiplier ( MC1495 was an early one, Analog Devices AD633 or Burr-Brown(oops, Texas Instruments!) <S> MPY534 are better newer ones) as a squaring circuit, in the feedback loop of an op-amp. <S> To use a multiplier to square a voltage simply connect that voltage to both inputs. <S> Connect your input voltage to opamp's non-inverting input, the opamp output to the multiply inputs and the multiply output to opamp's inverting input. <S> If \$ V_{out}^2 = <S> V_{in <S> } \$ then \$ V_{out} = <S> \sqrt{V_{in}} \$. simulate this circuit – <S> Schematic created using CircuitLab Details such as DC biasing left as an exercise... <S> (Side note : the analog multipliers rely heavily on "matched pairs" of transistors; it is relatively easy to match 2 transistors if you make both at once in the same area on the same chip!) <A> V(OUT) = <S> SQRT(V(IN))/10 in this case: <S> ( Open & run the DC Sweep simulation in CircuitLab.) <S> As far as "matched transistors", in this case: mismatch in Q1/Q2/Q3/Q4 or in Q6/Q7 will produce a slight scale factor error (which you've stated you don't care about much anyway) <S> Q5 is not match dependent variation in temperature between different transistors may produce scale error <S> you can simulate mismatch by adjusting I_S of one transistor. <S> See this LED example for something similar in the LED case. <S> (You can also have B_F "beta" mismatch, but in this particular circuit <S> , it's less of a factor.) <S> I added some notes on the schematic. <S> I'm sure others can help simplify or make this more robust, but I hope it's a good start using parts you probably already have on your bench! <A> From TI application note 31 : <S> May work with other op-amps. <S> See the application note for details on running the LM101A off a single-ended supply. <A> This is not intended to be an answer or an explicitic solution, rather an expanation why there aren't any single chip integrated solutions. <S> Perhaps the demand is too low, when you can use a digital solution now with quantization using 12 or 16 ADC's with log codecs or log algorithms and divide by 2 in binary as the log of the exponent ^(0.5) has a 0.5 multiplier in the result. <S> Square root designs come in many analog variations from 1 to 16 integrated parts with complexities of precision matching, current mirrors, bias mirrors to use the quadratic non-linear behavior of FETs. <S> They have been a perpetual research topic of EE Profs with getting controlled results spanning from 3 to 7+ decades. <S> Problems result from variations in RgsON , Vgs threshold and self heating. <S> Few of these research topic experiments have ever made their way into production, perhaps because of the difficulty of controlling the process of doping and fabrication contros to get the required consistency, which are orders of magnitude more difficult than CMOS logic. <S> The zero reference is the most critical for errors and a differential output offers more linearity in the Sq Rt result. <S> Considering negative feedback is inverting is used, it is academic that <S> sq. <S> rt amps tend to take a negative input to give a positive ouput, yet this is not an maginary number. <S> Ha. <S> Have fun. <A> I'd recommend a log amplifier, followed by a 0.5 gain linear amplifier, followed by an antilog amplifier. <S> You might be able to buy the log and antilog amps as single purpose <S> IC's. <S> The Burr-Brown 4127 would handle log and antilog, but is obsolete. <S> AD8307 might be another choice <S> Another approach, depending on your bandwidth requirements and some other things, would be to hand the problem to a microcontroller and a DAC. <A> Works in Spice, took about a day to figure out. <S> second stage resistor network removes offsets that caused the third op amp section to overdrive Accuracy within 1db for RF/MW Schottky Diode Detector .. <S> 0005vdc - 1.000vdc
| if you have some BJTs plus an op-amp lying around, a quick translinear BJT analog square root is all yours!
|
What's The fundamental difference between interrupts and delay in embedded programming? I'm new in embedded programming in C, just getting to understand coding.Is there a fundamental difference between an interrupt function and a delay function? I would greatly appreciate answers with example code. <Q> Those are two conceptually totally different things. <S> "Interrupt function" <S> This is more commonly called an interrupt handler or Interrupt Service Routine (ISR). <S> The execution is triggered by the reception of an hardware interrupt. <S> What actions are taken in the ISR normally depends on the reason the interrupt was generated (the kind of interrupt source that caused it). <S> "delay function" <S> This is typically a function accepting 1 parameter which specifies the delay that the code execution should be blocked for. <S> Maybe you are confused here, because a delay can also be implemented using a interrupt driven approach. <S> You can implement a delay using a (timer) interrupt. <S> This is often preferred to calling a delay function like delay(1000); /// delay for 1000ms because this would block the main loop for 1 second. <S> Using an interrupt based approach, you can set some kind of flag in the interrupt service routine (which fires after a specific delay using a hardware timer/counter). <S> That flag can just be checked in the main loop to determine if the delay expired, effectively not blocking other code from execution. <A> An interrupt, though, can occur anytime. <S> It yanks the program pointer away from whatever line of execution it happened to be at, <S> does some processing in an interrupt routine, and then restores the program pointer to where it was before the interrupt. <S> You can achieve an effective delay using one kind of interrupt that is triggered by a timer (i.e., a timer interrupt). <S> You preload the timer to some value, start the timer, and trigger an interrupt when the timer register rolls over. <A> An Interrupt is agenerated in response to a certain event. <S> For example if you generate an interrupt on a switch, that part of code will only be called when that switch is pressed. <S> In case of a delay function, you constantly check every few microseconds if the key has been pressed. <S> Think of this as mail on your phone vs Webmail. <S> In the first case, whenever you receive an email, you get a notification on your smartphone saying you have a mail. <S> In case of webmail, you check every few minutes(or hours) whether you have a mail.
| During a "delay", the programs sits and waits at a particular point in a program, and does nothing else.
|
What do these passive components do in this microphone amplifier circuit? I have this circuit I built long ago to amplify 2mV signal from speaker and phase shift it by 2.5V. Now the question is, what does C2, C4, R5, and R6 exactly do? <Q> R5 and R6 set the gain of the circuit. <S> C2 also changes the frequency response of the circuit-- reducing the gain at low frequencies. <S> Basically, cutting off the bass frequencies. <S> I am assuming (I have not calculated) that this will cut off frequencies below about 200 or 300 Hz. <S> Odds are high that you could remove C2 (short it out) and have a circuit that works just fine. <S> UPDATE: <S> I should also mention that this circuit is missing a DC blocking cap on the output. <S> This is normally done, especially when the opamp is ran off of a single supply rail. <A> C4 reduces closed-loop gain at high frequencies. <S> It is a form of dominant pole compensation to fend off the risk of amplifier instability. <S> It shouldn't be necessary with internally compensated op-amps, but it's good to leave a spot on the circuit board for it. <S> As for C2, primarily it is needed for proper biasing. <S> If R6 were connected directly to ground, the amplifier would have a large DC offset at the output. <S> The feedback cannot be referenced to ground because the amplifier is based around the 2.5V operating point. <S> C2 provides an "AC ground" for the feedback loop, without coupling it to the 0V DC ground. <S> The presence of C2 has the side effect that the amplifier has only unity gain at DC: bass is rolled off, in other words. <S> Rheostat R6 controls the gain, which, ignoring frequency effects, is basically \$1 + <S> R_5/ <S> R_6\$. <S> The smaller the resistance that is dialed in on R6, the bigger the gain. <S> The particular wiring of a potentiometer to serve as a rheostat shown in the schematic is a good method, because if the wiper of the potentiometer happens to make an intermittent contact, the resistance of the part will not go above that of its resistive element. <S> The circuit has a minimum gain, when R6 is maximum, with no upper bound on the gain: when R6 is turned toward zero, the gain increases rapidly toward a large value. <S> The circuit designer wanted the user to be able to get large amounts of gain from a single op-amp stage. <S> By the way, since C2 blocks DC, it also ensures that R6 operates quietly. <S> When significant DC flows through potentiometers, they can create a scratchy sound when operated. <S> This circuit has a bit of a flaw: the designer neglected to capacitively bypass the voltage divider formed by R2 and R3. <S> That is to say, R3 should be paralleled with a capacitor to reduce power supply ripple, which will appear as a signal at the node between R2 and R3. <S> Thus the design relies on VCC <S> being well regulated. <A> Hope <S> I haven't missed anything. <S> Well possibly I did - <S> David Kessner reminded me that answers sometimes have to go the extra mile because they may be read by a person who has R6 (10k pot e.g.) tied to a midrail point and therefore doesn't need C2 to make the circuit function correctly. <S> Under these circumstances C1 becomes the dominant component to block low frequencies and as the values of components currently stand C1, R2 and R3 form a high pass filter of about 7Hz. <S> The 7Hz previously said 40Hz which is wrong <S> and I can't explain such attrocious numeracy!!
| C4 technically changes the frequency response, giving it a LOWER gain at higher frequencies, but the value of the cap implies that it's just there to add some stability to the circuit and won't effect the audio frequency response too much. Technically, C2 is doing the same function (High Pass Filtering) as C1+R2+R3.
|
Reversing direction of a motor I need to be able to reverse the direction of a RS-360SH motor The operating voltage is 7.2 volt Current is around 5 A on normal running and around 8 A during stalling. I tried to use a 2-pole 3-position changeover switch. Is it suitable? I found that most H-bridges have less current carrying capacity. What should I do.? <Q> SW1 off SW2 off = stop SW1 on SW2 off = <S> forward <S> SW1 off SW on = backward <S> SW1 on SW2 on = stop <S> The flyback diode protects against spikes, especially if one is using a microcontroller for switching. <S> In that case, some capacitors across the power source may also be needed. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> You would still use a H-bridge. <S> The difference is that you would have to build one from discrete MOSFETs (including heatsinks) instead of using an IC. <S> Remember that H-bridges work by channeling power through the motor between pairs of MOSFETs, so you would need to activate MOSFETs on opposite corners to control the direction of rotation. <A> You can use two form C relays. <S> Tie the "NC" pole to ground, and the "NO" pole to supply, and tie the "COM" terminal to the motor input, one for each relay. <S> Then pull relay 1 to make it go one way, and pull relay 2 to make it go the other way. <S> Pololu.com has some nice ones. <S> Another option is battle-bots style motor controllers, like the RoboClaw or the Sabretooth.
| An alternative is to buy a pre-made motor driver with built-in high-current MOSFETs. Two single pole relays can easily be wired to move a motor forward, backward, or stop.
|
Can I use foil as a wire for my project in tight spaces? I am building a project that I can put a AA battery into a little compartment. The battery fits fine without anything else in it, but when I put a wire in, it gets tight. A solution that might work: aluminum foil. I measured the resistance with a multimeter, and it is about the same as a wire. Is this a bad idea? (Besides the low durability of the foil) I am planning to wrap the foil in some electrical tape or similar to insulate it, except for where I am going to connect to the battery. Will it carry enough current without overheating and melting the plastic? 100mA max with LEDs, only on for 1/2 of every minute I would say during use. Fairly standard plastic, I would say and operating in a house. P.S. The battery is 3.7v 1200mAH and a Lithium rechargeable, but may be a bit more/less voltage. Also, I only need it for one of the two sides (+/-), and is one better to use than other?Should I change my circuit, or am I just paranoid? <Q> There are things called "Flat Flex Cables", and many variations of those, that are basically the "non-Ghetto" version of what you are talking about. <S> These are also related to "flexible circuits", which are part cable, part PCB. <S> Essentially they are all custom flexible circuits that many people use as cables for tight spaces. <S> Here is a picture of an older iPhone where these cables are clearly visible (in a sort of orange-ish-brown color): <S> These cables are designed a lot like we design PCB's-- using the same CAD software. <S> They are designed in those crazy shapes, and not just bent when it is all put together. <S> Sometimes these cables are just soldered directly to the PCB's, other times they use connectors. <S> With the right design, they can be capable of carrying several amps. <S> If you are making only one, in your garage, I would use copper tape instead of aluminum foil. <S> It is easier to solder to, and is more conductive. <S> Instead of "wrapping it in electrical tape", I would use two layers of thicker packing tape. <S> Lay one layer, sticky side up, and lay the pre-cut copper foil onto it. <S> Then lay another layer of tape, sticky side down, on top of that. <S> Squeeze. <S> If you want to be extra careful, use three layers of tape, with copper for +V between two of the layers, and copper for -V between the other 2 layers. <S> That way if the copper shifts around it won't short out so easily. <S> Update: Instead of packing tape you might want to use Kapton Tape . <S> Kapton is a special tape that can withstand high temperatures-- like when you solder. <S> So you could use copper tape/foil with Kapton on the outside and then solder to the copper after you assemble your "cable". <S> Don't get the 1 or 2 mil thick tape, since that will be too thin for your purpose. <S> Go with 3 or even 5 mils. <S> It is good to 500 deg F, which is hot enough to solder with but many soldering irons can go hotter-- <S> so you still need to be a bit careful. <S> But it is a lot better than packing tape in that regard. <S> The down side is that compared to packing tape, Kapton tape is very expensive. <A> 100 mA into a strip of heavy duty kitchen aluminum foil, width a few millimeters, driven by a AA battery will be just fine. <S> If some part of the foil is too thin and generates too much heat because you're drawing amps' worth of current, the foil will act like a fuse and burn off. <S> By the time you have two layers of tape on it, you might as well use coated 28AWG wire, ("transformer wire") which is about as thin as a few layers of tape. <S> 28 AWG transfomer wire is about 1/3mm thick, and is rated for up to 1.4 A current in chassis wiring. <A> only prob will be soldering the tin foil. <S> just use a very thin wire - how about a 'twist tie' that is used to close bread? <S> Super thin.
| The idea to paint the tin foil is good as adding tape will make it thick and has been pointed out, you can just use very thin wire in that case. I would just use a good coat of acrylic conformal coat to insulate it, rather than tape.
|
What is the easiest most cost effective way to print conductive ink? I've designed some interesting prototypes with conductive paint (bare paint). I'd like to see if I can make them more space efficient via some sort of printed design. However, I would like to keep using ink on paper, ie, actual PCBs are out of the question for this project. Are there any off the shelf cost effective ways of printing a conductive pattern to paper? Bonus love if you know if printing is possible with a transparent solution like: http://en.wikipedia.org/wiki/Indium_tin_oxide <Q> Boy, this seems like an HP7475-style plotter hacked to take a pen with conductive ink would be the way to go. <S> These were plotters that moved pens in x and z, while y was handled by a paper-mover. <S> I don't know if there's anything like it out there today. <S> They were pricey in the late '80s. <S> Poking around a bit, I can find a ref to them being used for PCB http://www.youtube.com/watch?v=IG9KNDvoRl4 <A> Screenprinting, if you're not doing tiny runs - there are loads of instructables to get you started. <S> Other than that, you might want to try a conductive (usually silver ink) pen. <S> If you're dead set on printing rather than hand-drawing, some kind of stenciling is probably your only option. <A> One option for plotting would be to use the Makeblock XY plotter, designed to be used with a pen of your choice. <S> http://store.makeblock.com/xy-plotter-robot-kit <S> Although their customer support is ltd... <S> and the setup buggy from what we have experienced. <S> But there are many instructables for building XY plotters DIY style. <S> E.g. http://www.instructables.com/id/CNC-Arduino-GRBL-Easydriver-Shield/ <S> Or adding attachments to CNC machines.... <S> Or hacking inkjets <S> http://www.instructables.com/id/Print-Conductive-Circuits-With-An-Inkjet-Printer/
| It might be possible to modify an inkjet or laser cartridge to use conductive ink or toner, but it would be difficult.
|
Difference between Brushed ESC and Brushed DC Motor Driver (Controller) What is the diffrance between a Brushed ESC (electronic speed controller) and a Brushed DC Motor Driver (controller)? they both do the same job, yet at different prices and look diffrent. Example: Motor driver datasheet: http://nvhs.files.wordpress.com/2013/02/datasheet-l9110.pdf ESC datasheet: http://www.hobbywing.com/uploadfiles/sx/file/manual/HW-05.pdf <Q> The main difference is that ESC you linked is a complete module meant to be used by the end user. <S> On the other hand, the motor controller you linked is just a bare component which is meant to be integrated in a module. <S> So the target audience is different. <S> Motor controller is expected to be used by an engineer (or at least experienced hobbyist) who has necessary electronics knowledge to make it work, while use of ESC often requires drastically lower level of electronics knowledge since often only thing that needs to be known is to follow assembly diagram. <S> For example, the ESC is supposed to be connected to a radio which will output some type of signal. <S> That signal is not necessarily what motor controller expects, so there may be need for a conversion stage. <S> Also ESC will often have a protection mechanism which will turn off motor when battery voltage is too low, while motor controllers often do not have that protection. <S> Depending on the power ratings, ESC could use a motor controller made from discrete components instead of an IC motor controller. <S> The exact difference is a bit fuzzy, since there is a tendency of integrating as many features as possible on a single IC, so some features which ESC module would provide using components other than the motor controller would find themselves integrated onto the motor controller. <A> The so-called brushed DC motor controller in the question is merely a dual half H-bridge IC with some inductive load protection. <S> In other words, it is similar to the well-known L293 and L293D dual half H-bridge devices. <S> The pin-out is simpler, providing just the pins required to drive the H-bridge and thus an attached DC motor forwards or backwards. <S> There is no speed control, no internal PWM clock, and no logic built-in for modifying motor speed. <S> A brushed DC ESC on the other hand consists of not only H-bridge functionality, but also a PWM clock and PWM drive capability at the output. <S> Thus the motor can be directly speed controlled by an ESC, without providing any external clock source or control logic. <S> The ESC in the question incorporates a Battery Elimination Circuit (BEC), a standard Radio Control (RC) throttle-signal input from an external RC receiver, speed control through a 2 KHz PWM, an alarm function with integrated speaker for indicating error conditions, overheating fold-back, and logic via its on-board microcontroller to gracefully handle loss of control signal in a pre-programmed manner - by throttling down the motor(s) <S> if signal is lost for 1 second or longer. <S> Also, the current ratings for the specific ESC series mentioned are 20-50 Amperes, way higher than the pretty anemic L9110 H-bridge IC rated at just 800 mA. <S> There is no reason to expect the two devices, with their vastly different functional descriptions , to be even somewhat similar. <A> In general, an ESC provides an interface between an RC receiver and a motor. <S> In addition, some ESCs can also use the back EMF of the motor to provide closed-loop control. <S> An ESC also converts a servo control signals (~1to2ms pulses @ 60 Hz) to something more appropriate to motor speed control. <S> A motor driver such as an H-bridge simply provides a way to connect/disconnect each motor connection to a power supply rail through transistors. <S> By doing so, you can operate the motor in forward, reverse or braking modes with a microcontroller. <S> There is no control loop although som circuitry for implementing that may be provided. <S> It will respond to PWM signal duty cycle, so the motor speed can be controlled. <S> If you are using a standard RC transmitter/receiver pair, you want to use an ESC unless you are up for quite a bit of circuit building. <S> If you just want to use a microcontroller to drive a motor with PWM, then the motor driver is all you need.
| Motor controller is the main part of the ESC, but there (usually) are other components as well which are used on an ESC to provide complete module.
|
DC voltages at long distance from battery I have 12 volt and 135 ampere battery. Now I want to connect a device approximately 300 feet away from the battery. When I connect it at this distance, my device does not work. When I connect the same device to the same battery at a shorter distance, the device does work. What can I do? <Q> Any real conductor has an effective resistance per unit length. <S> The voltage drop over that length of conductor, and the power dissipated in that conductor, is dependent on the amount of current you draw through that conductor. <S> For a current draw of I , and a Resistance per Meter R you will experience: (I^2 * R) watts per meter of power lost as heat in the conductor and (I * R) voltage drop per meter of conductor <S> If your endpoints cannot tolerate the worst case voltage drop, or if your power budget does not account for the losses in the cable, you can expect them not to function as intended. <S> This PDF is a reference I have used for stranded wire. <A> The battery is too far away. <S> You should have a bigger voltage on the battery side (DC-DC boos converter) or thicker cables. <S> Voltage drop is affected by the current flowing through the cables, length of the cables and cable thickens. <S> You can look for more info here http://www.buildmyowncabin.com/electrical/copper-wire-resistance.html . <S> It even has a calculator, so you can just put your values in and get the voltage drop. <A> As others have mentioned we need more info to be exact, but assuming your "internet cable" means something like CAT5, and assuming you are only using one pair, then you probably have a serious voltage drop at 900mA. <S> A rough calculation based on a typical CAT5 cable with 24AWG conductors, using the typical loop resistance of 16Ω for 100m. <S> We will estimate the routers load as 12Ω for a max of 1A: 300ft = 91.44m, so loop resistance = <S> 16Ω <S> * (91.44/100 <S> ) = 14.63Ω Total circuit resistance = 14.63Ω + <S> 12Ω = 26.63Ω <S> Circuit current = <S> 12V / 26.63Ω = 451mA <S> Cable voltage drop = <S> 0.451A <S> * 14.63Ω = <S> 6.59V <S> Voltage available at router = <S> 0.451A / <S> 12Ω <S> = 5.4V <S> So, although this is just a rough estimate (ignoring temperature effects, inductance/capacitance. <S> Also we don't know what kind of regulation circuitry the router uses <S> or it's input range) <S> we can see that there is nowhere near enough power getting through to the router. <S> I would use at least 18AWG or thicker cable, preferably with some shielding and e.g. a ferrite bead. <S> You can try using multiple conductors to lower the resistance. <S> Also placing a largish capacitor (e.g. > 100uF) across the wires at the router end may help a little.
| The voltage drop seems to big.
|
Making 12V DC from 6V AC I've got a 1980 Honda XL 185s that has a 6 volt electrical system. The headlight uses a 6V AC, 30 watt bulb powered from the generator. The other lights (tail, blinkers) operate off of the 6 volt battery on 6 volt DC. I'm attempting to increase the intensity of the headlight in order to make it safe enough to ride at night. Presently the headlight is very dim anywhere near idle speed and just slightly dim at any other rpm. I'm assuming that changing my 6V AC to 12V DC and then installing a manufactured 12V LED bulb will be easier than changing 6V AC to 6V DC and building my own 6V LED light. I am also assuming that LED is my only option for a bulb, as I believe that I lose wattage in the step up or conversion of the power. Electricity is not my strongest subject, as you can see. I'm open to suggestions if I'm going about this all wrong. <Q> First when you rectify 6 V AC using full bridge rectifier, you'll get 8.4 V DC. <S> If you use doubling rectifier like those on images, you'll get about 16.8 V DC <S> If 16.8 V is too much <S> then you can drop is somewhat using voltage regulator or so. <S> I even suggest you to use regulator to have constant brightness. <S> ADD <S> It is also good to use boost regulator like MC34063. <S> Just follow its datasheet, while keeping in mind you'll need external transistor, diode and inductor rated not less than 10A. <S> And do not forget rectifier before boost. <S> ADD2 <S> There may be found that your generator cannot deliver enough power for normal 12 V bulb. <A> In order to do this, what you will first need to do is use a transformer. <S> Since you want 12 VDC, this would require a primary to secondary ratio of 2 for the transformer turns. <S> After the transformer, you can use a full wave voltage rectifier to get the 12 VDC. <S> The reason why Passerby is asking for the current details is you will need to choose parts that can handle the current drawn. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Above schematic should give you a rough idea of the circuit you will need. <S> You may want to add a regulator in case you have variations in your 6 (VAC) supply. <S> The nodes labeled A and B are places you can tap the 12 (VDC). <S> Tap A can be used if you have a steady supply from the 6(VAC), or you can add in the regulator and use tap B to get a regulated DC supply. <S> All the best. <A> I have a 1979 XL185s. <S> I changed the headlight to a 12V halogen bulb and added a MSR Voltage Regulator 610-203 that I mounted just below the headlight. <S> I had to use a hole-saw to drill out the old 6v bulb and glue in the new halogen. <S> Instructions on how to do this are at instructables.com. <S> The title of the instructable is: "Reusing old motorcycle sealed headlights". <S> I wired this separately. <S> It is not connected to the stator. <S> I charge when the bike is parked. <A> All white leds run on about 3 VDC <S> so why do you need 12VDC anyway. <S> Now for the same performance the LED system will draw 20 to 25% of the power of the halogen so you could run a dcdc converter into your leds <S> in fact you are spoiled with options so I will say a few . <S> Off the shelf 6VDC LED headlamp OR 6 to 12 DCDC to run 12VDC LED headlamp OR you could roll your own by using boost convertor to do a series string of LEDs built into your headlamp and running off <S> 6VDC .Voltage doublers as has been described by Vovanium can work if the electrolytic is properly rated for the current .
| I changed the turn signals and brake light bulbs to 12V LED and power them using a 6800mAH lithium battery. In this case you'll have to get more powerful generator or try xenon or LED light. I am using a H4 60/55W halogen bulb that you can get for less than $3 from ebay.com.
|
Can I use a 500mA fuse instead of a 315mA fuse? I have a guitar amp with a fuse on the power socket. It is a 250v 315mA slow blow fuse. My local electronic store only has a 500mA fuse. Can I use that or should I order a 315mA online? <Q> Order the correct one. <S> It will work with a 500mA fuse, but you are putting the circuitry protected by the fuse at some risk due to the extra surge current possible. <S> It's quite possible a component will blow rather than the fuse. <S> In general putting higher rated fuses in is a bad idea, though this is a smallish current and not too different, in extreme cases putting the wrong fuse in can lead to severe damage and possible fire. <S> So, while the fire or even the severe damage is extremely unlikely in this case, it's worth the wait to order a correctly rated fuse rather than put the wrong one in. <A> Can you? <S> Yes. <S> Should you? <S> No. <S> First, 500mA is 58% more than 315mA. <S> That's a huge increase. <S> Plenty of parts can fry themselves with heat with that much of a difference in current. <S> Secondly, the original is a slow blow fuse. <S> This means that it is designed to allow more than 315mA, ONLY if it's relatively fast and infrequent. <S> It will wait a few seconds before blowing. <S> A fast blow fuse like the 500mA one you want to use, will take a fraction of a second to blow when it is past <S> it's current limit. <S> So the question is, how much do you hate that amp that you are willing to fry it? <A> You should not use a higher current fuse than what the original one was rated. <S> You should order a 315mA fuse online instead. <S> The current rating on the fuse will dictate when the fuse will blow. <S> For instance, if the amplifier pulls >315mA with the original fuse, the fuse will blow to protect the circuitry within the amplifier from damage (as well as the power source/supply, in this case, your house and its electrical components!). <A> Specifically, the fuse is normally current-rated to less than the current rating of the power transformer. <S> Other components are either likely to be overated (resistors rated at 500mW or some other nominal value), or to fail suddenly (and not be protected by a fuse), but a power transformer is a big chunk of wire and metalic core, where the cost is proportional to the current rating. <S> If there is a fault that runs a bit too much current through the power transformer, it probably won't fail. <S> It will just get too hot. <S> Hot enough to melt or burn the case, insulation, paper, wood, cardboard or whatever. <S> Hot over a long period of time, allowing smoldering fires to convert to flame, or allowing smouldering fires to asphyxiate sleeping people. <S> Big thermal mass, so it doesn't cool down quickly when exposed to air. <S> Will this happen to you? <S> No, probably not. <S> You have to have thousands of fire accidents to get one fatality. <S> Still, bottom line is I wouldn't use the wrong fuse, I'm certain I wouldn't use the wrong fuse in a device that I already know blows fuses, and I'm damn sure I wouldn't lend it to my mother or my little sister after I'd re-rated the fuse.
| If you replace it with a 500mA fuse, you can potentially damage the amplifier, your house and its wiring, etc, as the higher-rated fuse will allow the amplifier pull more current than it will be able to handle.
|
Is it possible to have multiple ISR routines for a single timer in micro controller? I have doubt that micro controller will support multiple interrupt routines for a single timer. For example, single timer which interrupts at 5ms, 10ms, 1s etc. In my design I am using 3 timers: one timer interrupts every 1ms for some status check, other two at 50ms and 1s. I am curious to know about why can't I have controller which has more than one ISR and also, instead of interrupts at timer overflow, why can't it interrupt at its period match. <Q> There may be some that have this capability, but most don't. <S> You will need to maintain a count of cycles elapsed and delegate to the appropriate routine from there. <A> Of course, each timer will need its own interrupt routine. <S> It doesn't seem like you would want to treat your 5ms interrupt the same as a 1s interrupt, but if you were dead set on that type of architecture, all the interrupt routines can have the same code in them. <S> That, of course, would use up some extra program memory, even if you just have all the interrupts call the same subroutine. <A> I can only speak for AVR's <S> but I know the one's I used only had 2-3 timers. <S> But I don't see a need for using multiple timers. <S> You can just use one where the timer's prescaler and compare value are configured where a compare match ISR is thrown at some known time interval (every 1ms for example). <S> You can then keep track of the time and have a switch statement to control what action you want done. <A> Timer ISR with variable period is fairly easy to achieve. <S> Variant 1. <S> Timers usually have a countdown register, which can be updated by the code. <S> The countdown initial value can be updated inside the ISR itself on a case by case basis. <S> A state machine can be used to decide which initial value to assign to the counter. <S> Variant 2. <S> Another option is to set up the timer for the shortest duration then count interrupts if you need longer duration. <S> For example, you need to do 3 different things every 5ms, 10ms, 1s. <S> Set the timer for 5ms, within the ISR increment a counter <S> ** every time ISR is called. <S> In the main() loop, compare the counter to thresholds. <S> For 10ms duration the threshold would be 2, for 1s the threshold would be 200. <S> Once the counter is equal to the threshold, the main() <S> does what needs to be done at that interval. <S> A good thing about this approach is that you can have one timer and one ISR, but multiple thresholds (multiple counters too, if needed). <S> The variable timing would be implemented in the code, rather than in the hardware timer. <S> Note that, this approach requires a main() loop, which always loops faster than the shortest interval. <S> Accuracy of the timing should also be considered. <S> If that becomes a problem, there are variations of this pattern, which can work with a slower main() loop. <S> ** counter and flags are global variables visible to both ISR and main()
| No, but there are plenty of microcontrollers with multiple timers, each run of which can throw interrupts at different intervals.
|
Reading 5v analog to 3V PIC I'm trying to figure out how to connect a linear pushbutton sensor to a Microchip PIC. The problem is: the sensor has an 5V output and only 3 pins (VDD, Sensor and GND). I need to power the sensor with a VDD different than the one my PIC is running on. But this means I should either connect the 5V ground to my 3V ground or do an analog reading without connecting the sensor's ground to the side of my microprocessor. Is there any way to do this? I already have a PCB so besides the resistor divider to convert the 5V, I don't have any room for another component. Note The 5V and 3V power supplies have to be isolated from each other. Edit I have sacrificed the separate ground planes in order to connect the sensor. This works. <Q> Just connect the 2 grounds of the different circuit (and use the voltage divider of course) and you'll be ok. <S> It ensures that the divided 5V from the sensor is a meaningful voltage for the PIC. <S> edit OP seems to need isolated circuits (was not in the question). <S> There are analog optocouplers which allow you to get your sensor voltage across an isolation barrier. <S> The IL300 is mentioned a few times here on electronics.stackexchange, for instance here . <S> You won't need the voltage divider. <A> The datasheet of the hall effect pushbutton sensor in question indicates an operating voltage range of 3.5 to 24 Volts. <S> The output voltage is approximately the same as the supply voltage applied to it. <S> While the PIC microcontroller being used has not been specified, many PIC microcontrollers support an operating supply range of 2.0 to 5.5 Volts. <S> Assuming the specific PIC device available to the OP has this same range, an optimal solution would be to operate both the microcontroller and the sensor at 3.5 Volts - this eliminates any need for voltage level translation, since the sensor will not exceed the 3.5 Volt supply, and thus its output can be directly used with the PIC. <S> The datasheet provides the following graph of output voltage to distance of travel for the sensor: With a 3.5 Volt supply, the right-hand end of the graph would shift linearly down to around 3.0 Volts output at 4 mm travel, with the lower limit remaining approximately at 0.5 Volts. <S> That would work fine with a 3.5 Volt supplied PIC. <A> AMC1200 . <S> It works like an OpAmp, but provides high voltage isolation between input and output. <S> Since the AMC1200 comes with a fixed gain of 8, you will still need a resistor divider on its input. <S> There are also other variants available, e.g. from Analog Devices .
| If you need to isolate the two power domains, you can use an isolation amplifier like the The PIC won't notice anything about the 5V in the other circuit.
|
How to connect ATTiny13 to USB? This may be on the limit of ATTiny13 possibilities, but still: is it possible to connect ATTiny13 to USB to get ADC readings (one way)? According to this article http://www.vk2zay.net/article/211 (and my understanding of it) it seems doable, though the size of the serial communication program takes a lot of memory. However, instead of max232 I have Micro USB to Serial Adapter from microbot ( http://www.microbot.it/products/mr002-002-1.php ). (Well, I also have max3323 chip, but I would like to spare it for something else). I am aware of this question: How can I communicate between micro-controller and PC without the use of RS232/USB Adapter? but can't quite understand why max232 is needed in between? UPDATE : I can't find any better datasheet on the adapter, but it uses MCP2200 chip. UPDATE 2 : as Passerby answered below, one can connect attiny directly to the microbot's adapter. For the record, these are changes I made to above mentioned project to make it work: Line 52 of the code needed "const": const unsigned long mags[10] PROGMEM = {... to make avr-gcc happy. Pin 6 of the attiny needs to be connected to RX of the adapter (attiny can use Vdd and Gnd for 5v power) I have not set any fuses with avrdude (removed them in Makefile) Baud rate in my case was 1200, and all it took to see the output of attiny was cu -l /dev/ttyACM3 -s 1200 (I guess, cu does some magic to the adapter in the beginning to set the baud rate). Baud rate has been calculated by looking at the pin 6 output with oscilloscope, which gave about 0.8 ms min pulse width. (cu is Linux/Unix serial utility, another one tried is minicom) The datasheet for the adapter is not enough. I needed to look up MCP2200 chip's specs to make better guesses <Q> The microbot adapter is a TTL (Typically 5v) based usb-to-serial adaptor. <S> I can't tell what IC they use, but they all act the same. <S> Just hook up the TX, RX, and GND pins to your ATTiny13, and start a regular serial communication. <S> Or in this case, just ATTiny's TX to the adapter's RX pin and Ground pins together, as the project you link to is transmit only. <S> You would simply replace the max232 in the circuit, with the usb adapter instead. <S> Everything else stays the same. <S> The max232 is used when converting from TTL serial (0v Low, +5v High) to actual RS232 <S> like a computer serial port would use (+3~25V Low, -3~25V High). <S> Since you are using a usb-to-serial adaptor with TTL levels, the same that the ATTiny13 would use, the max232 is not needed. <S> There are some usb-to-serial adaptors intended to be used with actual rs232 level stuff, so the max232 or similar chip would be useful then, but not in your case. <S> The 5v from the microbot adapter is directly connected to the usb 5v pin. <S> This gives you up to 500mA to use. <A> AVRs have the advantage of the LUFA software stack. <S> It won't meet the USB spec exactly, but it's close enough for almost all general applications. <S> From there, it should be pretty straightforward to use the ADC peripheral on the ATTiny and let LUFA take care of the USB side of things. <S> Edit: actually it looks like you want V-USB now. <S> Sorry about the red herring. <S> Specifically, here is an example of interfacing an ATTiny45 with an LDR to get you started. <A> There is a excellent tutorial here that may help you out. <S> It shows how to use a 9 dollar usb to USART bridge, or you could just build your own, and the free HyperTerminal or RealTerm terminals to communicate with AVR's.
| You can connect an AVR directly to the USB D+ and D- pins and get a reasonable semblance of USB from it.
|
Using relays to switch between video outputs I have a simple question: would I be able to send a video signal (composite) to each relay per camera? The reason is that I only have one video input but need to be able to use two cameras (not at the same time, though). I have my drawing that I sketched out of what I think the hookup may need to look like. I wasn't sure if a relay would work since I was thinking the relay itself would mess with the video signal when the magnet engages the pin inside. I will be using this type of relay with an Arduino: <Q> Composite video is very forgiving and you can definitely use relays to basically perform the same function as unplugging camera 1, and plugging in camera 2, and vice versa. <S> In your diagram, however, you show using two relays and a "Y" splitter, which could lead to the possibility of both video signals being active at the same time, resulting in a scrambled video signal. <S> In this manner, only one camera will ever be connected to the output to the PC at one time. <S> The down side is that you will have to keep the relay energized continually for one signal (power consumption), and off for the other. <S> (A latching relay could avoid this problem.) <S> Looking at your Arduino relay board, the relays appear to be SPDT (single pole double throw), so you'd need to connect the shields (ground) together. <S> The following diagram shows this: Edit: I removed the diagram showing a DPDT relay because I goofed up; both Camera 1's composite video pins were going to the same throw on the relay. <S> Doh! <S> I revised the text to be applicable to the relays you have. <A> I would recommend going the bus-switch direction - it is assured to work. <S> While composite video is very forgiving - I had a solution using a SPDT for camera's in a vehicle and the specific relay i had allowed <S> cross-talk (within the relay) between the two active signals. <S> Now if you powered them up independently (which i could not do) it might work. <A> Here's what I was using to switch the high bandwidth signal CX-230 . <S> You might find the one that will fit your application better. <S> We tried a splitter on transistors, but it introduces noise. <S> However, this mechanical one seems to work better. <A> I think using an IC for switching, such as the CD4066B, which allows switching of analogue or digital signals, should work fine for a composite signal. <S> Use the Arduino to open or close each video feed in, the 1 IC can switch 4 different signals. <S> https://www.google.com.au/search?q=CD4066B&ie=&oe= <S> the IC can be had for less than $1.00 easily.
| Instead, consider using both throws of the same relay so that your inputs from each camera are connected to the throws, and the output is connected to the pole.
|
Why are the current directions in the hybrid-\$\pi\$ model for BJT the same for both NPN and PNP? Here is the hybrid-\$\pi\$ model: with \$I_c\$ and \$I_b\$ going in, and \$I_e\$ going out.The same circuit can be used for both NPN and PNP, the only thing changing being \$V_{be}\$ for NPN and \$V_{eb}\$ for PNP. The currents direction does not change, which is what I don't understand.We know that for a PNP in active mode, \$i_c = i_e+i_b\$. For a NPN in active mode, \$i_e = i_b+i_c\$, which corresponds to the current flow shown on the hybrid-\$\pi\$ model. Why is it the same for PNP? <Q> It's a small signal AC model, so the DC currents don't matter. <S> Since \$ \frac{dI_{C}}{dV_{BE}}\$ is the same polarity for both, we can use the same model (i.e. a larger b-e voltage results in a larger load current, just they are both negative for the PNP version (which equates to the same result as the NPN) <A> \$+g_m\cdot v_{be} = -g_m\cdot v_{eb}\$ <A> Directions of \$i_b\$ and \$g_m v_{be}\$ are correlated. <S> They both must go to the emitter or both go out of it. <S> If it is easier for you use this 'inverted' model: <A> The + and - sign at the base-emitter side and the arrow at the collector-emitter side only refere to the reference direction <S> , i.e. they do not make any statement about the actual current direction. <S> They indicate only what direction is considered positive and what direction is considered negative. <S> Collector: <S> current is flowing in direction of the arrow, i.e. collector current is positive. <S> In case of the PNP transistor: Base: current is flowing out of the base, i.e. direction is from - to +, i.e. base current is negtaive. <S> Collector: <S> current is flowing opposite to the direction of the arrow, i.e. collector current is negative.
| In case of the NPN transistor: Base: current is flowing into the base, i.e. direction is from + to -, i.e. base current is positive.
|
Noise from solid state rectifier in tube amp Recently I was talking to a friend about solid state rectifiers in tube amps. He told me that solid state rectifiers induces noise in the power supply, because the breakdown current of the silicon diodes, something like switching spikes. Is this noise a really concern? How could I reduce, or even eliminate that problem? <Q> Diodes can be noisy when used as rectifiers due to reverse recovery induced spikes. <S> Certain types of diodes perform better (schottky and so-called 'soft-recovery' diodes) or are essentially immune (silicon carbide) to this effect. <A> The V-I curve of a tube power rectifier has a much more rounded "knee" as compared to a solid-state rectifier. <S> This tends to reduce the production of line-frequency harmonics that would fall in the audio band, allowing the designers of audio amplifiers to basically not worry too much about power supply rejection in their designs. <S> I don't know of any straightforward way to emulate this behavior in a solid-state replacement for a tube rectifier. <S> Additional audio-band filtering in the power supply should help. <A> Noise from solid state rectifiers in high speed switching power supply circuits do need to be addressed. <S> However I can't see any merit how this would apply to an AC input 60Hz of audio amp. <S> It is a slow sine wave and switches at o volts with slow slew rate. <S> Tube rectifiers dissipate power due to there large forward voltage drop. <S> They are unreliable and costly to replace. <S> The power transformers have to compensate making them more costly. <S> That's why they disappeared by the 60' even when silicon diodes were not that good. <S> I don't recommend replacing tube rectifiers with solid state because the supply voltage will be higher and that may violate the maximum parameters of your amplifiers components. <S> I stay away from any amp that uses tube rectifiers because it is just stupid. <A> Diodes in audio amplifiers will generate noise than can be picked up in nearby AM radios. <S> Not a problem that comes up much these days. <S> Bypass each diode with a .01 uF X7R ceramic capacitor of the appropriate voltage.
| A well-designed circuit can address reverse recovery via the use of appropriate diodes (i.e schottkys and/or silicon carbide where appropriate) and by snubber networks, which absorb and dissipate the spike energy.
|
Systemverilog to Verilog translation I have a code block (multiple files) in Systemverilog. I am using the Xilinx tool flow that does not understand SystemVerilog (an old part). Is there a tool (or a rule book) I can use to convert the SystemVerilog to standard Verilog-2001 code ? <Q> Not aware of any tool that will automatically do the conversion. <S> You could do it by hand or write your own script. <S> Here is a list of common SystemVerilog to Verilog-2001 (or vice-versa) <S> Easy conversions: always_comb -- <S> > <S> always @ <S> * always_latch -- <S> > <S> always @ <S> * , may want to add a synthesis directive for latch <S> always_ff <S> -- <S> > <S> always int -- <S> > <S> integer or reg signed [31:0] <S> shortint -- <S> > <S> reg signed [15:0] <S> longint -- <S> > <S> time or reg signed [63:0] bit / logic -- <S> > <S> reg <S> byte -- <S> > <S> reg [7:0] <S> unique -- <S> > <S> remove and add synthesis directives full_case parallel_case <S> priority -- <S> > <S> remove and add synthesis directives <S> full_case <S> More challenging conversions: var = '0; -- <S> > <S> var = {PARAM_VAR_BITS{1'b0}}; '1 / ' <S> X / 'Z --> same as ' <S> 0 and substitute <S> all 0 with 1 <S> / X / Z respectively function void --> if not called by any other function then task else function reg <S> any calls should assign a dummy bit. <S> interface -- <S> > <S> either add each net to the respective module port list or <S> create <S> `include files. <S> enum -- <S> > make each item a parameter , make the variable of packed array (aka IEEE 1364 vector) of reg struct -- <S> > <S> either separate out each item or <S> make one bus with parameters as position keys union packed -- <S> > <S> same as struct plus some intelligent bus connections <S> (ex: {dest_0[3:0],dest_1,...,dest_n[1:0]}={src_0,src_1[1:0] <S> ... <S> ,src_n[9:0]} ) <A> It covers many of the differences highlighted by the other answer. <S> Check it out at https://github.com/zachjs/sv2v . <A> I know this is old, but just to share a solution I used. <S> Not a great one, but here it is. <S> Use RTL Compiler with synthesize <S> -to_generic. <S> That creates a Verilog compatible netlist. <S> This isn't perfect b/c <S> it also implements the flip-flop logic in terms that aren't exactly optimal for Xilinx's tools.
| I recently released an open source tool for converting SystemVerilog to Verilog.
|
Soldering iron struggling to solder to ground plane I've got a 48W Soldering iron which I'm using on PCB's, which I'm designing with Eagle and getting made up for me. I'm a hobbyist, so needless to say, I may well have the wrong tool for the job here. My designs use surface mount components and my soldering iron is really struggling to melt the solder when I'm trying to solder to a surface mount pad which is connected to the ground plane. Is 48W a bit on the small side? Should I replace the iron with a more powerful one or is that not the problem? I'd be very grateful for any help. <Q> You just need to heat the pad for a longer time. <S> Use big flat tip on your soldering iron to maximize heat flow. <S> If you still cannot solder you may try placing a hot plate under your board to preheat it. <S> And next time remember to use thermal reliefs: <A> I would recommend using a heat gun or hair dryer to raise the temp on the entire board. <S> Then after 30 secs or so, reattempt to solder the component. <S> If that fails, buy a flux pen. <S> Apply some flux to the pad to refresh the 'old' solder. <S> Especially useful for re-work. <S> https://www.sparkfun.com/products/8967 <A> For example, your iron may be at the proper temperature, but as soon as you transfer heat into a large wire or pad, that heat conducts away from the iron and it now must regenerate it. <S> If the iron has a low thermal capacity, it might require that you hold the iron to the pin or pad in question for a long time, which could cause damage to components or pads. <S> I strongly recommend that you get an iron with good thermal recovery and temperature control. <S> (See other threads for recommendations.) <S> As @Szymon mentioned, one way to reduce the heat requirement on the PCB is with thermal relief pads. <S> But if you have a component that has a tab specifically designed to solder to a large copper pour as heat-sink, you will run into the issue anyway.
| Soldering iron wattage plays a role, but even more important is thermal recovery and capacity.
|
Interference between speaker and vacuum tubes I'm building my own guitar tube amp, and now I have a dilemma. The speaker magnet is so close to the preamp tubes that I'm worry about interference between both. Should I be worried or that is not a problem at all? <Q> Since tubes make electrons traveling in vacuum between electrodes they are sensitive to magnetic fields. <S> Nevertheless, some power tubes like beam tetrodes use electrostatic deflectors to concentrate electrons into beams. <S> These kind of tubes must be kept in some distance of transformers and speaker magnets. <A> The magnetic field of the speaker will have a negligible effect on the electrical performance of the tubes. <S> However, there are other considerations such as heat and vibration. <S> Is there still adequate airflow around the tubes so that they don't overheat, or heat the speaker excessively? <S> In addition to microphonic effects that other commenters have alluded to, is there any possibility that the speaker magnet can pull the tubes out of their sockets over time, perhaps aided by vibration of the chassis? <A> I came across a very interesting article by <S> L L <S> (Bill) Williams, published in The Bulletin of the British Wireless, about beam power tetrodes. <S> The beams are not those viewed from above, formed by the beam forming plates. <S> That is a misnomer. <S> The original name "beam confining" plates is more correct. <S> The beams are actually the sheets of electrons formed as they go around the wires of G1, missing the G2 wires hidden behind, then converging into a dense pack, forming a virtual cathode near the anode, forcing the electrons onto the anode.
| But in preamp tubes, their grids are so close and the electrons are so fast, a magnet can hardly disturb their path.
|
Exploiting stack buffer overflows on an Arduino Is it possible exploit stack buffer overflows on an Arduino board? <Q> Your question can be read two ways, DarkCoffee: <S> If a particular Arduino based device can be induced to overflow its stack, can it be exploited? <S> Yes, it is possible to exploit a stack overflow on an Arduino. <S> One possible attack is the return oriented programming method, which requires sufficiently complex firmware. <S> So, one defense here is to keep your firmware as simple as possible. <S> It is highly unlikely that the Arduino "hello world" sketch is vulnerable. <S> That shouldn't be much comfort to you, though, because an LED blinker isn't terribly useful . <S> Useful firmware will have more functions, and therefore more function tails to harvest for use in an abstract machine. <S> The Arduino also has a boot loader, which inherently has the power to overwrite firmware. <S> My reading of the first page of the INRIA attack paper leads me to believe it combines both approaches: return oriented programming to execute enough code to activate the self-flashing ability of the microcontroller so that arbitrary code can be permanently loaded. <S> Are there stack overflow attacks on Arduinos in general? <S> I'm not aware of any attack that works on all Arduino based devices. <S> Again, the "hello world" LED blinker sketch is probably invulnerable, simply because it is too trivial to be vulnerable. <S> The more code you write, the more likely it is that you will create a vulnerability. <S> Note that writing 5,000 lines of code then replacing 2 kLOC with 1,000 new lines isn't a net savings of 1 kLOC from a security standpoint. <S> If those 5 kLOC were secure and you messed up while writing some of the new 1 kLOC, it's still a vulnerability. <S> The moral of the story is that the most secure code tends to be that which is stared at the longest, and that means keeping it unchanged as long as possible. <S> Obviously, every vulnerability should be patched ASAP. <S> This is no argument for keeping old vulnerabilities around. <S> It's an argument against adding features thoughtlessly to code you believe secure though inspection, audit, and analysis. <A> The important thing is that we cannot answer this question with "no" with anything close to absolute certainty, unless we formally verify a given Arduino system, as deployed, instruction by instruction, and even then. <S> Arduinos have optional ethernet interfaces and other form of remote communication, so remote exploits are possible in concept. <S> There is a TCP stack for internetworking, and even if it is small and simple, it could have flaws. <S> But, specifically, are stack buffer overflows possible? <S> Consider that the Atmel AVR processors have a Harvard architecture, which means that code and data resides in separate memory spaces . <S> That tends to rule out exploits where code is injected into the stack and subsequently executed. <S> An address placed into the stack by an attack vector will be interpreted as being in the code space, whereas the remaining attack vector bytes containing the malicious payload are in data space. <A> If you look at what normally gets exploited in x86 systems, ie, heap overflows, stack overflows, seh overwrites, format strings <S> etc there isn't that big of an attack surface. <S> With the possible exception of format strings I don't see any of those attacks working since the architecture simply doesn't allow it. <S> If you are interested in this type of research I would recommend looking at clock and voltage glitching, this often allows extracting information from devices even when locked, and just buggering with them in general. <S> You could also try differential power analysis if you're up to the statistics. <S> Lastly timing attacks are probably the easiest to exploit if you are looking for something to start with. <S> On the straight up hardware side there's a program called degate that allows reversing chips at the silicon level. <S> There's been a couple of decent conference talks on the subject and you'll probably love those. <A> If you hook up a debugger you get full access to RAM and flash, so there's no need to exploit anything, really... <A> Buffer exploits with intent to control via code incection only work against Princeton Architecture, because data storage and program storage share the same memory. <S> Now our plucky little Atmel has a Harvard Architecture - it runs code from a different memory than data. <S> And our craftily exploited buffer overflow can only write to SRAM, which cannot be executed. <S> It might crash the Arduino, though, if you have a way to transfer data to the buffer.
| It may be possible to exploit it to overwrite existing benign but vulnerable firmware with malign firmware. There isn't really anything to exploit on an embedded processor like the ATmega (used on Arduino) since there's only one execution level (full access) and no fancy stuff like Intel/AMD CPU ring protection (keeping user code away from kernel code in hardware).
|
Low cost method for retrieving information from a microcontroller I am in need of a device that can poll and record the temperature of an area automatically such that I can get the information on to my computer somehow. I am thinking of buying an NTE7225 temperature sensor or something similar, and hooking it up to a cheap microcontroller. Where I am stuck is how to store the information so that I can retrieve it later. I would need to store the information for days, preferably indefinitely until removed, but as long as it is powered on would be the next best one. The amount of data would be minimal, one temperature reading and timestamp every n minutes. The accuracy of the data would preferably be as accurate as the sensor is reporting (but that may be naive). The only two methods I can think of would be to: Buy an SDCard port of some sort and write an SDCard driver to put the information on to the card Use a USB port that exposes itself as a mass storage device with a file on it with the information in it. This has the added downside of being volatile. Are there any other good ways to do this? I can probably do it with a plug computer or raspberry pi, but I’d like to see if I can do it more minimally. <Q> I would use I 2 C or SPI, for both the sensor and an EEPROM in which to store the sensor data. <S> A 10-pin MCU can give you access to both devices (8-pin if you use I <S> 2 C)and a UART with which to talk to a computer (probably through a FT232 chip) for retrieval and reconfiguration. <A> Minimal, eh? <S> For the maximally minimal experience, you can do all of this inside a microcontroller. <S> Choose one that can rewrite its own flash memory, and measure its own temperature. <S> I'd suggest MSP430, but lots of microcontrollers meet these specs. <S> Then it's just a matter of a loop that measures temperature and records it to the micro's flash memory <S> then sleeps for a few minutes. <S> You can extract the data by reading the flash memory with a debugger, or choose a micro with a UART and write code to dump it out serially with an FTDI cable or such. <A> Why not skip building all the smarts and get it ready made? <S> http://www.lascarelectronics.com/temperaturedatalogger.php?datalogger=402 <S> This device will log the data and it can be download into a .csv file format. <S> There are heaps of other modes out there if you're only interested in ambient temperature. <S> I only mention this one because I've tried it before. <S> If you want to measure temperature of a surface or a device, there may be a solution for that. <S> If you want to build for development's sake then a Raspberry Pi may be the way to go for a flexible solution. <S> The SE Pi site would be able to help you out then. <A>
| If all you want is to read a temperature, then you can avoid microcontroller and connect temperature sensore directly to COM port, as shown here and here .
|
How can I switch a high-side transistor from logic referenced to ground? Problem: I have a logic signal (represented by SW1), say from a microcontroller, that is either 0V or some low voltage, maybe 5V or 3.3V. I have a higher voltage supply (V1) and a switching device (M1) on the high side of that supply, connected to a load. simulate this circuit – Schematic created using CircuitLab Sometimes, there is an H-bridge, or half an H-bridge, and I need to control the high-side transistor(s) (M2), but I think basically it's the same problem: simulate this circuit The difficulty is that my logic output is only 0V or 5V, but I need higher voltages, like maybe 50V and 45V, to switch the high-side transistor. I understand that the precise voltages required will depend on the transistors I select -- I'm just wondering how to solve this problem, generally. Is there a simple way to do this if my application is not very demanding? If I need to do the switching rapidly, say for a PWM application at 50kHz, is there a more complicated way to do it? <Q> Obviously you can just use the one NPN version, but the push pull increases drive capability. <S> This is just the rough idea, divider can be adjusted and protection added to ensure Vgs tolerance is met. <S> Q1's emitter resistor is to prevent it saturating and lengthening the turn off time. <S> Simulation at 1MHz <S> - I added the gate voltage (red trace), note it only swings ~7V, it follows the Q2/Q3 base voltage (a zener can be added as mentioned if needed): <A> How about a pull-up for the M1's gate (the P-FET) and an N-FET (M2) from that gate to ground? <S> If you power M2 you pull M1's gate low, switching it on. <S> If M2 is off the pull-up resistor ensures M1 is switched off. <S> More details <S> : P-FET M1 is switched on if its gate becomes a few volts lower than the source (the arrow). <S> ANd <S> N-FET M2 is switched on if its gate becomes a few volts higher than the source. <S> So if you apply a high voltage to M2's gate it will be on, pulling the gate of M1 low. <S> This creates the required voltage drop between gate and source to switch M1 on. <S> So applying a voltage to M2 will switch M1 on. <S> If you make the gate of M2 low it will switch off. <S> Then the gate of M1 will be pulled high by R1, and there won't be a voltage difference between gate and source. <S> Then M1 will switch off. <A> There are few basic solutions: <S> Gate transformer: you will be able to control both transistors in a leg with one transformer but the transformer itself may be hard to design. <S> Fully isolated gate drivers: simple but expensive solution as you will need to provide isolated power to high side gate driver(s). <S> This means using expensive DC/DC converters or a transformer with multiple isolated secondary windings. <S> Bootstrap circuit: <S> the boost capacitors provide power for high-side gate drivers. <S> These caps are charged when low-side mosfet is on. <S> This is a cheap solution but you must be sure to properly start-up the circuit. <S> First turn-on all bottom mosfets to charge the boost caps. <S> Only then can you properly start the converter. <A> I'm going for the high power and fast PWM end of the question because its the most difficult to solve as a design. <S> I deleted yesterday's answer not because it was wrong but because this is a more refined idea: - After the schmitt trigger has restored the control waveforms I'd use a standard push-pull MOSFET driver and, due to the slight asymmetry in the rails it will produce (say) a 12V active drive to the gate with a 2V reverse drive for switching the gate off quickly. <S> I would use the same driver topology on both FETs so that any delays are equal to both top and bottom FETs. <A> If you don't need a very high switching speed, an optocoupler will do the trick. <S> If the switching voltage is high, you might need a zener diode to make sure you don't exceed the Vgs spec for the FET. <S> simulate this circuit – <S> Schematic created using CircuitLab
| Aside from IC and isolated solutions (e.g. high side switch ICs, transformers, opto, etc - which is what you'd usually go for nowadays), one simple solution is a reasonably fast discrete PMOS driver circuit like this:
|
Positive and negative potential via two power supplies with common ground? I need to use a positive and negative potential on a circuit including an instrumentation amplifier. My lab only has single supply power supplies (only offers positive voltage). I know that I can reverse the polarity and achieve a negative potential, but this means using multiple power supplies. (I am pretty sure that I cannot reverse the polarity on a single rail to fulfill both my negative and positive potential needs as this will cause a short). I do indeed need to tie the grounds for both supplies to one another, correct? <Q> You would connect the negative terminal of supply 1 to the positive terminal of supply 2, then use the free terminal of supply 1 as positive rail, the connected terminals as circuit ground, and the negative terminal of supply 2 as your negative rail. <A> Your belief that the power supplies "offer only positive voltage" is fundamentally flawed. <S> Most lab power supplies have two terminals, with the electric potential difference (colloquially, voltage) between them regulated to some value set by the controls. <S> Because voltage is a difference, it means they do not have one terminal with no voltage and another one with positive voltage . <S> You can call one 0V and another 5V, if you want. <S> You can also call one -1382787V and the other one -1382782V, if you want. <S> Or \$\pi V\$ and \$(\pi+5)V\$. Or -5V <S> and 0V. <S> Any two numbers \$A\$ and \$B\$ where \$B-A = 5V\$ will do. <S> This is because every lab supply I've seen has galvanically isolated outputs. <S> See: <S> What is the COM terminal on a DC Power Supply? <S> Is voltage a delta? <S> Can it always be treated as a potential difference from a reference point? <S> What is ground and what does it do? <S> Help me understand the relationship between positive, negative, neutral and ground in AC and DC <A> We can take the two different terminal of the different supplies to connect that as a common and then take the positive and negative supply from the remaining terminals Just Like: https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQsBjhkP0UbpyK_7Cj5grFbVxWxrKqxAKvsucb_5kO-qMFbdAI8
| Yes, as long as the two supply outputs are floating (i.e. no common connection between them prior to connecting) then simply connecting two terminals together to serve as the common ground is fine.
|
How to know usb connection is lost I am working with AT90USB1287 controller with USB communication to PC. I am sending some commands from PC to controller using USB communication to activate some controlled switch. I am able to change the states of switch by sending commands(ON and OFF, voltage controlled switch). My problem is when switch is ON and unfortunately user forgot to send OFF command from PC and he shutdown the PC but still controller is running or suppose if i lost PC connection via usb, At that times it is causing problems. I want to check the in ATUSB1287 controller code itself if usb connection loosed then swicth t command should be zero. Can any one help me how to know usb connection is lost or not? this is my approach like is it possible to check in the main loop that usb connection is lost? if lost then switch off. Any other way to switch off? after losing connection to PC or PC shutdown. I am new to this type of thing, if anything wrong in this question please excuse me. <Q> On page 258 of the datasheet : <S> • 0 – <S> VBUS: <S> VBus <S> flag <S> The value read from this bit indicates the state of the VBUS pin. <S> This bit can be used in device mode to monitor the USB bus connection state of the application. <S> See Section 22.10, page 255 for more details. <S> On page 255: 22.10 Plug-in detection <S> The USB connection is detected by the VBUS pad, thanks to the following architecture: <S> The control logic of the VBUS pad outputs a signal regarding the VBUS voltage level: <S> • <S> The “Session_valid” signal is active high when the voltage on the VBUS pad is higher or equal to 1.4V. <S> If lower than 1.4V, the signal is not active •The <S> “Vbus_valid” signal is active high when the voltage on the VBUS pad is higher or equal to 4.4V. If lower than 4.4V, the signal is not active <S> • <S> The VBUS status bit is set when VBUS is greater than “Vbus_ valid”. <S> The VBUS status bit is cleared when VBUS falls below “Session_valid” (hysteresis behavior) <S> • <S> The VBUSTI flag is set each time the VBUS bit state changes <S> Not sure if this Is what your looking for but figured I would post it anyway. <A> It is likely that the solution which would best match your requirement would be to look for when the 1 ms USB frame events cease to happen. <S> There should be related logic in your USB code for handling these events, which you could have reset a loss of frame timer. <S> If that timer manages to expire, you know the PC is no longer actively managing the USB, even if VBUS is still present. <A> how to know usb connection is lost or not? <S> This event occurs when the host ceases to communicate with the device altogether for more than 3 ms - not sending even frame events. <S> The USB devices are supposed to lower their USB current in this state. <S> Note that this will not be helpful in case the driver or control program simply gets killed, e.g. by task manager. <S> The USB frame event will still be sent every millisecond. <A> If you're using the LUFA framework for managing the USB communication, then you can use the EVENT_USB_Device_Disconnect() event to detect the physical disconnect of the cable (the same as the VBUS detection Wallace pointed out). <S> Chris Stratton's answer is also supported in the LUFA framework, via the EVENT_USB_Device_StartOfFrame() which is received every 1mS, and can be used to detect a valid protocol-level connection. <S> Simply reset a timer every time the event fires, and check if the timer ever overflows - if so, then your device is physically connected, but not communicating. <S> You can find out more about these events in LUFA via the documentation here: <S> LUFA USB Events <S> If you're rolling your own implementation, there is a lot to be learned from the LUFA source code and examples for AVR. <A> A non USB-specific way would be for the controller to occasionally query the PC and expect an acknowledgement. <S> After N queries without an acknowledgement, the controller can assume that communication has been lost.
| Look in the manual of your microcontroller, there should be info on how to catch the USB Suspend event.
|
How can I electronically sense the state of an LED in another device with an Arduino? I'm working on a project to integrate an off the shelf garage door monitor with an Arduino. The base station has a pair of LED's that flash in different patterns to indicate the state of the remote sensor, and my thought is that I can read these by connecting them to the the input pins, however I have some hurdles to cross. I've made some progress, but I'm just getting started with electronics and I'm unsure if I'm going in the right direction or if I'm going to fry $70 worth of stuff. Here's what I know: The base station has a 100mA 12V power supply. The Arduino can use a up to a 12V power supply, but it's happier with 9V. The voltage across the base station leads is about 1.9V when they're lit. Arduinos use 5V logic, and read anything higher than 3V as high. My plan is get a 12V power supply that can power both easily, feed the base station directly off of it, and use this converter to give the Arduino 9V. I assume that they share the same ground level. Since the voltage across the LED is only 2V, which is not enough for the Arduino to read, I'm currently thinking of using a variation of this circuit below, which shows the ON state as about 1V and the OFF state as 5V at the input. The difference will be that I'll just run a wire from the positive side of one of the base station LED's to the transistor base. simulate this circuit – Schematic created using CircuitLab So, am I on the right track? Is there a better way to read these LED's using an Arduino? <Q> The problem is being addressed with unnecessarily complex solutions. <S> The crux of the issue is an incorrect assertion: " Since the voltage across the LED is only 2V, which is not enough for the Arduino to read, ... ". <S> The Arduino's analog inputs are high impedance, and can happily read a 2 Volt signal. <S> In fact, AnalogRead() would return a value of around 1024 <S> x 2 / 5 = <S> ~ 400 to 420 for an approximately 2 Volt signal. <S> The high input impedance ensures that operation of the LEDs is not materially affected - even a voltage follower or a buffer is unnecessary. <A> You can use a voltage follower so you can read the voltage of the LED without changing the impedance of the reading circuit. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Well, I don't know much about your project, but this could be a quick solution. <S> ;D <A> Why bother modifying the remote? <S> Use a phototransistor/photodiode. <S> It's a light based transistor. <S> Hot-glue it over the led or tape it on, and you are done. <S> This still requires an analog input on the arduino. <A> The voltage across the LEDs may be too small for the arduino input <S> but it would easily switch on a transistor. <S> Any small signal NPN transistor would do for Q1 and Q2. <S> The resistor values are not that critical.
| So assuming the two circuits have their grounds interconnected, simply hook up the anodes of the LEDs to separate ADC pins of the Arduino , and use AnalogRead() on each.
|
Does the physical size of through-hole ceramic capacitors relate to voltage rating? I am sorting through some ceramic capacitors and reorganizing them. I came across a number of capacitors with "82" on them (at left) , which I assume is 82pF, but they are physically larger than even my 0.1μF capacitors (at right) . Does the large size of these capacitors relate to their voltage rating (or something else), or did I misinterpret the capacitance value? <Q> For a big capacitor the distance should be low and area should be high because capacitance is directly proportional to area of the plates and inversely proportional to the distance between the plates. <S> But if the distance is too low, the dielectric will get punctured with voltage. <S> So there must be a proper distance between the plates according to voltage; and for that distance, the area should be high as to get the required capacitance. <S> So in any capacitor, the size depends on voltage and its capacitance value because voltage rating is proportional to distance between plates and capacitance is proportional to area of the plates. <A> Check this answer: Maximum current and voltage of Small Ceramic Capacitors? <S> They are a standard, so most of them can manage almost the same voltage/current for the same capacitance value. <S> That is the reason there are power capacitors, electrolytics, ceramic and others. <S> All of them depends on the usage you need. <A> The 82.pF caps looks to be around 300-400 Volts while the .1uF cap is probably 12-16 Volts.
| Ceramic caps don't usually have a problem with power ratings outside of high power RF circuits where special metal cased caps are used where inductance of the wire leads is the main concern
|
Simulation tool to calculate microprocessor power consumption? Are there any simulation tools to calculate microprocessor power consumption at the early brainstorming stage of development? <Q> No. <S> There are no tools that I know of. <S> And if there were, they would be mostly useless. <S> There are just too many factors to consider that any tool would be wildly inaccurate. <S> If you do this at the very early stages of project conception, when most of your software has yet to be written, then your estimates could be 10x or more off! <S> The best that you can do is look at the microcontroller datasheet and estimate your max power consumption. <S> You could get a little deeper into it by also estimating how much time the MCU will be in sleep mode and factor that into it. <S> Much beyond that <S> and you will not get much more accurate even though you spend a lot more time trying to estimate things. <A> Current low power microprocessors have many operation modes with various power consumption levels in each mode. <S> for example, the TI MSP430 (an ultra low power 16Bit MCU) has an active mode current of 180 to 270uA per MHz, at least 3 lower power modes with different power consumption in each mode, and that is without the peripherals. <S> Taking all those parameters into account is quite a task, however, some vendors have tools to these simulations easier (Energy Micro have these integrated into their IDE). <S> It is much easier to get an evaluation board, add your application circuit and measure the current consumption at each mode. <A> Yes, their are simulation tools for calculation of power. <S> Orion 2.0 is an open source tool that is used to calculate power consumption of the On-chip Network of microprocessors. <S> Renowned processors include OpenRISC, MIPS, Intel, ARM, ARC, ALTERA and many more... <A> Altera's supported processors that are supported by Imperas are: <S> Nios II SNios II FIt can simulate these processors in the form of single core, double core as well as many core... <S> And Heterogeneous configuration of processors are also supported.
| Also we can have simulation tools for designing of a customized system (platform) of any renowned processor, that are called Open Virtual Platforms. Software tools will not help you much in this regard, even if they existed.
|
Microcontrollers - are the output states constant or multiplexed? PWM obviously require computing resources (and thus cannot be done simultaneously with other processes), but if I were to set a pin as output 5V or 0V, do these states remain constant or are they repeatedly "refreshed" as the microcontroller works on other processes? This is hard to explain in text so I thought of an analogy to my question. Imagine I have a glass in my hand and am instructed to put it on the table. Then I am instructed to sit down in a chair. The glass on the table is a state. Do I leave the glass on the table, or do I pick it back up and sit down and the repeat very quickly so you do not realize the glass was ever removed from the table? Or perhaps more simply, does the microcontroller "forget," if you will, about the states of its pins unless you explicitly program a state change? Hopefully I made that as confusing as possible. <Q> The way I interpret the question has nothing to do with PWM, sorry if I am way off base, but it sounds like you used it as just an example. <S> Pretty much every type of microcontroller and devices with I/ <S> O use a latch/FF to drive their output circuitry. <S> What this means is, when you set a state, it stays in that state. <S> It is not like DRAM where the output stats have to be constantly "refreshed" in order to stay at their state. <S> With your glass example, I have never seen any hardware that would pick up and put down the glass on the table repeatedly. <S> It would only ever put the glass on the table, and leave it there until a state change is requested. <S> Going back to PWM (just in case you were actually asking about PWM). <S> Whether you bitbang it or your microcontroller has dedicated hardware as other posts outlined, the I/ <S> O block is only accessed and modified if a state change is requested by running code or the PWM peripheral. <A> The microcontroller doesn't have to refresh the outputs. <S> Once they're set they keep their state indefinitely (until power is removed). <S> While in older processors the clock was required to maintain the processor's state, today's processors are what is called fully static. <S> That means that the clock can actually be stopped and everything will stay in its current state. <S> That's because all registers (including I/O) are made using flip-flops. <A> Most modern microcontrollers have a dedicated hardware PWM peripheral which takes care of the PWM, a very rough analogy might be: <S> The processor core tells the peripheral to: "toggle this pin at 10kHz and 50% duty cycle until I tell you otherwise". <S> Then the core is free to do other stuff. <S> It may set an interrupt, i.e. ask the peripheral to tell it when something of interest happens. <S> You can maybe think of the core as the "boss" and the peripherals as specialist workers. <S> The core manages the whole program (reads each instruction and acts upon it) and "asks" the peripherals to do various tasks and notify it when they have completed them. <S> In your analogy, it would be like another person is holding the glass, you instruct them to place it on the table while you are free to sit on the chair. <S> If the micro didn't have a dedicated peripheral, then it would have to do it "manually" (i.e. itself) and keep track of the pins state and timing between toggles. <S> This would mean a lot of cycles dedicated to pretty menial stuff which is easily handled by a simple peripheral. <S> Here is a diagram of the layout of a popular 8-bit microcontroller, the PIC16F690 . <S> Notice the peripherals arranged at the bottom: <A> You are making some assumptions that are not exactly valid. <S> Also, yes, you made the question as confusing as possible. <S> Seriously. <S> PWM can be done simultaneously with other processes. <S> If done in software, you use timer interrupts to generate the PWM signal on a GPIO pin. <S> Other interrupts can run, and the main process is doing unrelated things. <S> Also, many MCUs can do the PWM directly in the timer peripheral, freeing the MCU to do other things. <S> But you are in control of how they are multiplexed, so that's not really an issue. <A> Most of the I <S> /O pins on microcontrollers are multi-function, but I wouldn't call them multiplexed. <S> For example, several pins on an AVR can be used as digital input, digital output, or analog input. <S> You would normally select the desired function as part of the program initialization, and not change it later (although I might see some reason to change an analog input to a digital input to view the same signal.) <A> In a simple example of a microcontroller hardware PWM peripheral, an 8 bit counter might be connected to an 8 bit digital comparator. <S> The microcontroller would load a number into the comparator and increment the counter with the system clock or some prescale divided version of it. <S> the counter would then free-run, counting from 0 to 255 and back to zero repeatedly. <S> The comparator would have an output indicating whether the counter value is greater or less than the comparator value. <S> This would become the PWM output. <S> The period of the PWM would be how long it takes for the counter to complete a count cycle and the duty cycle would be what fraction of the total count is represented by the comparator value. <S> The microcontroller code would not have anything to do except set the hardware up initially and change the comparator data when a pwm change is desired. <S> The PWM would output a continuous stream of PWM pulses without processor attention.
| For digital outputs, once the pins are set to be outputs they will hold the last value the processor wrote to them - no need to "refresh" them periodically. As for the I/O Pins, they are multiplexed.
|
Using a 12V battery while simultaneously charging via solar panel I have a couple of 12v batteries that I'd like to use to power a cooling apparatus while camping for several days. I also have a 15W solar panel I'd like to use to top-off the battery. Can I use the battery while it is charging? Or would I have to disconnect the solar panel prior to using the battery? Alternatively, I could charge 1 battery while using the other, and simply swap them out - is this preferable? <Q> so it looks like you are charging and discharging simultaneously. <S> If the charging source can deliver more current than the load requires, then the excess current will be used to charge the battery. <S> If the charging source delivers less current than the load required, then the battery will supply the extra current needed. <S> This switching between charging and discharging will happen automagically as the charging source and load vary. <A> If by "use the battery" you mean "can the battery be in the circuit?" <S> then yes. <S> If by "use the battery" you mean "draw power from the battery while charging it? <S> " <S> then no. <S> Charging is, by definition, putting power into the battery. <S> This is the opposite of drawing power from it. <S> You can't do both, by definition. <S> Under normal operation, where the battery is powering a load, conventional current flows inside the battery from (-) to (+), through the load, and back to the battery. <S> If something else (like your solar panel) can apply a voltage higher than the battery, then the battery becomes "the load", and current will flow through it in the other direction, reversing the redox reaction inside it, storing electric energy from the solar panel as chemical energy in the battery. <S> Of course, you have to make sure this current is within the operating parameters of the battery. <S> If you charge a battery too fast, or too much, with those limits depending on the particular battery and specified in the datasheet, it will be damaged, destroyed, explode, or otherwise bad things will happen. <S> Don't do that. <S> You also want to make sure that when there is not enough sun on the solar panel, and thus its voltage is lower than the battery, that the solar panel doesn't become the load, with the battery driving a (potentially very large and destructive) current through the panel. <S> Usually this accomplished with a series diode. <S> There are, of course, no shortage of commercial products designed to charge batteries with solar panels. <S> It's basically the most common thing to do with solar panels. <S> Such a device will take care of monitoring the charge on the batteries, being sure to not damage them, preventing reverse current, etc. <S> Some are sophisticated enough to adjust the operating point of the panels for maximum efficiency and other such neat stuff. <A> If you operate a laptop while its battery charger is connected, then you are familiar with the concept you ask about... <S> Yes, you can. <S> Answer 2 and the aforementioned laptop powering are JUST what you propose. <S> Just be sure not to cause a deep discharge... <S> some batteries will not recover. <S> NiCads can even reverse polarity.
| While it is true that you can't actually charge and discharge a battery simultaneously, it is quite common to have a charging source, a battery, and a load, all connected in parallel
|
What's the Opposite of a sensor? I'm trying to write an electrical engineering paper about different I/O on mobile phones. The inputs, such as the camera, microphone, accelerometer, GPS, can be considered sensors. What's the equivalent word for the outputs, such as display, speakers, vibration, etc? I thought it might be haptic, but haptics are only for outputs involving touch. <Q> The commonly accepted term for this is "actuator," although technically that only applies to outputs which generate motion (for example, an LED is not an actuator). <S> A more general term for both inputs and outputs is "transducer," which is a device that converts one form of energy into another. <S> For example: An LED converts electrical energy to light, a speaker converts electrical energy to acoustic waves, and photodiode converts light to electricity. <S> Transducer is also often used to mean "sensor," even when the sensor isn't really doing an energy conversion <S> : A common pressure sensor is really a bridge resistor network, so electrical energy from the power supply is being converted to electrical energy to the amplifier/AD converter/whatever. <S> The pressure of whatever gas is acting on the sensor isn't really being converted to another form of energy. <A> You might consider using the term " output indicator" or just "indicator". <S> Thus the display is a visual indicator, the speaker is an audio indicator, and the vibrator is a mechanical indicator, etc. <A> And haptic does refer to touch. <S> When I write about this kind of stuff <S> I tend to say: visual output, or audio output. <S> The word output should cover the general sense, if you want to get more specific <S> I suggest simply naming the output method you are using e.g. 20x4 LCD Display
| An output is the opposite of a sensor, as you say.
|
Switch symbol: Which line is normally-closed? The symbol below is for the component TL32P0 (TINY SWITCH ON - MON), included in EAGLE 6.5. In this symbol, which pin is normally-closed (NC)? 1 or 3? Or is the symbol not a typical one, i.e. not somehow standardized? <Q> For momentary NC <S> /NO switches, the one shown closed, is the one that should be normally closed. <S> Convention follows common sense. <S> The given switch though, is a on/on SPDT switch. <S> It isn't really a NC/NO momentary switch, so there is no concept of "normally closed" aside from it being the side you want. <S> If only one throw of a SPDT switch is used, the symbol should match that side, but that's not very necessary in most cases. <A> The symbol in your question usually indicates the state when the push button is not pushed, when it is not being touched. <S> The little arrow in the symbol indicates there is a spring pushing the switch contact up to the top position. <S> When you push the lever, it pops back when you release it. <S> That is the ON-MOM part in the datasheet. <A> Note that in the tables in the data sheet, the switch configurations are given in tables that have roman numeral column headings. <S> III II <S> IEinpolig ZweipoligTL36P0 <S> TL46P0 <S> ON <S> - ONTL39P0 <S> TL49P0 <S> ON <S> OFF <S> ON[ ... ] <S> TL32P0 TL42P0 <S> ON - <S> MOM <S> I would think that for the single pole part, the roman numerals correspond to the pin numbers, and are given as roman numerals in order to convey the idea that these are positions and not pin numberings. <S> (The two-pole parts have six contacts, and so perhaps I, II and III correspond to 1 and 4, 2 and 5, and 3 and 6). <S> I'd get my hands on a sample before designing a PCB. <S> Now, on to the symbol. <S> With that in mind, if the roman numerals in the data sheet correspond to pin numbers (positions III, II, <S> I being pins 3, 2, 1), the symbol's pin numbering is then reversed relative to the data sheet. <S> In this kind of situation, one way out is to get your hands on a sample of the part, then clone the symbol and renumber the pins, if necessary.
| I would say that the normally closed contact of the switch is the one that is actually symbolized as being closed. For the vertically mounted units, it doesn't matter; you can just design the PCB arbitrarily and then determine their orientation when stuffing the board, since the footprint is symmetric, but the ones that lie horizontally, with bent terminals, have to be correct.
|
How much current would you design for the various supplies required for Spartan 6 LX9 devices? I'm designing a new board based on XC6SLX9-3TQG144C. There are three supplies required -- VCCINT, VCCAUX, and VCCO. VCCINT is 1.2V and the other two will be 3.3V. I'm wondering how much current to design for in the power supplies. Obviously the current consumption depends significantly on the RTL running inside, but are there any good rules of thumb for this? In the past I've just over designed the thing to be able to supply something like 1 amp (can't remember which LDO I used, but at the time it was a national part) for the internal supplies and whatever I think I'll need on the I/O side of things (which is much easier to estimate). I'm trying to minimize area on this board though so it would be nice to not just "shoot the fly with a bazooka" so to speak. Is there a reasonable way to accurately estimate the current consumption for the internal supplies of an FPGA? I've looked a bit at xpower, but I didn't see (didn't spend a ton of time looking) a way to enable/disable various portions of the design as one would expect in real life (e.g. memory controllers, actions responding to external events, etc). <Q> Why not ask Xilinx, since they are the ones who designed the chip in the first place-- and it is in their best interest for them to help you successfully design your board? <S> Of course the best place to look is in the datasheets. <S> The second best place is in the Xilinx Power Tools Tutorial . <S> After that there are lots of app notes, user guides, and white papers on the Xilinx web site that talk about techniques, modes, and development tool options to reduce power more. <S> And don't forget the many reference designs that you can download the schematics for. <S> Finally, Xilinx and/or your distributor will have resources to help you. <S> Field Applications Engineers can provide design assistance, as well as review your design. <S> While people on electronics.stackexchange can give you assistance in this, it is not a replacement for using the documents, resources and tools that Xilinx has already provided. <A> The answers above seem to suggest that the datasheets provide sufficient information to determine the power consumption of the device. <S> I disagree <S> -- The datasheets provide a lot of information on quiescent current, leakage currents, etc, but they cannot speak to dynamic power consumption, which accounts for the vast majority of the power used. <S> After all the datasheet has no idea how fast anything is switching the device, how much of the device is being utilized at any given time, or what peripherals (e.g. serdes/memory controller stuff) are being used at any given time. <S> After digging into this a bit more it's not too painful to dump a vcd file to xpower and get a fairly reasonable estimate for power consumed by the various supplies. <S> Ultimately though it seems that for 99% of the cases over designing the supplies by some reasonable amount of headroom is easy enough and probably not worth optimizing a ton. <A> If you want the option to disable portions of your design, build that into the logic - using clock enables to freeze areas that you don't want to use at the moment can substantially reduce power consumption. <S> Also, if you're concerned about size, you can get multi-output switchmode controllers in small SMD packages that will supply both 1.2V and 3.3V at good efficiency. <S> A good place to look for such things is the large electronics vendors, e.g. Digikey, Mouser, RS, Farnell, etc that allow you to do parametric searches on their product range. <A> If you have already finished your design, use the Xilinx Power Estimator. <S> But one of the reasons to use FPGAs is the ability to reconfigure them as needed, so you may want higher power later, then I can't see the point in finding precise current values. <S> And eventually both if you require 1.63 or 1.87 A you'll end up with a 2 A regulator, don't you?Unfortunately <S> , there are other subtle issues to take into account when powering FPGAs: <S> Stability - Typically FPGAs require their supplies within a few % of the nominal value. <S> Check the ripple voltage, especially for switchers. <S> Load regulation - An FPGA is or may be a large amount of logic running at high speed thus consuming a large and VARIABLE current. <S> Suddenly changing current will cause a drop in voltage that may be out of specs. <S> You may need lots of low-Z caps OR... a higher current regulator. <S> Soft Start and sequencing - Turning on everything at once may cause problems. <S> Specially the larger FPGAs need (or recommend) <S> a sequenced turn-on with a slope (soft start) of some ms. <S> Monotonicity - On turn-on, in between 0,5 and 0,9 V the logic starts runnnig and there may be a large current inrush that will cause a voltage drop. <S> Even if useconds it can make logic misbehave. <S> Supplies must cope with this to ensure an always rising voltage <S> I found these guys have a lot of expertise on FPGAs: www.akteevy.com
| The various datasheets for the Spartan6 do include enough information to have a reasonable stab at the upper limits on the amount of current consumed by each type of Vcc.
|
What parts would one typically use for automated PCB testing? I have a circuit board in production, primarily through-hole, to the tune of ~400 units per year. Each one is manually inspected and tested. The board has ten distinct voltage rails, four voltage feedback amps, three current feedback amps, a microprocessor with particular response characteristics, and a few other parts. That's a lot to check. I'm considering building an automated test rig for all that. I think a PCB that feeds the appropriate input stimuli, observes the responses, and gives a go/no-go would save me a lot of time. I'm reasonably confident that this is done, commonly. However, the techniques used to do it are unknown to me. I imagine a test rig with a circuit board of the same footprint as the unit under test (UUT). It would have a microprocessor, appropriate protection and scaling circuitry, and a large number of vertical pins sticking up from the board. Mount points would also stick up from the test rig for the UUT. When the UUT is mounted on top of the test rig, the bottom of the board makes contact with the vertical pins, allowing the test rig to feed stimuli to the UUT and observe responses. This seems reasonable, and I have the idea I've seen something very much like this before. But the details elude me. What sorts of pins would be used on the bottom board? (Part numbers would be great!) Would I need to put specific kinds of test points on the UUT, or can I get away with just contacting the clipped pins protruding through the board? What other concerns might there be? <Q> The pins used for making the kind of test fixtures, which the O.P. is describing, are called: contact probes , or spring loaded pins , or pogo pins . <S> They come in various sizes and with various shapes of tips. <S> The choice of a tip depends on the type of test pad: via, flat pad, pin from a throughole component on the solder side. <S> Here's a datasheet of the pogo pin family as an example. <S> This particular family is available on Mouser. <A> The test board arrangement referred to is commonly known as a Bed-of-Nails board. <S> The pins used are called pogo pins or spring-loaded test probes: <S> ( source: eBay ) <S> Pogo pins come in a variety of contact shapes: <S> Yes, specific test points, and pogo pins in corresponding locations, would be good - else the pogo pins would simply press against random parts of the DUT, potentially causing shorts or meaningless readings. <S> If you mean "Do I need to shape my test points a certain way", <S> then yes: <S> Pogo pin contact points are often exposed pads on the DUT PCB, or exposed vias, depending on the manufacturing process preferences. <S> Vias have the slight advantage of the pogo pin tips centering on the hole / dimple in the via, potentially providing better registration of contacts. <A> Use that term to search on any suppliers website (mouser, digikey, etc). <S> Pogo pins come in various points, some are optimized to contact bare copper test points, others are optimized to make contact with via's. <S> But you mention you have a microcontroller on your on your product. <S> Consider what you could check with a dedicated application on that controller, maybe with a little extra circuitry on your board. <A> Here is an example of test pads added to PCB for connecting the pogo pins <A> Adafruit has a tutorial <S> How to Make a Pogo Pin Test Jig which is quite informative. <S> SparkFun also has an article on automated hardware testing jigs: <S> PogoBeds: <S> SparkFun Production and Testing .
| The pins on the test rig would probably be pogo pins.
|
What is the minimum current a current transformer can sense? Datasheet of AS-100 mentions a maximum current it can sense before saturation, but what is the minimum current it can sense. For instance, if I put 10 mA 50Hz through a conductor passing through the sensor AS-100 (1:50 ratio), will it produce 0.2mA through a 50 Ohm (suggested) terminal resistance on it's secondary? <Q> If you look at the data sheet, the secondary DC resistance is 0.6 ohms. <S> The recommended load resistance is 50 ohms. <S> As the data sheet says, this value was selected to give a 1 volt output for 1 ampere flowing through the primary. <S> As a check, 1 ampere in the primary will yield (for a 50:1 ratio) <S> 20 ma in the secondary. <S> With 20 ma through it, the 50 ohm load resistor will indeed produce 1 volt of output. <S> With 10 ma in the primary the secondary level will be 0.2 ma which will yield 10 millivolts across the 50 ohm load resistor. <S> This should be well above any electronic noise in your sensing circuit. <A> Sensing is not performed by the transformer -- it is performed by the circuitry attached to the secondary. <S> The minimum amount is determined by the equipment measuring it -- the load it places on the secondary, significant digits of precision and the reference voltage. <A> Current transformers are like any other transformers and obey the laws of Faraday and Lenz. <S> What is important to understand are the sources of error and how real world materials act. <S> Before a transformer can actually transmit energy, the poles in the magnetic molecules must be first aligned in the same direction. <S> This is the initial magnetizing current. <S> Additional losses based upon degree of saturation are also present. <S> These IR losses are also subtracted from the potential output. <S> The material of the core chosen and its size determine the amount of these losses. <S> For the application chosen, AS-100, the CT will produce a non-linear output and probably will not give the expected signal, <S> as the magnetizing current from the wire through the hole is not enough to excite the core enough to transmit energy through the core. <S> A different CT should be chosen, one with a highly specialized core that is designed to excite with a minimum of excitation current. <S> Core such as nickel and the new nanocrystal cores would provide a much better result. <S> Please refer to this treatise that explains fully the model of a CT - http://www.crmagnetics.com/assets/technical-references/analysis_of_ct_error.pdf
| With that said, the minimum current that can be sensed is probably limited by the noise level of your sensing circuit.
|
What are the ways to make a dual power supply from a single voltage source? I have a function generator IC XR2206 from EXAR. It's application circuits uses dual power supply +/-9 volts. How can I make such a 9-0-9 dual supply from a single voltage source like a battery or an adapter? <Q> A relatively painless approach, assuming you have just the requisite positive supply <S> , say +9 Volts, would be the use of a switched-capacitor voltage converter such as the MAX1044 <S> or ICL7660 in voltage inverting mode. <S> The first typical operating circuit schematic in the linked datasheet shows how. <S> This will provide an inverted voltage supply of up to 10mA, matching the positive voltage supply, up to 10 Volts: Sufficient for XR2206 operation with a high impedance load. <S> For higher current requirements, other negative voltage generation modules exist from various manufacturers, typically switch mode converters. <S> This article provides some ideas on virtual ground / rail splitter circuits. <A> For a quick and simple dual power supply, use two resistors in series connected in parallel with two capacitors. <S> Connect the two ends to the battery or power source and BAM! <S> You have a dual power supply. <S> Typical values for bipolar converters like this are 100k-1M for the resistors and 47uf to 4700uf depending on the current draw of your circuit. <S> simulate this circuit – <S> Schematic created using CircuitLab Note:!!! <S> Make sure the negative rail of your power supply is not connected to ground! <S> Use the continuity setting on your DMM to check !!! <A> The XR2206 works just fine off a single supply without any kind of rail splitting, you just need to read the datasheet. <S> Figure 2 shows a single supply example. <S> If you go this route, be mindful of the minimum single supply voltage. <S> Also, a word of caution: the XR2206 is several years obsolete. <S> Do not use it for anything that you may want to put into production.
| If a supply of twice the required minimum voltage is available, another option is to simply split the supply and create a virtual ground, either using an op-amp fed from a pair of matched resistors as voltage divider, or using a dedicated rail splitter part such as the Texas Instruments TLE2426 .
|
How to choose right PWM frequency for LED? I want to control LED's brightness with PWM (via BJT transistor). What frequency of PWM should I choose? <Q> For a question like this, you will probably get as many answers as there are people interested in answering. <S> Here is my answer: <S> It depends . <S> Here are some of the limiting factors, first the lower limits: Persistence of vision: <S> Different people are differently sensitive to flicker in a light source. <S> Some would notice flicker even at 100 Hz, others perhaps not even at as low as 10 Hz. <S> Motion of light source relative to the eye makes flicker more discernible, scaling up with speed of the motion. <S> Human vision sensitivity at low intensity of light - both ambient and source intensity. <S> At very low intensity, the eye is much more sensitive to any change in intensity. <S> So an LED operated at low duty cycle / low current and in a dark environment would require a higher minimum PWM frequency. <S> Now the upper limits: <S> LED turn-on characteristics <S> : An LED cannot be toggled at arbitrarily high frequency, once the pulse duration approaches the turn-on time, the LED never really turns on fully, hence linearity of PWM control is lost to begin with, and at higher frequency / shorter pulses, eventually the LED just stays dim or off. <S> PWM provider capabilities <S> : Your microcontroller would have its own maximum PWM rate, which sets a hard limit. <S> Switching losses: <S> Any switching system, MOSFET based, BJT based, or other, suffers switching losses of power as switching rate increases. <S> At one point this become significant both in terms of heating of switching device, and efficiency of illumination. <S> Thus, depending on these parameters, and any others affecting your specific requirement, the correct answer could be anywhere in the 50 Hz to few dozen KHz range. <A> Cadillac was one of the, if not THE first car to introduce LED brake lights and we as Engineers wonder how this missed this major detail. <S> People would say why is that car brake light flickering as it was driving past our view? <S> It was so irritating to some with Seizure sensitive to flicker, that it could trigger an "episode". <S> Since we have house LEDs stationary we, don't often care yet we know something is irritating to some people. <S> This is often because Engineers don't know much about Biomedical responses and think 150 Hz is OK, because they can't tell anything staring at it. <S> That's because it requires motion artifact to detect the flicker or moving images across the retina peripheral. <S> The range of frequency I would suggest is 300 Hz minimum for stationary and 1kHz minimum for moving flicker-free. <S> Although the industry has been slack with 300 Hz and <S> peripheral eye motion flicker-sensitivity still exists at this flicker rate in moving tail lights. <S> White LED phosphor responds much much faster than TV tube phosphor. <S> If you don't care about my concerns, feel free to follow the others' advice at lower frequencies. <S> I looked for references to back up my experience. <S> This is just one example. <S> http://www.thenakedscientists.com/forum/index.php?topic=45126.0 <A> As I've seen, almost all of the PWM dimmer diagrams with LM555, have the oscillating circuit formed by a 0u1 capacitor and a 1k resistor. <S> That means something about 2 kHz with slight variations at low and high widths. <S> I think this frequency offers enough switching speed in order to not see bad flickers on moving and, on the other hand, slowly enough to turn on the LED al low width. <S> I wanna try higher frequencies to see what happens (5...10 kHz) <A> Agree with those above on the low end, but on the higher end of frequency spectrum, you can sometimes hear an audible switching if you are in the 1k-15k range. <S> You'll want to stay out of the audible range or you can potentially hear a high pitched noise at your PWM frequency. <A> If you put a capacitor parallel to the led you should be able to avoid the flickering and instead get a slight declining wave, or ripple. <S> The higher the frequency, as well as longer 'on' pulse width will give the most consistent light. <S> Choice of frequency now depends more on how many different widths you wish be able to squeeze into a cycle, or intended dimming resolution so to speak. <A> There is research that suggest the majority cannot distinguish past 500Hz, and some other research that suggest a minority can see flicker up to 1500Hz. <S> I have a housemate who is very sensitive to flicker - 1Khz caused them problems but had no further problems once my lighting system as set with a 4kHz PWM frequency. <S> (apologies I read it some time ago and cannot find the reference now) <S> Note my application was soft lighting for the whole room <S> , so peripheral visions would definitely be an issue. <S> The limiting factor is really the rise and fall time/resistance of your mosfets as this will dictate switching losses in relatively high current applications. <S> Fast low resistance fets are worthwhile in this application.
| It depends entirely on the application and human eye natural sensitivity to flicker when the light is moving or when your eye is moving with peripheral sensitivity improved to flicker, while steady-state peripheral vision declines.
|
How can I calculate the inductance of the primary of a transformer given a specific load on the secondary? Inductance in the primary of a transformer decreases as the load on the secondary increases. How can I calculate the inductance of the primary coil? What if it was step up or one to one ratio? <Q> Inductance in the primary of a transformer decreases as the load on the secondary increases. <S> No it doesn't. <S> It may seem like it does (because when loaded your transformer takes more current into the primary) but just imagine that the load you put on the secondary (say 1:1) ratio were applied to the primary - the current in the load would be the same (1:1 ratio) and the small current that goes into the transformer primary (when off load) will still be going into the primary <S> (this small current is the magentizing inductance and remains intact with varying load conditions). <S> If your ratio was (say) 10:1, and you connected a 10ohm resistor on the secondary, this is equivalent to connecting a 10ohm x \${(\frac{N_P}{N_S})}^2\$ resistor on the primary i.e. 1000 ohms. <S> Np and Ns are primary and secondary turns and your equivalent primary load is the turns ratio squared. <S> With the "equivalent" load connected on the primary, the transformer inductance may "appear" to have changed but it's still there and in parallel with the "equivalent" load. <S> EDIT <S> I'm adding a picture below showing a 1:1 transformer with windings that are 10mH each. <S> On the secondary there is a 2.53uF capacitor and the primary is excited with \$10V_{RMS}\$ at 1kHz <S> : - Conclusion, adding a load of any description does not affect the primary magnetizing inductance of a transformer. <S> If you put an inductor on the secondary you might think the primary inductance has reduced but in fact the added secondary inductor becomes in parallel with the never-changing primary magnetizing inductance. <A> Is that transformer the ideal transformer? <S> Then the answer is simple. <S> The capacitance of the secondary side is impedance converted and observed from the primary side. <S> Then how about with an actual transformer? <S> I did the experiment. <S> The photos are as follows. <S> First, it is inductive at low frequencie, change to capacitive at higher frequencies from antiresonant frequency, and change to inductive again at series resonance frequency. <S> The anti-resonance frequency is the resonance frequency of the self-inductance on the secondary side and the capacitance. <S> The series resonance frequency is the resonance frequency of the short-circuit inductance on the secondary side and the capacitance. <A> Inductance in the primary of a transformer decreases as the load on the secondary increases. <S> No it doesn't. <S> Actually, it does with non-air-core transformers. <S> The permeability of the iron changes with flux density, which means the inductance changes when the amount of current through the transformer changes. <S> Loading down the secondary increases the current through the primary / the flux density in the iron core, and the inductance of both the primary and secondary changes. <S> This is easily demonstrated by driving any old iron-core transformer / inductor with a variac and watching the current and voltage through the coil as you slowly turn up the variac. <S> Use ohm's law to give the inductive reactance and <S> you will see it fall by a factor of 2-4 as the current through the coil increases - with the "other" side of the transformer open. <S> Example - primary coil of a microwave oven transformer, magnetic shunts and secondary coil removed. <S> Here is the inductive reactance of that coil at various currents... <S> 460 ma --- <S> > 109 ohms. <S> 1.3 A ---> 70 ohms. <S> 2.2 A ---> 45 ohms. <S> 5.0 A ---> 22 ohms. <S> Kevin <A> As the load on the secondary increases, i.e. the resistance or impedance, whichever you prefer, goes down, then the reflected impedance (and inductance) of the primary goes down as well all the way to shorting the secondary is where we measure the leakage inductance. <S> In a perfect transformer, a short on the secondary is reflected as a short on the primary. <S> If you want to directly measure the inductance of the primary you do so with the secondary open and vise versa. <S> but you do have to take into account the vectors and not just scalar values if you want a reasonably accurate answer. <S> Here is a link to a nice article that does work. <S> You have to use peak voltages and currents and your angles must be in radians. <S> https://meettechniek.info/passive/inductance.html <A> This is fairly easy: just Thevenin transform it. <S> Take your transformer+load, transform your nonideal transformer into a series and parallel impedance + ideal transformer, and then transform that again into a thevenin equivalent without the transformer entirely. <S> http://en.wikipedia.org/wiki/Equivalent_impedance_transforms
| From your original question, there are some methods of direct measurement of iron core transformers with inductance as high as 50H or more that work quite well
|
How do I check a BJT transistor if it is still functional? Is there a simple method to do a sanity check on a bipolar junction transistor whether it is still functional or defective? simulate this circuit – Schematic created using CircuitLab Say for example I have a circuit that used to function, and I suspect the transistor (NPN, PNP). How would I go forward to make sure the transistor is defective or how can I reasonably be sure it isn't? Do I need the datasheet for the part? <Q> Use the multimeter on a low ohms scale. <S> Check the resistance between the base and emitter with the red lead on the base and the black lead on the emitter, then repeat with the red and black leads reversed. <S> If the transistor is good, you should get a low reading and a high reading. <S> Repeat this process with the base and collector. <S> You should also get a low and a high reading. <S> Also measure the resistance between the collector and emitter and then reverse the multimeter leads as before. <S> In this case, you should get a high reading in both measurements since you are measuring across back to back junctions. <S> If all of the measurements are OK, then the transistor is probably good, If any of them are not, then the transistor its probably bad. <S> By the way, multimeters vary as to the polarity of the battery during resistance measurements. <S> In most, the positive terminal is connected to the positive battery terminal but some multimeters have this reversed. <A> Equipment To test a bipolar junction transistor (NPN or PNP) <S> you don't need any special features on your multimeter other than resistance or even better the diode test. <S> I am personally not a fan of h(FE) measurements on a DMM as it is not defined what is actually being measured. <S> The actual h(FE) <S> in your circuit may be an entire order of magnitude off due to the fact that h(FE) depends on the exact DC bias of the transistor. <S> Equivalent circuit To test a BJT <S> it is essential to understand what the equivalent ciruit looks like. <S> Here is the equivalent for an NPN: <S> simulate this circuit – <S> Schematic created using CircuitLab Method <S> A total of 3 × 2 = 6 simple tests suffices: Base - Emitter diode. <S> To test the diode, check with your multimeter (preferably in diode range, otherwise ohms) if the diode's measures is around 600mV in one direction and HIGH (O.L.) in the other direction. <S> (a) Put one probe on base, the other probe on emitter, (b) then reverse. <S> A short or an open indicates a defective transistor. <S> Base - Collector diode. <S> Same procedure as with BE-diode, but with different pin. <S> Collector - Emitter not shorted. <S> From the equivalent circuit it can easily be seen that it is impossible for current to flow between collector and emitter. <S> With the diode tester check (a) <S> if the two pins measure HIGH (O.L.) in (b) both directions. <S> A short or lowish value indicates a defective transistor. <S> Do you have to desolder the transistor to measure it correctly? <S> To be absolutely sure: <S> Yes, but it doesn't hurt to check it in circuit. <S> If you measure a short, take out. <S> If it measures OK in circuit, you have a fair (though not 100%) chance that the transistor is OK. <A> I check BJT's and diode's with the BJT and diode testing receptacles on my multimeter. <S> It will report the forward drop for diodes, and the DC gain (HFE) for BJT's, both PNP and NPN. <S> It is easy to insert TO-220 and TO-92 packaged transistors into the receptacles, which are spaced at 0.1". <S> Each receptacle has four holes: EBCE, so that it can accomodate transistor pinouts that have the base in the middle, or the collector in the middle. <S> If you don't have this feature in your meter you should get one that has it! <S> Or else you have to build a test jig, perhaps on a breadboard or more permanently. <S> There are simple tests you can do for obvious failures like opens and shorts. <S> You should be able to make a simple circuit using a voltage source and a resistor, where the base diode (VBE) is used as a diode. <S> Current should flow and the VBE drop should be a reasonable figure like 0.6-0.7V. Another test: the collector should not be shorted to the emitter. <S> If a transistor is in a circuit and cannot be removed, then one thing to do is to find another instance of exactly the same device and compare measurements. <S> Failing that, if the transistor is part of a repeated circuit (e.g. channel in an audio device) or part of a complementary pair arrangement (where the voltages and currents in both halves should be similar), that can provide clues that the transistor isn't working. <S> Failing that, what we can do is understand the circuit and use that to our advantage. <S> We can directly measure the node voltages at the transistor's terminals when the circuit is powered up. <S> Currents can be estimated by measuring voltage drops across the resistors (assuming the resistors are themselves not faulty and we know their values). <A> I find the following procedure very straight forward and easy. <S> On your multimeter, set the range to diode measurement. <S> Put the red lead in the center pin and the black lead on any the side pins. <S> If you get a reading and only one reading in just one of the sides you have an NPN transistor. <S> Second case would be set the black lead from the multimeter at the center pin and try to get a reading from the other 2 pins touching them with the red lead. <S> If you get a reading then we have a PNP transistor. <S> This method works for bipolar junction transistor since the principle is remembering that a BJT is simply a diode with an extra layer of either N or P material. <S> So essentially you are testing a diode or a PN junction.
| You can do a simple check with any multimeter that has an ohmmeter function. What you are doing is checking the diode junctions; in one reading, the junction is forward biased by the battery in the multimeter and will yield a low resistance, in the second reading, the junction is reverse biased and will yield a high reading.
|
What is the purpose of the hole in the top of an LD1117V33? I'm planning on using an LD1117V33 with input from the Raspberry Pi 5V rail ( circuit diagram ), and (maybe because this is my first electronics project) the hole at the top of the LD1117V33 makes me think that it could be laid flat and fastened. But given that regulators turn extra voltage into heat, is this ever done? Will the leads even remain sound after bending? <Q> While the TO-220 package of the LD1117 can certainly be lead-formed to place the heat sink tab (the metal part with the hole) <S> flat on a circuit board, another way of using it is to bolt a heat-sink onto the metal tab while leaving the part standing upright: <S> (Source: Adafruit ) <S> Similarly, in many applications the through-holes for the TO-220 part will be close to the edge of the board, so that the tab can be directly bolted to an outer metal casing for the device. <S> Appropriate insulation in the form of a nylon sleeve and mica washer electrically isolates the metal of the heat-sink from the metal casing, while allowing heat transfer. <A> You can bend the leads a few times but don't make a big habit of it because it will break. <S> And yes, this is done a lot especially when it looks like the power dissipation is greater than 0.5W <S> - the heatsink prevents the device warming up too much. <A> Depending on your heat needs, you don't need a separate heatsink to add on, though you can have lay flat heatsinks. <S> A large copper pour can be used as a heatsink itself, called a thermal pad. <S> Some ICs even require it! <S> (Pictured L390 H Bridge Motor Driver and LDO removed from Raspberry PI) <S> The leads arn't as fragile as you may think <S> , a bend or three won't kill them. <S> Just make sure to hold them and bend the far end, to prevent any stress to the body of the to-220. <A> The hole is indeed intended for mounting the device to a heatsink or some other mechanical surface. <S> It is possible to lead-form TO-220 devices. <S> The 'proper' way to do it is via a tool that holds the leads rigidly near the edge of the case and applies the bend below the pinch point, so that force isn't transmitted through the package to the wire bond or the die. <S> Many manufacturers will specify a minimum distance from the edge of the package for lead forming. <S> We have several pneumatic lead-form tools at my office that pinch and bend the device in a single operation (insert, ca-CHUNK, remove). <S> They're very handy and completely reliable. <S> That being said, one can lead-form with pliers when in a pinch (pun intended) <S> but when I do it, I usually use two pliers - one to hold the lead near the package, the other to perform the bend.
| The hole, as you kind-of guessed is for laying the device flat on a heatsink and bolting it down. This is commonly done.
|
Will Stressing a Lamp Filament with AC, DC and/or Relay chatter change its lifespan? I am building a device that shortens the lifespan of an old style "edison" bulb with an extra long filament as a kind of arbitrary timer. I am planning to "stress" it (not immediately explode it or anything) by rectifying the current using an unsmoothed Full Wave rectifier assuming that the filament is designed for 230VAC with 60hz duty cycle therefore will do worse under noisy higher voltage DC. I can also add in a relay turning on and off at 60hz which is very alarming to hear (cool!), would this cause it to cool and heat more times causing metal fatigue?Is there a way to push more current through a bulb and make it shine brighter? I have a vague understanding that the current pull is the same, as is the RMS. To Summarise: What causes more wear on a Filament and how can I increase it :D <Q> There are three main causes of failure for filament bulbs: Evaporation of the filament. <S> The more voltage you put across the bulb, the more current will flow through the filament. <S> The more current that flows through, the more heat and brightness in the bulb, causing the filament to evaporate faster and fail. <S> (see chart) Heating/cooling cycles will also add mechanical stress on the filament. <S> This can be done by turning the bulb on and off at some duty cycle to allow it to heat and cool. <S> High current inrush can also make a bulb fail early. <S> Inrush is when the bulb is switched on and the bulb driver produces a very abrupt voltage transition. <S> The above image ( source ) was in reference to halogen lamps, but the failure/brightness curves should be the about same shape as for filament bulbs in general. <S> Burning out the bulb <S> Overvolting the bulb seems like the most straightforward way to cause controlled yet random failures. <S> By this method you can control the lifespan of the bulb from months to seconds, depending on the voltage you set. <S> With a variable trasformer, you can easily dial in the voltage and approximate lifespan of your bulbs. <S> ( image source ) <S> Heat cycling can't give you this kind of control, and generating precise inrush current is needlessly complex for your application. <S> One of the things that makes it so hard to predict the lifespan of the filament is that very small imperfections or defects in filament can have a dramatic affect of lifespan: <S> Small variations in resistivity along the filament cause "hot spots" to form at points of higher resistivity; a variation of diameter of only 1% will cause a 25% reduction in service life. <S> The hot spots evaporate faster than the rest of the filament, increasing resistance at that point—a positive feedback that ends in the familiar tiny gap in an otherwise healthy-looking filament. <S> Source: Wikipedia <A> You're more likely to shorten the relay's lifetime than the lamp's. <S> Rectifying is useless, as the peak voltage and power dissipated (and thus the heat) will be the same. <S> The relay makes only sense if you allow the lamp enough time to sufficiently cool down. <S> The best thing to kill it is to switch the relay on when the main's sine reaches its maximum on a cold bulb. <S> The peak current then can easily reach ten times the nominal value. <S> If the lamp hasn't cooled down enough the peak may only be twice nominal, and it won't do much harm. <S> I think you'll need to let it cool down for at least half a minute. <S> Lamps used in darkroom enlargers are often rated at a lower voltage (e.g. 190V instead of 230V) to give a higher color temperature. <S> These also have fairly short lifetimes. <A> It seems that the hotspots and mechanical stress of being turned on and off does the damage, and my rectifying the voltage does next to nothing because of the RMS. <S> While over on undervoltage sounds cool and a good solutuon <S> it's too large for my situation. <S> I am adding some CFL starters (wired in parallel in case one breaks) <S> inline to have it switching on and off at in-equal intervals averaging about 1hz. <S> evil laugh
| The further above the bulb's specified voltage rating, the quicker it will fail.
|
Power plug orientation and usability I was wondering what advantage is gained by modeling a power plug after the lower design. These are American power plugs, and they both exist. Perhaps the only consumer-based effect gained by using the upper plug is that the plug can be put in upside down, which is helpful when using big, bulky wall warts. I know that electricity-wise, the orientation really doesn't matter, and that the options below don't matter if there is a ground pin. The ground pin will limit the orientation to the upright position. However, I can't really think of a solid advantage gained by the lower option. Also, why are there sometimes holes in the end of the plug? I think that they may exist to save metal. As always, thanks for your input. <Q> In some applications, polarity matters because there is typically a policy of having switches and fuses all in the "hot" path (from the fusebox right through to appliance internals). <S> The holes are for locking the plug to certain types of receptacle (maybe) <S> The world's smartest man says <S> "Engineers have been sticking holes in the prongs of plugs for so long that they have forgotten why they started." <S> You leftpondian householders seem to have a baffling array of outlets to understand. <S> from Z-tronix <S> The National Electrical Manufacturers Association (NEMA, USA) has set standards for configuration that differ depending on current rating (15, 20, 30, 50 or 60 A) and electrical potential (120, 208, 240, 277, 480 or 600 V) <S> *. <S> This has resulted in more than 35 different straight blade configurations (various grounding systems included). <S> From Museum of plugs and sockets <S> The system rules out accidental intermating of devices and related risks. <S> If you look at the DIY SE site you'll find several questions where leftpondians are having trouble changing plugs on appliances to fit their outlets, or rewiring outlets to suit new appliances. <S> Luckily for rightpondians, their homes have exactly one type of outlet (two if you have a shaver outlet in bathroom) <S> so life is a lot simpler. <S> Anything over 3.1 kW gets hardwired by an electrician. <A> The only NEMA plugs and sockets I could find ( here is a chart ) <S> that fit the description in the question are the NEMA 1-15 (15 Ampere) and 2-30 (30 Ampere) formats: <S> NEMA 1-15: NEMA 2-30: <S> ( source ) <S> Both formats are designed for the second type of plug described in the question: <S> This ensures that the "hot" or "live" line is correctly connected to the "hot" or "live" side within the appliance, not that it should matter for a 2-wire AC mains connection. <S> The non-polarized version of this plug works in either orientation, so it'll still fit the polarized socket, but without "hot" guaranteed to go to some hypothetical "hot" inside the device: Since low-power 2-wire equipment often works under the assumption that neutral is equivalent to building earth, the polarity affects only such applications where such a "neutral" being exposed to touch is a concern. <S> I can see the merit of that. <A> The difference in blade width is for polarity. <S> The wider blade is for ACN (neutral) and the narrower blade for ACH (hot). <S> Wikipedia AC power plugs and sockets in the section for "North American and IEC 60906-2, NEMA 1-15 <S> (15 <S> A/125 V unearthed) <S> (Type A) <S> " states: <S> Initially, both blades were the same width, so the plug could be inserted into the socket either way around. <S> Plugs manufactured since the 1950s are polarized; the neutral blade is wider than the line blade, so the plug can be inserted only one way. <S> Polarized NEMA 1-15 plugs will not fit into unpolarized sockets, which possess only narrow slots. <S> NEMA 1-15 plugs will fit NEMA 5-15 earthed sockets, which have a wider slot for the neutral blade. <S> Some devices that do not distinguish between neutral and line, such as internally isolated electronic power supplies, are still produced with unpolarized narrow blades. <S> Regarding the holes, according to HowStuffWorks <S> They are to help maintain the grip in the socket, allow a plastic "lockout tie to be inserted at the factory", and to save metal. <A> About the holes in the prongs. <S> The socket will have a dent in its contacts which falls in the whole, making it harder to retract the plug. <S> This way they reduce the risk of the plug simply "falling out" of the socket.
| For typical household equipment that uses an isolating power adapter / isolated switch mode power supply, this polarity issue becomes moot, hence the convenience of a plug that works in either orientation simply saves some aggravation when plugging an appliance in, in a dark room or in a hurry.
|
Build an H-Bridge Motor Driver with 4 N-Channel MOSFET I have bought 4 N-Channel MOSFETs to build an H-Bridge Motor Driver.My Motor drive and my power supply voltage is 12v.My TTL logic voltage is 5v as I want to speed up/down the motor with uC PWM.Now I have understood that I have problem with driving High Side MOSFETs as their Gate Voltage must be bigger in respect to their Source voltage.What are my options now? shall I change them to P-Channel MOSFETs? <Q> Check out this device. <S> http://www.linear.com/product/LT1910 <S> It's a high side N-channel MOSFET driver. <S> I think that it has a little boost converter internally. <S> We've just started playing with these and it will drive the MOSFET gate to 20 VDC with a 12 VDC supply. <S> Nifty huh?!? <S> Though the device isn't fast, relatively speaking, so you would be better off doing PWM for speed control on the low side MOSFET. <S> You can get a regular FET driver to do this with your 5 V input. <A> For half bridge just use one of these: - For full bridge use two. <S> These devices are able to drive n channels topside because they smuggle a bit of energy away from the output using a capacitor \$C_{BOOST}\$. <S> The 1N4148 is for startup I believe. <S> There are other devices that can do this too. <A> This is entirely possible but you need some way to generate the higher-than-supply gate voltage required by the high-side MOSFET. <S> There are several possible ways of doing this: Generate this high side voltage from a separate source, using something like a sub-US$0.1 chip like MC34063 connected into a small boost converter. <S> This method works with any drive waveform <S> Use a gate driver chip like the sub-$1 IR2110 . <S> This requires a PWM drive waveform as it generates this high voltage using a bootstrap process (essentially a switched capacitor synchronous charge pump) <A> Its very useful.try it.
| You should Use IR2101, Its a half bridge gate driver IC with all the details mentioned inits datasheet.
|
Step down switching regulator heating up with light loads I built a step down switching regulator based on a Diodes AP5100 using the datasheet example circuit with this layout . The voltage is being stepped down from 15V to 12V and the AP5100 is heating up to 60°C+ under light or no load at all(0-40ma). At about 80ma load the temperature is more reasonable at about 40°C and runs relatively cool(low 30s) above 150ma. The circuit that is being powered by this operates at low current(<20ma) 85% of the time and the other 15% at about 250-500ma, so it would be nice to have it run cooler under the light load. Should I try increasing the inductor size to improve the light load efficiency? EDIT: The circuit that I am using is shown above and it's for 3.3v. The only change that I have made is to use 3.6k with 49.9k to get 12V. And also, I have substituted the B230A with a STPS2L60A. The caps are all ceramics at the proper voltages including the 10uF(35V) and 22uF(25V). The inductor is 3.3uH with these specs . <Q> I fixed the problem by using a higher value inductor(10uH) as suggested by the datasheet and the regulator does not heat up at all under light and no load conditions. <S> I have tested it at half the maximum expected load (250ma) and I am getting 20mv pp ripple. <S> I'll do more testing at the max load, but the results are very good so far. <A> This answer is incorrect This graph for efficiency vs. load current is taken from the datasheet: <S> It looks like this IC is not supposed to be used for driving low currents in typycal configuration. <S> Note that the slope of the efficiency curve is very steep for \$I_L\leq\sim300mA\$. <S> This means that lowering the current in this region of operation increases the power dissipated by the IC <S> , hence you see the increase in temperature. <S> I'd say that you shouldn't use this typical configuration for driving a load which is 85% of the time <S> is very light. <S> You need to either change the configuration (which I believe to be a hard task), or use another component. <S> In my opinion, the latter is the most promising and easy solution. <S> Mitigating the heating problem in the given configuration: <S> This should reduce the current drawn from the internal MOSFET and will lead to higher efficiency at light loads, but will also lower the efficiency at higher loads and may lead to higher output voltage ripple due to insufficient current capability (which will require a bigger \$C_{out}\$ to mitigate). <S> I can't say to what extend can you shift the efficiency curve - you'll need to find it out experimentally. <A> Your output capacitor is rated at 6.3 V only. <S> If you have changed the voltage divider for the circuit <S> to output 12 V instead of 3.3 V, chances are you have destroyed the output cap. <S> It may now act as a short (or heavy load), so you might actually be far from a light-load condition. <S> Don't worry about efficiency at no-load or light-load condition. <S> No-load means P out = 0. <S> Efficiency is defined as η = P out / P in . <S> At no load, even if your standby power is <S> very small (e.g. P in = 1 µW), with P out = 0 <S> , the efficiency will still be zero. <S> This, of course, won't look good in the efficiency diagram, so the manufacturers tend to not plot the curve all the way down to zero output power or current. <S> For such problems, it helps to think about the converter's losses instead of its efficiency.
| As suggested in the datasheet, you can try to use higher value inductor.
|
Meaning of causal signal What exactly does causal signal mean? Causality,as I see it is a property of a system wherein the output at PRESENT is dependent ONLY on PAST and PRESENT values of input.Here we have a reference of Output signal Time to define PAST & PRESENT for an input. Since an isolated signal doesn't have a concept of a STATE,how can we define past or present for a signal? If ideas of Past & Present aren't defined for a signal,how can the idea of causality be defined for signals? Here the definition is given but I 'm not able to get a feel of Causality of a signal? I've a follow-up question which I've put up here . <Q> A causal system (e.g. a causal filter ) is as you say, it simply depends on only past and present values of the input. <S> All real time systems are causal, for they cannot "see" the future", i.e. it is not possible to have an output before there has been an input. <S> An example of a non-causal system would be: y(t) = <S> x(t + 5) <S> An example where non-causality comes into use is something like an ideal filtering system applied at a later time, where the data has been recorded previously (or is estimated in the case of predictive systems), therefore the future state of the input is known. <A> The easiest way to think about causality is to put present time at zero. <S> In that case: \$x[n+1]\$ represents one sample into the future, the next sample. <S> It hasn't been taken yet. <S> \$x[n]\$ represents the present time sample. <S> \$x[n-1]\$ represents a sample aged by one sample period. <S> There are transfer function that will end up with \$x[n+m]\$ terms in them, which correspond to positive powers of \$z\$. To actually implement these transfer function in real time, you have to delay everything by \$m\$ samples. <S> It's a lot of number crunching, but multiplying through the transfer function by \$\dfrac{z^{-m}}{z^{-m}}\$ will effectively delay every sample by \$m\$ sample periods, making \$x[n+m]\$ into\$x[n]\$. Information about the future is no longer required and the difference equation can be implemented on a microcontroller, for example. <A> A signal itself is not causal. <S> But all signals are generated from some system. <S> And all real systems are causal. <S> The present state for a system could be the charge on a capacitor, the current in an inductor, the temperature or velocity of some object, the state of memory bits in digital logic, etc. <S> All systems evolve according to their present state and present inputs, but a system can depend on its past state in that its present state is based on the evolution of the system from those past states. <S> Also the future states of a system will be an evolution from the current state, and future input. <S> Therefore the future state of a system may depend on past states since the present may be dependent on the past, and the future may depend on the present. <S> The same is true for any signal that is generated by the system. <S> A signal may depend on its own past state or the past state of other signals because those signals are generated from a system that evolved from that past state. <S> A signal only has a notion of past, present, and future because it is part of a system. <A> A causal system is one for which the impulse response is zero before time-zero (which is defined as the time of initial excitation, or when the input signal is supplied). <S> Usually, this term concerns the input signal. <S> This then means that the input signal has zero amplitude before it is applied to your system. <S> If you think about this in terms of a circuitry experiment it make sense. <S> You would first set up your circuit, ensuring all electrical connections are established, the turn on your voltage supply. <S> Time-zero being when you flip the switch. <S> So, if a signal is isolated, it does not have a sense of causality. <S> Your question is philosophical, not practical. <S> The term causal only applies to signals when we are talking about their impact on systems.
| A causal signal is one which is zero before time-zero.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.