source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
LCD/display for a digital thermometer-like device I need a small LCD display for a digital thermometer-like device I am making. I need to be able to display 6 digits or letters only.The main constraint is the small size and rectangular shape.I cant have width more than a little over a centimeter and length appropriate for 6 characters. I am unable to figure out how and where I can get this type of LCD. I am also ok with other displays, e.g. LED-based. <Q> The smallest standard product LCD glass I could find is one from Varitronix that is 20.3mm <S> x 38mm. <S> It offers eight digits instead of 6. <S> According to the data sheet for this part it is available with pins attached which adds a very small amount of additional width. <S> Smallest size will generally imply that you use zebra strip for connections and a custom tooled case / holder to bring the display into proper contact and orientation with the circuit board. <S> Do note that for small form factor displays it is common that the digit height is approximately one third the overall width of the LCD glass with the rest being used up by the contacts and sealing area. <S> Varitronix Product Page Above Product Data Sheet <A> An alternative approach would be to take a look at a very small LCD graphic type display. <S> The smallest modules use a technology called TAB where a graphics LCD controller is mounted on a flex circuit that goes between the display and your circuit board. <S> The controller provides the drive excitation for the display so that you do not have to do that with your own circuitry. <S> I found a web page (linked below) that lists products available from VS-Top Electronics. <S> They show a graphic type display with 96x26 pixels with an active display area that is 25.9mm <S> x 10mm. <S> The module size is 33mm <S> x 13mm <S> but there is the flex strip with its "on flex" chip that has to fold in along side or under the display. <S> The graphic type display offers you a lot of flexibility to display more than just numbers. <S> In a 96 pixel width you can easily display a six digit / character message using a font that is sized at 16x26. <S> Smaller sized fonts could obviously display more - even two lines. <S> http://www.goodisplay.com/TAB_LCD_Modules.asp <S> You would have to contact the manufacturer to get further information or to find local contact information. <A> Your small size device implies that you may also be after the lowest power consumption. <S> LCDs offer this feature so that small battery operation is feasible. <S> You did mention LED technology however <S> so here is a small display recommendation for LEDs. <S> Avago offers a ultra mini seven segment display module that has a height of just 11mm. <S> You could use six of these modules side by side to get your full display. <S> Product Page Data Sheet Link
Note that for smaller sizes it is generally required to work with a vendor such as this to get a custom LCD glass made to your size requirements.
Need a device that can take single input and covert to a keyboard key press on USB Let me explain what I'm doing currently. We have made a finger heart rate monitor, each time your heart pulses a transistor is switched on via its base. The collector and emitter of the transistor are then wired to a dismantled USB keyboard. The wires are wired to the P key on the keyboard. Each time your heart pulses the letter P on the keyboard is pressed. While this works its large, fragile and ugly. Anyone know of a pre-made USB device that can simulate a key press from our heart rate monitor? <Q> I gather that detecting a keypress is not the real purpose, but that you want to detect the digital signal from the transistor one way or another. <S> There are lots of modules with FTDI's FT245R USB interface, which allows you to connect up to 8 digital <S> I/Os. <S> For example this one costs only 9 dollar (and you may even find cheaper ones). <S> If you want to stick to the keypress then completely taking apart the keyboard is a solution. <S> Most keyboards have only a small PCB with the controller, and a connector to the actual keyboard matrix. <S> Find out which two pins define the P key, and connect the transistor between those pins. <S> Then you only need that small PCB, and you can throw away the rest. <A> They also used to use the term "keyboard wedge" for this sort of thing, but nowadays that term seems to be used exclusively in the context of point-of-sale barcode and credit card scanners. <A> I'd personally attack this with an Arduino . <S> Simple, tons of existing support from the community and cheap. <S> You could extend the functionality quickly and easily if you so chose to. <S> Here's a relevant link to a rough schematic, code, projects similiar, etc: PracticalArduino <A> Use a microcontroller with built-in USB-transceiver, for example the Atmega32U4, in combination with a software emulator or a simple script or even something like Autohotkey . <S> That will provide a quick, very inexpensive <S> (the Atmega32U4 costs < $4) and also flexible solution for what you're trying to do -- and none of the messing with an actual keyboard either. <S> You can program the Atmega32U4 to act like a standard HID USB device (a la many keyboards, mouses). <S> You can either use the Atmega32U4 itself as part of your heart monitor, or alternatively just send data via it, using it as the USB-UART interface. <S> See, e.g., this tutorial . <A> Use something like this . <S> Emulate a keypress on a digital pin state change with NETMF asks for no more than 10 lines of C# brackets excluded :-) <A> Had a similar need. <S> Finally found a cheap and easy solution, a Chinese company has a number of devices that you can set any key press you want to associate with one or more dry contacts. <S> Here is one example, one of the cheapest solutions, I'll just be cutting off the phone jack. <S> https://www.pcsensor.com/usb-switching-cable-with-6-35mm-audio-jack-female.html <S> But they have pigtail solutions as well: <S> https://www.pcsensor.com/usb-keyboard/diy-switch-line-usb-switch-cable-can-connect-4pcs-different-pedals-can-customize-different-line-length-usb-switch6_3.html <S> The only downside is you need a Windows system to program the device. <S> But once programmed this should work with any computer that recognizes a USB computer keyboard. <S> I was going to hack a USB foot pedal that I found on Amazon. <S> https://smile.amazon.com/gp/product/B0098PLPOI <S> The pedal was cheap but actually well made and work as expected on my Mac. <S> They solved the problem right by using an infrared LED and photo cell, where pressing the pedal interrupts the beam. <S> This is a much better than a mechanical switch in terms of durability. <S> But in taking it apart <S> I discovered the maker's URL and found their other solutions for what I really wanted -- dry contact input. <S> The only problem is I'll have to wait almost a month for my smart cable to arrive from China. <A> There are a ton of USB HID little boards around that do what you ask with about zero programming. <S> One that I've used is the U-HID, http://www.u-hid.com/home/uhid_nano.php
What you're looking for is a "keyboard encoder" or "keyboard emulator", such as these .
How to fake an encoder signal with one function generator? I wish to be able to have a encoder quadrature signal that I could set the frequency to some specified values (from 10 to 60 Hz). I have a function gen that fulfills the freq requirements but it has only one output. So the question: is there some kind of circuit (analog or IC) that I could use to add 90 degrees of phase to a signal generated by a function gen, and then use both as they were the outputs of the encoder. It means that the gain should be unitary as well. If something got misunderstood please ask. Thanks for any help!!! <Q> I would try following approach: Set the frequency of the function generator 2 times higher then the desired frequency (so 120Hz if you would like to have 60Hz) <S> Build the divider by 2 with quadrature output with 74** logic chips. <S> There are many solutions available, schematic of the one that could work is shown below *). <S> It uses one chip with two D flipflops (for example 74??74) and one 74??86 chip with 4 xor gates (only 2 are used). <S> *) I have just drawn it without any simulations or prototyping. <S> It is not guaranteed to work, but you get the idea. <A> Like Dave says an RC filter will give you a delay, which emulates the quadrature signal. <S> Use a Schmitt-trigger to follow the filter. <S> Unless you use a potmeter for the resistor the RC time constant will be fixed, while your frequency varies. <S> That means that the phase shift will vary as well. <S> To make sure you don't get more than 180° shift you could calculate the RC time for about 90° at the highest frequency, then at the lower frequency it will be less than that. <S> 90° at 60 Hz is 4 ms, then <S> depending on the Schmitt-trigger's threshold levels the RC time constant should be around 5 ms. <S> A 4.7 kΩ resistor + <S> a 1 µF capacitor will do the trick, or 47 kΩ + 100 nF, for instance. <A> You don't really need 90° of phase shift across the whole frequency range <S> you're interested in, you just need enough of a fixed delay so that the circuit you're driving can distinguish the two edges. <A> A two-chip approach which would allow "smooth" control of start/stop and direction would be to use a quad flop with complementary outputs (e.g. 74HC175) and a 4x2 multiplexer chip (e.g. 74HC153). <S> Drive two of the flop inputs with the inputs that should control speed and direction <S> (they can equally easily be wired to behave as "run" and "direction", or "run CW" and "run CCW"). <S> The other two flop inputs should be tied to the outputs of the multiplexer. <S> The multiplexer "select" inputs should be tied to the first two flop outputs (the ones controlled by the direction inputs). <S> The "data" inputs to the multiplexers should be wired such to yield the desired behavior for the various direction modes: <S> For stationary, wire them so <S> D2=Q2 and D3= <S> Q3 <S> For clockwise, wire them <S> so D2=Q3 and D3=/Q2 <S> For counterclockwise, wire them so D2=/Q3 and D3 <S> = <S> Q2 <S> Wiring <S> the circuit in that fashion should yield clean outputs that will move up or down by one click per cycle when the directional buttons are pushed, and remain stationary when the buttons are released, with no "weird" actions on a button press or release. <S> The addition of a 74HC174 would make possible a "single-step" feature (bringing the circuit total up to three chips plus the function generator that produces the clock).
A simple R-C circuit followed by a buffer or gate should do the trick; if you use an XOR gate, you can use the other input of the gate to reverse the apparent direction of movement by switching it from low to high.
Is it possible to make a usb charger to power multiple devices? I was thinking how nice it would be to have a single wall plug with multiple (4-6) USB ports that would be capable of supplying enough power (at 5v) to charge say an iPad, smartphone, bluetooth headset etc. simultaneously at full capacity. But I haven't been able to find such a thing anywhere. So I am contemplating making one. I don't have any knowledge of electronics and only a rudimentary knowledge of electrics (I can wire a plug) and would appreciate it if someone could tell me how viable this would be from an electrical/electronic point of view. Assuming it is feasible, I'd also like to know whether the work required to make such a thing could be done by an enthusiastic beginner. Of course if someone can recommend somewhere I could buy such a device I'd happily buy it instead ;-) <Q> A 5 Volt power supply of whatever rating suits plus some USB port hardware is the main requirement. <S> Just increasing the power feed to a cheap USB hub is probably the cheapest easiest way. <S> Some existing current limiting hardware MAY need to be bypassed. <S> 5V, 5A should be ample. <S> As you are located on Nowhere, OK you should have no problem picking one up locally. <S> ADDED <S> Here's a bargain powered USB hub on ebay UK. <S> 4 GBP for a 7 port hub wit power supply. <S> Power supply is rated at 1A, 5V, so ebay UK <S> 5A 5.5V psu GBP7.80 buy now - from Hong Kong BUT free economy delivery. <S> 5V 5A GBP8.60 free delivery <S> HK <S> 12/24V to 5V/5A - Shenzhen free delivery SMPS care <S> Two of these internal UK GBP 16 each :-( <A> EDIT- Ok <S> I know you said in <S> UK- <S> But i found these on e-bay dot com or direct <S> Possibly easier and cheaper than doing it the DIY way. <S> It does not include power addpeter <S> so you would still have to wire it to AC and connect all the USB ports correctly to suply power.(maybe <S> dissect an 2.1A multi port "apple" charger and put it in there) <S> -Original <S> It seems the max is 2 USB ports per faceplate.. <S> Why? <S> Dunno... <S> I found this though that can give you max 3. <S> But if you want you can DIY them and possibly get 6. <S> Buy 1 Faceplate <S> Buy 6 USB modules <S> Buy 3 Blank modules <S> Cut them out(using a square file and a cordless drill to start off)(+ elbow grease) <S> Use some sort of epoxy on the inside to hold the usb plugs nice and snug. <S> Don't be shy- be sure to scratch smooth surfaces like the pvc so the epoxy will bond better. <S> Also clean any metal with some alcholo to remove oil residue from your fingers Wire them to a 5V supply of 2A atleast <S> I cannot guarantee that iPhone/iPad devices will just work. <S> Those damn things need some sense signal or something so it will require more research into that. <S> But a Raspberry Pi will work fine or HTC, USB LED's, etc, etc ... <S> Good Luck :) <A> You must be aware of a usb hub .Just <S> take a reasonable adapter that outputs up to 5v and connect it to one end of your usb hub. <S> NOTE: <S> current rating is must to be checked before implementing any such design else you'll see smoke. <S> Normal USB current values are safe for this purpose Update:- <S> You can purchase powered usb hub at Ebay Amazon <A> A USB charger is not just a simple 5v supply and connector. <S> The charger has to tell the device how much power there is. <S> I believe that normally they put a resistor between the data lines. <S> But for the full 2.1amps there is some odd system of voltages on the data lines indicating power that seems to be hard to find an official reference for.
Measure how you can fit 2 USB sockets in 1 blank plate.
M.S. Math to Engineering Ph.D : Mathematics in Electrical Engineering I have two Bachelor's degrees. One is electrical engineering and the other one is mathematics. I am studying mathematics (partial differential equations) in the graduate school (Master course) now. But I want to study electrical engineering later (for Doctor's degree). So I have a question here. Would you tell me a field(or major) in electrical engineering which is deeply concerned with mathematics? <Q> Also theoretical circuit analysis is highly mathematical. <A> There is field known as EMFT(Electromagnetics field theory), it starts with some equation and ends with another. <S> Best part is that, you barely bother to think about its physical nature, its all in Calculus ;) <A> One field I stay away from, mainly because of mathematics, is advanced motor control. <S> Non-linear systems are generally a tough issue, and engines are among the most complicated and most common systems you'll find in the industry. <S> Field-oriented control, rotating coordinate systems, nonlinear transformations. <S> It's a multidisciplinary field. <S> Engine systems have to be powered, controlled, modelled. <S> They're an electrical system, but also a mechanical one. <S> There is a lot of signal processing involved in this, too. <S> Engines are everywhere. <S> Every single factory relies on them, every power plant, hydrostation, processing line. <S> An engineer who knows his engines will find a job everywhere. <A> Simulation of nano-electrical systems. <S> Apply boundary conditions to quantum physics and Maxwell's equations. <S> PhD would be investigating yet-unknown boundary conditions in interesting systems. <A> I’m currently writing a PhD at an electrical engineering department. <S> I say mostly everything is kinda math heavy :) <S> Some example projects at my department: We develop finite element methods for computing losses in motors, we build geometrical optimization tools for these motors finding n-dimensional solutions, we work with advanced signal processing and control theory to make the devices work at all, we model semiconductors with large state-space equations, we build numerical software running on GPUs to study the aerodynamical interactions with the electromechanical system in HA wind turbines, we study oscillations in the power grid with large system models including power stations in the whole nordic grid, we build large models which try to predict the weather so optimal locations for wind turbines can be found with regards to grid stability, we build numerical models for how wave power buoys interact with waves during different loading conditions, etc etc etc. <S> If you wanna go for heavy math you probably can’t choose wrong at my department ;)
Other math intensive fields of electrical engineering are signal processing (which includes the detection of signals in noise as well as spectral analysis and reconstruction of distorted signals) and communications (which includes coding theory and cryptography).
Learn C programming before start learning Microcontroller/Embedded Systems Possible Duplicate: How to become an embedded software developer? I want to know whether it is mandatory to learn C/C++ programming before start learning Microcontroller or the Embedded Systems. If yes, why do I need C to start with? <Q> By definition of "mandatory", of course not. <S> How advantageous it would be very much has to do with what your personal goals are. <S> I suggest that many people who work with microcontrollers work in C, many of the libraries and drivers you can track down will be in C, and many of the discussions you'll find or take part in when you need a bit of help will be in C. <S> For me, that's enough of a reason right there, before any considerations of C vs assembler vs any other language can even start up. <S> If you don't embrace C at least a little, you're cutting yourself off from many resources. <A> It's Not mandatory to learn C/C++ programming before learning Embedded systems. <S> But yes Learning C/C++ will definitely pre-build your logic and understanding of programming methodology. <S> As you will be using Embedded C most probably so similar syntax will also help you. <S> All the way you will also develop all the skills of logic and programming in Embedded also, <S> Hence it's not mandatory. <S> Depends on your interest. <A> You can start learning about microcontrollers and embedded systems without knowing C, but you won't be able to progress very far. <S> I would also recommend that you start with plain C rather than C++. <S> Michael Barr has a nice article on the subject: http://embeddedgurus.com/barr-code/2009/08/real-men-program-in-c/
Most real-life embedded projects will use C and most of the code written for embedded projects is written in C, although it is a good idea to learn some assembly programming as well.
What is the name of this springy type oscilloscope probe accessory? Exactly what it says on the tin. How is this pictured accessory called? The obvious place to look for a name would be the probe manual, but it looks like they decided to add the accessory to the package after making the manual, since it's not on the component list. <Q> An example of it being named as such is here . <S> It's called "Probe tip ground" here . <S> It is also called a "Probe tip spring adapter" here . <S> Whatever it's exact name, I think the main thing is to have "tip" in there, as it differentiates from the standard ground clip by implying the clip is used at the probe tip. <S> Basically, it's <S> function is to shorten the ground lead, as this lowers inductance and enables higher frequency signals to be displayed accurately. <S> Try it with a very fast rising signal, and compare it to using the normal ground clip and you will see the difference. <S> A common mistake is using the wrong setup to probe a signal and then assume the fault is with the signal, when it's really issues caused by the setup. <S> The way to use it is like the following picture, touch the ground wire to the IC ground pin, and the probe tip touches the pin you wish to probe: When designing your board, you can add dedicated test points to make getting to the signals easier. <S> You can even add on board probe tip adapters (available from any decent distributor) if you have enough space. <S> For a detailed discussion of scope probes the Tektronix ABCs of Probes is good reading. <S> Here is a diagram from the above link showing the effects of different ground lead lengths on a fast rising signal: <A> It is what it looks like - a ground spring <S> *. <S> At least that's what Agilent call it. <A> I have always known those to be "Ground Clips" or "Ground Spring Clips". <S> Another seller refers to them as "Tip Grounds". <S> Notice the different sizes with various arm lengths in the clip. <S> On more than one occasion, when trying to make a difficult single handed measurement, I've had to resort to making a similar type of temporary clip out of a piece of bus wire. <S> http://www.caltestelectronics.com/ctitem/35-35mm-probe-accessories/CT3672
It's a "Probe tip ground clip" (or something very similar like the examples below)
Make linker use bank 0 in relocatable mode I'm tryin to build assembly project with MPASM/MPLINK for PIC16F628A. Microchip advice that it's better to stay on bank 0 and switch whenever you want different bank, and then get back to bank 0 (to minimise bank switching). That's why I want to put most GPR file registers in bank 0. Also most used SFR registers are in bank0. However the linker is trying to fit data starting from smallest databank which is GPR in bank 2. There is no way to tell the linker to start filling from bank 0, except make bank 2 protected in linker script. There should be better way... UPDATE:For those who didn't understand the question (or didn't want): "How to reserve memory in bank 0 for PIC16F628A addresses from 0x20 to 0x6F in relocatable code mode in more than one file." What I tried: 1. file1.asm FirstBank udata_ovr 0x20register1 res 1register2 res 1 file2.asm FirstBank udata_ovr 0x20register3 res 1register4 res 1 Of course that doesn't do it because register1 overlaps with register3. I need register3 to be placed on unused bank. 2. file1.asm FirstBank udataregister1 res 1register2 res 1 file2.asm FirstBank udataregister3 res 1register4 res 1 This will put all these registers in bank2 3. file1.asm FirstBank udata 0x20register1 res 1register2 res 1 file2.asm FirstBank udata 0x20register3 res 1register4 res 1 results linker error update 2:The reason I want to fit my variables in bank0 is because most commonly used SPF registers are in bank 0 and I don't need to switch between banks when I use them (which means less code). And no, I shared memory (70-7F) is not enough to fit all variables I need. It wouldn't be optimal to switch banks when I can fit all variables that I use in 99% of the code in bank 0. Now it should be clear. If anyone that's discussing my feelings actually wants to help I'll still appreciate it. P.S. I guess I missed the very important keyword "relocatable mode", so I apologize about that. But please keep your comments/answer on topic. If something is not clear ask and I'll try to change question to be more clear. Thanks to all that actually want to help. <Q> This can be done using directives in both the assembler source and in the linker script. <S> When you use the udata primitive, the label becomes the section name. <S> Consider the following example source files similar to what you have provided: file1.asm SomeSection <S> udata register1 res 1 register2 <S> res <S> 1SomeOtherSection <S> udata <S> register5 <S> res 1 end file2.asm <S> SomeSection <S> udata register3 res 1 <S> register4 <S> res 1 end <S> In file1.asm , there will be two output sections generated by the assembler named SomeSection and SomeOtherSection . <S> You can verify this by turning on the output map file and looking at the listed section names. <S> The next step is to tell the link where those sections should be placed in memory, this requires a change to the default linker script. <S> Locate and copy the default linker script for your device ( 16f627a_g.lnk ) to your project directory and add it in the Linker Script project settings. <S> At the bottom of the linker script you'll notice a set of SECTION specifiers like this: <S> SECTION NAME= <S> PROG ROM=page // <S> ROM code <S> spaceSECTION <S> NAME= <S> IDLOCS <S> ROM=.idlocs <S> // <S> ID locationsSECTION NAME= <S> DEVICEID <S> ROM=.device_id <S> // <S> Device IDSECTION <S> NAME= <S> DEEPROM <S> ROM= <S> eedata <S> // <S> Data EEPROM <S> Add your own section names here and the destination RAM bank. <S> SECTION <S> NAME= <S> SomeSection <S> RAM=gpr0SECTION NAME= <S> SomeOtherSection RAM= <S> gpr2 <S> You can verify in the map output file that your variables have been placed in the correct location. <S> From the example above, registers1-4 go into gpr0, register5 goes into gpr2. <A> The udata_shr should do what you want. <S> See the assembler/linker manual section 4.64: <S> This directive declares the beginning of a section of shared uninitialized data. <S> If label is not specified, the section is named .udata_shr. <S> The starting address is initialized to the specified address or will be assigned at link time if no address is specified. <S> This directive is used to declare variables that are allocated in RAM that is shared across all RAM banks (i.e. unbanked RAM). <S> No code can be generated in this segment. <S> The res directive should be used to reserve space for data. <A> I want to add a non-optimal solution that actually works, but it's not that convenient. <S> Option 1If <S> all variables that need to be in bank 0 are listed in only one file and exported with "GLOBAL" an udata section with fixed address would do the job. <S> I'm still waiting if someone will sugest something that allows to address bank 0 from multiple assembler files (objects). <S> option 2 <S> :Of course if you don't use bank2 at all a "place-holder" can be used to allocate all GPRs in bank2: <S> placeHolder <S> udata 0x011F res <S> 48 option 3 <S> :The closest thing to a solution is to name all udata sections across the files with the same name and (very important) pad the space to more than 48 bytes: in file1.asm FirstBank <S> udatavariable1 <S> res <S> 1variable2 res 1 res <S> 48 <S> ; this needs to be decreased if data in this section becomes ; Larger than 32 bytes. <S> The idea is to keep ; data+padding > 48 so the section cat't fit in bank 2 in file1.asmFirstBank udata variable3 res <S> 1 variable4 res <S> 1 <S> But these are just workarounds, not real solutions. <S> UPDATE <S> :Note that you shouldn't have to worry about liker starting from bank other than 0 with MCUs that have all banks with the same size. <S> For example for PIC16F648A linker starts from bank 0.
Maybe there is a way to pass the name of bank as mentioned in linker script or some way to force linker to start with bank 0.
How can I achieve very bright light? I'm not sure if this is right site for this, but couldn't find better. I've been given an task to create something that has light intensity like police beacon . I need it to be cheap, so I'm looking at dealextreme.com LED emitters , but there aren't any good user experience videos. I don't know if the LEDs are right for this and how should I pick right one from these LEDs. <Q> Maximising brightness: Brightness is a function of amount of light and area illuminated. <S> More light = more brightness. <S> Less area = more brightness. <S> So <S> For less illuminated area use LEDs with low "radiation angle" or "cone angle". <S> Lenses: <S> If that is not bright enough you can use a lens or reflector. <S> Many companies provide lenses for LEDs. <S> Deal Extreme have a range here <S> Effect of colour: <S> Note also that brightness is related to eye response to colour - yukky yellow green is about the best colour for optimum eye perceived brightness - but if you want a specific colour this is not much help in optimising brightness. <S> Related: <S> Mind plasticity add on for the ever young: <S> Lime Green is close - Lime Green Fire Engine from here <S> - BUT more recent studies suggest that familiarity is more important than visibility for emergency vehicles. <A> It sounds like you would be better of with an of the shelf high-brigtness LED lamp rather than individual LEDs for which you need to make a circuit. <A> If you want very high brightness for a split second, then a few seconds to charge it up again, use a camera flash with a timer circuit and a relay. <S> It is really bright and is great for a lightning effegt
For more light obtain as many lumens as you can afford.
The best stack-up possible with a four-layer PCB? I'm designing a 4 layer PCB and I know that the standard stack-up is Signals GND VCC Singals (GND and VCC can be switched depending on the layer with more signals) The problem is, I don't really want to connect all ground pins through vias, there are just too many of them ! maybe because I'm not used to 4 layer PCBs, anyway, I've read a tip by Henry W. Ott about a different stack-up GND Signals Signals GND (Where the power is being routed with wide traces on the signal planes) According to him, this is the best stack-up possible with a four-layer PCB, for the following reasons: 1.Signal layers are adjacent to ground planes. 2.Signal layers are tightly coupled (close) to their adjacent planes. 3.The ground planes can act as shields for the inner signal layers. (I think this requires stitching ??) 4.Multiple ground planes lower the ground (reference plane) impedance of the board and reduce the common-mode radiation. (don't really understand this one) One problem is cross-talk, but I really don't have any signals in the third layer, so I don't think that corss-talk will be an issue with this stack-up,am I correct in my assumption ? Note: The highest frequency is 48MHz, there's a wifi module on the board too. <Q> You will hate yourself if you do stack up number two ;) <S> Maybe that's harsh <S> but it's a going to be a PITA reworking a board with all internal signals. <S> Don't be afraid of vias either. <S> Let's address some of your questions: 1.Signal layers are adjacent to ground planes. <S> Stop thinking about ground planes, and think more about reference planes. <S> A signal running over a reference plane, whose voltage happens to be at VCC will still return over that reference plane. <S> So the argument that somehow having your signal run over GND and not VCC is better is basically invalid. <S> 2.Signal layers are tightly coupled (close) to their adjacent planes. <S> See number one <S> I think the misunderstanding about only GND planes offering a return path leads to this misconception. <S> What you want to do is keep your signals close to their reference planes, and at a constant correct impedance... <S> 3.The ground planes can act as shields for the inner signal layers. <S> (I think this requires stitching ??) <S> Yeah you could try to make a cage like this I guess, for your board you'll get better results keeping your trace to plane height as low as possible. <S> 4.Multiple ground planes lower the ground (reference plane) <S> impedance of the board and reduce the common-mode radiation. <S> (don't really understand this one) <S> I think you've taken this to mean the more gnd planes I have the better, which is not really the case. <S> This sounds like a broken rule of thumb to me. <S> My recommendation for your board based only on what you've told me is to do the following: Signal Layer(thin maybe 4-5mil <S> FR4)GND(main FR-4 thickness, maybe 52 mil more or less depending on your final thickness)VCC(thin maybe 4-5mil <S> FR4)Signal <S> Layer Make sure you decouple properly. <S> Then if you really want to get into this go to amazon and buy either Dr Johnson's Highspeed digital design a handbook of black magic, or maybe Eric Bogatin's Signal and Power integrity Simplified. <S> Read it love, live it :) <S> Their websites have great information as well. <S> Good Luck! <A> There is no such thing as THE best layer stackup. <S> I don't like that configuration, though. <S> Firstly, if your board uses SMT components, you'll have a lot more breaks in your planes. <S> Secondly, any debugging or rework will be virtually impossible. <S> If you need to use such a configuration, you're doing something horribly wrong. <S> Also, there is nothing wrong with using vias for grounding. <S> If you need to lower the inductance, just place more vias. <A> "best" depends on the application. <S> Theres really two questions to address in your post <S> "Conventional" (signals on outer layers, planes on inner layers) <S> VS "inside-out <S> " (signals on inner layers, planes on outer layers). <S> An inside-out board will have better EMC performance but it will be much harder to modify when you realise you screwed up the design, will need more vias which is not great from a density or signal integrity point of view <S> and if you are using IC packages whose pin pitch is too small to put ground between the pads <S> then you end up with big holes in your planes which is also not great from a signal itegrity perspective. <S> two ground planes VS one ground plane and one power plane. <S> In both cases when a high speed signal changes reference plane there needs to be a nearby path for it's return current to move between the two reference planes. <S> With two ground planes you can do that with a single via connecting the two planes directly. <S> With ground and power planes the connection has to go via a capacitor which typically (assuming a "conventional" stackup) requires two vias and a capacitor. <S> That means worse signal integrity and more board area taken up. <S> On the other hand having a power plane reduces volt drop on your power rail and frees up space on your signal layers. <A> As the others said, it depends on your application. <S> Another stackup I've found useful is Signals (low speed) Power Signals (impedance controlled) <S> GND <S> This keeps the two signal groups well isolated from each other, gives excellent impedance matching and allows me to dump heat into the ground plane.
If you read carefully, the stackup with grounds on outer layers is said to be best from EMC perspective.
Transmit video wirelessly from on board camera over short distance Possible Duplicate: Cheapest way to wirelessly transmit video I asked a similar question a few days ago, but I think I was unclear about my requirements, and they have changed a little since then too. Here's my proposed setup: I have a small robot which travels around my room (max 10 ft away from origin). The robot has a small camera fitted into it, and a way to transmit that video to me wirelessly. I am retrieving the live video feed from it, and based on what I see on the screen, I give it further instructions. So essentially, I need a camera -> transmitter -> receiver setup for a video signal. I would appreciate recommendations for those three components, and what the cheapest way I can achieve that setup is. I am having difficulty finding this info online, perhaps because I don't know what the keywords I should be searching are. My main requirement is that it has to be cheap (EDIT: in the tens of dollars). I don't care too much about the video quality, frequency, or range (as long as it is roughly 10 feet or more). Please let me know if more details are required. <Q> You don't state what "cheap" means to you, but I'm inferring that you mean <S> "something in the tens of dollars". <S> They typically include camera, IR illumination, modulator, transmitter, receiver, demodulator, and an LCD screen. <S> Lots of fun donor parts for a project on a budget. <S> You'll need to work out power supplies and getting composite video out of the demodulator, which will be specific to the particular model you obtain. <A> You can transmit data optically at well above the required bandwidth using an LED and photodiode. <S> The problems encountered with using visible light (or IR) may make radio more attarctive, but the LED solution is liable to be the cheapesyt. <S> Here's an example. <S> LED AM Video Link . <S> One of his circuit diagrams of an optical receiver as an example of what's involved: Wikipedia - Free space optical communications <S> Nothing new under the sun - Video of enthusiasts (in 2009) using German WW2 optical communicator LiSpr80, Lichtsprechgerät 80/80 <A> I found a really cheap wireless security camera on eBay. <S> The added advantage is that the camera is extremely small, perfect for my RC vehicles and robots. <S> Here is a link to the item: Mini Wireless 1.2Ghz <S> Color CMOS Camera + Receiver <S> Also, it should be extremely simple to set up. <S> While Russel's answer is interesting, I have a feeling that it will take a lot of my time just to try to get it working, and it will very limited in scope for projects that need to move around all the time.
I'd start with a used wireless video baby monitor, and modify to suit your specific design requirements.
What's wrong with this casting in C code for AVR? I defined two variables: uint8_t a[2];uint16_t b; Next I want to use a as variable of type uint16_t , e. g. b = (uint16_t)a; But this is wrong! My programs doesn't works correctly with such code. All is OK when I replace b to uint8_t b[2] and use elementwise operations. Why? <Q> a is a pointer to an array of bytes. <S> If you cast it to a uint16_t and assign it to b , then b will contain the address of the base of the array (where it is stored) in SRAM. <S> If you want to treat the two bytes of the array <S> a as an integer, then use a union as suggested by user14284, but be aware that the union will represent the byte array in the memory byte ordering of the architecture (in AVR that would be little-endian, which means byte 0 is the least significant byte). <S> The way to write that in code is: union{ uint8_t a[2]; uint16_t b;} x;x.b[0] = 0x35;x.b[1] = <S> 0x4A;// by virtue of the above two assignmentsx.a <S> == <S> 0x4A35 <S> // is true <S> Another way to do this without using a union is to cast <S> a to a uint16_t pointer and <S> then dereference it like so: uint8_t a[2] = <S> {0x35, 0x4A};uint16_t b = <S> *((uint16_t *) a);b == 0x4A35; // <S> because AVR is little endian If you are using the buffer to store big endian data (e.g. network byte order), then you'll need to byte-swap to use either of these techniques. <S> A way to do that without any branches or temporary variables is: uint8_t a[2] = {0x35, 0x4A};a[0] ^= <S> a[1];a[1] ^= <S> a[0];a[0] ^= a[1];a[0] == 0x4A <S> ; // truea[1 <S> ] == 0x35 <S> ; // true Incidentally this is not an AVR or even an embedded-only problem. <S> Application level networking code written for PCs typically calls functions called htonl , htons (host to network, 32- and 16-bit variants) and ntohl , ntohs (network to host, 32- and 16-bit variants) whose implementations are target architecture dependent as to whether they swap the bytes or not (under the assumption that bytes as transmitted 'on the wire' are always big-endian when they are part of multi-byte words). <A> If your intent is to concatenate the two 8-bit variables into a 16-bit variable, use a union . <S> If you want to cast a single member of <S> a into b , then specify which element of the array you want to use. <A> You need to cast the value pointed by a . <S> b = <S> (uint16_t)*a; I never used AVR <S> but if you are working with a 16 bit architecture you have to make sure that a is word aligned. <S> Failing to do this may result in an exception. <A> Each member of a is an 8-bit number. <S> It can't hold anything larger. <S> Casting it to 16-bits does not do anything to a . <S> It merely extracts whatever value a might be able to hold, and converts it to 16 bits so that it matches up with the format of b when the value is stored there. <S> You didn't even refer to a member of a . <S> You must use a[0] or a[1] (and not a[2]!). <S> If you use <S> a by itself, you just get the address of it. <S> (Good catch, Bruno). <S> Declaring a to be an array of two 8-bit numbers doesn't make it a 16-bit number, either. <S> You can do some things programmatically to store and retrieve 16-bit values using sequences of 8-bit, but not the way you were thinking. <A> If you want to convert the bytes in <S> a into a 16 bit value, <S> and the representation is little-endian (the lower 8 bits of the value come in the first byte), do uint16_t b = a[0] <S> | (a[1] << 8); For a big-endian representation do uint16_t b = <S> (a[0] << 8) <S> | a[1]; <S> Avoid using pointer casts or unions to do this, as that leads to portability problems.
On your code you are casting only the pointer to the array.
microcontrollers to start with I am a beginner in electronics, till now i understand basics of electronics and worked upon 8085 & arduino only, now i want to enhance my practical skills by working upon some more microprocessor/microcontroller. Please suggest me the most helpful for the same and which one i must brought as there are a lot of options available in market. Also if any kit or book is available for this purpose, suggest me that as well, i really want to try my hands on practical electronics now. Thanks <Q> I would recommend the Atmel AVR 8-bit microcontrollers as a good starting point. <S> The micros themselves are a little bit pricey piece for piece for an 8-bit part, but for a hobbyist they're great, because the programmers are cheap, and the software tools are free (and excellent) <S> These are the micros on which the Arduinos are based, and there are tons of examples for all variety of applications using the entire range of micros. <A> Well, if you are new to the MCU world maybe you should focus on having a strong knowledges of the basis. <S> If you jump dirctly to the trendy world of ARM such as Cortex m3 as soon as things do not work you will get lost due to the hyper complexity of thoses beasts. <S> It's not the right time for you to solve problems such as PLL locking, clocks gating, mutichannel DMA or very compex <S> Timer units. <S> you should focus on basic but powerful 8 or 16bit MCU. <S> such as MSP430, Pics, AtMega, etc. <S> If you know how to work at this level, without hal libraries, rom included RTOS etc. <S> You will become a much better embedded programmer. <S> I have tons of example of programmers who began with powerful ARM chip and that put float variable everywhere, use complex c++ class and finally end up with exteremely innefficient and very slow result. <S> If you know about fixed point math, look up tables and efficient usage of embedded ressources you will be a king. <S> there is also a debate about the language to learn with. <S> 10 years ago people would say that you have to start with assembly first. <S> and afterwards you may use higher level languages such as C. but real ingeneers will stay at the assembly level. <S> I think that it's to true anymore. <S> having knowledge in assembly is good <S> but nowadays c compiler offers very decent performance. <S> What is important is to know what happend at the lowest level. <S> what is a register overflow. <S> how integer math works and how to use bitwise operations. <A> The O'Reilly book " Designing Embedded Hardware " by Catsoulis has a pretty good review of the different families, their architectures, and the areas where they excel and why somebody might choose or not choose a family. <S> Many people (myself included) have their favorite dev environments and <S> I know I'm inclined to recommend my own favorite, but I think the best way to go about it is to read some good overviews and try to match the family to the jobs you can picture yourself doing. <S> I don't think you'll find much strong opposition to recommendations to start w/ an 8 or 16 bit platform, though. <S> That seems to be pretty good advice.
http://www.avrfreaks.net/ is an excellent resource if you're just starting out, and the people in the forum are extremely helpful.
Why is this MOSFET's "pullup" resistor necessary? I'm reading an basic electronics textbook, the chapter on MOSFETs, and it has started with a simple model of the MOSFET as a switch (the "S model"). It shows a circuit like this: And says: Here we see the purpose of the load resistor R -- it provides a logical 1 output when the MOSFET is off . Huh? Without that resistor (ie, replacing it with wire) the value at V out would still be 1/high when the switch was off, because there is an open circuit between drain and source. So why does it need the resistor? (This is on p.292 of Foundations of Analog and Digital Electronic Circuits , by Agarwal and Lang. I'm trying to follow the MIT open courseware, first course.) <Q> First with the FET switched on. <S> The on-resistance of a FET can be very low, even as low as a few mΩs for high current ones, but let's take an average FET with a 1 Ω on-resistance, and a 10 kΩ pull-up resistor. <S> Let's say \$V_S\$ = 5 V. <S> The FET pulls the output level almost to ground; it forms a resistor divider with R, so that \$ V_{OUT} = \dfrac{R_{DS(ON)}}{R + R_{DS(ON)}} V_S = <S> \dfrac{1 \Omega}{10000 \Omega + 1 \Omega} <S> 5 V <S> = 0.5 mV \$ <S> So with the FET on we have as good as zero. <S> Next with the FET off. <S> Then there's no current through R, and since the voltage across R = R \$\times\$ <S> current (Ohm's Law) <S> the voltage is also zero. <S> If \$V_S\$ is 5 V, and there's no voltage difference across R, then \$V_{OUT}\$ also must be 5 V. <S> Just like the FET isn't a perfect switch when closed it isn't a perfect switch when open either. <S> There's a small leakage current, say up to 1 µA. <S> That will cause (again due to Ohm) <S> a voltage drop of 1 µA \$\times\$ <S> 10 kΩ = <S> 10 mV across the resistor, and the output will be 4.99 V instead of 5 V. <S> The leakage current is the reason why you shouldn't choose R too high. <S> If R would be 1 MΩ then the voltage drop would be 1 V and that may be too much. <S> So it works with the resistor. <S> What if we omit it? <S> With the FET on the output woill be drawn to ground, but with the FET off the output would be floating if our FET was a perfect switch, so it would be undefined. <S> With the leakage current it might still pull the output low, if the input impedance of the load was very high. <S> So the resistor is needed to define the level when the FET is off. <A> The resistor is needed; otherwise you'd have no way of getting a logic 0/1; also, in this case, when the MOSFET is on it shorts Vs to ground. <S> E.g. in the example below, the blue line is the input voltage (Vin) and the green line is the current that the voltage source (Vs) is giving. <S> As you can see, the current reaches extreme values. <A> But if you turned the switch on, what would your state be? <S> EDIT: <S> go look up 'ohm's law'. <S> Looking at the image below, for the "LOW" case, where I=Vs/R, change R to 0ohms and tell me what your current is. <S> Or for an empirical experiment, go short your car battery terminals together or stick your finger in a socket. <A> If the resistor is replaced with a short circuit then turning the transistor on tries to short out the power supply. <S> Either the output will stay high and the transistor will get very hot or the power supply will collapse. <S> Both are bad. <S> If the resistor is replaced with an open circuit then when the transistor is off there is nothing left connected to the output other than some stray capacitance and so most likely it will stay low. <S> Which brings us to the root of the question. <S> You have interpreted "without that resistor" as "replace the resistor with a short circuit". <S> The author clearly intended it to be interpreted as "replace the resistor with an open circuit".
You need the resistor to keep the Vs from shorting to ground and to give you a defined 0V when the transistor is on thus the inverting property.
Possible to output sinusoidal signal with an Arduino? Is there a way to output a sinusoidal wave with an arduino? Perhaps using PWM? It would be nice to be able to simulate something around 10kHz. Is this even possible with the hardware on the Uno? <Q> Yes, you use a low pass filter combined with PWM. <S> The lower the duty cycle the lower the value of your output. <S> So you modulate your duty cycle like a sinusoid and pass the PWM output through a LPF. <S> The output of the LPF will then be a sinusoidal waveform, though it will have a DC offset. <A> Look for DDS (Digital Direct Synthesis) which uses a low pass filter as mentioned in the other answers: It then uses a varying PWM signal to create a sine wave: <S> All you need in order to implement it with an Arduino, including the source code for the PAM generator, can be found in this article . <A> Not quite an Arduino, <S> but I remember a specific lab exercise that required me to do this in my university microcontrollers course using an AT90S8515 - and <S> as I recall, it required some assembly programming to get the frequency into the tens of kHz... <S> in fact here's the lab description . <S> But you're not going to get much frequency out of it using the digitalWrite function. <S> Like I said, at a minimum you'll need to do direct port assignments.
Other than PWM + Low Pass Filtering, another way is to use an R-2R ladder DAC , and drive the output with a PORT.
Looking for help on why my n-channel mosfet is getting destroyed I've got a design that I've inherited with a pretty standard n-channel mosfet driving a relay that controls a motor and actuator. On a recent build we started getting a 50% failure rate on the n-channel mosfet. Previously we had no failures of the mosfet. The only differences I've been able to find so far are different date codes on the relay and mosfet. Otherwise nothing has changed. The mosfet is an ON Semiconductor 2N7002LT1G The relay is a Omron Electronics G6RL-1-ASI-DC24 The flyback diode is a ON semiconductor MRA4003T3G The mosfet was examined by ON semiconductor and it was found that it was most likely destroyed by excessive voltage. But I've not been able see a voltage spike on the mosfet above 30V so far. Here is the part of the circuit with the mosfet/relay/diode. <Q> I'm guessing the diode wasn't soldered down properly on your recent build, or maybe you got some bad parts. <S> Take one of the boards that failed, replace the FET, and look at the drain with a fast scope while the relay is being turned off. <S> Then reflow all the solder connections around the diode and maybe even solder wires directly from the diode to the relay and look at the signal again. <S> You show the schematic, but not the physical layout. <S> Where is the diode relative to the relay and the FET? <S> If it too far away, then the inductance to it partially defeats its purpose. <S> Another possibility is that this was a bad design all along, and now you got some parts where the difference matters. <S> Try putting a small cap immediately accross the relay. <S> That will slow down voltage changes so that other parts of the circuit can keep up. <S> If the relay is off board, then you have to protect the FET drain separately. <S> This could mean a separate reverse diode on the board an maybe a small cap to ground on the drain. <S> You don't want to put too much there because it will cause a small surge when switching on, but a few 100 pF to a nF <S> or so should slow down the voltage changes. <S> What voltage is VBATT? <S> Why isn't the diode a Schottky? <A> Changing R38 to 10k MAY help. <S> Adding a zener across gate-source may help Showing all the relevant circuitry may well help - in this case what is hiding behind ACTCTRL1 may or may not be relevant. <S> Why it would change between batches is not obvious, but something to check is that gate voltage can never exceed (or closely approach its max rated value (Vgsmax). <S> This depends on the impedance of ACTCTRL1. <S> Miller capacitance will couple turn off voltage from drain to gate and this MUST be clamped by attached gate impedance to less than Vgsmax. <S> Vgsmax may vary between FET batches but this is not overly likely. <S> If there is any doubt then placing a zener diode of slightly more voltage than V_gate_drive_max from gate to source <S> (cathode to gate so zener usually does not ever conduct). <S> R38 is probably far higher than necessary at 100k. <S> Odds are that this can be say 10k and this may have been changed between batches without being notices. <S> Miller capacitance energy has to drive this to above Vgsmax to destroy the FET so a 10k makes this 10x harder energy wise. <S> With 5V drive a 10k will require 0.5 mA drive so most drivers will have no problem with this. <S> If ACTCTRL1 is not a direct connection to a drive pin and has series resistance then this may need to be reduced proportionately. <A> You mention that the failure analysis points to overvoltage, so this may not be relevant, but ensure that the diode wasn't placed backwards. <S> With a 500ma(max) FET and a 1A(max) diode, it is almost a surety that the FET will fail first in the case of a forward-biased diode. <S> We once had an assembly house do this to us with SMT diodes like yours (the silkscreen was totally obscured by the part). <S> It took a embarrassingly long time to find, but was a simple fix...at a new assembly house. <A> I see that this is essentially what DeanB said. <S> This adds a few figures and wanders around the general area a bit. <S> If D21 is installed with incorrect polarity the FET will fail almost instantly. : Failure from over dissipation is almost certain. <S> If the diode fails instead tjhe FET woll fail soon after due to inductive spikes. <S> On FET turn on the diode conducts from 24V to ground via FET. <S> Diode fails open circuit. <S> Relay now operates. <S> On relay release you now have an inductive spike and no diode ... <S> :-(. <S> The 7002 is not overly high current capable and will probably current limit at "a few" amps. <S> It may be a release ebtween diode and MOSFET to see which can self destruct first. <S> If the MOSFET dies first the relay never operates. <S> If the diode dies first the relay operates at least once, and possibly a number of times. <S> So <S> : Check diode polarity. <S> Observe Drain with oscilloscope. <S> Observe base with oscilloscope 9see <S> my other answer). <S> The diode datasheet here is rated at 88 C/W with 1 inch square pads so needs not overly much overcurrent to die thermally. <S> The MOSFET is rated at 300 mW dissipation and 417 C/W !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! . <S> Datasheet here Wityh all the drive in creation <S> it's good for about 1.6A and will then drop as much voltage as you want to feed it, whereas the diode is hardly breaking a sweat at 1.6A with Vf of about 1 Volt, so if the diode is reversed you'll get about P_transistor = <S> V.I ~~~= <S> (24-1) x 1.6 =~ 30 Watts. <S> Death would be nearly instant. <A> You may need a faster diode. <S> The data sheet I'm pulling up for that part doesn't list a forward recovery time, which generally means it's long enough that nobody who cares about recovery time would use it.
One batch of diodes may have had a faster recovery time, another slower, and now that you've got the slow batch the inductive kick is enough to break your FET before the diode can recover.
What is a good way for the mcu to determine which hardware version it is running on? I'm working on a new product design and there will probably be small or large hardware changes/fixes over the life of the product. For future firmware updates in the field I need a way to determine the hardware revision. What is a good strategy? I'm currently pulling two spare pins up/down with external resistors and checking the pattern. This only allows for 4 hardware revisions, but that might be enough for practical purposes. It might become a problem if I need one or both of those pins in a future hardware revision. I guess a more economical way might be to have a resistor divider connected to an ADC pin. Each hardware revision could have different value resistors. Unfortunately I don't have any spare ADCs in my current design. I guess another way could be to encode the hardware version number in an EEPROM or the mcu flash during production? (We don't have that facility at the moment.) I guess I'm looking for suggestions for a flexible and robust method. [EDIT] Re. suggestion from @trav1s: I don't have an address bus per se but I have an 24LCxx EEPROM on the I2C bus. The low 3 bits of the Slave Address is hardwired. I guess I could change the address bits and search for the EEPROM during startup. <Q> I wouldn't use a version number programmed into the microcontroller. <S> Unless the software is different for different board versions, but then the board version seems superfluous to me. <S> Have as few versions of the microcontroller's software as possible, ideally just one. <S> Each different version may cause logistic problems. <S> EEPROM is expensive for large capacities (much more expensive per bit than Flash), but for a few bytes you can find them cheap. <S> This one is only 16 cents in 100s and only needs 1 I/O line. <S> A way to decrease the chance of errors is to have a different package for each board version. <S> So have a batch of EEPROMs programmed with a version number 1 in SOT-23, the next version 2 in MSOP, etc. <S> Then you can't have a version 1 EEPROM on a version 2 board. <A> This is something I deal with on an ongoing basis. <S> We have very complex hardware that's been in the field for almost 10 years, with different versions of various subsystems. <S> Some of the subsystems have a 2-bit code, but as you mentioned, that's not always enough. <S> The EEPROM suggestion is a good one, but it requires programming the EEPROM and populating the board with the right version. <S> What I would suggest is an 8-bit parallel in-serial out shift register like a 74HC166. <S> and then you only need 3 pins to load and read the shift register from an MCU. <A> One option that will use only two digital pins is something like this: By changing the R1 and C1 values you can have different charge times for the capacitor that you can measure to determine the hardware version. <A> If there is any unused space on in the address bus you could place a ROM register on the bus which can be read by the MCU. <S> The register would contain the version number of the hardware. <S> When the MCU reads from that address the register would write its value to the data bus. <S> The register could be hardwired on the board or if you want to be able to change the version number with your bare hands you could make pins that can be tied up/down like you are doing now.
The version number can be set on the input by the PC board itself tying inputs HIGH or LOW The EEPROM code is a good idea, because it allows for lots of different board codes, but take it out of the microcontroller, in a separate device.
How do you remove the buzzer from this PCB whose solder side is inaccessible? (Click on an image to see in original size.) There is this buzzer in this UPS (uninterruptible power source) circuit. I want to remove it from this circuit because it make a lot of unnecessary noisy. Black-outs happen too much in my area. Sometimes they happen in the deep night, when I am sleeping, and this little buzzer wakes me up by freaking me up. I always immediately realize it when there is a black-out, so this buzzer is really not needed. I am not able to de-solder it. Because the PCB is strongly embedded into the case by some very hard clippers. It just won't move. How do I remove this buzzer from the circuit, or shut it up without removing? I don't plan to re-use it, so it is OK if it is destroyed in the process. I just don't want to get into risk of damaging any other part of the PCB. <Q> You could quieten the buzzer by filling the hole in the top of the plastic. <S> If you pour in something rubbery (hot glue could be good) then it would almost certainly muffle the sound. <S> To remove it, I'd crack the plastic with some pliers removing enough to heat the legs with a soldering iron. <A> I know the OP has probably solved this problem, but this is for anyone who might land here through google like I did. <S> I just disabled a piezoelectric buzzer exactly like this one. <S> Looking at the first picture included in the OP's post, the buzzer is the black cylinder with the hole at the top. <S> See that seam running all around the cylinder? <S> Beneath <S> that is a shiny silver disk. <S> Lift that out and throw it away. <S> You'll see copper wire beneath that, but there's no need to touch that. <S> Lastly, snap the top of the cylinder back on. <S> Now you'll barely be able to hear the buzz. <A> There may be an alternative choice. <S> These devices are often resonant, and very loud at resonance. <S> Putting a piece of cellophane tape over the opening may upset the resonance and cause it to be so quiet that you no longer need to remove it. <S> And of course, the process is reversible. <A> Just a little bit at a time so as not to risk damaging the PCB. <S> Use large wire cutters like these . <A> First of all, the solder side is perfectly accessible. <S> From the pictures, it doesn't seem difficult. <S> It looks like it is simply held in place by screws, plus a few board-mounted components that protrude through the enclosure. <S> Secondly, the buzzer may be wired in series with some other component: one of the neighboring jumpers or resistors. <S> A cut jumper or resistor can be replaced easily, if need be, since those are generic parts. <S> Like the hero in the movie, diffusing a time bomb, you have to cut the right one, without seeing the solder side traces. <S> For that you can probe around their voltages with a multimeter from the component side, with the buzzer on and off. <S> That's still a guess: better to do it with the circuit board out. <S> Even with the board out and access to the solder, I'd still remove a resistor or jumper rather than the buzzer. <A> Option #1: <S> I tried Jason's method on an APC brand UPS. <S> Worked like a champ. <S> Grab the black cylinder (marked 330-0004 or similar) and gently twist left <S> /right until it comes loose. <S> Problem solved. <S> Option #2: <S> Using a flashlight to shine through the PCB from one side makes it easier <S> it identify the correct contacts on the other side. <S> Option #3, for APC UPSs with a data port: Purchase a USB-to-RJ11 cable for about $15 and install APC PowerChute software. <S> Disable the buzzer through software as originally intended by the manufacturer. <A> I have an inverter with the same problem so I stuck a toothpick in it. <S> I had to get it stuck in just the right place to make it very very quiet <S> but it worked for a while until i decided to unsolder the thing. <S> Mine used to come on when the batteries were at a certain voltage even though they still had plenty of power <S> and it was really really loud. <A> I tried covering the piezo hole, stuffing it with cotton and tape. <S> But the gargle sound was still loud and more irritating. <S> De-soldering the buzzer was easy. <S> A tweezer or nose-plier to pull and a soldering iron to just heat the soldered ends a little on the other side of the PCB. <S> But probably the heavy heat-sink or the sticky gel keeping the LED in place made it seem as if something was still holding the PCB back. <S> Ah, peace at last. <S> If it wouldn't have worked, i'd have taken that nose plier and crushed the blessed buzzer. <A> Just grip the buzzer's sides gently with needle nose pliers and twist clockwise and counter-clockwise about 20 times, like you're turning a knob. <S> There are only two wires holding it to the board that will eventually weaken and break off cleanly. <S> For those searching, I did this to quiet a Verizon FIOS box that does not stop beeping after removing the back-up battery. <S> Hopefully this will save millions of batteries being purchased just to stop the beeping.
If you open that component, you silence the buzzer, without destroying it. Then use a soldering iron to remove the buzzer. Take a very small flat head screwdriver, insert it into the seam, and wiggle the top off. The PCB screws were easy to remove. Well, it is not accessible now , but it will be if you remove the circuit board. I would use wire cutters to destroy it.
MOSFET IRF7832 to turn on LED strip I am trying to use a IRF7832 MOSFET { datasheet here } to control a short LED strip. I have connected the LED strip between 12 V and drain and 0V to gate and source. The LED strip has 6 strings of 3 LEDs. As I understand pin 5-8 is drain, pin 1-3 is source and pin 4 is gate so I have pin 1-4 to 0V and 5-8 to the LEDs. I expect this to turn off the LEDs but they are turned on very dim and I measure about 4.5 V between drain and source. If I connect gate to 5V the LEDs turn on and I measure 2.5 mV across drain and source. I have tried 2 different IRF7832's. What am I doing wrong? <Q> What you say you have done would be completely correct and would work if you had done it and if the FET was alive. <S> So either - The MOSFETs are dead or You are doing something different to what you say you are doing. <S> This seems the most likely situation. <S> Check painstakingly, step by step. <S> Murphy. <S> Drain to source leakage current at Vgs = <S> 0 is 1 uA max. <S> Odds are your eyes are not that good :-). <S> Presumably you are assuming that pin 1 is indicated by a dot on the package. <S> It should not matter, but= <S> t ensure that all 3 S leads are grounded and that all 4 D leads are connected to the LEDs. <S> IF LEDs are white you can expect about I <S> = <S> V/R = (12 - 3 x 3.3)/100 <S> =~~ 20 mA <S> when on. <S> I find IR data sheets to usually be quite reasonable. <S> They should indeed have noted it as an N Channel on page 1. <S> The diagram on page 1 shows it is an N Channel. <S> MOSFETs are inherently exquisitely ESD sensistive. <S> A MOSFET with no protection built in can be destroyed by <S> 20 to 30 volts applied gate to source. <S> You can induce that level of voltage just by opening a non-ESD safe bag that they are contained in. <S> However, modern MOSFETs usually have reasonable to good ESD protection built in BUT always regard them as "static sensitive". <S> Once you have handled on without ESD protection it is always suspect subsequently. <A> I had the very same problem just now, and it turned out to be caused by ESD damage. <S> To do a simple test, try measuring current flowing through the gate (you can use a standard multimeter for that). <S> There should be no measurable current going through - <S> the transistor is voltage controlled; if you see any current on the gate, that means you need to get another MOSFET. <A> The IRF7832 is an enhancement FET, which means that you have to apply a positive voltage relative to the source to the gate. <S> \$V_{GS(th)}\$ is maximum 2.3 V, so you'll need a higher voltage than that to be sure of 250 µA <S> drain current. <S> A volt higher should give you enough current to light the LEDs. <S> For most FETs that would be around 1 µA at 25 °C, but it increases exponentially with temperature. <S> The datasheet gives a value of 150 µA at 125 °C, and that should be enough to get some light out of the LEDs. <S> Are the FETs considerably hotter than 25 °C?
The current with the gate grounded is leakage current, and should be as low as possible.
power supply cut-off in umbilical power cord to tube amp I am building a tube amp with a separate power supply in a second enclosure - connected to the amp via an umbilical power cord. What is the most elegant way to keep the power supply off if someone inadvertently turned on the power supply without the umbilical cord being plugged into the amp? I have heard of using a relay to do this by running an additional ground wire in the umbilical cord, but haven't seen a schematic or any details of how this would actually be done. This is a hi-fi amp with a Edcor xpwr054-120 TRANSFORMER , so I will use it for the heater power @24 VDC and the main power @330 VDC (power supply takes the 240 VDC and ramps it to needed 330). I guess I don't have a way to run an additional low voltage signal via a relay with this setup, is that true? Any suggestions? <Q> Russell has already given you a good direct answer to your question, so here are some other things to consider: If safety is your concern, and since you are designing this all from scratch anyway, put the power supply in the same chassis as the amp itself. <S> That completely avoids the issue, and is how it was traditionally done back when these things were traditionally done. <S> Let the power supply stay on. <S> If safety is the issue, use a connector arrangement that makes it difficult to get at the high voltage pins when disconnected. <S> This usually means the high voltage comes out of a female connector with the conductive parts recessed so you can't touch them with your fingers if you wanted to. <S> This is what ordinarly wall power outlets do too, for the same reason. <S> If you are worried about the power supply itself getting damaged under no load, fix that. <S> This is easy to do. <S> Tube amp power supplies were usually just a transformer secondary, a full wave bridge, and a capacitor. <S> Make sure the components are rated for the highest possible no load voltage and all will be fine. <S> This is easy to do. <S> Tube amps need multiple supplies. <S> At the least you will need something like 6 V or 12 V for the fillaments, and around 200 V for the anodes. <S> Depending on which tubes you end up using for the input stages and the power stages, you may want two different anode supplies. <S> For example, the 12AU7-A (common signal amp tube) has typical operating voltage shown as 100-250 V, with 330 V maximum. <S> The 6L6 (common for power output stage) has the typical operating voltage shown from 250-350 V. <S> There is some overlap when you look at the specs carefully, but two supplies might still be what you want in the end. <S> Sometimes the lower preamp supply was made by extra filtering of the power amp supply. <S> That was OK since the preamp current draw was quite small. <A> There are even safer ways, but the method that upu suggested would work well enough [tm] in most cases. <S> The lead contains 3 wires. <S> Let's call them live, ground, and go. <S> Live conveys high voltage. <S> Ground conveys ground. <S> How are we doing so far? <S> Go is connected to ground at the amplifier end. <S> A say 12V relay which is located in the power supply has 12V connected to one side of its coil and the other side is connected to the power supplky "go" terminal. <S> When the amplifier is connected there is a circuit from +12 via <S> the relay coil via psu go terminal, via power lead to amplifier go terminal. <S> Here the go terminal is grounded so the circuit returns via the ground lead and the relay operates. <S> The operating relay operates the power supply. <S> The terminally curious can activate the psu output without a cable by grounding the psu "go" terminal. <S> If the psu output connector is a finger and standard probe safe socket such one would need to be very clever or exceptionally stupid and unlucky to get a shock if it was powered up (which is how it should be) then this extra layer of protection would make the system very safe indeed. <A>
The most elegant way is to design a power supply that doesn't have a problem with being energized while the load is open.
Is this 'pmod' connector standard? Here's an image of my Digilent Coolrunner II development kit: Those connectors on the backside are 6x2, female, and seem to be on .1" pitch. Are these standard, and where could I buy the male counterparts? Much obliged. Just a few words to search on is all I need. '6x2 electronic connector' didn't cut it. <Q> Are you sure about the gender? <S> For these application IDC connectors are often used, with the male boxed connector on the board, and a female connector to a flat cable: "IDC" seems to stand for "Insulation Displacement Connector" (which is rather cryptic AFAIC). <S> edit <S> If the board has indeed the female connectors then they're for what's called male headers <S> At the left there's the "straight" version, right the "right-angle" version. <S> These are for PCB mount as well, and with the straight connector your satellite board will be vertical, while with the right angle connector it will be in the development board's plane. <S> The disadvantages should be clear: <S> the way the connectors are placed close to each other on the development board doesn't offer the freedom the flat cables would give you. <S> Unfortunately I haven't seen these headers for flat-cable mount. <A> Even though they call them "Pmod connectors", the keywords you are looking for are: 0.1" right-angle 2x6 (or 6x2) male header . <S> They sell overpriced adapters too: <A> That looks like the standard of standard connectors the 100 mil header, they may be older than engineering itself <S> ;) <S> Most connector manufacturers make them in various, lengths, platings, and angle positions. <S> You could order a 6x2 Samtec version from digikey for $1.63 http://www.digikey.com/product-detail/en/TD-103-T-A/SAM1114-03-ND/1105555 <S> It says no stock, value add, but that just means they cut them to your length to order. <S> Pick USPS shipping if you want the best shipping deal. <S> Here's a link to their page for 100 mil connectors. <S> http://www.samtec.com/standardboardtoboard/100_pitch_square.aspx Molex also makes them under the CGrid or CGrid III name: http://www.molex.com/molex/products/family?key=cgrid_iii&channel=products&chanName=family&pageTitle=Introduction <S> Those are what I usually use, although I do really like Samtec as well. <S> Keep in mind when ordering they come in different types of platting (and different plating thicknesses). <S> This is an extremely common part so they should be easy to find. <S> One last tip is they're easy to cut to the size you want <S> so I usually just buy a bag of really long ones, say 32 x 2 and then cut them to size as needed. <S> They're pretty useful in the lab for making test points or connectors on the fly. <S> Good Luck! <A> I also wanted to connect self developed module by cable. <S> It was really hard to find a 12 pin male header for ribbon cables. <S> Those offer the gender you would like to have. <S> Additionally 12 pins seems to be really unusual. <S> As far as I understood that, they are normally to be soldered on the PCB. <S> I ordered some from eBay and let you know if it worked out.
I would make a small adapter PCB for the header to connect to a flat-cable assembly, like a Micro-Match which is a one-part connector for directly connecting a flat-cable to a PCB. So after searching for a while I found out that it is called "2.54mm 2x6 Pin 12 Pin Male Header IDC Ribbon Cable Transition Connector" on eBay. Samtec is also great about sending out samples for free so if you only need a few you can request samples from their website. So if this is proto or a hobby project you'll want to get either the thinest gold or no gold to keep the price down.
CPLD best practice for resetting a counter My application has a bog-standard count-until-a-certain-number-then-reset-the-counter section. My experienced friend tells me that when using actual chips, it's common to increment the counter on the rising edge of the clock and reset the counter on the falling edge. That way the designer has a lot of time to do what needs to be done before the next clock arrives. But he's never used a CPLD and I wonder if this changes the rules. Or if his information is technically sensible but not practically needed. My design has something like always @(posedge clock) begin (increment the clock) endalways @(negedge clock) begin (reset the counter conditionally) end I'm not trained at all in electrical engineering, I just read and dabble. But I can't let it rest when I don't feel I have a certain (n00b-level) understanding of what's going on. I just read an example from a university course where the instructor didn't care about when the counter was reset. His design was something like: always @(posedge clock) begin counter = counter + 1; if (counter == some_number) counter = 0; end This leads me to believe I'm over-engineering, the instructor is instructing not building an industrial app, or the synthesis process handles such things. Of course I could try it in the simulator or actually plop it into the CPLD. Eventually this is going to be driving a powerful machine and it's got to work every time. I can't have an edge case where the machine misbehaves. EDIT - more context. While it may not matter with respect to the answer, I am counting pulses generated by an encoder attached to a rotating spindle. I have to count every one of them, and I can't lose any. EDIT 2 - example of a loop that increments a counter, then on some condition, changes it. module slow_count( input clk, output reg [3:0] count ); reg[19:0] snooze = 0; always @(posedge clk) begin snooze = snooze + 1; // Set the counter if (snooze == 1000000) begin snooze = 0; // And change it here count = count + 1; if (count == 10) count = 0; end endendmodule <Q> It sounds like you don't have an external reset signal to respond to, you just want to count to some number then go to zero as the next step. <S> You could consider this a mod n counter, where n is one more than the maximum count in your counter. <S> So I'm not sure what you mean about "losing a signal" while doing the reset. <S> If you had a 3-digit decimal counter and it rolled over from 999 to 000, you wouldn't consider it as "losing a signal", it would just be counting to the next value in mod-1000 arithmetic. <S> So if you do always @(posedge clock) <S> begin if (counter == some_number) begin counter <= 0; end else begin counter <= counter + 1; <S> endend <S> You'll have a counter that counts continuously in <S> mod- some_number+1 <S> arithmetic. <S> Alternately you could say it counts to some_number , then resets to zero without ever "losing" a clock pulse. <S> If some_number+1 happens to be a power of 2, you don't even need the reset condition in your code. <S> For example, for a mod-16 counter, you can just use a 4-bit counter, and the synthesized logic will count continuously and repeatedly from 0 to 15. <A> If there's no reason to do otherwise, I always clear the counter on the next positive edge, assuming the counter is positive edge triggered. <S> This keeps the time at each value constant, which may be important if the counter shares a clock signal with and controls other blocks, and especially frequency dividers. <S> As always, synchronous operations are your friend. <S> Your university example is good practice in my opinion. <A> If you don't need to reset the counter asynchronously, then the counter should simply determine on each clock cycle what the next clock value should be, so everything runs off the same clock edge. <S> If you do need to reset the counter asynchronously, there are a variety of approaches which may be used based upon what is known about the timing of the reset input <S> (most notably, whether there is any possibility that the reset signal might be released near a clock edge, <S> and/or any possibility of "runt" reset pulse). <S> The data input to the first flop should be high when its output is high and either the second is high or the third is low, or when all three flops are low. <S> The counter itself should not be asynchronously reset, but should instead load itself with an initial value whenever the third flip flop is low. <S> The outputs from the counter should be asynchronously "AND"ed with the "and" of the three flip flops before driving downstream circuitry. <S> Using such an approach, any proper-length reset will cause the outputs to go low asynchronously. <S> A runt reset pulse may cause the count outputs of the overall circuit to go momentarily unstable, but they will either reset cleanly or will within two cycles revert to the original count sequence. <S> As described, there will be few cycles delay between releasing reset and observing the first count; such a delay may be eliminated by adding some extra logic between the counter and the circuits fed thereby, and by having the counter itself loaded with a non-zero value. <S> Effectively, the first few counts following a reset would be handled by the flip flops rather than the counter. <S> A runt reset pulse may cause those first few counts to appear oddly, but counts after them would be fine.
The most robust way to have a counter reset asynchronously is to have a sequence of three flip flops which are operated by the main clock, and have the first one by asynchronously reset by the master reset input.
How do I control several hundred individual leds with Arduino(s)? I am working on an electronics project which involves hundreds of LEDs. (Talking upwards of six to seven hundred LEDs...a lot, I know.) Is there any way to control this many LEDs with one or a couple Arduinos? I would like to be able to access/control each LED individually as what I am wanting to do is plot LEDs onto a wall map of the world. I will then interface Arduino with Google Analytics and when someone navigates to my site from a certain place in the world, the LED closest to their region will light up in almost-real-time. Any help would be appreciated. Thanks! I've tried to research some and read about multiplexing and charlie-plexing, but those seem to max out at 100 or so? I'm assuming I would need external hardware/components to be able to control this many LEDs, but what exactly would I need to make this happen? Has anyone else ever created an LED matrix this large? <Q> When you multiplex a large number of LEDs individually the common way is to use an N x M matrix. <S> The time is divided in N steps, in each step you activate one of the N row lines, and the column lines that correspond of the LEDs you want to enable. <S> Note that the row lines can each carry M times the LED current, which asks for some buffering. <S> Each LED is on only 1/N of the time, so to keep the normal brightness you must increase the current N-fold. <S> Most LEds don't like this. <S> Charlieplexing is not practical in ths situation because of the large currents involved. <S> From your question I understand that you want to enable only 1 LED at a time? <S> In that case there is nothing wrong with Charlieplexing. <S> A uC with 31 I/ <S> O pins can drive 900 LEDs. <S> Sounds like the consruction will be a nightmare... <S> Update 5 years later <S> :Normal multiplexing or Charlieplexing is nice when you have too much time at hand, but when I had to control 100's of LEDs now I would buy a long strip of WS2801 LEDs. <A> Theres even a a tutorial on this on the Arduino site! <S> Serial to Parallel Shifting-Out with a 74HC595 <S> Shifting Out & the 595 chip <S> At sometime or another you may run out of pins on your Arduino board and need to extend it with shift registers. <S> This example is based on the 74HC595. <S> The datasheet refers to the 74HC595 as an "8-bit serial-in, serial or parallel-out shift register with output latches; 3-state. <S> " In other words, you can use it to control 8 outputs at a time while only taking up a few pins on your microcontroller. <S> You can link multiple registers together to extend your output even more. <A> I would build this in a modular manner. <S> Maxim's 6960 will drive 64 LEDs for you, though it is a bit pricey. <S> They are driven with a serial interface, and you can connect up to 256 of them together. <S> The 7218/7221 would also work. <A> A bit of a late answer to this question, but here are 528 LEDs Charlieplexed off a single PICAXE 40X2. <S> It would go up to 930 LEDs if all pins were dedicated to the job. <S> The build : http://www.picaxeforum.co.uk/entry.php?25-The-PICaxe-orrery <S> A video: http://www.youtube.com/watch?v=82LvqiaH-iA <S> The PICAXE architecture is quite slow, so the maximum number of LEDs that can be lit simultaneously is limited to about 15 before flicker becomes a problem. <S> A faster processor, and cleverer programming, would increase this number significantly. <A> I am not sure if my answer is good or not... <S> but why not speaking about WS2811 addressable leds stripes?? <S> We want to do a LED matrix to show text. <S> There is a project here ( https://www.pjrc.com/teensy/td_libs_OctoWS2811.html ), made on a Teensy, which is near same thing than an Arduino. <S> I think it uses the concept of PWM (Pulse Width Modulation), and thus allowing to send complex data to the leds stripes with a single wire. <S> But again, I am not sure if my answer is good... <A> We had a nice bit of discussion regarding driving many LEDs in a recent question here. <S> My answer there appears to be directly applicable to your problem here. <S> See the answer here: Driving LEDs at long distance <A> Based on info at http://bildr.org/?s=shift+register on the 74H595 shift register with an Arduino Uno, that said 'if you have 1000 of these chained together'a project was started on a an LED display <S> with320 LEDS. <S> When I got above 100 LEDs got bad flicker and eventuallyfried the Arduino. <S> So I talked to tech support at Sparkfun who sold me the breakout boards for the 74H595. <S> He said you can onlyhave five or six LEDs on at a time. <S> So I went back and reread thearticle at BLDR and realized that you can control thousands of LEDsusing 74H595/Arduino but you can only have a dozen or so on atany one time. <S> (This makes sense because the Arduino will allow 200mA thru the 5 volt out put and each LED draws 20mA <S> so about ten is all that it willsafely power) <S> Transistors have been seen that can be switched on with 1mA of current. <S> If that is true if one could design a circuit that controls transistorsthat have a much higher voltage/current collector to emitter flow. <S> Then one could use the Arduino/74H595 combination to control transistorsthat in a circuit with higher current. <S> Allen in Dallas
You could use a cheap and readily found 74HC595 (or similar) shift register to easily control hundreds of LEDs using just a few pins from the arduino.
Transistor setup for large motor circuit I am building a relatively simple circuit which essentially consists of two lead acid batteries rated at 12V and two motors rated at 12V. My original plan is to wire them all in series, and control them with a motor driver of some sort using a pwm signal. However, all of the motor drivers I can find that can handle this are rather expensive, and it seems as though it would be just as acceptable to do it with one or two mosfets . I am not sure of what quality/type of mosfet to get, and where to place them within the circuit. I am thinking it would be easiest to do just one high quality one before both motors, but would I be able to control the speed of the motors using a pwm signal that way though? Any advice is appreciated. EDIT: The mosfets will be controlled by a simple microcontroller such as a pic or avr. Here are three N-FETs I have found that may work. 87A 100A 104A Added [RM]: Copied from a comment - extra data should be in question for easy reference. The motors rated power is 337 Watts (at 2655 rpm, 172 oz-in, and 68 amps). The load is present at all times, and should stall minimally, but I have a current sensing ic in place to monitor the current and reduce the voltage if it starts getting too high. I don't care too much about bidirectional control, and the current measuring circuit is a 180 A rated attopilot chip. <Q> Do not put the whole shebang in series. <S> PWM Drive on the N-FET gates will allow you to control the speed of the motors. <S> Use two PWM signals to permit individual control of each motor's speed. <S> Selection of an N-FET type will take some careful work. <S> Since your motor can draw 27A at normal load (133A at stall) <S> you will need some beefy parts. <S> If you design the circuit around nominal conditions plus a guard band you may choose a 70 or 80A N-FET. <S> If so then you will have to design the circuit with some intrinsic current limiting or add some current overload sensing that couples back into the FET gates to shut them down when the current starts to get to high. <S> Further details regarding FET selection are stymied by lack data regarding what you want to control the gates of the FET with. <S> Keep in mind that this configuration causes you to only be able to control the motor in one direction of rotation. <S> If you require bi-directional control then you will need an H-Bridge for each motor that consists of four power FETs per bridge. <A> All 3 MOSFETs are potentially OK. <S> All have low Rdson, which is a very important factor. <S> Key questions include: <S> What is the motor rated power. <S> This allows the steady state current to be easily calculated and gives some idea of the startup currents. <S> Whjat are you driving? <S> ie is the load present during startup. <S> Do you want bidirectional control. <S> With 2 x 12V batteries and 12V motor you can get bidirectional control with two FEts per motor by joining the +ve on battery A to -ve on Battery B and using the joining point as ground. <S> You now have +/-0 <S> 12V and can drive a motor either way by applying either PWMd +12V or PWMd -12V. <S> Applying both at once is a very bad idea :-). <S> More answers if more information comes ... <A> Think about what will happen in a fault condition, should the motor stall or fail. <S> Simply connected a 12V car battery through a couple fets to a 100A motor is not very sensible. <S> There are a couple home-build projects you can take a look at: <S> Take a look at OSMC or (less mature) <S> OpenReVolt .
Instead deploy your circuit with each battery individually connected to a motor and then through a N-FET to GND.
How to convert a three wire hall effect sensor to a 2 wire sensor? Would there be any possibility to convert a three-wire hallsensor to a 2-wire equivalent.The connections are a V+, GDD and OUT. The voltage between V+ & GDD would be 24V and the OUT port would reflect the influence of a magnetic field on the sensor. I assume that if one would connect the wires in the correct way you could get an sum or subtraction hence enabling a 2-wire circuit. Thank <Q> A two wire sensor surely implies that the device becomes one that operates as a current device. <S> The current would vary between two levels depending upon the magnetic field sensed by the Hall device. <S> You have not indicated if the sensor is an on/off type detector of if it is an analogue device intended to show the relative strength of the magnetic field detected. <S> In either case your target implementation could be designed to work as a 4-20mA type device. <S> For the on/off type design the circuit could simply switch between 4mA and 20mA. <S> The analogue implementation would vary continuously over the 4 to 20mA range. <S> You can find various 4-20mA circuit designs on the web but the easiest is to deploy an IC chip that performs the 4-20mA driver function. <S> Two possibilities to use for this are the Analog Devices AD5750 or the Texas Instruments XTR117 . <A> Part number and link to datasheet of actual part is highly desirable. <S> I assume that it will run on a range of voltages including some below 24V. Feed via a resistor that drops a few volts. <S> Arrange sensor output to draw additional current so that IR drop will increase and be detectable. <S> eg See diagram below and assumptions in text. <S> " <S> Main load" represents the sensor electronics core load and "Active" is an additional load switched into circuit when the output is active. <S> This is only an example system - other similar ones will come to mind with this as "catalyst". <S> If the main sensor electronics draw 5mA and the sensor output is designed to add about the same again then the voltage across the 1k resistor will double when the sensor operates. <S> Assume as an example: <S> Will operate on 10-30V <S> Draws say 5 mA Output is open drain. <S> Feed via 1k <S> Feed wires = negligible compared to 1k. <S> output draws another 5 mA when activated. <S> Other assumptions will work but in the absence of you supplying real ones these provide an example. <S> Feed from 24V 1k resistor will drop 5V at 5mA so sensor sees 19V. . <S> When Hall switch operates the extra 5 mA will reduce voltage after resistor to 14V. Detect this 19V to 14V swing as desired. <A> That way external connections are Ground and Out.
The way that pops to mind is to package it with a battery.
Can you store energy in an inductor and use it later? My company uses supercaps to power the device if power is cut. I was wondering if you could do the same thing with an inductor. If you can't, why not? <Q> The magnetic field which stores the energy is a function of the current through the inductor: no current, no field, no energy. <S> You'll need an active circuit to keep that current flowing, once you cut the current the inductor will release the magnetic field's energy also as a current, and the inductor becomes a current source (whereas its dual, the capacitor is a voltage source). <S> Aspects of the capacitor-inductor duality in energy storage terms: \begin{array}{ll}\mbox{Capacitor} & \mbox{Inductor} \\\mbox{* stores energy in electric field} & \mbox <S> {* stores energy in magnetic field} \\\mbox{* must be open loop (infinite resistance) } & \mbox <S> {* must be closed loop (zero resistance)} \\\mbox{ <S> * loses energy through parallel resistance} & \mbox <S> {* loses energy through series resistance} \end{array} <S> A superconductor can sustain a magnetic field in a zero resistance current loop, however. <S> Unfortunately you'll always see the fumes of water vapor caused by the liquid nitrogen in pictures like this, which means temperatures below -183 °C. <A> Problem is that energy in an inductor is due to current, and most all practical conductors have some resistance; this means that energy is continuously drained into heating the coil itself though I^2R loss. <S> This can be overcome by using superconductors, which have no resistance at all, but the problem there is that all presently known superconductors have to be cooled to cryogenic temperatures. <S> Also, while an ideal superconductor would remain superconducting at any arbitrary current, all know superconductors (afaik) have some upper limit to the current density they can support before the effect collapses. <A> \$\begin{array}{lcl}\textbf{Capacitive Storage} & & \textbf{Inductive Storage} \\\mbox{Must have infinite internal resistance} & | & \mbox{Must have zero internal resistance} <S> \\\mbox{Voltage must stay in it forever} & | & \mbox{Current must flow through it forever} <S> \\\mbox{You deal with voltage} & | & \mbox{You deal with current} \\\mbox{Self discharge may take years} & | & \mbox{Self discharges in very short time} \\\mbox{Electric field doesn't leak outside much} & | & \mbox{Magnetic field may interfere other components} <S> \\\mbox{Lighter} & | & \mbox{Very <S> heavy (iron, copper, etc)} \\\mbox{May be cheaper} & | & \mbox{Fe and Cu may be very expensive in some countries} \\\end{array}\$ <A> Yes, people can and do store energy in an inductor and use it later. <S> People have built a few superconducting magnetic energy storage units that store a megajoule of energy for a day or so at pretty high efficiency, in an inductor formed from superconducting " <S> wire". <S> I've been told that several electric utilities have bought a few such units and use them to improve power quality. <S> Most people in the US have dozens of switching voltage converters. <S> Most of those switching voltage converters gradually store up energy at one voltage in an inductor or transformer, then "later" gradually draw that energy out of the inductor or transformer at a more desirable voltage, over and over, often 40,000 or a million times a second. <S> Many popular electronic parts suppliers allow you to sort inductors by their Q factor .The <S> Q factor rates how well an inductor or a capacitor stores energy. <S> In switching voltage regulators and other energy storage apps, bigger Q is better. <S> The best off-the-shelf inductors (all non-superconducting) at popular suppliers have a Q factor of 150 @ 25KHz. <S> Most capacitors have an order of magnitude better energy storage (higher Q) than that. <S> But in nearly all energy-storage situations we use something else,because that something else either (a) has lower up-front costs or (b) is more efficient or (c) requires less space or (d) <S> some combination of the above.
People can and do store some energy in inductors for use later.
What do you call the drawing which contains tracks, pads and drilling points of a PCB layer/side? Example: Does this drawing has a technical name? I see that people usually call these drawings "PCB". But, PCB is physical object, physical implementation of circuit, isn't it? Is these kind of drawings really called "PCB", or do they have a special name? <Q> I would also call the drawing you show a "PCB layout", as it obviously isn't the PCB object. <S> But like Wouter already indicated the definition of a PCB contains a lot more information that the copper pattern shown. <S> First, this is just one layer, there could be a second copper pattern on the top/bottom side (for PTH the default copper layer is bottom, for SMT <S> it's top), and inner layers, up to about 20 in the extreme. <S> In general you won't find a drawing that includes tracks/pads and drillings, because that's already too much information for one drawing. <S> The drillings drawing will show a series of different markers, like + , x , T , etc, for different hole diameters. <S> Usually you'll have 1 drill drawing, since the hole will go through all layers in most cases. <S> If you have the wallet for it you can have blind or buried vias, and the the drilling will be different for each layer. <S> My drawings start with the board outline, and that's often a pretty boring drawing, as it can be just a rectangle, but also a more complex outline like this one is possible. <S> Each of the component layers will have a copper layer (no distinction is made between tracks and pads) a solder mask layer (which leaves the pads clear) a "silk" layer, containing texts to be printed, like refdes's, logo's and identification a mechanical/keep-out layer, which shows the designer where he shouldn't place components, or indicating how much height he has available in certain areas. <S> (This layer is of no use for the PCB manufacturer.) <S> So "PCB layout" is only part of the drawings, and in many cases should be called "PCB layout top" or "PCB layout bottom". <A> The picture you show is the copper side (bottom layer copper) of a PCB. <S> It shows the copper (and the outline). <S> It does not show the drills as such, only the absence of copper that suggests drills at certain places. <S> A real drill picture could for instance also show drills at the corners that are not surrounded by copper. <S> There are many more layers, for instance in rough order of probability: drills bottom solder screen <S> top silkscreen <S> top copper <S> top solder screen <S> bottom silk screen for more than 2 layers: additional copper and drill layers <A> I think the word you're looking for is Gerber : <S> The Gerber format is a file format used by printed circuit board (PCB) industry software to describe the images of a printed circuit board (copper layers, solder mask, legend, drill holes, etc.). <S> The Gerber format is the de-facto industry standard for printed circuit board image transfer. <S> Gerber files are actually ASCII text files: <S> G75*G70*%OFA0B0*%%FSLAX24Y24*%%IPPOS*%%LPD*%%AMOC8 <S> *5,1,8,0,0,1.08239X$1,22.5*%%ADD10C,0.0080*%D10*X000281Y000835D02*X002472Y006196D01*M02* <S> But programs used to view Gerber files create images like this one you've shown and this one: <S> The programs create those images for human consumption. <S> But the ASCII is read just fine by the CAM Machines used to create the PCBs. <S> From <S> What is a Gerber File? <S> : <S> In many ways, Gerber is the electronics world's equivalent of PDF. <S> This odd little format, a hybrid machine control language and image, is a core component of the electronics manufacturing supply chain. <A> It's still somewhat a general term, but applies to your picture better than just "PCB". <A> It's called a layout. <S> Or a PCB layout. <S> Or a PCB design. <S> Specifically, it's a copper layer from a design. <S> I don't know what else you would call it.
I would call it a "[PCB] layout".
Can you use an opto-coupler to isolate the incoming supply from the output I would like to breakout the 5v and 12v outputs from my PC's psu. This is because of convience and accessibility. Would it be possible to use an optocoupler to isolate the supply coming from the psu? so that in the event of a dead short, it won't cause my pc to reset itself. Am only asking for a minimum 1A output for both rails. Ideally <Q> No. <S> Opto-couplers transmit signal , not power. <S> If you are worried about shorting the output of the same power supply the PC is using, then it's probably best if you don't use it for that. <S> You could put a regular fuse in series, but that will take a little time to react and won't protect against the immediate glitch. <S> A "polyfuse" has enough resistance that even a short on the outside probably won't glitch the supply inside the PC enough to matter, but you have to be aware of the series resistance. <A> You would need a DC-DC isolated switching power supply to do what you want to do and they arent cheap. <S> My question to you is what will you be using the external power supply hook up for? <S> If its for powering projects or accessories I would just buy 5v & 12V switching supply, they are very cheap nowadays. <S> That or use another PC ATX power supply by putting a light load on the 5V bus and grounding the power up pin. <A> It's only 100mA, not the 1A you requested, but Analog Devices has a line of RF-based digital isolators that are also capable of providing power on the isolated side. <S> The ADuM5000 , for example, takes 5V in and provides a regulated 3.3V or 5V output at up to 500 mW. <A> They aren't expensive. <S> A recent BOM of mine used a part from The CUI VBT1-SMT Series. <S> THIS PART is a 5V-5V converter that can provide 200mAmps with 1kV of isolation for under $6. <S> I'd read the data sheet very carefully to see how it will protect you from short, and if you're not satisfied, fuse it. <A> it's possible but not practical to opto-couple electrical power, think big expensive, hot LED shining on a high-efficiency photovoltaic array. <S> for this reason most people use transformers for power isolation. <S> if you need 5V or 12V isolated buy an isolated supply from your favourite supplier
The PC power supply is unlikely to let a short damage it, but if you might be doing bad things like shorting it, you really should get a separate bench supply for powering your questionable stuff. You can use an isolated DC-DC converter.
Electricity consumption of electrical machines - why do they consume electricity when they are not turned on? The question is, why do electrical machines consume power when they are not turned on (they are plugged into an outlet)? Also, suppose there is a seven-port USB hub with AC power. Is the power consumed by the hub always the same regardless of how I use the hub? <Q> "Turned Off", can (unfortunately) mean different things, it may refer to the device still having power available but in a low power standby mode, where consumption is minimal. <S> Many consumer devices do this for various reasons, such as waiting for a remote signal to turn on. <S> If power is completely cut off (e.g. the circuit is broken) then the device cannot use any power. <S> Switching off a device by switching the wall socket or unplugging would be an example. <S> Also many devices have a main power switch as well as a standby switch (e.g. a mechanical switch at the rear). <S> This is what I understand as "turned off". <S> The USB hub will consume less power when not loaded (ideally almost none, probably a few mA)It's efficiency under load will typically be around 80% if using a switching converter, this will vary a bit with different loads. <A> If the machine is switched off it doesn't consume power. <S> Final. <S> Sure, there are machines which consume power despite not being operating. <S> Take my washing machine. <S> It's being switched on and off with a push-button, not a switch. <S> But that push-button is a small tact switch which isn't capable to interrupt the 230 V supply. <S> Instead it will give a signal to the microcontroller, which in turn activates the machine: the display lights up, and commands are being accepted. <S> When the machine is "off" the microcontroller remains active; it's cheaper to use that tact switch for on/off than a genuine mechanical switch, and also that mechanical switch is so much 1970 <S> , users won't accept it anymore in 2012. <S> So when I say my washing machine is switched off it actually means it's inactive: the motor, heater, pump and valve, etc are all off, but the logic remains active. <S> That may consume 1 W or so. <S> The USB hub may have a switch to switch it on and off, and when off it will effectively be off: zero power. <S> In the hub! <S> It will be powered by a wall-wart, that remains plugged in to the wall socket, and that does not have a switch. <S> So it will consume power, which you can feel when you touch it: it will be slightly warmer than the environment, even with the hub off. <S> The power used by the hub will vary a bit when you load the 5 V outputs, and that load of course also adds to the total power consumption (but only partially to the hub's itself). <S> The hub's power consumption increase is due to the loss in the voltage regulator which provides the 5 V out. <S> 1 W standby power doesn't seem much, but it adds: think of all the devices which you think are off, but have that one LED on. <S> When I still had TV I had a VCR which consumed 11 W in standby (more than half of the 21 W it consumed when active!). <S> Total standby power worldwide in households alone may be as much as a terawatt-hours a day. <A> AC/DC converters used to interface the grid with a low voltage devices consume some power even when there is no load (e.g. nothing connected to the hub) because they contain control electronics that need a little bit of power jest to keep the device ready. <S> If you take a look at typical efficiency curve <S> you will see that if you draw very little power the efficiency goes towards zero.
This is because you always need a small amount of power to keep the internals running and this is why an electronic appliance (containing SMPS or some standby features) will draw some power if connected to the socket and not running.
Are CMOS outputs high-Z when unpowered? If a microcontroller I/O pin drives an external MOSFET, and the microcontroller's power is turned off, will that MOSFET's gate be floating? I know sometimes a resistor is added to ground, but are there risks if I don't place the resistor? <Q> When turned off, the output state is undefined (almost certainly pretty high impedance, but there may be protection diodes and other features that will cause variations between parts), so it's best not to assume anything about it unless the datasheet specifies something definite. <S> Of course you can test the output impedance yourself with a multimeter if you want to get an actual figure to go from. <S> If your design requires an output line to not be left floating when the micro is off, then definitely use the resistor. <S> This is good practice anyway for cases <S> where the microcontroller may malfunction (or the pin becomes physically disconnected) <S> , so the pin has a "default" state. <A> Both a CMOS output and a MOSFET gate can be high-impedance, so the voltage at their connection can be determined by 'random' things like stray capacitive or inductive coupling, leaking through high resistances (dirt on your PCB) or statics <S> (fingers touching your traces). <S> If you care whether the MOSFET is on or off in such a situation the gate-to-ground resistor (for an N-FET) is definitely mandatory. <S> Another good reason for this resistor is that it bleeds any static charge that otherwise might accumulate and destroy the gate. <S> This is less likely with modern micro-controllers that have a protection circuit at their I/ <S> O pins, but that circuit is designed to protect the IC itself, not an external FET. <S> So by all means: yes, include the resistor! <A> Many, though not all, CMOS devices to have either deliberate or parasitic diodes between their pins and the rails. <S> Though the design of CMOS inputs does not inherently create parasitic diodes, the design of a normal CMOS output does. <S> In particular, the normal way of wiring a transistor to drive an output low creates a diode from V SS to that output, and the normal way of wiring a transistor to drive an output high creates a diode from that output to V DD . <S> In the days before mixed-voltage logic, outputs which could drive both high and low would almost always have parasitic diodes to the rails, and inputs would often have deliberately-placed diodes to protect them against damage from electro-static discharge. <S> Many newer programmable logic devices and microcontrollers, however, have circuitry which eliminates the high-side diodes on at least some of the I/O ports. <S> This will waste a little current when the MOSFET is turned on, but it need not waste much. <S> In most cases, 1-50uA wasted on such a resistor will be minor compared to the amount of current drawn by the thing being switched.
If you want to ensure that a MOSFET is turned off when a processor is not deliberately driving it high, you should probably use a pull-down resistor.
Hall-effect switch or photointerrupter I'm dealing with a small automation project, a rack and pinion system controlled by an Arduino card with two limit switches to ensure that the rack moves within the boundaries.I have been trying both photointerrupters and hall-effect switches and both of them seems working without problems.Which sensor should I use if I need to prioritize reliability and correct functioning in time?I heard that optical sensors are sensible to environmental light, dust and aging. Which are the minus points of an hall-effect switch?In this case I mean a unipolar hall-effect switch, will all the logic already build in, and that it can be connected to a microcontroller with a simple pull-up resistor. <Q> I'm not hall sensor export <S> but I can tell you I worked on a lot of consumer printers and scanners, and every time we did some kind of limit switch it was a hall effect. <S> So that's got to tell you something ;) <S> With a little online research I found this paper that talks about the hall effect and it's disadvantages. <S> They don't seem like they would negatively affect your project as you described it though. <S> Basically the limitations they mentioned are distance that the sensor works at (not really a problem for your limit switch) <S> , sensitivity change over temperature, and the presence of an offset voltage. <S> Again if you're just detecting when something hits an edge I'd guess it wouldn't be a problem. <S> Here's the article: http://tec.upc.es/ie/transp_2010-11/HallEffect.pdf <A> Since you mention mechanical systems like rack and pinion, it sounds like there is dirt, dust, and grease in the environment. <S> In this case I'd definitely go for Hall sensors first. <S> Grease, dust, and dirt don't effect them. <S> Metal shavings can, but no worse than they would effect a optical sensor either. <S> Hall sensors can be fooled by external magnetic fields, but fortunately those fall off fast with distance. <S> Usually the magnet a Hall sensor is trying to detect is much much closer, and therefore produces a much stronger field than something like a motor that is multiple inches away. <A> Both are reasonably good solutions. <S> You have identified the main factors that affect optical sensors. <S> Worse case you may also manage interruption from spider webs and insects generally. <S> Hall sensors can be affected by extraneous external magnetic fields - but this is unlikely to be a problem in most situations. <S> Occasionally you can get unexpected fields of some magnitude at a distance from the source. <S> I long ago saw a situation where a CRT display would distort slightly whenever an elevator's power cable loop being trailed by an elevator on the other side of the wall swept past the rear of the screen. <S> Separation was probably one metre or more. <S> Rats seem to like to eat PVC (specifically) cable sheath - regardless of the sensor or power system it feeds. <S> Either type of sensor will have a degree of hysteresis. <S> Hysteresis is useful in reducing the effect of operation/ de-operation "bounce" but may need to be allowed for. <S> Worst case an excessively astute control system may shut a motor down if it does not detect sensor operation when motor power is applied. <S> An early US manned space launch <S> * was aborted when an umbilical cable pulled clear as the rocket started to lift and one pin pulled out before the other, creating an anomalous circuit configuration. <S> The computer decided to abort the launch , turned off the motors and the rocket settled back onto the pad without disaster. <S> The astronaut who had control of the escape tower firing kept his cool and did not trigger the eject system. <S> Had he done so the mission would have been much delayed. <S> As it was they launched successfully a few days later. <S> You should be able to better than NASA when it comes to sensor bounce :-). <S> *- Gemini <S> VI <S> - The man in the high castle who made the brave and technically improper but mission saving decision not to eject was Walter Schirra
This will depend on the specific design but the Hall sensor will probably have more hysteresis.
Does an external interrupt interrupt ADC or does ADC stall interrupt? I'm working on an RTC application with a 1Hz clock attached to the external interrupt pin on a PIC16f887. I also have continuous ADC operations happening along with the 1Hz clock. My question is whether the ADC or the interrupt would get priority if both occur at the same time? What if the interrupt occurs during an ADC operation? Is the operation halted to allow the interrupt to be executed? This would obviously invalidate the reading.Or does the interrupt wait for the ADC to finish? <Q> No, the interrupt occurring has no effect on the A/D. <S> The A/D runs from the instruction clock or its own clock, depending on how you set it up. <S> Both these keep going during a interrupt unless you deliberatly execute a SLEEP instruction to stop the processor clock. <S> At most, the 1 Hz interrupt could delay the interrupt routine processing the A/D conversion done, if you are doing this by using interrupts at all. <S> There is no requirement that A/D results be handled by using interrupts. <S> Even if so, the A/D will perform its conversion and write the result into ADRESH: <S> ADRESL regardless of whether the processor is taking a interrupt or not. <S> In fact, the processor itself is not really "in" a interrupt. <S> That's only a software abstration. <S> When the right conditions are met for a interrupt, the processor executes a call to location 4 and turns off the GIE bit in INTCON. <S> That's all. <S> The rest is up to firmware. <S> Once the A/D has finished a conversion, the result will be available in ADRESH:ADRESL. <S> It is up to the firmware what to do with that. <S> The value will stay there until a new conversion is completed. <S> If the firmware doesn't start a new conversion until reading the result of the previous, then nothing can be lost. <S> If a new conversion is started automatically, then it is possible for the previous data to be lost if the firmware didn't get around to reading ADRESH: <S> ADRESL in time. <S> Look at the acquisition and conversion time of the A/D and the instruction rate, and you will see there are generally plenty of instruction cycles to grab a conversion result, even if a new conversion is started automatically by the special event trigger of a CCP module. <S> Just make sure the clock tick interrupt code is not so long that it takes longer than it takes the A/D to make a new result. <S> This should be easy. <S> Any lengthy processing is best handled by setting a flag and letting the foreground code get around to it when it gets around to it. <S> The interrupt code should handle only the immediate servicing of the device. <A> I didn't have much hands-on experience with the PIC family, but I can tell you what would happen in an AVR chip. <S> I suspect they are very similar. <S> The ADC module in your microprocessor works in parallel to your program routine. <S> The ADC will update its reading after the conversion. <S> Should an interrupt happen between initializing the ADC reading and updating the output, the following sequence will happen: <S> In your main() <S> function, the ADC reading is initialized. <S> ADC conversion begins In parallel: <S> The interrupt is called ADC conversion ends, the result is stored in a special register The interrupt eventually ends, your processor returns to main() and reads the ADC reading result. <S> This isn't the most appropriate use for waveform diagrams <S> but I hope it pictures this sequence well enough for you: <A> The PIC you use has only one interrupt, which is effectively the OR of a number of interrupt sources. <S> When two interrupt sources occur simultaneously the effect is still that an intterupt occurs. <S> If one of the interrupt sources is still active when the interrupt routine finishes a new interrupt will occur and the interrupt routine will be called again and again, untill all (enabled) interrupt sources are cleared. <A> In the general situation, it's up to the designer to prioritise interupts <S> But usually a 1 Hz clock update will tolerate being ignored for a variable period while the ADC completes.
It is up to your interrupt routine to handle AND CLEAR the interrupt sources it wants to handle. In your specific case, if you have something more important than the ADC is to you, then you may choose to abandon the ADC reading.
Are optical fibers full duplex? Can optical fibers transmit in both directions simultaneously? Both single mode fibers and multi mode? What about if they we choose non-interfering wavelengths? <Q> Yes, it's done all the time ; not "just in theory" and it's not at all "better to have two fibers" - in long-distance networks where fibers are expensive, many different wavelenghts travelling on both directions are a common, everyday state of affairs. <S> The equipment to get them injected and separated at each end is expensive, so that sort of thing is not seen where fibers are cheap to install. <S> Look up CWDM and DWDM <S> (Coarse Wave Division Multiplexing and Dense Wave Division Multiplexing) for more detail. <S> On my network I have one set of 1310/1490 BiDi SFPs; I'd have more if I could find them cheaply enough (though they are MUCH, much cheaper than the devices above) - <S> on the particular link that set is installed on they allow 3 links to run over 5 fibers where 7 were damaged, and only 2 links were possible with the dual-fiber SFPs (still in use on 2 pairs) - they work perfectly and only need the single fiber. <A> Light travelling in both directions through a fiber is no problem. <S> Paths of in- and outgoing light can be seperated/combined by beam splitters . <S> Interference happens only if two different beams hit the detector. <S> Then both beams may interfere (coherence required). <S> In fiberoptic gyroscopes <S> this effect ( Sagnac effect ) is even wanted. <A> Apparently that is possible and there is at least one commercial product . <S> I haven't seen them used in practice, though. <A> Theoretically, such concepts are good to be imagined and, in fact, it is possible to make one that can communicate bidirectionally, but for reliability it is preferable to have a duplex with two fibers. <S> Know More in <S> Single-Strand Fiber Technology <S> — How it Works <A> Photons don't interfere with each other so in theory on a perfect fiber it would be possible to use the same wavelength in both directions but in practice that doesn't really work because of reflections. <S> On the other hand different wavelengths in different directions is very much possible. <S> You can easilly get transcivers that use two widely spaced wavelengths on the same fiber for the two directions. <S> The wide spacing of the wavelengths is presumablly done to keep the splitting optics cheap. <S> These are commonly used in fiber to the home type applications on single mode fiber though appparently it is also possible to use them on multimode . <S> There are also systems that can put many different wavelengths on a fiber. <S> This is known as "wavelength divison multiplexing". <S> Due to cost such systems are usually only used on long distance backhaul links.
Most commonly all the wavelengths on a given fiber are run in the same direction but if the number of fibers to a given destination is small there can be advantages to running both directions on the same fiber.
Do Linear regulators have a minimum current to maintain their output voltage? When I was searching Digikey for a ~6V to 3.3V Linear regulators, there was a minimum current column in the listing results. This kind of threw me because I didn't know that there was such a thing, or it was negligible. Since the uC in my design goes to deep sleep, this could be a problem. Do common regulators, like a LM1117-3.3 have this limitation? I didn't see it in the datasheet. <Q> According the the LM1117 datasheet , there is a typical minimum load current of 1.7mA (max 5mA) needed to maintain regulation. <S> EDIT - <S> this is for the adjustable version <S> , I didn't notice you are using the fixed version, which has an internal resistor (which Steven mentions in his answer) to sink the minimum current required. <S> So you will be okay, but the quiescent current (Typ. <S> 5mA) is not great for a power conscious design, there are much better regulators out there if this is important. <S> Usually a linear regulator will require a minimum load current to maintain regulation, the reason being a typical linear regulator cannot sink current, only source it. <S> Since there are usually other control currents that flow to the output pin, then even with the pass element off if there is no load <S> the output voltage can rise above it's desired voltage because there is "nowhere for the current to go". <S> If you study the schematic in the datasheet you should be able to see how this happens. <A> The schematic on page 3 of the datasheet shows a resistor between output and ground, which will take care of the minimum load current for stable operation. <S> Note that some parameters are somewhat hidden in the datasheet's electrical characteristics, because they're not shown as parameters themselves, but as conditions for those parameters. <S> For instance the 1.25 V reference voltage is specified for a minimum 10 mA load. <S> It's a good idea to follow these conditions, otherwise the performance may be different from what's specified. <A> Some current is always required to flow through the output stage, but sometimes this is drawn internally, so the application needs not worry about it. <S> This is the case of the LM1117 with fixed output voltage, and it is implied in the datasheet in the electrical characteristics section because it lists output voltage ranges for output currents greater or EQUAL to zero (and less than some upper value). <A> As far as I can tell there's no output load current required to allow the LM1117-3.3 to maintain a regulated voltage. <S> It does have a max quiescent current of 15 mA , though. <S> This may be an issue if you have a limited power source.
There is only a minimum load current for the adjustable version of the LM1117.
Fast approaches for Soldering / PCB assembly Our team (three hobbyists now developing our first serious device) is interested in soldering/assembling approximately 200 PCBs. We've already found a low-cost manufacturer for the raw boards, so just the assembly remains. We'd like to keep the total assembly time and cost reasonably low of course, and therefore are considering various approaches. The numbers are as follows: 200 single-sided PCBs 5 cm X 5 cm board size 30 capacitors and resistors (0603 size) 5 components QFN / QFP 4 components SOIC / SSOP 1 USB connector 1 SD-card-socket The raw boards may come bunched/panelized as manufactured but essentially, we want to get, on average, each individual board done in less than 20 minutes ideally. Which one of the following options would you suggest as best? (given the cost constraint and the desired time per board I stated above): Option A: Hand-place components with tweezers, solder resistors and caps with iron, and solder QFN's with hot-air gun ? Option B: Apply solder paste (possibly using a stencil), hand-place components with tweezers, then use a toaster/reflow oven ? Option C: Get it done entirely by an assembly shop ? Note : All three of us in the team have roughly around 6 months of consistent experience with the traditional soldering method (tweezer, soldering iron, and hot-air-gun). We don't mind any necessary hand-work at all because we're definitely excited about our board, but it would be good to know we're choosing an efficient approach. <Q> C: definitely the assembly shop, if you have the wallet for it. <S> That's for you to decide. <S> Ask some quotes, and decide if doing it yourself is worth the effort. <S> Since this is a hobby project you may think your time is free, but then it has to stay fun as well, hasn't it? <S> edit Just got this in a mailing from DesignSpark: fundraising may get you started to have it done by a shop. <S> Erik raised 313 218 dollar for a 5 000 dollar target. <S> (end of edit) <S> Alternatively, B: Again, get a quote for a stencil. <S> Yet, even applying the solder paste manually will take less time than hand soldering, which I would not recommend: the resistors and capacitors are not much of a problem, but the ICs may take quite some time if you want to do it proper, i.e. all pins soldered and no short-circuits. <S> Not A: it takes too long <S> and it's messy. <S> I would only do it myself if I could use the oven. <S> Remember that Jobs and the Woz also hand-assembled their first batch of Apple computers :-) <A> Options A and B: <S> No, forget it! <S> You will certainly screw up multiple of the QFNs/QFPs ending up spending far too much time trouble-shooting the boards for it to be worth it, even for a hobbyist. <S> Down to 0.5 pitch QFPs are possible to solder by hand if you are good... <S> SD connectors may or may not be possible depending on pitch. <S> QFNs will only cause you trouble. <S> I have people with many years of soldering experience at my disposal, but each time we want to be cheap and do things like this ourselves, we get problems, ending up with something crappier and more expensive than what we would have gotten from the professionals. <S> There are always plenty of local, small SMD assembly companies that would be happy to do jobs with this volume for a reasonable price. <S> Don't go ask the big dragons. <A> 200 PCBs is getting on the high-side for Options A and B. <S> If you have a lot of time on your hands and have some decent tools you can do it with a modified Option B. First off, you definitely need a stencil. <S> Rather than going to an expensive shop to get a laser cut stencil, try this method using a soda can, a laser printer, and some basic chemicals to do it at home. <S> Secondly, forget tweezers. <S> I've been using tweezers for a long time and it can be handy for small jobs but becomes very time consuming when populating a lot of components. <S> Furthermore, I've found it to be tolerable for a few resistors <S> but when you get into larger components, i.e. larger than the jaws of your tweezers, it becomes really difficult to place things without smudging your solder paste all around. <S> Suction tools can be useful but do not use anything where you control the vacuum with your hand. <S> You're carefully placing components with your hand, there's no sense adding one more job to throw off your precision. <S> I have a SteadyHands device and it works really well both for large components and for small components. <S> It EASILY cuts my assembly time in a third but more importantly it saves me from tearing my hair out! <S> For reflowing, I've found a toaster oven works just fine. <S> After a few tries you'll know just how much heat to use and when to shut it off. <S> I use a thermocouple routed into the oven but at this point I'm sure I'll be just as good to do without it because I can see when the solder melts and wicks up onto the components. <S> but I have not tried it.
I have friends who use skillets and have had reasonable success It's not a huge undertaking and will save you tons of time.
Are processors designed using different technologies? Can/Are processors be designed using different technologies ?What I mean here is: in, for example, Intel's 28nm processors, are all the gates in that processor built in 28nm technology or are only the most critical parts of that processor built in 28nm, the other, much much less critical parts being designed in other much less expensive technologies such as 65nm or more for example ? If yes [processors are a mixture of technologies] how can this be done in practice (i.e different technologies on a same die) ? And why is this done ? I'm curious about all this so any extra info related to these questions is also more than welcome <Q> The whole processor is built with the same technology. <S> This is determined by the mask(s) and optics to project them on each die on a wafer (a process called "stepping"). <S> Smaller feature sizes allow more components to be packed on a die, lower power consumption and higher speed. <S> It's no use spending a small fortune (they do cost a small fortune) on a mask and then not use its possibilities. <S> To be clear: yes, the same 28 nm will be used for one step for the complete die surface, but no , not all components will be the same size. <S> It's just that the 28 nm mask won't be swapped for a 65 nm mask for part of the die. <S> edit There are indeed larger areas on a die which don't require the 28 nm small size. <S> Typical is the solder ball pads for a flip chip: <S> Notice the scale: these pads are 1000 times larger than the finest structures on the die. <S> Here a less fine mask may be used, but again, if the process step would also require the 28 nm then the same mask will be used for both. <S> It's not because the pads are gigantic that they don't have to be positioned precisely, and that's less error-prone if you don't have to switch masks. <A> "Technology" isn't really the right term for what you're asking. <S> The number commonly associated with a particular technology (e.g., 28 nm) refers specifically to the minimum gate length, which is determined by the width of the lines that can be drawn on the mask that forms the transistor gates. <A> In any given modern process it is very common to have multiple GOX (Gate Oxide) thicknesses. <S> This is not used for cost reasons but for interfacing to the outside world. <S> The core will run at the lowest voltage and on a thinner GOX but will be very much faster. <S> The thicker gate oxide transistors are connected to the package pins, are slower but operate at higher voltages. <S> As you scale the GOX thickness the physical size of the transistor must also increase. <S> Adding in additional steps to accomodate this dual GOX flow actually increases cost of the process. <S> But it won't be able to work other wise. <A> At 90nm process static power starts comparing and eventually overshadow dynamic power. <S> And how it can be implemented, well silicon manufacturing process involves masks and etching if you can do a 28nm procress I would assume <S> a 65nm process could be done using 28nm <S> it would be just a big transistor on the masks <A> technology node can be related with feature size ( mim length of the MOS transistor channel b <S> /w the drain and the source). <S> if IC is 28nm, it means mim length channel is 28size not every channel length is same, but same time it does not means that it goes to 65nm.
The technology of the chip is determined by the specific processing steps required to make it, and among other things, this determines the minimum feature sizes for various items on the chip. The reason to use different technologies is to reduced static power (basically leakage current on the transistor). To be sure, not all transistors on any given chip require the minimum gate length, and many require more than the minimum gate width (for greater current-handling capabiilty), so yes, you will indeed see transistors of many different sizes on a chip.
Pulldown resistor on output pin, how does output still work? On a part I'm working with, it says that you can configure the part to operate in a particular mode by "strapping" a particular pin to ground. That is, it wants you to use a pulldown resistor to pull it to ground. From what I understand, when this part starts up, the pins are inputs, so the pin gets pulled down, which tells the part to be in X mode. I believe microcontrollers are like this as well, where all pins are inputs when it starts up or after it resets. What confuses me is that after the part starts up, this is an output. It's basically connected to ground through this resistor. How could there still be an output if it's basically tied to ground? Let's say it's supposed to output a signal to, I dunno, a microcontroller. Whenever it outputs, wouldn't that current all go to ground and not end up at the microcontroller? Thanks for the help! <Q> You have two modes. <S> Input <S> The input is high-impedance, so there won't flow any current, apart from a small leakage current, which we'll ignore for the moment. <S> Let's say you have a 10 kΩ pull-down resistor. <S> So if the low end is 0 V, so will be the input. <S> The controller sees it as a low level. <S> Output <S> Whether the output is high or low, it's low impedance, like for instance 10 Ω. Low won't be a problem: <S> the pull-down already made the level low, and the low impedance of the output only enforces this. <S> If the output is high, the internal 10 Ω resistor and the 10 kΩ pull-down form a resistor divider. <S> The output voltage will then be \$ V_{out} = <S> \dfrac{10 k\Omega}{10 k\Omega + 10\Omega <S> } 5 V = <S> 4.995 <S> V \$ <S> So the pull-down resistor changes the output voltage <S> only very slightly, thanks to the big difference in resistance. <A> In electronics 'tying to ground' is not an all or nothing thing. <S> The resistor pulls it to ground, but only weakly so. <S> The microcontroller can - when the pin is configured as output - pull much much harder. <S> Think of a gentle breeze flapping a piece of laundry in one direction. <S> You will have no problem pushing it in the other direction. <S> (Unless the breeze turns into a tornado, the electronic equivalent would be a resistor with a very low resistance). <A> The actual pin is configured as a tri-state driver with a input attached to the pin pad. <S> Once read the output pin is taken out of tri-state mode and driven. <A> Presumably, you're pulling the pin to ground via a resistor with a value in the 10k - 100k range. <S> Configured as an output pin, the current through the resistor will be essentially zero when the output is low and will be 5V/10k to 5V/100k = 0.5mA to 0.05mA when the output is high, assuming 5V logic. <S> Provided that the output pin can source more than the parasitic load produced by the resistor to ground (most everything can source at least a few mA - check your datasheet), you should have no problem using it as a normal output pin, though your system current consumption will be higher as a result. <S> To minimize the parasitic draw, use the highest value resistors possible that will still achieve the desired result.
On reset the driver part is tri-stated, allowing the external resistor to pull the pin in the right direction, which is in turn read by the internally attached input. Since there doesn't flow any current into or out of the input there won't be any current through the resistor, and then, due to Ohm's Law there won't be any voltage across it either.
reference source for copper conductivity vs. temperature? I am looking for a curve for copper conductivity vs. temperature over the -55°C to +180°C range (covers std. ranges of semiconductors plus NEMA class H insulation in the case of magnetics / motors) but cannot seem to find anything searching on the internet. I have heard that it depends on the particular copper alloy as well, I'm just looking for "normal" copper found in electrical wire. Does anyone have a reference that would include this information? edit: I'm not looking for a linear approximation (the Wikipedia page on conductivity lists copper conductivity and its temperature coefficient at 20°C) but rather a curve. <Q> Data from NIST <S> (table 2) <S> At low temperatures the resistivity of copper approaches a "residual" resistivity. <S> However, this isn't really a concern until below ~100K . <S> At higher temperatures the resistivity is best approximated with a linear increase vs. temperature (as you've already found). <S> I plotted the resitivity vs. temperature, and I wouldn't be too worried about non-linearity too much until ~800K . <A> Debye temperature <S> Θ is a parameter of the function. <S> Its value for pure Copper is <S> Θ Cu = <S> 343.5 K <S> If you can't find the value of the Debye temperature <S> Θ alloy of your particular alloy, you can make some measuremnts over the interesting temperature range and determine it by least-square fitting . <A> There are lots of resources out on the interwebs for information about copper; they even have their own website . <S> You might start with the calculator at the bottom of this page: http://hyperphysics.phy-astr.gsu.edu/hbase/electric/restmp.html <A> To follow up on helloworld922's response, here is some quantitative analysis of the NIST Table 2 data, both from 100-800 K and from 200-500K (= <S> -73.15 <S> K to +226.85 K, a range that is closer to the working range of motor windings) <S> using PyLab: # copper conductivity fit from NIST: <S> # Journal of Physical and Chemical Reference Data# Electrical Resistivity of Copper, Gold, Palladium, and Silver# R. A. Matula# JPCRD 8(4) <S> pp. <S> 1147-1298 <S> (1979) <S> # http://www.nist.gov/data/PDFfiles/jpcrd155.pdf# numerical data from table 2 import numpy as npimport matplotlib.pyplot as pltT0 = <S> np.array([ 100, 125, 150, 175, 200, 225, 250, 273.15, 293, 300, 350, 400, 500, 600, 700, 800])r0 = <S> np.array([ 0.348, 0.522, 0.699, 0.874, 1.046, 1.217, 1.387, 1.543, 1.678, 1.725, 2.063, 2.402, 3.090, 3.792, 4.514, 5.262])T = <S> (T0, T0[4:-3])r = <S> (r0, r0[4:-3])f = <S> [np.polynomial.chebyshev. <S> Chebyshev.fit(T[0],r[0],4), np.polynomial.chebyshev. <S> Chebyshev.fit(T[1],r[1],4)]for i in range(0,2): <S> plt.figure(i+1) plt.plot(T[i],r[i]-f[i](T[i])) <S> plt.plot(T[i],r[i]-f[i].truncate(2)(T[i])) <S> What this does is to approximate the resistivity vs. temperature data with 4th-degree polynomials, and plot graphs of errors in the polynomial approximation vs. temperature, for the 4th-degree polynomial and for a linear polynomial. <S> The Chebyshev coefficients* for a polynomial fit are: <S> 100-800K: 2.77689151e+00, 2.44286730e+00, 3.00859915e-02, 1.44364826e-02, -2.64166679e-03 200-500K: 2.06557521e+00, 1.02015113e+00, 2.57505898e-03, 1.80482498e-03, -1.11397377e-04 Over 100K - 800K: <S> Here I would definitely say that a linear approximation is close but not sufficient for precision applications. <S> The error in a linear approximation is close to 1% of the resistivity value (slightly higher for <200K). <S> I would use a quadratic or cubic approximation. <S> (the 4th degree coefficient is small enough that it's not worth the extra complexity) <S> Over 200K - 500K: <S> Here the linear approximation does much better due to the reduced range; maximum error of a linear approximation is about 0.15% of the resistivity value. <S> I'd probably live with a linear approximation. <S> *Chebyshev coefficients: Chebyshev approximation is a technique for approximating functions with polynomials + quantitatively evaluating the accuracy of those approximations. <S> The subject is too detailed to discuss it much here. <S> If you have a copy of Numerical Recipes go read about Chebyshev approximation. <S> I also just wrote a blog post about Chebyshev approximation which might help explain. <S> edit: The JPCRD Matula reference refers to ultrapure copper exceeding IACS levels. " <S> Standard" commercial copper is slightly lower conductivity than ultrapure (about 2.5% lower) and has a lower tempco of 0.00393. <S> See http://library.bldrdoc.gov/docs/nbshb100.pdf
The Bloch-Grüneisen Formula gives you a function of resistivity vs. temperature.
Ideas to measure 2D position of an object constrained to X-Y plane I am working on a project, and an aspect has come up where I would like to measure (track continuously) the X and Y position of an object across a 2D plane. The object is moved by a person, with the object's movement constrained to the 2D plane (so no Z-axis displacement). Constraints: I would like measured position resolution of 1 mm, ideally 0.5 mm or better. The space over which the object moves is 30 cm X 30 cm. Whatever method of measurement I use shouldn't significantly constrict the movement of the object. Also, please just assume that the plane on which the object moves is air, and NOT an actual solid surface (for project-specific reasons that are hard to verbalize). The good news is: The object is completely OK to be modified as necessary (LED on top, or string attachments, or anything else). What might be a method to get that kind of resolution? I am considering various approaches, but I don't know if any of them will fulfill the resolution requirement. Since there aren't many constraints on my existing system, I am OK with even a complex / bulky implementation, just as long as it's precise enough. Here are a couple of my ideas so far: (1) Infrared-based range sensors (only need two actually) (2) Two long calipers/micrometers connected from the object to the sides (3) Two strings, each connected from the object to a freely bending strain gage leaf on the side <Q> Idea 4: <S> This will give you the best accuracy. <S> You will need the following: 2x Precision linear slides. <S> 2x Precision linear encoders . <S> 2x Metal linkages. <S> Attach a linear encoder to each linear slide. <S> Arrange the two slides 90º apart, and attach the object to the sliders using the linkages. <S> Linear encoders like this are used for precision measurement applications. <S> Using this method you could easily achieve 0.01mm resolution, and 0.1mm accuracy, and will probably do much better than that. <A> Idea 3: Use a camera. <S> I don't know what constraints you have on your object, but if you can add a tiny LED, then tracking with a camera can be a doddle. <S> Jennifer here is sporting a range of red LED trackers. <S> Perfect for bedazzling and confusing your friends. <S> Synchronise the LED to flash in time with the camera's frame rate, so that you get one image with the LED on, and one with the LED off. <S> Subtract the images, and locating the LED within the image is trivial. <S> Alternatively, add an IR filter to the camea, IR LEDs around the lens, and stock a retro-reflective marker on the object. <S> This should show up much brighter than the object or surroundings. <S> Alex is modelling some fetching retro-reflective tape which his mum made him wear on his bag. <A> Idea 1: Use two String Potentiometers . <S> Arrange them about 90º apart and 1m from the square so that the object moves around, you can measure the distance between the object and the pot. <S> The you can use some trigonometry to calculate the exact position. <S> I have seen this done and it works well. <S> Can you get the accuracy? <S> You should do the following: Arrange the pots in such a way as to make use of about 80% of their range. <S> Buffer the signals from the pots with op-amp followers (Good quality precision opamps). <S> Use a good quality 12-bit ADC, with a properly laid out PCB. <S> Make the system mechanically sound and rigid. <S> Make sure the strings emerge from a small hole. <S> This way, you might expect to achieve an ADC range of about 3000 steps. <S> This gives you about 0.1mm resolution. <S> Now, to get the accuracy. <S> You'll need to calibrate the system carefully. <S> Accurately measure the position of the object in several locations, and correlate those readings with the measurements. <S> This could easily give you 1mm accuracy. <A> These give you 6 degrees of freedom (X,Y,Z, roll, pitch, yaw) which is much more than what you need, and can be a little bit expensive, but it's a working off-the-shelf solution. <S> The system consists of a stationary transmitter, and a moving receiver. <S> The system can tell you the position and orientation of the receiver relative to the transmitter. <S> The accuracy is specified at 1.4mm, but you could probably improve that with careful calibration. <A> Idea 5: Digital pen and address dot paper. <S> The pens contain a tiny camera which looks at the paper while you write. <S> However, it doesn't actually look at the ink you've laid down, instead it looks at a pattern of tiny dots on the paper. <S> (You need to buy this special paper, or you can print it). <S> One of these would easily be able to meet your specification. <A> I did a project on this, and the sextant method works fine, especially in short range, but it has its blind spot, below a certain distance, it will not work. <S> Plus, if you have more sources of illumination, it will be erroneous. <S> The accuracy of the measurement is a function of the quality of the camera used and the separation between the camera and the source of illumination. <S> Hope that helps! <A> what you are describing is essentially a digitizing table or tablet. <S> When I worked for a photogrammetry OEM our digitizing tables were about a meter square and were then (and possibly now) used by cartographers, etc. <S> They consisted of a glass table with thin copper wires attached to the back of the table in a grid formation; and a pointing device (crosshairs) which contained an electromagnetic coil. <S> Logic circuits would send electrical impulses down the copper wires in the X and Y axes; these impulses would be picked up by the coil and processed by digital counters to calculate the exact X-Y position of the pointing device down to hundredths of an inch.
If for some reason you couldn't use a pointing device within your project you could try attaching a pantograph. Idea 2: Use an Ascension Sensor . You can get these amazing pens which can record everything you write an draw.
Feasibility Question and Advice on CAD software For a hobby project I have bread boarded, I am considering using a pair detectors that operate as a single use physical barrier. When hit by a projectile, a trace is broken allowing +5VDC to to trigger a flipflop that is part of my gate logic for a counter-timer. I have envisioned this detector as a thin adhesive sticker with a thin copper trace embedded in it that forms a simple pattern to cover the area, zigzaging across the surface. Similar to the passive RF sticker tags used by retail stores for antitheft. My questions are:1) Will it be practical to have a manufacturer print a batch of these things for me?2) I've never used CAD software before, is there a suggestion for a free CAD program, that doesn't have a huge learning curve for this type of project (I'm a linux guy but thinkning W7 is more likely here ) ? EDIT: Photo diodes are a great idea, and I will likely try them and ask questions in a separate thread. The break-able trace allows for more configurations and keeps slew rates ( and other rates ) small. I plan to use a very small distance to track the velocity of said projectile, like 1 or 2 cm.I have a 10 Mhz clock for my timer. EDIT2: I should have added a current limiting resistor to the diagram so as not to start a fire with the trace...but I think you get the idea from this diagram. <Q> Using metal Christmas tree tinsel used to be common for this sort of thing in physics labs; then photo gates got cheap, tinsel feel out of favor as a decoration, and modern varieties may not be conductive anymore anyway. <S> For a disposable item like this, you might want to investigate some sort of carbon-based conductive printing rather than a metal circuit board process or silver-based conductive ink which costs a small fortune. <A> I would definitely do the proof-of-concept using readily-available materials first. <S> What sort of projectile is it? <S> Can you use 1mil mylar sheets, or do you need something really easily-breakable like cellophane or plastic wrap? <S> For the traces, perhaps one of those circuit repair pens will work. <S> If you have access to a laser, you can cut the pattern out of mylar sheet and use it as a stencil, then paint the conductive paint onto the sensor's plastic substrate. <S> If you want to go with CAD, the only free ones I know of that are popular are Eagle and KiCad . <S> I haven't used either much. <S> I have used ExpressPCB before for two projects -- while simple enough, you are stuck using their proprietary software, and you have limitations on the board size to get their special prototype pricing. <S> You'll also need to do things like print text with conductive traces because you don't get soldermask on the cheap boards. <S> From what I understand, Sunstone Circuits will take the Eagle format, so if you learn that, it should be a piece of cake to get the boards made. <S> In addition, services like Dorkbot PDX sound awesome for low-cost runs if you're not in a rush. <S> The only thing I have heard of manufactured that is close to what you're talking about is a flexible circuit, but I don't think the plastic is easily broken. <A> If you're in the US, buy a Sharpie magic marker, then head off to Radio Shack and get a slab of single sided bare PC board and a bottle of etchant. <S> Yes, they still carry this stuff: I bought some just last month. <S> Now, draw the pattern you want on the board with the Sharpie. <S> Let it dry and then go over it once or twice to make it a bit thicker. <S> Nail polish also works, BTW. <S> This is your etch resist. <S> Next follow the instructions on the etchant to etch away the copper not covered by the ink/nail polish. <S> Note: <S> FeCl2 stains everything it touches, including your fingers. <S> Its fumes will also rust steel over time, so don't leave your container of etchant uncovered for weeks. <S> And now, you should have the pattern you want on the PC board. <S> Clean it up with acetone (nail polish remover) from the local Walgreens and you're good to go. <S> If this won't work for you, just email me and I'll design a simple board for you (this will take like 5 minutes!) and email the CAD files along with the name of an outfit that will be happy to make you as many boards as you need.
You don't need anything nearly as conductive as a normal circuit board, as you only need to detect if the connection is still intact or not. Or you can pick up a small jar of Bare Conductive's conductive paint and paint it on yourself.
How to increase current of a DC circuit Well.I am new to electronics. I have just started creating small circuits. Coming to the point,I have a circuit with 5v input and current in the circuit is 2ma but I have a requirement to increase it to 200 ma in a circuit. When I googled for the solution, I found threads like increase voltage or decrease resistance (using V=IR) to increase the current But those values are to be fixed in my circuit. Basically I Studied that CC transistor has high current gain so I thought to use it in my circuit but people on internet says it amplifies signals current(probably an ac signal i guess so) and I am unable to understand what does that mean. What does voltage gain and current gain mean in a Transistor? Does it amplify only ac signals? If I apply 5v dc input to a CB configuration that has high voltage gain, Wont it make it as 20v at the output? Similarly if I input 10 ma current of a DC circuit to CC amplifier, Does not the CC make it as 1 Amp at the output? After seeing the comments I added the circuit picture. Now I want to increase the current in the circuit where R is 2.5Kohms and E1 is 5volts and the current is 2 ma but I want the current to be increased to 200 ma but keeping the R1 and E1 fixed. But Im unable to figure it how.Please kindly clear me this. and let me know what should i prefer if i want to increase current in a circuit keeping the voltage and resistance values constant in a circuit.Thanks <Q> You can't. <S> Actually it's all Ohm's fault: \$ <S> I = \dfrac{V}{R <S> } \$ <S> The current is defined by voltage and resistor. <S> If you have 2 mA at 5 V then your resistor will be 2500 Ω. End of story. <S> 2)decrease your resistance, or 3) <S> a combination of both. <S> For instance: <S> \$ <S> I = \dfrac{V}{R} = <S> \dfrac{50 V}{250 \Omega} = <S> 200 <S> mA \$ or also \$ <S> I = \dfrac{V}{R} = <S> \dfrac{5 V}{25 \Omega} = <S> 200 <S> mA \$ <S> A transistor can be used to increase current. <S> You'll have a low current path, from base to emitter in an NPN, and a higher current path from collector to emitter. <S> The collector current will be a multiple of the base current if the circuit allows it . <S> That means that the voltage source at the collector side must be high enough, and the load resistance low enough to get the 200 mA. <S> Again <S> Ohm's Law: if you have a 1 kΩ collector resistor you will never get more than 5 mA with a 5 V supply, no matter how hard the transistor will try to draw more. <S> About your comment on controlling a LED. <S> First 200 mA is a lot for a common LED, too much actually. <S> A value like 20 mA will be more than enough for an indicator LED. <S> Your LED will have about 2 V across it, that's a voltage you subtract from the 5 V. <S> The remaining 3 V will be across the series resistor. <S> So we apply Ohm, again: <S> \$ R = <S> \dfrac{V}{I} = \dfrac{3 V}{0.02 A} <S> = 150 \Omega; \$ <S> If you use a 150 Ω resistor in series with the LED you'll get 20 mA. <S> You don't have to amplify anything for that; it's the resistance which dictates the current. <S> If you would simply use the 150 Ω resistor without the LED then the full 5 V will be across the resistor and the current will be 33 mA = 5 <S> V / 150 Ω. <S> Again <S> no need for amplification, just changing the resistance or voltage will do. <A> Now I want to increase the current in the circuit where R is 2.5Kohms and E1 is 5volts and the current is 2 ma <S> but I want the current to be increased to 200 ma but keeping the R1 and E1 fixed. <S> Solution 1: (Parallel Resistor) <S> Put another resistor in parallel to R1 with a rating of 15Ω. Your E1 & R1 will remain fixed and the current increases. <S> ;) <S> Let the parallel Resistor value be R:- <S> \$ <S> I = <S> \dfrac{V}{Req} <S> .......... <S> (equation 1)\$ <S> \${Req}= (R1 * R)/(R+R1)\$ putting \$ <S> I =200mA , V=5V , <S> R1=2500 <S> \Omega \$ <S> \$ <S> R = 15 \Omega\$ Solution 2 (Another Voltage Source): <S> Put in series another voltage source of 495 V(sounds more Theoretical). <S> In \$ equation 1 \$ <S> set R eq <S> = \$ 2.5 <S> k\Omega \$ and \$ V= 500 <S> V\$ <S> \$ <S> I \$ <S> becomes \$ 200 mA \$ <A> You can get 200 mA to flow, only not through that resistor. <S> You can keep R1 and E2 in that circuit where they are and provide a parallel path in which 200 mA is able to flow. <S> Thereby you satisfy the requirement that R1 stays at the same value and in the same configuration relative to E1. <S> R1 could be involved in a transistor circuit such that approximately the same 2 mA flows through R1, and this turns on the transistor such that 200 mA flows. <S> Take a look at base bias under http://en.wikipedia.org/wiki/Bipolar_transistor_biasing under "Fixed bias". <S> Under this arrangement, the collector resistor RC might be chosen so that it limits the current to 200 mA when the transistor is fully turned on (saturated). <S> Your original R1 resistor plays the role of RB, the base resistor.
If you want to increase the current you'll have to 1)increase your voltage,
How can I find temperature of microcontroller? In some boards which environment temperature goes up could cause high temperature in micro controller. This will effect on micro and bad situation maybe occurs. For example I have designed a device which used in a box. This box was near a motor and after some load to motor I encountered a high temperature near micro. So, anyone could help me if there is any solution for finding temperature of micro? This micro could be AVR or PIC. If micro could find it's temperature, it could terminate working before any bad damage. <Q> At least some <S> (I don't know about all of them) <S> AVRs have a temperature sensor on-chip, which is connected to the ADC. <S> The temperature measurement is based on an on-chip temperature sensor that is coupled to a single ended ADC channel. <S> The sensor is a diode that produces a temperature dependent voltage. <S> This voltage is measured with the ADC. <S> The voltage has a linear relationship to temperature and the result has approximately a 1 LSB/°C correlation to temperature. <S> (from this application note ) <S> A number of PIC devices also have an internal temperature indicator, like the PIC16F15xx and 16F18xx. <S> This family of devices is equipped with a temperature circuit designed to measure the operating temperature of the silicon die. <S> The circuit’s range of operating temperature falls between -40°C and +85°C. <S> The output is a voltage that is proportional to the device temperature. <S> The output of the temperature indicator is internally connected to the device ADC. <S> The circuit may be used as a temperature threshold detector or a more accurate temperature indicator, depending on the level of calibration performed. <S> A one-point calibration allows the circuit to indicate a temperature closely surrounding that point. <S> A two-point calibration allows the circuit to sense the entire range of temperature more accurately. <S> (from this datasheet ) <S> Further reading AVR122: Calibration of the AVR's internal temperature reference , Atmel application note, Using the AVR internal temperature sensor , PIC16F15xx datasheet , p.133 AN1333: <S> Use and Calibration of the Internal Temperature Indicator , Microchip application note, <A> There are some PIC 16, for example, but I don't remember the specific model numbers. <S> On other PICs, the watchdog timer interval is a predictable function of temperature. <S> You can determine temperature with a initial calibration and then measuring the watchdog interval at run time. <S> None of these methods are very accurate, but if you only need a rough idea of too hot, then might be good enough. <S> For anything else, use a external temperature sensor. <S> There are many available, both digital and analog. <S> If you have a spare analog input pin on the micro, then a simple analog sensor will probably be easiest. <S> Otherwise, you will need to use something like IIC, SPI, or one-wire. <A> The PIC16F1503 is one that has an internal temperature sensor. <S> Others are the PIC16F1526/7/8/9.
Some micros come with temperature sensors built in.
voltage leak to MOSFET gate? Fried? I have an N-channel MOSFET circuit like this, except there is a more detailed (still resistive) load circuit in place of the LED and R1. I attach my oscilloscope probe to gate (no other connections to gate at that point), and ground to ground. I can see drain-side circuit voltage fluctuations (measured separately) on the scope (low current, low voltage). I thought the gate was pretty well insulated from the drain side; I don't know but based on my currently limited knowledge of MOSFETs I am wondering if the MOSFET is fried. <Q> You say you are probing the gate , but you are watching the drain on the scope? <S> How is this possible without a second probe on the drain? <S> Assuming this is actually what you have done, then since the gate is extremely high impedance and floating, then pretty much anything moving near it or touching it will cause the voltage at the gate to vary, and hence the drain-source current and drain voltage also. <S> Touching the probe to it will certainly do this. <S> EDIT 2 <S> - It seems you are trying to implement something like this: <S> This circuit will stay on for a while after touching. <S> On touching the finger bridges the +V and the MOSFET gate, charging the cap and turning it on. <S> The high value resistor then gradually discharges the cap to turn it off again after a while. <S> You can change the resistor/cap values for a longer/shorter on time. <S> EDIT 3 - here is a simple Set/Reset circuit using 2 transistors: <S> To Set, apply the supply voltage to the S input (e.g. button between base and Vs. <S> Vs could be e.g. 5V - 12V), to Reset, do the same for the R input. <S> Output can be taken from either O point (one is inverted) and used to drive your alarm circuit. <S> Transistors can be any general purpose NPN (BC337, 2N2222, etc) <S> Here are the waveforms: <S> Also, here is a simpler version, where you ground the inputs to switch states (R1,R2 = 1kΩ, R3,R4 = 10kΩ): <A> You should never leave the gate of a MOSFET floating like that. <S> Static charges can easily puncture the gate oxide, permanently damaging it. <S> Tie a high-value resistor (1 megohm or so) between the gate and the source. <S> Yes, the gate is very well insulated from the drain/source, but there is a significant amount of capacitive coupling between them, which is probably what you're seeing on your scope. <A> There are two primary capacitances that will cause this for you. <S> the first is know and gate/darin overlap capacitance and the second is gate/channel capacitance. <S> The second capacitance will be noticeable if here is any conduction in the channel. <S> So if the transistor is on then that will be the dominant capacitance.
EDIT - another possibility is that the drain has a signal present at it, and you are seeing this at the gate due to capacitive coupling between them - in this case Dave's answer fits. This is why you should never leave a FET gate floating (unless you are building a static detector) Add a pulldown resistor to ground (e.g. 10-100kΩ) to keep it off until you apply a turn on voltage. What you're seeing is normal.
Diode between VCC and GND I was having a look at some guitar effect circuits and came across with a company that offers PCBs for some well known circuits. I have noticed that most of ther circuits have a 1N4001 (D1) placed between VCC and GND, without any kind of resistor in series. This one, for example: At first I thought it was meant to avoid reverse biasing the transistors, but risking the power supply by placing it in parallel doesn't make much sense to me. I think it would be better to place it in series to the source or, if needing to keep that parallel setup, at least put a resistor in series to the diode to avoid a direct short circuit. I just would like to know if the circuit is wrong or I am missing something. Thank you very much. <Q> I nearly always put such a 'fools diode' in my circuit, even when I am breadboarding. <S> Reverse power will kill most of the chips I use. <S> Over-current protection is a function for the power supply, not for the powered circuit. <S> This makes more sense: most power supplies are current limited in the first place, think of basic batteries, and 7805-like regulated power supplies (but NOT NiMh accu packs!) <S> Having the protection in the attached circuit will not protect against an error in the circuit, or the wring to the circuit, so it must still be complement by a protection in the supply <S> I build much more powered circuits than I build power supplies, so it makes more economic sense to put the current limiting in the supply. <S> When I use a battery (NiMh etc) that does not inherently limit its current <S> I add a fuse, polyfuse or the like (often the battery supplier has already done this). <S> You circuit is fed by 9V, most likely it is intended to be fed by a 9V battery, which is current limited by itself (unless maybe when it is an NiMh 9V pack? <S> or are those protected in any way?) <S> If you are really worried <S> I suggest you either put a fuse or polyfuse between the battery and this circuit, or as your circuit probably draws very little current and probably can live with a small voltage drop, put an schottky diode in series (an 1N5819 will drop ~ 0.4V at 100mA). <S> This circuit was probably designed long before schottky diodes became common place. <A> I sometimes do this. <S> The diode shorts out the power supply. <S> During a short circuit, a good power supply should just trip without blowing up. <A> Putting it in series means you have an additional voltage drop. <S> And for battery powered application even the 0.2V of schottky diode counts. <A> The diode is reverse biased when the circuit is powered up correctly. <S> So it's for protection against reverse connection. <S> But you'd expect some current limiting and other protection in there too. <A> I think it would be better to place it in series to the source <S> Yes <S> Sir, You are right, its in series ........ <S> Please look at it again. <S> The point above D1 is a node voltage and not some power source. <S> It leaves your relative ground at +9 <S> V <S> with respect to the node marked as -9 V .So D1 and C7 are parallel components which have a potential difference of 9 V .
A series resistor is often not practical because it makes the voltage the circuit sees dependent on the current it consumes.
Measure weights with arduino I want to measure weights with arduino. After the measurements, i want to analyze the weight data of the measured objects.Precision is not very important, but it should be work in the range of 10 to 100 kilograms. Is there a force-sensing socket, weight-sensor or something similar for Arduino that i can use? <Q> You can either buy one of these expensive transducers, or go via a more creative route. <A> You could use the good ol' technique of the dynamometer: $$ <S> m.g= <S> k\Delta <S> x$$Where <S> x is the displacement of a spring , k its stiffness coefficient, g the gravitational acceleration (approximately, at the Earth surface) constant 9.81m/s², and m the mass of the weight. <S> Basically place the weight on a spring and read its displacement to get the mass. <S> You can read the linear displacement however you prefer, the easiest would probably be using a linear potentiometer (e.g. at sparkfun ) with the slider tied to the tray. <S> Just measure the voltage of a voltage divider with the potentiometer in it. <S> For more accurate readout, you should make sure the tray is only free to move in one direction (compression of the spring), which is easy to do by attaching flanges to the tray, sliding along walls. <S> If the maximum displacement of the potentiometer is 20mm <S> and you want to measure from 10 to 100kg, then you should buy a spring with a stiffness of approximately 44.1N/mm. <A> There is a good webpage that tells how to use weight sensors with arduino. <S> Most of these techniques utilizes ADC for weight transducers to connect to arduino. <S> Other links <A> PIEZO speakers can be used as a sensor to force. <S> I guess they could be placed on a point to become a scale. <S> Very DIY. <A> For about $15 buy an electronic scale at Target or similar. <S> Take it apart, you want the 4 sensors in it, one under each 'leg'. <S> These can be used as shown in the following article .
The only cheap alternative to buying a transducer would be finding an analog weight on ebay and interfacing it electronically.
Cutting the ground wire in an isolation transformer? I bought a non-tech isolation transformer (500w), which I planned to cut the earth mains ground from the output, but leave the chassis grounded; however, when I opened it up I found the output outlets were grounded to the chassis and the chassis connected to the mains ground. So I just cut the ground. Now my isolation transformer is floating both on the primary and secondary coils. Naturally this means the outer case is no longer grounded and if there was a short within the transformer, touching the case would be bad. Otherwise, does anyone see if this will lead to a dangerous scenario when I am probing the DUT with a grounded oscilloscope? Assume that I plan to connect the black alligator clip of the oscilloscope to any arbitrary point in the DUT. <Q> I think what you did was close, but I wouldn't leave the whole chassis floating. <S> I'm assuming this isolation transformer comes with a standard 3 prong outlet for the output side. <S> Just disconnect the ground connection on this outlet, but continue to let the input side ground be connected to the chassis. <S> There will be plenty of other things around at the normal ground potential, so the chassis of the transformer isn't going to make anything worse. <S> I agree with Dave in that I don't understand why isolation transformers come with the grounds connected. <S> I got one that way too many years ago, but didn't expect it. <S> I actually blew out a fuse before realizing that the grounds were connected together inside the box. <S> I don't know what they think isolation means, but different from what I had assumed. <S> By the way, beware of inrush currents on a 500 W isolation transformer. <S> All the ones I've seen are toroidal cores. <S> These can retain residual magnetism depending on what part of the power cycle they were turned off at. <S> If this happened to be at one peak and you turn it on next time near the other peak, there will be a very large inrush. <S> I once blew a 30 A breaker with such a transformer, even though I had switched it on a number of times previously on the same circuit. <S> Unfortunately this was on a weekend and the breaker was in a different locked room. <S> Argh. <S> Often you want to adjust the voltage anyway when you're debugging power circuits where you want isolation. <S> In that case, put the variac before the isolation transformer instead of after it. <S> If you bring the variac voltage up and down with the knob, there won't be much inrush. <A> The better alternative is to use a 3-wire to 2-wire "ground breaker" adapter between the transformer and the DUT. <S> This is a bit of a pet peeve of mine. <S> The whole point of an isolation transformer is to get a source of AC power that is completely isolated from (floating with respect to) the mains ground. <S> Connecting the ground from one side of the transformer to the other completely negates this, and I don't know why they do it. <S> The only reason you're using the transformer in the first place is because the DUT's ground is not already properly isolated from the line/neutral input! <S> At most, there should be a high-value resistor (e.g., 1MΩ) in parallel with a smallish capacitor (e.g., 1nF or less) connecting the two grounds. <S> The resistor drains off static charges, and the capacitor provides a certain amount of RF bypass. <A> Now your scope ground can be on any potential (possibly deadly). <S> It is always safer to use differential voltage probes. <S> Take a look at this Tektronix technical brief . <A> Yes, I know it's an old question, but there is a potentially fatal issue which has not been addressed and it is entirely to do with what the isolation transformer may be used for after you've finished doing what you need with a scope and a DUT. <S> This answer is for the part of the question which reads: "...does anyone see if this will lead to a dangerous scenario..." For safety, all earth connections on the output sockets of an isolating transformer must be linked together, but must not be connected to the input earth of the isolating transformer. <S> Two operators could be using using equipment plugged into different output sockets of an isolating tranformer. <S> Assume both operators are using metal-cased tools and the case of each tool is properly earthed to the earth pin on the flexible cord of the tool. <S> Scenario one of two: the output earths in the isolating transformer are not linked together: One operator has an unsuspected short circuit from phase to earth in his tool. <S> The other has a short circuit from neutral to earth. <S> Either operator may use his tool in perfect safety with this isolating transformer - right up until one operator touches the other and they both are electrocuted. <S> Scenario two of two: The output earths in the transformer are connected together: In the case of two faulty tools as described above, the operators are immediately alerted and kept safe because as soon as the second tool is plugged into the transormer, it blows the transformer secondary fuses. <S> And as there can be only one reason for that occurrence given that both tools are known to be operating well individually <S> , it will be instantly known that both tools need urgent repair. <S> A rare scenario, yes, but one which almost guarantees a fatal result when an isolating transformer is borrowed by a couple of tradespeople who are going to work in close proximity to each other. <S> So it is critically important to link all output earths in isolation transformers. <S> If a problem arises when using an oscilloscope and DUT on a workbench, then do anything else to alleviate the problem but do not unlink the output earths in the transformer. <S> Other people need to have implicit trust in the transformer when they use it.
Generally you want as little as possible floating at some arbitrary voltage. You've actually done the Right Thing, although you need to be aware that the case of the transformer is now going to be at the same potential as the DUT ground, so any faults in the DUT (not just in the transformer itself) could cause problems.
Altium Error? What is this reddish box? I've been to a couple introductory Altium trainings and everything goes fine and dandy. This is the actual first board I am working on by myself. I've been learning so much just by doing stuff myself but there is something that I can't seem to quite understand. Whenever I transfer my schematic to the PCB is is placed inside this reddish box, I believe it is a Room. All the examples I saw during training didn't do this. And if I move the components outside the box they turn green (DRC error maybe?) Does anyone know what this means? <Q> No, this is the correct way to disable Rooms in Altium. <S> Go to Project -> <S> Project Options <S> In the class generation tab, you can select not to generate rooms. <S> If your project contains multiple schematics, then you'll need to untick this box for each schematic. <A> That is indeed called a "Room". <S> Rooms are relevant if you're doing multi-channel design, as they let you copy the layout between channels. <S> It's also completely normal. <S> If you want to disable it, it's very easy to do: <S> Click the room -> <S> PCB Inspector panel - <S> > <S> uncheck "Rule Enabled" checkbox. <S> "Design" menu -> "Rules" menu item -> <S> In the tree: "Design Rules" -> "Placement" -> "Room Definition" - <S> > uncheck all the "Enabled" checkboxes. <S> Alternatively, you can just delete the room, but it will come back next time you synchronize the schematic to the PCB. <A> Rooms are used for grouping components into logical areas. <S> This helps to make placement easier because you don't need to go hunting for all the components that you need. <S> Rooms are also used for multi-channel design, which allows you to design a circuit once and then instantiate multiple copies of the same circuit, including copying room layout. <A> I just delete the Rooms. <S> They have a pretty limited functionality, and are generally more trouble than they are worth.
When working on complex projects, using rooms can make layout easier because components on a sheet of the schematic get placed into a room.
Attaching a LED to PIC's Rx pin I need some way to know whether the microcontroller ( PIC ) is receiving (or transmitting) any data. So I thought of keeping a separate LED so that it'll blink when any data transfer occur. But I need to know how to attach this LED . Is it OK to directly attach an LED to PIC s Tx (and Rx ) pins? I mean will it affect the transferring data in some way (like by dropping out the voltage etc...). <Q> (At least some) PICs can't drive much current(*), but also for the RxD <S> pin you better use a transistor to drive the LED, since you'll avoid loading the transmitter at the other end (probably a MAX3232 or similar?). <S> Connect the input "Q" to the TxD/RxD line. <S> A typical general purpose transistor will have a gain of about 100, then 1 mA base current is enough to get 20 mA collector current. <S> For a 5 V bus and power supply: choose \$R_B\$ = <S> 3.9 kΩ, then the base current will be (5 V - 0.7 <S> V)/ 3.9 kΩ = <S> 1.1 mA. <S> To limit the collector current to 20 mA (typical indicator LED) \$R\$ should be (5 V - 2 V)/ 20 <S> mA = 150 Ω. <S> For a 3.3 V bus and power supply, use the same equations, replacing 5 V by 3.3 V, then your resistor values will be 2.2 kΩ and <S> 47 Ω resp. <S> (There are logic level gate FETs where that can be as high as 4 V <S> and then you won't get enough drain current with a 3.3 V bus voltage.) <S> The real advantage of the FET is that it needs hardly any drive current, but since we only need a mA for the BJT we won't have any problems with that either. <S> (*) <S> This random PIC controller specifies a 700 mV drop at only 3 mA output current <S> , that's a 230 Ω output resistance. <S> A 2 V LED directly driven from a 3.3 V output will drop the output by 1 V at only 4 mA. <S> Most indicator LEDs are specified for 20 mA. <A> No, you don't want to connect the LED via a low side switch transistor as others have shown. <S> In the normal case, the idle level of both lines is high, which would then result in the LED lit most of the time. <S> It will be very difficult to notice it occasionally getting a little dimmer. <S> What you want is the LED to be on only when the line is in the active state, which is low. <S> Here is a simple circuit: <S> The transistor is used in emitter follower configuration, which eliminates the need for a base resistor and also uses the minimum possible base current for the resulting LED current. <S> When the digital line goes low, the emitter will be at about 700 mV. <S> Considering a normal green LED that drops about 2.1 V, that leaves 2.2 V accross R1. <S> 2.2V <S> / 120Ω = 18 mA, which is just under the maximum of 20 mA <S> the typical T1-3/4 and many other common LEDs are rated for. <S> This is a case where you want to maximize the LED light output, meaning to run it at its maximum current. <S> The line will go low for short periods, so you want to make that short time as visible as possible. <S> If that doesn't work, you will need some kind of pulse stretching, but try this first. <S> If you are using a 3.3 V supply, adjust R1 accordingly. <S> 3.3V - 2.1V - 700mV <S> = 500mV accross R1. <S> 500mV / <S> 20mA <S> = <S> 25Ω. <S> You want to leave some margin, so the standard value of 27 Ω should work fine. <S> 3.3 V supply is about the minimum you want to use the emitter follower configuration in. <A> Instead, try using a logic level mosfet to drive the LED. <S> Connect the MOSFET's gate pin to the Rx pin and the drain to the LED and a resistor. <S> Ignore <S> the part number shown on the schematic. <S> BS170 would be much cheaper and work fine for this purpose.
A MOSFET like AndrejaKo suggests is a good alternative, but make sure you have a logic level gate type, with a maximum gate threshold voltage somewhat below the bus voltage. You shouldn't attempt to connect the diode directly to the pin because it will definitely affect the operation of the pin.
Garage Power is low...any way to boost? First of all, I'm an active StackOverflow user. This is my first time on Electrical engineering, and I HOPE this is the right place to ask this. I just moved into a new apartment. The breakerbox is no where to be seen sadly. My wife to be has told me that the garage is mine to do with as I please. So far I have placed a 46inch tv (sony bravia, older LCD, not LED), ps3, several other game systems, high powered computer, low powered HTPC, a small soundbar with sub and a couple of lamps in there. Everything is hooked up to the one outlet that is available to my setup. My AVR/batterybackup displays that it is receiving 121-122V. I have no way to convert to 220 so far as I can tell, and even if I did, I doubt my apartment management would like that very much. My AVR/Battery backup Problem: I currently have the tv, high powered computer (core-i5 oced to 3.8ghz, gefore 560ti448, 750W power supply, and 1 lamp on. The AVR is reading that it is at 70% capacity. With the ps3 on, playing a netflix video, and When I start a benchmark on the PC, it jumps to 101-105% of its capacity, and in 5 seconds, shuts itself off. The breaker has not blown, Im sure because the AVR is absorbing the overflow and not tripping it. Question: Is there anyway that I could increase the ability to power my garage without major modifications? For instance, dropping an extension cord down from the upstairs that is on another circuit is doable (fire and electrical codes not withstanding); but adding a sub-box to my breaker box is not. Im hoping there is a better way, for instance, would piggy backing a couple of higher powered AVR/battery backup units do the trick? Current Load information: Computer (basic browsing)and monitor+1 lamp: 33% - 0.173kW Same as above with TV: 64% - 0.336kW Same as above with PS3 - 85% 0.430kW Computer (running benchmark)and monitor+1 lamp: 65% - 0.362kW Thank you all for any advice/knowledge you can impart. And again, if this is not the correct subsite for this question, please let me know, or feel free to move it (if you are a mod) <Q> The outlet in your garage will either be 15A or 20A, depending on the upstream breaker (hint: it's worth your trouble to find the breaker box given what you're trying to do). <S> This equates to up to 1800VA or 2400VA for a resistive load (less for the loads you're running). <S> If all of your man cave gear is plugged into the 875VA UPS that you linked, that is the limiting factor, not your house wiring. <S> Get a larger UPS, run two in parallel and have them run different loads, or just use a surge suppressor and skip the battery backup for your less critical loads. <A> Your apartment wiring is definitely not the issue, you are overloading your UPS. <S> Either get a beefier one or plug the devices that don't need redundant power into a power strip. <A> You say with everything on the UPS is at 105% of capacity, but what capacity is that ? <S> Since the breaker is not tripping and only the UPS shutting down, it could well be that the outlet has more capacity than the UPS. <S> Ask the landlord what the outlet is rated for. <S> It would help to know when the building was built or when the outlet was put in and where this is, but as a wild guess the outlet is probably good for 15 A. <S> That should be good for 1.6 kW at least with some margin. <S> Assuming you really meant kW, not kWh (getting units right is important in engineering), then it sounds like a 15 A outlet should do it. <S> A quick and simple way to get what you want is to only plug in the minimum necessary stuff into the UPS. <S> Do you really need all the lamps to go thru the UPS? <S> The TV? <S> I can see the point to the computer and a monitor and maybe one lamp, but why does the rest of the stuff really need to run accross a power glitch?  
From there, you could also determine if you have multiple circuits supplying power to your garage, but you're a long ways off of having to do that.
How does rewinding a smart card antenna into a smaller coil leave it operational? Here is a description of how one guy extracted the electronics from a smart card and then embedded it into a ring wearable on a finger. The card in question is more or less similar to the card in another question , the minor difference is that the card in the current question uses a thin (presumably copper) wire as antenna and the card in the linked to question uses wide thin flat traces. The wires run along the card perimeter. The card is credit card size, so the antenna is more or less an ellipsis. So that guy uses solvent to soften the card plastic, strips the card and extracts the electronics. Then he rewinds the antenna wire so that the antenna coil can be embedded into the ring. The resulting coil has several times smaller diameter yet the electronics work. How does it happen that rewinding the antenna into a smaller loop does not break the card operation? <Q> Without a link to the ring related page it's hard to be very specific <S> BUT There is much rubbish and many false claims published on the internet. <S> This has a good chance of being less veracious than may appear. <S> The system may still function but with reduced range. <S> It is exceedingly unlikely that it will work anything like as well as it did in its original form. <S> An antenna that worked in a card will have different area, different inductance and capacitances, different relationships of portions to other portions in terms of fractions of a wavelength and relative phase, and more. <S> A look at Microchip's AN710 RFID Antenna design application note description page here and <S> PDF here will demonstrate the differences that varying geometry makes - and will also show you what may work best in a ring. <A> The "antenna" used in an RFID tag is a coil of wire (an inductor), and it interacts with only the magnetic portion of the RF field emitted by the reader. <S> It may also be part of a tuned circuit that helps the tag extract power from the signal. <S> Therefore, any coil that has the same value of inductance, regardless of its geometry, will work correctly with the rest of the tag circuitry, and the sensitivity (range) of the tag will be a function of the "loop area" (basically diameter) of the coil. <A> How does it happen that rewinding the antenna into a smaller loop <S> does not break the card operation? <S> Because your not really changing anything. <S> The antenna still is an antenna of the same length, however it now just takes up less space. <S> The range at which it works may be altered, however there isn't anything preventing it from working. <S> You could cause damage in the process that would break the unit. <S> Or if the antenna wire gets shorted it could cause it to not work or at least not work at any distance. <S> The second link you gave shows a wound antenna too, it's mostly done to save space but still give it the surface area it needs to work.
The wire that was used looks like winding wire (like in magnets, motors, and transformers,) and is insulated. Patch antennas are based on a good grasp of the technology involved, a certain degree of magic and variable amounts of luck and experimentation.
Is using a 125VAC Kill-A-Watt (Power meter) on a 220VAC network possible? A 125VAC Kill-A-Watt has come to my hands, but in my country, the grid operates at 220VAC. I know I can't use it as-is, but is it possible to modify it to be usable? <Q> The kill-a-watt unfortunately does <S> it's own RMS conversion, and does not use a off-the-shelf power monitoring IC or anything. <S> Also, the controller IC is unfortunately, a epoxy-blob device, so it's not possible to easily reverse engineer it, or even determine what it is. <S> The only IC I could look find the data sheet for in the kill-a-watt I took apart <S> a while ago was a simple quad-op-amp (a LM2902). <S> Overall, I think it would probably be easier to build your own, rather then try to convert a existing kill-a-watt. <S> Anyways, no matter what you do, there is really no way to make the voltage readout work properly without a firmware change, so I can't see how useful even swapping some parts would be. <S> Note the high-quality soldering job. <S> It was like that from the factory. <S> I did this tear-down a few years ago, and I've been just too lazy to actually post it anywhere. <A> Ask sales for availability of the 220Vac unit by email/ <S> It shoukld be easy to adapt with the correct p/n component changes, an adapter cord pair and perhaps an MOV protection clamp with proper HV rated series line 1MOhm resistor. <S> I believe this may be the schematic for 220Vac using the same chip used in the 120Vac kill-a-watt. <S> They are cheap,but how accurate depends on attention to many details. <A> I have about 10 in my office monitoring several devices and have built a couple of portables for home (using an sturdy extension cord with the meter in the middle). <S> Knowing the consumption has led me to change old power hungry devices for new efficient ones. <S> I have sold meters to the utilities for ages, so I had quite a few spare leftover samples to use.
Just get an old power meter and connect it.
Good FPGA / Microcontroller development board for real time image processing I have been working with OpenCV on Desktop environment for the past one year and now I want to shift to dedicated hardware for my real time image processing applications. I have the following questions: Which development boards (FPGA/Microcontroller) are good for implementing image processing algorithms? The image capturing device will be webcam. Will I be able to code in C/C++ and convert the code into assembly level and dump it in that development board? Will I be able to use libraries like OpenCV in those image processing algorithms? Since webcams will be used, the image interface/resolution is: Interface USB 2.0 Resolution max 640 x 480 Frame rate 25 - 30 fps Depth 8 x 3 for colored image 8 x 1 for gray Application: thresholding, gesture recognition, object detection, tracking, optical flow <Q> Digilent makes some low priced development boards that has USB and VGA that might fit the bill. <S> You will need to program the FPGA with Verilog or VHDL. <S> When programming FPGAs you are describing actual hardware <S> and so it is completely different from coding in C/C++. <S> Unless someone has ported OpenCV to VHDL or Verilog <S> I doubt it. <A> This is a very broad question, and without knowing what sort of applications you're targeting, the resolution and frame rate of your images, etc. <S> it is very difficult to answer. <S> FPGA programming for real-time video is a very different animal from software programming using libraries such as OpenCV. <S> It sounds like a good first step for you would be to shift to a single-board computer that offers many of the features of the desktop environment you're used to. <S> There are many inexpensive ARM-based boards out there; perhaps one of the best known right now is the Raspberry Pi . <A> I think you can be successful with the Avnet ZedBoard with the new Xilinx Zynq XC7Z7020. <S> It runs embedded linux, has the interfaces you require, and since the dual ARM Cortex-A9 processing system is tightly integrated with the FPGA fabric, supports high bandwidth integration of software and memory-mapped hardware accelerators. <S> It should be straightforward to build and run OpenCV on this board. <S> It is a much steeper learning curve, however, to master the build environment, building your accelerators to speak AXI4 bus interface, etc. <S> At $300-$400 it is ~10X more expensive than RaspPi but includes the FPGA. <S> http://zedboard.org Happy hacking!
In terms of FPGAs, you would be most concerned with high performance DSP on the chip, for that I would recommend a Xilinx Spartan-6 FPGA or a comparable Altera.
Best order for PCB power planes? [ EDITED ] I seem to have confused the terminology between signal and power planes! There is a ground plane, plus potentially four power planes -- +/- 15V, +HV (200V), and i'm not sure if a -VREF (~ -7V) reference voltage should be considered a "power" or a "signal". I guess what I'm really wondering is whether it's considered kosher to turn the +/-15V, +HV, and -VREF into solid copper layers analogous to the ground plane, as opposed to trying to draw out all those traces. [ Original ] I'm laying out a schematic for a piezo driver on a multi-layer PCB. The schematic has potentially five signal layers -- a ground, +15V, -15V, -VREF (-6.95V), and a +HV (+200V). Is there any advantage/disadvantage to having 5 signal planes? Is there a "best practice" on how to order them? The output is a ~0-150V signal, which might be a low-frequency sweep of ~ 10 to 100Hz, or a high(er) frequency dither of ~ 1-100kHz. <Q> This set of articles has been referenced a number of times on this site and it's quite a good primer. <S> Read through it and decide which goals you are content to optimize for. <S> http://www.hottconsultants.com/techtips/pcb-stack-up-1.html <S> http://www.hottconsultants.com/techtips/pcb-stack-up-2.html <S> http://www.hottconsultants.com/techtips/pcb-stack-up-3.html <S> ... read on for more layers. <S> Here is an excerpt of the objectives of stackup design: <S> When using multi-layer boards there are five objectives that you should try to achieve. <S> They are: <S> A signal layer should always be adjacent to a plane. <S> Signal layers should be tightly coupled (close) to their adjacent planes. <S> High-speed signals should be routed on buried layers located between planes. <S> In this way the planes can act as shields and contain the radiation from the high-speed traces. <S> Multiple ground planes are very advantageous, since they will lower the ground (reference plane) <S> impedance of the board and reduce the common-mode radiation.. <S> If you read through the articles, you'll find that there is no one "best" way to stack up your design. <S> There are just a number of possibilities with different characteristics and tradeoffs. <A> You don't need to put your high voltage tracks or plane on its own layer. <S> But you should make sure that it keeps its distance from tracks on the same layer. <S> Some PCBs have slots cut in them to separate areas with a large voltage difference. <S> Notice the black slots around some of the resistors, and near the heatsink. <S> Also, you don't have to dedicate an entire plane to each power supply voltage. <S> In fact, you don't have to dedicate any plane to any power supply voltage or ground. <S> You could probably do this in two layers. <S> Someone designing a piezo driver for a commercial product may even be able to do it in one. <S> It's amazing how many products you can open up to reveal a single sided PCB. <S> For example the PCB in this answer! <S> It's from an induction hob. <S> It's got a bunch of high and low voltages on it, and very high currents too, but doesn't worry about having 5 or 6 layers. <A> In general you want to have a a symmetrical stack, so 4 or 6 layers in your case. <S> I realize you only said five signal layers and not what you'll be doing for power, but I'll ramble on anyway. <S> Uneven stacking can lead to warping problems. <S> Like if you have the top layer as a plane and then five layers of signals. <S> When that's heated in the oven it's going to warp like a potato chip. <S> Some people like to keep their signal layers routed orthogonally to reduce cross talk <S> so you can'd <S> do that as easy with 3 sig layers on top of one another. <S> Also I don't think it's going to save you any money, the board houses like to do things it twos also. <S> Looking at your signals (damn +200V hah), I'm thinking you'll want to isolate that high voltage signaling from your low voltage work. <S> So maybe an extra plane for that is not really the way to go? <S> You might want to put him on one edge or something. <S> Tough to say without knowing your design. <S> I feel like if I brought that to UL for a safety cert <S> that's what I'd have to do. <S> Unless of course your whole system can never be touched by a person.
Power and Ground planes should be closely coupled together.
What is the equivalent thevenin resistance of a digital output port on an Arduino Uno R3 How would I determine the thevenin equivalent resistance? <Q> You can't directly, at least assuming there is nothing between the arduino output and the microcontroller output. <S> Microcontroller manufacturers don't spec output resistance usually, but they do specify the worst case voltage drop under some load. <S> For example, for a micro running at 5 V <S> they spec might say the minimum guaranteed logic high output is 4.0 V at 20 mA sourced (I'm making up these numbers as examples only, you need to check the datasheet). <S> Assuming the output when driving high is a saturated FET that can be modeled well enough as a resistor, then this says it drops 1 V at 20 mA. <S> 1V / 20mA <S> = 50 <S> Ω. <S> That's the worst case, so is the highest resistance. <S> The actual resistance can be anywhere from 0 to that value. <S> However, modeling a digital output as a Thevenin source is only roughly right. <S> You can get some first order useful information from it, but you certainly don't want to use that for any kind of detail. <S> If you find yourself wanting that, then it's a good clue you need to step back and think about the design differently. <S> It would help if you explained why you want to know the output resistance of the micro. <A> These characteristics can vary considerably over process, voltage and temperature. <S> You can get an approximate value by looking up the DC characteristics of the chip pins in the datasheet, and doing a ΔV/ΔI calculation based on two different pairs of V OH <S> , I OH or V OL , <S> I OL data. <S> But the better answer is to design your external circuit so that the specific source resistance of the output pin has little effect on its overall performance. <S> If you give us some idea of what you're up to, we can offer more spsecific advice. <A> Old thread but <S> someone may find this useful when searching [As I would have done]The answear is 25 ohms. <S> Resistance of input pins [yes they do have some]Going off the graph on page <S> [387] <S> pf <S> the atmel data sheet: <S> Atmel ATmega640/ <S> V-1280/V-1281/V-2560/ <S> V-2561/ <S> V <S> Plucking some numbers from the GraphV= <S> IR R= <S> V/ <S> I = 0.5/20e-3 <S> = 25 ohms [ <S> Ish]The relationship for the uno is similar.
To start with, there's no single answer to that question, because the pin characteristics are determined by the MOSFET transistors that drive it.
How to read high voltages on microcontroller? I want to read high voltages, like ~50V, using a microcontroller. I plan to put this as an input into the microcontroller's A/D line. But of course, you shouldn't have voltage that high on the input of a microcontroller or it'll fry. How might I read high voltages? The main thing is that I need to step down the voltage before reading it. What do I need to consider when stepping down this voltage? Thanks in advance! Edit: I noticed in the PIC18 datasheet that it says "The maximum recommended impedance for analog sources is 2.5 kOhms." How does this affect how I step down the voltage, be it with resistive dividers, etc.? <Q> The formula to calculate the output voltage is: <S> So if we assume your input voltage ranges from 0-50V, we need to divide it by 10 to achieve 0-5V. <S> If we also assume we want to load the input voltage with 100kΩ, then the calculations would something like: Vout / Vin = R2 / 100kΩ 0.1 = R2 / 100kΩ - <S> > R2 = 10kΩ <S> R1 = <S> 100kΩ - R2 = <S> 90kΩ <S> So R1 = <S> 90kΩ and R2 = <S> 10kΩ <S> For an ADC requiring a maximum source impedance, you must make sure the voltage divider impedance is below this level. <S> The impedance at the divider can be calculated as R1||R2. <S> For <2.5kΩ, the above won't meet this requirement as <S> 10kΩ||90kΩ = 9kΩ <S> If we use 9kΩ and 1kΩ though, we get 1 / <S> (1/1000 + 1/9000) <S> = <S> 900Ω <S> Bear in mind <S> the lower the resistance <S> the higher the wattage rating resistors you need. <S> 50V / 1k = <S> 50mA <S> -> <S> 50mA <S> * 45V <S> = 2.25W across the top resistor (0.25W across the bottom) <S> In these cases it's best to use an opamp buffer in between a high resistance divider and the ADC. <S> Or use a 2kΩ and 18kΩ divider, which is not quite as power hungry as the 1k/9k version. <A> To add to Oli's answer: <S> The Schottky diode protects the opamp's input against overvoltage in case the input voltage would exceed the maximum specified 50 V. <S> This is a better solution than the 5 V zener which is often placed in parallel with the 3 kΩ resistor. <S> The 5 V zener voltage requires several mA, if the current is much lower the zener voltage will be lower as well, and the diode may clamp the input to for instance 4 V, or even lower. <S> The 27 kΩ resistor will allow 2 mA, isn't that enough for the zener? <S> I might, but that's not what the zener will get; most of that 2 mA will pass through the 3 kΩ resistor, leaving only tens to hundreds of µA for the zener, which simply is too little. <S> Select a Schottky diode with a low reverse leakage current, so that the 5 V supply voltage doesn't influence the divider too much. <A> For an isolated measurement, you can use a voltage transducer, <S> e.g. LEM's LV-25 or similar. <S> But a much easier way if you don't need isolation is to just use a voltage divider : <A> To fight your source impedance problem you could first use a voltage divider and then use a standard opamp. <S> That should have a low enough output impedance for you. <S> Here's an app note I posted yesterday on using opamps for converting voltage levels for ADCs. <S> http://www.ti.com/lit/an/slyt173/slyt173.pdf <A> Look up something called a resistor divider . <S> Using two resistors, you can multiply a voltage by a constant between 0 and 1. <S> In your case you want to scale 50 V down to the microcontroller level. <S> Let's say the micro is running at 5 V <S> , so you want to scale the input by 0.1. <S> This could be done with two resistors, the first having 9x the resistance of the second. <S> The signal goes into the first. <S> The other end is connected to the second resistor and the micro A/D input, and the other end of the second resistor is connected to ground. <S> With the 9:1 ratio you get a gain of .1 <S> (attenuation by 10). <S> You probably want the lower of the two (the 1x resistor) to be around 10 kΩ, which would make the other 90 kΩ. <S> I'd probably use 100 kΩ to provide some margin and overrange sensing. <A> I've successfully done this using a voltage divider and a Zener diode reverse biased between the input pin and ground (just in case).
A simple resistive voltage divider will achieve what you want.
MAX232 circuit, what is the purpose of the capacitors? Possible Duplicate: Can I use 10 \$\mu\$ F caps in a MAX232? What is a decoupling capacitor and how do I know if I need one? Kindly refer to the following typical MAX232 circuit: I am still not quite sure I understand capacitors correctly, and while building this circuit, I realized that I wasn't understanding what the purposes of the capacitors I was sticking onto the breadboard were. My guess is that they are all used for power conditioning, or decoupling. I am not sure how I would be able to tell which one though. I am especially confused about the 10 uF capacitor, as it seems like it's just shorting out the GND and VCC pins from my microcontroller. <Q> The 10uF capacitor shorts only AC voltages developing between VCC and GND: <S> noise on the power supply. <S> To DC, a capacitor is an open component! <S> When you power this MAX232 with single-voltage 5V supply, its V+ and V- pins are able to generate a dual supply: a positive voltage greater than 5V and a more or less equal but opposite negative voltage. <S> How that kind of thing works is that an oscillator drives a network of diodes and capacitors: look up the term charge pump . <S> The capacitors needed to make this charge pump work are connected to pins 1 and 3, and pins 4 and 5. <S> The 1uF capacitors on 2 and 6 (the V+ and V-) outputs, are just additional "rail caps" on this dual supply that is generated by the chip. <S> They probably just do some further removal of ripple and noise from this generated supply. <S> (To filter ripple, these capacitors don't have to be large. <S> Why? <S> Because the internal oscillator for the charge pump probably works at a substantially higher frequency than 60 Hz.) <S> The use of the capacitor on pin 2 shows a slight deviation from the "Typical Operating Circuit" given in the Texas Instruments datasheet (Figure 4). <S> In the datasheet, the pin is capacitively coupled to ground through a 1uF capacitor. <S> Here you have it coupled to VCC. <S> That does not matter much, because both VCC and GND are AC ground. <S> However, this configuration is not a mistake. <S> It appears in the original Maxim datasheets for this device! <S> One important clue in the TI datasheet is a note that this device is compatible with another company's existing product (and so is not a TI house design). <S> It behooves us to look at the Maxim data sheet in addition to the TI one. <S> That datasheet contains a lot more discussion and numerous additional diagrams. <A> RS232 can range from +/-10V to +/-15V from what I've seen, and the MAX232 is used to convert from TTL levels coming from / going to a microcontroller <S> , so its charge pumps needs the caps to get to the right voltage. <A> <A> The 10uF cap between supply and ground is a decoupling capacitor . <S> It provides a low impedance charge buffer for the switched capacitor DC/DC converters inside the chip, which can have high instantaneous current demands. <S> The decoupling capacitor in this application is somewhat unique in that it's unusually large -- most digital ICs use a decoupling cap of ~0.01 - 0.1uF to ensure a solid power supply rail on die. <S> In this circuit, the capacitor needs to source charge to the 1uF capacitors, so a 10x value is common.
I think they're just part of the voltage boost circuit and inverter circuits to get you those higher RS232 signal levels you need
What is the difference between level shifter, voltage regulator and dc-dc converter? What is the difference between level shifter, voltage regulator and dc-dc converter? My understanding is: level shifter is used to convert one voltage into another voltage voltage regulator is used to produce constant output voltage from high voltage dc-dc converter is used to convert dc level into different level Is this correct? If I want to convert 5V voltage supply to 2.5V, do I need to use regulator, level shifter or dc-dc converter? <Q> It might also be called a translator . <S> For example, the MC14504B converts TTL logic signals to CMOS levels, and a MC10H607 converts PECL signals to TTL. <S> A level shifter isn't meant to provide power, it can only source as much current as its target logic levels require. <S> The terms voltage regulator and <S> dc-dc converter are somewhat overlapping. <S> Classic linear regulators are almost always called regulators . <S> Linear regulators can only be used to produce a lower voltage from a higher one. <S> Switching supply circuits might be called regulators or dc-dc converters . <S> (Purists might claim that the regulator is just one part of a dc-dc converter circuit. <S> That is <S> the regulator is what provides the feedback control, whereas the dc-dc converter is a complete circuit including external magnetics, switching transistors or diodes, etc.) <S> Switching supply circuits include different types that are able to produce either lower or higher voltages from an input voltage. <S> To produce 2.5 V from 5 V, you can use either a linear regulator or a "buck" switching converter. <A> A level shifter is used between digital circuits in order to convert "high" and "low" as used by one of the circuits into "high" and "low" as used by the other. <S> That both circuits usually use 0V for "low" is incidental. <S> A voltage regulator is used to take a possibly unstable voltage source of higher voltage and produce a smooth output voltage. <S> A DC-DC converter is used to provide one voltage given another as input. <S> They usually have a voltage regulator in the output section. <S> To convert a 5V power supply into a 2.5V power supply you could use either a DC-DC converter or a voltage regulator; a level shifter would not be appropriate for this application. <A> There are two main uses of electrical current: <S> To actually provide power to operate a circuit or device. <S> Mostelectronic circuits are designed to run with DC with a specifiedvoltage range. <S> For example the 5V supply for an Arduino needs to bebetween 4.75 and 5.25V. <S> If the available power is outside therequired range it needs to be changed to the value the devicerequires. <S> A voltage regulator can be used to change a DC voltagethat is higher than the required voltage <S> (for example 9V in theArduino case) or is variable (for example 7-12V for an Arduino withregulator) to a stable voltage that the device needs. <S> A constraintwith a normal (linear regulator) is that it can only reduce voltageand it throws away the energy difference between the two voltages. <S> If you need to power a device from a voltage lower than it requiresyou <S> can use a DC-DC converter. <S> It can also be much more efficientthan a linear regulator if the input voltage is much higher than therequire device voltage (e.g. 12V input to power a 5V Arduino). <S> To provide transfer of information. <S> In this case the amount ofpower is usually small and the object is to pass information ratherthan power to operate the device. <S> For digital information there area number of accepted standards, for example 5V TTL where a 0 isrepresented by a voltage of between 0 and 0.8V and a 1 isrepresented by a voltage between 2.4v and 5V. <S> Another standard is3.3V TTL in which the high voltage is between 2.4V and 3.3V. <S> If you need to exchange information between the two standards you may use alevel shifter to interface the two devices. <S> Another common voltagelevel translator is between the levels used in Rs232 to TTL (either5V or 3.3v). <S> Level shifters need to work at the speed at which theinformation is transferred which may be extremely fast in some case,maybe 100's of Megahertz. <A> The above are great answers. <S> I'm adding this one (I'm not the author), because I found it extremely helpful as a supplement. <S> Voltage translation is required when microprocessors and peripheral devices operate at different voltage levels within a system. <S> Voltage translators interface between these system components and solve the problem of I/O voltage level incompatibility while retaining signal integrity. <S> Voltage translators can be used in any application where an interface is needed between system components with different I/O levels. <S> Voltage regulation is the ability of a system to provide near constant voltage over a wide range of load conditions. <S> Voltage regulator is an electrical circuit designed to automatically maintain a constant voltage level. <S> A voltage regulator may be a simple "feed-forward" design or may include negative feedback control loops. <S> It may use an electromechanical mechanism, or electronic components. <S> Depending on the design, it may be used to regulate one or more AC or DC voltages. <S> kak111 from http://www.edaboard.com/thread229917.html
A level shifter is usually a part that converts digital signals from one logic standard to another.
Is there any restriction in the choice of Ethernet PHY, depending on the TCP/IP stack? I am new on the forum and am currently working on a project to design an ethernet electronic board. I will have a microcontroller 32-bit with an external PHY.I wanted to know : depending on the TCP/IP stack I will choose, will there be any restriction on the external ethernet PHY or all the PHY are usable?The thing is I need to choose the Ethernet PHY before the microcontroller and then I don't know if I will use uIP or Contiki or microchip stack or any other. <Q> Basically there should be no difference what PHY You'll use, since the low level driver is written separately from all the TCP/IP stack itself. <S> At least I am sure this is done in LwIP, since I use this stack with Micrel PHY - had to write my own initialization setup stuff. <A> All PHY will be usable. <S> You choose the PHY based on speed and media (e.g. 100BASET, 1000BASESX). <S> Most PHYs have MII (Media Independant Interface), RMII <S> (Reduced [pin count] MII or GMII <S> (Gigabit MII). <S> Your microcontroller will need one of those interfaces. <S> For example MII is limited to 100 Mb, if you want Gigabit you need GMII or similar. <A> Microcontroller TCP stacks tend to include the drivers for the MACs and PHYs used. <S> So if your TCP/IP stack doesn't have a driver for your PHY then you will have some work to do to add one. <S> Adding a new phy to a stack is not an insurmountable task.
The interfaces tend to be fairly standard with just some slight configuration changes needed but if it's your first time working with ethernet sticking with one that is already known to work with your TCP/IP stack is likely the path of least problems.
How do I reliably connect power, ground and signal to a remote device? I am building an arduino-based multi-event (light, sound, vibration) high speed photo trigger. I'd like to house the arduino and display in one box, then be able to connect a remote sensor device to the main box. +-----------+| arduino | 5v, GND, signal +----------+| + |========================| sensor || display | +----------++-----------+ I had considered using a 3.5" TRS cable, but it seems there would be a risk of a short when plugging and unplugging the cable. Is there a better connector/cable combination I could use to connect these together in a way that can be (dis)connected very easily? <Q> You want to look at connectors with "ip67" protection to fully protect against dust and water immersion. <S> If all you need is "resistance" to dust and splashes, "ip54" is about as low as you'll want to go. <S> ( Wikipedia on IP ratings ) Note that the ratings assume you assemble cabling correctly with the right diameter cable, heat shrinking, possible gaskets, cable sleeve rating, etc. <S> These connectors will then come with some number of pins -- choose as many as you need (from 3 and up.) <S> Also, the pins will have current ratings; choose a current rating that is suitable for your power needs. <S> Finally, you need a mating set of male and female in both ends. <S> Many applications use round connectors (think "XLR" from audio) with screw rings to securely tighten the plug to the socket on each end. <A> I feel like you are looking for a very straightforward answer. <S> So the first thing that comes to my mind would be D-Sub connectors. <S> A DB9 connection would give you 9 connections, 2 of which you could dedicate to power and ground, and the rest can be used for whatever type of signal you are looking to transmit. <S> To keep things simple you could buy a DB9 cable assembly, and then just get 2 receptacles (one for each end of cable). <S> This way you don't have to worry about soldering the cable, but you will still have to solder the connections that go to your Arduino/Sensor Box. <S> I use these in most of my projects and have never had any issues, <S> that being said they would not be well suited for outdoor use. <S> Link to digikey for connectors Link to digikey for cable assemblies <S> Hope this helps! <A> If you look at Farnell or Digikey you will find a lot of connectors that are fast and reliable. <S> But what I see here as a very important point is the ESD protection. <S> If your sensor is designed to be plugged and unplugged often, you have to protect the design from ESD. <S> Thus don't forget to add some transil diodes or small capacitors to GND to the signal lines that leave or enter your board/sensor.
You can start looking on Digi-Key for ready-made cables , if you don't want to be poking connecting pins into sockets yourself before you start soldering...
What is the difference between Interrupt on Change and External Interrupt on PICs What is the difference in function between IOC and EXT Interrupt on a PIC? I am currently using a PIC12F1822, and apart from the extra layer of checking you have to do with IOC (i.e. which pin caused the interrupt) the two are identical. What is the practical difference if any? When would you use either one or the other? <Q> Look at this document which states:- Interrupt-on-change <S> This feature is similar to the external interrupt facility , except that a port change interrupt will be triggered by any change (not just one type of transition) on any of the pins for which it is enabled. <S> This makes it more flexible (being available on more pins), but also more difficult to deal with correctly. <A> This is likely done to simplify the chip's interrupt architecture by having less entries in the interrupt vector table. <S> Interrupt on change can be set to fire when a port register changes and can be useful for something like a keypad matrix where you don't want to write an Interrupt Service Routine (ISR) for every single pin. <S> You can write just one that can check the value of the entire port, which might be what you're really interested in depending on the application. <A> The three biggest differences between interrupt-on change and external interrupt pins: <S> The external interrupt pins allow software to specify whether the interrupt should be triggered by a rising edge or by a falling edge; if e.g. a pin is low and one is interested in falling edges only, an interrupt will not be triggered until the pin rises and subsquently falls. <S> Using interrupt-on-change, one would have to wake up on both events. <S> The external interrupt pins have individual latching status bits. <S> Even if an input pulse comes and goes before software has a chance to respond to it, software can still find out that it happened and react suitably. <S> By contrast, reading the I/ <S> O port connected an external interrupt pin has no effect on the interrrupt. <S> The PIC's external interrupts are more versatile and reliable than the general-purpose pin-change interrupts. <S> I'd suggest using the former when practical. <A> Basically, the external interrupt will be triggered on a specific (rising or falling, user defined) edge, while interrupt-on-change will be triggered on any edge (both rising and falling). <A> The interrupt on change is generally for a half byte of <S> I/O, where the external interrupts are generally for individual bits. <S> As you said already, one thing you need to do in the IOC ISR is to figure out which bit (or bits) changed. <S> The IOC is also a bit tougher to use, even beyond that. <S> It is imperative to read the port soon before enabling the interrupt, and even more important to READ THE PORT inside the ISR! <S> If you have a slow-changing signal, and think you can set a flag inside the ISR and do your read later, outside the ISR, think again! <S> The read of the port (or any bit on the port, if I recall correctly), resets the latch on the comparator that triggers the interrupt. <S> If you don't clear it inside the ISR, it will immediately retrigger when you exit the ISR. <S> If you remember to do this, it's all good, but if you forget and think you can read the port when you get around to it, you'll get a bit frustrated until you remember to do the read in the ISR.
Reading an I/O port which has a pin-change interrupt enabled at precisely the time the input changes may result in the pin-change interrupt not triggering.
Why do many electronics operate on 5 AND 3.3 Volts? Many modern appliances use a 5V Power connection. Internally they are working with 3.3V. Wouldn't it be easier to have 5V everywhere? Examples are many USB devices or Routers (they use 5V for power but 3.3V for serial communication). <Q> 5 V became much used in early logic families, and especially TTL. <S> While TTL is very much passé <S> now everybody still talks about "TTL levels". <S> (I even hear UART decribed as "TTL bus", which is a misnomer: it's a logic level communication channel, but may well be a different voltage than 5 V.) <S> In TTL 5 V was a good choice for the setpoints of the BJTs and for a high noise immunity. <S> The 5 V level was retained when technology switched to HCMOS (High-Speed CMOS), with 74HC as the best-known family; 74HCxx ICs can operate at 5 V, but the 74HCT is TTL-compatible for its input levels as well. <S> That compatibility may be required in mixed technology circuits, and that's the reason why 5 V won't be completely abandoned soon. <S> But HCMOS doesn't need the 5 V like TTL's bipolar transistors did. <S> A lower voltage means lower power consumption: an HCMOS IC at 3.3 V will typically consume 50 % or less power than the same circuit at 5 V. <S> So you create a microcontroller which internally runs at 3.3 V to save power, but has 5 V I/Os. <S> Next to compatibility 5 V also offers a better noise immunity. <S> And it goes further. <S> I've worked with ARM7TDMI controllers (NXP LPC2100) with a core running on 1.8 V, with 3.3 V I/Os. <S> The lower voltage is an extra power saving (only 13 % of a 5 V controller), and lower EMI as well. <S> The drawback is that you need two voltage regulators. <S> So that's the trend: internally ever lower voltages for lower power consumption and EMI, and externally a higher voltage for better noise immunity and connectivity. <A> Sure. <S> Increasing the voltage used from 3.3V to 5V increases power consumption by 2.3 times. <A> Most electronics had +5 available onboard <S> but, when circuits only required 3.3v, it was easier to drop the voltage on the chip rather than require manufacturers to re-engineer their power supplies and boards to add 3.3v. <S> The lower voltage not only reduces power consumption but in high-speed digital circuits it takes less time to swing from one rail to the other.
(The I/O may also be 5 V-tolerant; then it works at the 3.3 V levels, but won't be damaged by 5 V on its inputs. Therefore there is value in using as low a voltage as possible, even if there are some losses in the power supply from the conversion. But remember that power consumption increases with the square of voltage.
Square wave / Sine wave is more audible Consider you have 50 Hz both square wave as well as sine wave put on to a same speaker at different time. Which signal is more audible and what is the reason behind that ? We know that by taking the Fourier series of the square wave we get multiple periodic sinusoidal wave, each having the frequency as the multiple of the fundamental frequency. So which will be more audible, whether a sine wave having single frequency or the square wave? <Q> 50 Hz is fairly low and most speakers will not reproduce that frequency very well. <S> Since a sine wave will have only 50 Hz <S> there may not be that much audio reaching the human ear, and even then the human ear will not respond very efficiently to it. <S> A square wave, on the other hand, will have lots of harmonics that the speaker will reproduce very well <S> and the harmonic frequencies will be spread right through the ideal frequency range for human hearing (300Hz to 3 KHz). <A> In the specific example you gave, the square wave is much louder; mostly for physiological reasons. <S> 1)Into <S> the same load, a square wave will deliver twice the power as a sine wave of the same peak voltage. <S> This is same as saying the square wave has an RMS voltage equal to its peak value; whereas a sinewave has an RMS value of 0.707 <S> (actually sqrt(2)/2) times the peak value. <S> 2)More importantly, the sensitivity of the human ear is a strong function of frequency. <S> The telephone operates from 300Hz - 3KHz <S> (give or take). <S> That is where the intelligible content is and it is also where the ear has a good sensitivity. <S> The human ear is very insensitive to 50Hz. <S> The same power level at 500Hz would be MUCH loader. <S> Though the energy of the square wave in the harmonics (odd harmonics only; 3, 5, 7, 9..) has no more power than the fundamental, it will be perceived as much louder because of the ear's greater sensitivity to the higher frequencies. <S> The international standard ISO-226 identifies the accepted equal-loudness contour for the human ear as a function of frequency and absolute sound pressure level. <S> Equal-loudness contours are often referred to as <S> "Fletcher-Munson"' curves, after the earliest researchers, but those studies have been superseded and incorporated into newer standards. <A> "Which signal is more audible" is more ambiguous to be answered but sinusoidal waves are melodious in nature while those in square form will feel like drilling your tymphanic membrane. <S> Looking from that point, square waves will dominate. <S> However if you are interested with such experiments then I will suggest you an open source alternative " Audacity ". <S> Install this software and navigate to Generate menustrip - <S> > <S> Tone and choose the right waveform of your choice while entering desired amplitude and frequency. <A> Driving a resistive load with a square wave at a particular voltage will deliver twice as much power as driving a resistive load with a sine wave of the same peak voltage. <S> A speaker, however, does not represent a resistive load; the current required to change a speaker's position quickly is much greater than what's required to change its position slowly. <S> To displace air with a perfect square wave would require an infinite amount of power(*). <S> In practice, trying to drive a speaker with a perfect square wave will result in air motion which is not a perfect square wave. <S> While the actual observed behavior will vary depending upon the type of speaker one is trying to drive, driving a speaker with a square wave of a certain peak voltage will take a lot more power than driving it with a sine wave of the same voltage and frequency, and in general the closer the speaker is able to get to a perfect square wave, the more power will be consumed in the attempt. <S> (*) <S> If air were a lossless medium, it would be possible to recover all the energy one put into the air that echos back before it is removed by something else; the power one one would have to put in would thus equal the power that other things took out. <S> In practice, though, the closer to a square wave one tries to get, the greater the losses. <S> Instantaneously moving air would require moving it with infinite force against a finite distance; a speaker would be unable to recapture much of that energy. <S> Indeed, because of the speaker's electrical resistance stopping the speaker quickly would likely require pushing more energy into the speaker, rather than passively recovering energy from it. <S> If one's objective is to achieve the maximum perceived with a given available voltage, using a square wave or sawtooth wave would be a good way to do that. <S> If the objective is to receive the maximum perceived loudness for a given amount of power consumed, other waveforms may be better (which waveforms are best depends upon the designs of the speaker and the driver circuit).
The square wave will be more audible.
Purpose of these two transistors Hi does anybody know what's the purpose of the Q1 and Q2 transistors,sounds to me like they are constant current sources. Am I wrong? Could somebody explain me the purpose of those Q1 and Q2 transistor configuration there? Note, This is a simple preamp circuit. <Q> They act like a diode to bias the output transistor bases. <S> They are like a Vbe multiplier (also known as a rubber diode - see here ) without the multiplication (i.e R1 0Ω, R2 infinite in the diagram below), so the drop is ~0.6V. <S> Note the input is at the upper side, so <S> one ~2*Vbe multiplier (~1.4V, depending on desired bias)) can be used. <S> In your circuit it's in the middle, so you need 2 drops each of around 0.6V. <A> Q1/Q2 are transistors configured as diodes. <S> Which drive the bases of Q3/Q4 (respectively) with a Vf offset that is + <S> Vf/-Vf from pin 1 of IC1. <S> This would be an class AB amplifier and the offset bias provided by Q1/Q2 reduces the shoot through current and isolates Q3/ base from q4 base. <S> THe feedback for the amplifier is after the amplification provided by Q3/Q4 which will correct for the overlap distortion. <S> the output will swing to within a Vce of each rail. <A> Q1/Q2 's main purpose is temperature compensation of Vbe of the output drivers. <S> In order for this to work effectively, they must be connected to a common heatsink. <S> so the diode drops cancel out within 1% and prevent thermal runaway. <S> = added = <S> To prevent thermal runaway with the Q3 & Q4 becoming biased at the same time, you want the DC base current constant over temperature and supply variations. <S> We know Vbe has a NTC or negative temperature coefficient, so Vbe drops with rising T so a fixed voltage bias would result more DC emitter current which may increase T and thus a positive feedback thermal loop called runaway. <S> Hence the diodes Q1/Q2 will produce a similar voltage to Q3/Q4 as a function of temperature. <S> The differences include the ESR of Vbe and the junction temperatures. <S> ( Q1 vs Q3 & Q2 vs Q4 ) Ideal circuit design will minimize these differences. <S> The self-destructive runaway can get triggered by low headphone resistance at high volume levels causing thermal rise but be ok otherwise. <S> The output current limiting resistor is designed to reduce that risk. <S> Given that the Q3/Q4 also has an emitter resistor, the risk for thermal runaway is also lowered but the amount of crossover distortion is increased with frequency due to reduction in loop gain.
In a class AB or class B amp they are often used to provide a trimmable ~2*Vbe drop to bias the output transistors: The other answers are also correct but the main purpose is to prevent thermal runaway with compensation.
Classic essays on electrical and general engineering I tutor English language and literature. I sometimes find that tutees are really keen on engineering, tech and so on, and find analysing the more traditional texts intimidating (I mean Shakespeare and so on). I know there are classic essays on computing, and it occurred to me that the same might be true of electrical engineering and engineering in general. Classic books would be equally valid. Can anyone suggest such a thing? Many thanks. <Q> I think it's an excellent question <S> but I'm trying to think of something undeniably "classic" that wouldn't be too intimidating in a technical sense ( <S> e.g. Faraday's equations, Shockleys transistor patent , etc) <S> As far as readable/inspiring goes, I think many of the articles written by people like Jim Williams, Bob Pease might be worth looking at. <S> "Analog Circuit Design: <S> Art, Science and Personalities" is a non-too-technical collection of stories written by many top electrical engineers (including the above mentioned Jim Williams) <S> Also, a story based around a major engineering achievement may be worth looking at, for instance the Apollo missions and moon landing - "Apollo: <S> The race to the moon" apparently focuses on the team/engineering perspective. <A> Vitruvius, Ten Books of Architecture, is something that I heavily reference when teaching about failure modes. <S> Parts of it are good reads. <A> It's a 4 volume collection of mainly classical texts not only about mathematics but also about philosophy, physics and some more practical topics (like "How to hunt a submarine"). <S> It contains texts from John von Neuman, Alan M. Turing, Claude Shannon, Aldous Huxley, Lewis Carrol, Isaac Newton, Albert Einstein etc. <A> "The Existential pleasures of engineering" 2nd ed. <S> by Samuel C. Florman <S> ISBN 0-312-14104-1Not about specific fields but about the general approach. <S> Amazon <S> Here <S> "A deeply insightful and refreshingly unique text, this book corrects the myth that engineering is cold and passionless... " <A> These are slightly off-topic, but are sciencey and classic. <S> Origin of Species - Charles Darwin. <S> Death and Life of Great American Cities - Jane Jacobs <S> Almost anything by Stephen Jay Gould, Richard Feynman. <A> Experiments with Alternate Currents of High Potential and High Frequency by Nikola Tesla, and its available for free in iBooks.
I guess you will find a lot of texts you are looking for in "The World of Mathematics" by James R. Newman (editor) .
Solutions for implementing a USB Mass Storage Device I'm trying to figure out a convenient way with which a PC can configure an embedded system. The PC will have a custom app. written that can 'talk' to the embedded uC and configure the various settings and upload some data to it (~ 500 KB). The advantage of this approach is it's simplicity. My initial thought was to go with a UART to USB bridge and take it from there. However, I'm now considering implementing a usb mass storage device instead. The advantage is that the end-user can simply drag and drop a file which contains the data and the configuration settings. The board will have a flash memory IC of appropriate size mounted on it. The uC will be a low-end STM32 (I have not decided on a specific chip yet). Since the file will have to be in a specific format for the embedded system, I believe I'll still have to write a custom app. for the PC to write that file from the settings provided by the end-user. This isn't overly difficult. But what I'm confused about is, how do I mount the flash memory as a FAT disk on the PC? Are there any integrated solutions - perhaps a flash memory which talks to USB directly? NOTE: I know about LUFA for the AVR. However, I'm not yet sure if I'll be able to use an AVR as I also have to drive a 800x400 RGB display. As a test, I did drive the display using an AVR running at 8 MHz. The update rate was slower than I'd like. <Q> Lookup forebrain code examples, they use NXP <S> LPC1343 chip that has USB mass storage drivers in ROM <S> (so you can program the chip via drag and drop). <S> Forebrain have example where they use internal ROM driver to present an EEPROM chip or simply just piece of RAM as mass storage device. <S> They are closed source, but this gives the idea of how it could be implemented. <S> In general, you have to implement specific USB mass storage driver hooks. <S> There is no need to make config file in any special format as you could implement FAT system on your chip so it accesses flash memory as FAT filesystem. <S> You can lookup any SD card reading/ <S> writing example for popular microcontrollers - <S> some use low level, some implement FAT. <S> Particulary - this one for LPC1343 implements FAT over SD card: https://github.com/Miceuz/LPC1343CodeBase/tree/master/drivers/fatfs BTW, have you considered an option to put configuration into a file on SD card? <S> You would have loads of ready made code and examples for broad range of MCUs for that. <S> Config process would involve extracting SD card from device and putting it into computer though. <A> /UART interface to communicate with the device. <S> If there are pre-configured files (or files previously configured by the user) for the device, the user can just drag one of them and drop it onto your application, at which point, the application reads the file and sends the data to the device through whatever proprietary interface you come up with. <S> Implementing a USB mass-storage interface <S> just so you can get a drag-and-drop UI "by default <S> " seems like the wrong way to approach this. <A> I'd say go for the USB Mass Storage approach. <S> The benefit here is two fold. <S> 1.) <S> You can have people field update the device, without the configuration program, just by plugging it into a computer. <S> You could push custom updates out to people without having to implement the features in the software, test the software, etc. <S> 2.) <S> You can have your configuration software programmatically delete and re-upload the configuration file as if the device was a local drive. <S> This means you don't have to implement a block-level protocol on top of your UART line. <S> That saves you time. <S> I've been doing research into the same sort of approach for firmware updates in the field, and here's how most of the USB bootloaders typically work: <S> install USB bootloader into top 64KB of flash bottom 448kb <S> (in my case, 512kb flash) is mapped for storage on reset, if a certain GPIO is held high for 2 seconds, go into programming mode programming mode = enumerate as USB mass storage device drag and drop your firmware binary file once transferred, reset new firmware loads up <S> I haven't investigated this far, but: I could picture a bootloader when depending on the name of the file being added, it either goes into flash or EEPROM. <S> You could then drag-and-drop not only firmware to allow field updating and but allow configuration files to be dragged-and-dropped directly to EEPROM, essentially. <S> Just some food for thought. :)
As long as you have to have a custom application running on the PC anyway, there's no reason you can't implement a drag-and-drop user interface paradigm while still using the USB
How do I protect power out connector from having power in connected to it? I'm building an adapter for rotary encoder that reads input of encoder and sends pulses by RS485. I'm using two RJ-45 connectors to provide power both for adapter and encoder. Both connectors have the same pinout. The right side connector receives 12V, theres linear regulator on board that powers RS485 transmitter/receiver chips and encoder. I want to make some protection mechanism that would prevent failure when user connects 12V cable to output (left side) connector. Indication LED about wrong connection would be bonus. All I was able to come up is a mosfet Q1 that has it's gate tied to +12V and 5V zener diode in series with resistor and "wrong connection" led. Could someone advice me on more elegant/better way to do it? <Q> Using different connectors for different purposes is the best option. <A> Why not use a crowbar on VCC? <S> The zener diode activates the SCR which is then like having a short across VCC and GND. <S> It'll keep your circuit protected. <S> If your power supply can't handle it you can always add a fuse. <S> Here's a link to a page about them <S> http://axotron.se/index_en.php?page=26 <S> We used this one time when we had software people who were always plugging 48V supplies into our 5V eval boards! <S> We didn't control the connector barrels <S> either so <S> instead we used a crow bar plus a tiny fuse with a mechanical arm. <S> We called it the FU circuit for obvious reasons ;) <A> You're MOSFET doesn't seem to be doing anything useful. <S> Is it connected to the shield pins of the RJ45? <S> I would just get rid of it. <S> You really need the blocking diode on the output side of the 7805, not the input side. <S> 78xx-series regulators really do not like to be back-driven. <S> That, plus your "wrong connection indicator" circuit, should be all you need. <A> To complement Dave Tweed's response, since he has multiple chips on the board they would also need to be protected. <S> If it was just the regulator then he's only need two diodes. <S> I think this would work. <S> What do you think?
It's bad practice to use the same type of connector in an application for different purposes, especially if plugging into the wrong connector can have adverse consequences. Whenever someone plugged the wrong voltage in the crow bar would activate, blow the fuse, and the little arm would flick up and activate a warning led. To compensate for the diode's forward voltage drop in normal operation, you could put a similar diode in series with the 7805's ground pin.
Is this a serial LCD? I had a broken remote for a small RC helicopter that I took the LCD off. I dont know the size, but I could try to describe the pins and maybe someone could pinpoint what this is. It has 7 pins, and from the top it is labeled: BZB (not used) BZ (not used) VDD GND DATA WR CS LED- LED+ Just a serial screen? And what are the WR/CS/LED-/+ pins? Thought I could try to hook it up to my Raspberry PI laters if possible. <Q> Seems like it: <S> WR is probably a write enable <S> Oh <S> and since there's no clock signal <S> Maybe try that first messing around with the baud rate until you get some garbage or a character to show up. <S> Like sending 0x01 clear or something like that. <A> It looks like a Serial LCD, yes. <S> For the pinout, this is not absolutely certain, but: DATA = <S> Data <S> In WR <S> = Write data strobe (i.e. data clock in) <S> CS = <S> Chip Select - hold <S> either high/low (depending on logic polarity) to enable. <S> LED + = <S> Backlight LED anode LED - = <S> Backlight LED cathode <A> I have this same LCD, while not being able to get it working with an arduino, i found that the controller sends a clock like (High, Low, High, Low etc..) signal to both the WR and CS pins. <S> I got this from loading the analog read serial sketch to my arduino and then probing the pins. <S> With help from the sketch of greynomad Click <S> Here <S> i found that the controller sends signals at 115200 Baud. <S> Hope this helps!
DATA is probably your input serial data line CS seems like a chip select for the control to me LED- and LED+ are the power and gnd for the backlight it's probably a uart interface like a RS232 (probably not at RS232 voltage levels though). There's probably also single character commands to clear the LCD which you can figure out by trying.
What microcontroller can connect directly to a USB port? Essentially, I just need to send some data to the microcontroller via USB, then the microprocessor decodes the data and drives an LED light strip, which runs at 5V. I'm having trouble finding the right microcontroller for the job. The microcontroller just needs to have 2 serial in ports for USB communication, two serial out ports for communication with the LED strip, and be able to operate at 5V. It seems unnecessary to have a dedicated IC for USB communication when all I need is a serial COM port set up. For example, here is the snippet of Arduino code that writes a byte to the LPD8806 strip: void write8(uint8_t d) { for (uint8_t i=0; i<8; i++) { if (d & _BV(7-i)) digitalWrite(dataPin, HIGH); else digitalWrite(dataPin, LOW); digitalWrite(clockPin, HIGH); digitalWrite(clockPin, LOW); }} To latch the data you send zeros to the strip. <Q> I guess that by "two serial out ports" you mean one UART (since you also describe USB as 2 ports). <S> Rocketmagmet indicates that many/most LED strings use SPI, but that will need at least 3 wires. <S> Can you specify which protocol you need? <S> In general Microchip has the lowest cost microcontrollers, also this time. <S> And Microchip has many microcontrollers in DIL package as well, while many others have ditched that. <S> May be important for DIY. <S> The PIC18F13K50 exists in both DIL-20 <S> and SMT packages <S> works at 5 V (for interfacing with the LED strip) <S> is low cost at $2.5 <S> (OK, that's relative, but USB able controllers are a bit more expensive than more basic types) <S> has Enhanced USART for UART interface <S> has an SPI interface in case <S> you meant that has 25 mA source and sink <S> I/ <S> O, so you can directly drive a couple of indicator LEDs if needed <S> Further reading USB Generic Function on an Embedded Device , Microchip Application Note AN1166 <A> Your LED strip has a simple serial interface. <S> If you are just trying to control it with a computer, you can use a FTDI chip to wiggle the pins: http://www.ftdichip.com/Products/ICs/FT232R.htm <S> Then the complexity is on the PC side using libftdi or D2XX libraries. <S> But it's not too bad, similar complexity to your Arduino example. <S> Cables are available in different voltage configurations, so order carefully. <S> Of course, if you want the project to be standalone or autonomous somehow, you will want a full microcontroller solution. <A> Consider using the PSoC3 . <S> They are available with USB, and almost any peripherals you want. <S> (They are configured in software) <S> You'll certainly be able to have two serial ports for the LED strips. <S> You'll probably be able to have 20 if you want. <S> The development environment is also a joy to use. <A> It cannot get simpler than this: <S> ATmega8U2 . <S> To top it off, you can even use that with Arduino bootloader... <S> Datasheet: http://www.atmel.com/Images/doc7799.pdf <S> (sorry for being a bit concise, I'm typing from phone)
If you don't feel like making hardware, you can purchase premade cables with the FTDI chip from FTDI distributors like Mouser, or from Sparkfun etc.
Why don't gas pumps spark and explode? What Electrostatic Discharge (ESD) protections exist in the gas pumps at gas stations? I believe that here more than ever even one spark is intolerable. How can a it be assured that there is never any potential difference between a car and the gas pump that would cause voltage to arc from the gas tank to the pump when inserting the hose? <Q> photos here <S> A sign that tells you how to to behave is the only obvious protection I can see, though maybe there's hidden stuff behind the scenes. <S> Personally, I think some sort of affordance that forces users to touch a grounded piece of metal before pumping would help a bunch. <S> In the olden days, we'd always have to flip some form of mechanical lever to enable the pump and reset the price tally from the person who pumped before us, so this is probably doable. <S> I think a flame detector in the pump handle that cut off the gas flow might prove useful, too. <S> The really bad accidents occur when the fumes flash over and somebody panics and removes the still-pumping handle. <S> At many of the gas stations I've used, they remove the clip that keeps the handle pressed down, so you're forced to hold on to the handle to keep pumping gas. <S> It puts an end to the messing around to build up static, but I don't like this approach. <S> Instead of making me hold down the handle, it just encourages me to use other gas stations that leave the retention clips in place. <A> Basically it's because everything is static dissipative. <S> i.e. conductive, but not highly so, but sufficient to ensure that any charge gets bled off. <S> Even the concrete being poured is slightly conductive. <S> This reminds me of a homework question in EM theory that talks about the need to have ground clamps on aircraft whilst pumping fuel because of the charge build up from fuel in the hose being ionized (from gamma rays etc.) <S> on the way to the plane and thus pumping charge into the plane. <S> When the nozzle is removed you get a spark. <A> Not to say it doesn't happen, of course, but the problem may not be as serious as you think. <S> An explosion only happens if the fuel/air mixture is just right, which isn't that common at gas stations, or we'd hear about a lot more explosions. <S> Instead of trying to ground the car, the pump, and the user without creating a spark near the pump, a better approach might be to have some sort of sensor that sounds an alarm in the presence of dangerously high concentrations of gasoline fumes in the air. <A> I am of an understanding there is a Ground wire in the delivery hose. <S> Much the same as the cable found in washing machine fill hoses. <S> I have seen people smoking while pumping gas, to read the "No Smoking" sign. <S> Remove the cigarette from their mouth, and discard it in a puddle of spilled gas.
A static danger does exist while filling a gasoline container, so a warning sign is posted at the pump island, to place the container on the cement or a specifically designed holder. In fact, they do spark and explode!
Circuit with switching MOSFET not working I have this circuit built (updated to remove short-circuit): I'm experiencing some weird behavior though that I don't understand. 1. When I close the switch, nothing happens. No current flows through the MOSFET, according to the Ammeter. 2. If I disconnect the ground of the Arduino from the negative terminal of the power supply, current flows through the MOSFET, even when the switch isn't closed! Have I hooked this up incorrectly? Why is the MOSFET letting current through? Any ideas? Note: Data Sheet for MOSFET Note 2: When I use this exact setup but replace the 12V power supply with a battery, and the component with a resistor and an LED, it works fine. <Q> For starters, you seem to be shorting the "Arduino Digital Output" to ground whenever you close the switch (push the pushbutton). <S> Secondly, the n-mos is not connected properly, it should be placed with its source to ground and its drain to the load. <S> The ammeter should also be on the high side, not the low side, because it interferes with the Vgs being applied. <S> Thirdly (some may put this as first in priority), when you put a voltage source in your schematic, don't place it upside down because it obfuscates the schematic (I wish the "rotate" tool in schematic entry programs was disabled in such cases). <A> Your input to the gate is grounded out. <A> Since you're using a N-channel device, your circuit is forward-biasing it, so it conducts. <S> The only time it's not "there" is if the MOSFET is biased on and it's shunted by the conductive channel (i.e. current will flow through the channel instead of the diode). <S> Look closely at page 1 of your datasheet and you'll see the diode in the schematic symbol. <S> Look closely at page 2 of your datasheet and you'll see a section entitled "Drain-Source Diode Characteristics and Maximum Ratings".
The gate needs a 10k resister to ground, this is why it won't work... The MOSFET conducts because there's an intrinsic diode between source and drain.
Driving 50W-250W ultrasonic transducers with sine: Any Class B 135KHz monolithic power amp ICs? My project needs to drive a medium power ultrasonic piezoelectric transducer from a sine wave ( / sawtooth ) sweep generator that sweeps +/- 2% of the transducer resonant frequency. The question: What are my simplest options for driving these transducers from a DDS generated shaped signal, with reasonably low distortion (5-10%)? Use a power amplifier IC off a higher voltage rail, with lots of heat sinking, to directly drive the transducer Use a power amplifier IC, then (?) a transistor current amplification stage, then an appropriate (need help identifying) step-up transformer to drive the transducer Use some sort of (need help identifying) class D high power amplifier IC that would not need much heat sinking ( Edit: Not a solution, see Note 7 ). Some other option entirely Edit: From suggestion below Identify an off the shelf OEM amplifier module that meets the parameters and constraints. UPDATE: [15-Oct-2012] Option 5 above seems best answer, if a suitable OEM module or two could be pointed out - None found in my research so far. Hence leaving question open. The sweep waveform generation is through a DDS IC, AD9850, Datasheet here: AD9850 CMOS 125 MHz Complete DDS Synthesizer One of the transducers available to me: 5938D-25LBPZT-4 ( Ultrasonic Langevin Transducers ) Resonant frequency: 25 KHz Resonant impedance: 10-20 Ohms Capacitance: 5400 pf +/-10% Input power: 60W Datasheet: I wish I could find one! The transducer would change case to case, from 20KHz to 135KHz, each in the 50-250 watt range, similar in design to the one above. The driver designs I have seen for these transducers typically use switching i.e. square waves to drive them, MOSFET driven, with Vpp 100v in some cases! ( Do these devices even need that kind of voltage? Edit: Evidently so) Some drivers use tuned filters to shape the waveform to a sine or approximation thereof. This does not work for my purposes, unfortunately - The project is a single device that would first detect the resonant frequencies of an attached transducer across the full range 20-135KHz, then sweep around each resonant frequency with first a sine wave, ( Edit: Removing this requirement as unfeasible: then a sawtooth signal, ) at a specified power output, usually around half the rated power of the transducer. So what I am looking for is the wisdom of this community in suggesting a suitable prototype-friendly approach to getting those DDS waveforms over to the transducer. Thank you all! Added some notes based on comments and responses received: Waveform accuracy is not super-critical, 5% distortion is very acceptable. Thermal issues and power wastage through dissipation in the amplifier stage are bigger concerns. Cost is a key concern, at least until past the prototype stage. It has been suggested that prebuilt OEM amplifier modules that suit the requirements might be my best bet. While that does appeal, I am still hoping for alternatives in addition to, and examination of, the options I have proposed in my question, hence not marking the answer accepted, yet. Not found any OEM module online yet which covers a 20KHz to 135KHz frequency range, even for 50 watt output. The one suggested in a response is designed for 3.5KHz, and its switching frequency is 100KHz. ( Dropped this requirement: Also, wouldn't I require bandwidth much higher than that, to handle a sawtooth wave with even cursory accuracy? I might have to skip the sawtooth requirement, and constrain my question to sine waves, if the sawtooth or other arbitrary waveform delivery is seen by respondents as unattainable at reasonable cost. ) New Suggested approach is a Class B with feedback. Caveat mentioned is high dissipation at this amplifier stage. So two adjuncts to my question: Is there a monolithic Class B amplifier IC that might cover the desired frequency range (20KHz to 135KHz, giving up on the sawtooth wave) and power requirements (50 watts max)? What is the range of heat dissipation expected at such a class B stage, as a percentage of expected power delivery to transducer? New About Class D amplifiers, monolithic or OEM: They would need to use switching frequencies of the order of 800KHz or higher, to support a 100-135KHz sine wave with reasonable THD. For a 5% distortion requirement, the switching frequency must be even higher. Such high switching frequency Class D power amplifiers do not seem to exist. <Q> Try these linear amplifiers made by Apex . <S> They are designed specifically for ultrasound aplications. <A> In many ultrasonics applications you really will need to work with potential differences in excess of 100V to deliver sufficient acoustic power to the medium. <S> This is due to the fairly low impedance the transducers present electrically. <S> Predicting how much voltage you need to achieve a set acoustic pressure however is next to impossible as the transfer functions are non-trivial. <S> Many ultrasound applications are not terribly concerned with the excitation waveform. <S> This is the reason why many power amplifier stages are very simple push-pull configurations giving a square wave output. <S> Their advantage is two-fold: they can be driven easily from low-voltage signal generation circuits, and they dissipate very little power in the switching elements which is a common design constraint. <S> (Due to the fact that ultrasound transducers are fairly narrow-band, the energy dissipation is shifted to the cable and transducer. <S> Often cooling the transducer is much easier.) <S> In situations where signal waveform is important, the power amplifier stages I encountered in the past were generally class B push-pull configurations with negative feedback to avoid crossover distortion fed from high-voltage rails. <S> It sounds to me that this would be the way to go in your situation. <S> Note: there will be non-negligible power dissipated in your switching elements. <A> I think the Piezo Systems EPA-104-115 fits all your criteria except for the low-cost criteria. <S> It costs $2,639. <S> The AA Lab Systems <S> A-301HS may also fit and is probably as cheap as you'll find. <S> I saw one on ebay for $975. <S> Searching for <S> piezo driver or piezo linear amplifier <S> didn't turn up anything more affordable in my search, but feel free to double check yourself. <S> You might also want to read this paper written by a lab that built a less expensive driver for their piezo actuators. <S> Unfortunately their driver is in the 1kHz range <S> but they end by suggesting some methods that might get the kHz up. <S> On the other hand, they say they aren't sure where to get parts that could handle higher frequencies, but it may be a helpful read to understand what makes higher frequencies difficult and could lead toward a solution with some perseverance. <A> First of all, yes, you will need voltages on the order of 100V peak (70.7V RMS) to drive 250W into 20Ω. <S> It may even be the way to go for production, as well. <S> Be sure to select a unit that can deal with the capacitive load. <S> Here is one example. <S> Interestingly, I find that audio power amplifier modules these days are almost exclusively class-D, with the bandwith limited to 10s of kHz. <S> When I last looked at these some years ago, they were class-AB and had bandwidths of 100s of kHz. <S> Be sure to include "piezo" or "ultrasonic" in your search terms. <A> I would observe that a standard piezo or piezo composite transducer has a bandwidth of maybe 20% or so (Possibly an octave with a fairly hardcore matching network for tuning), there is a reason everyone does square wave drive, and it is that the transducers just do not have enough bandwidth to reproduce anything <S> other then a sine wave, it literally does not matter what the drive waveform is the transducer will bandpass it into a sine wave.... <S> Further even within that bandwidth the group delay varies widely,to the point that even putting a reasonably square multi cycle pulse into the water is difficult enough that Paul Doust used to use it as a party trick demo (As in a squareish burst of sine waves). <S> I would suggest that whatever you do, a modest (few ohms or so) power resistor in series with the amplifier output would be a good idea to help phase margin. <S> There are audio amps what will do what you want, but cheap? <S> Not so much, and as I say a H bridge is all you really need because of the transducer limitations <S> (The exception is multiple tones within the available bandwidth where intermod can be an issue). <S> Class D with GaN might be an option <S> but nobody really has product yet. <S> Regards, Dan.
You can purchase OEM power amplifier modules that cover the power and frequency range you're interested in; this is probably your best bet in terms of getting the prototype operating quickly with low design risk.
Is unshielded untwisted pair cabling fine for audio? Noob here just trying to work out if there's much difference between the various types of cabling for use in connecting amps to speakers. I have unshielded untwisted pair cabling here at the moment. <Q> For the connection to the speakers it's fine, for connecting audio sources to the amp's input it's not. <S> For shielding this will be obvious. <S> Twisting requires some imagination. <S> Suppose a magnetic field, for instance from a motor, may induce a current in the wires, depending on the field's direction. <S> Here the currents are induced counterclockwise. <S> In the left twist that's to the right for the red wire. <S> But half a twist further the red wire is at the top and a counterclockwise current will go to the left, cancelling the current induced in the other half twist. <S> Why doesn't a speaker's cable need the shielding or twisting? <S> The susceptibility depends on the cable's impedance: a low impedance like a speaker (8 Ω) will take all the energy out of the noise, neutralizing it. <S> A 100 nA induced noise current would give you 4.7 mV noise across a 47 kΩ input impedance, but that same 100 nA is <S> less than 1 µV worth in the 8 Ω speaker. <S> On top of that: a speaker's signal has a much higher level than the input signal, so the noise will be relatively lower. <S> The most important for a speaker cable is <S> it's low resistance. <S> don't use thin signal wires. <S> When you go shopping for speaker cable you'll see OFC cables, for Oxygen-Free Copper. <S> The seller will tell you that it sounds better, and it will only cost you up to 100 dollar per meter(!). <S> If you want to be swindled you definitely have to buy it. <S> Purists will claim they hear the difference, but that is absolutely impossible . <S> Nobody <S> in a double-blind test could ever tell the 100 dollar OCF cable from an average 2 dollar cable. <S> And it will never happen either. <S> Pick a cable with a polarity indication, so that you're sure you connect both left and right speakers with the same polarity. <A> If you ever look at the types of wire that amplifier and speaker manufacturers use inside their products for the speaker connections, you'll realize why all those fancy interconnect cables are a complete waste of money. <S> The only important parameter for speaker wire is that it has low enough resistance to transfer the power effectively. <S> I still feel that if you're running a moderate- to high-power system, the best "bang for the buck" can be had by going to your local hardware store and purchasing AWG12 2-conductor rubber-jacketed power cord. <S> Usually the cheapest way to get it is to buy a heavy-duty power extension cord and cut the ends off. <S> That's why all the speaker cables I use in my music concert PA system are bright orange! :-) <A> Witnessed a System with Parallel wire (Zip Cord) in a home where the receiver and all electronics were unplugged and removed or un-wired from the speaker wires and yet the speakers were clear as a bell still working. <S> While the volume was very low, the home owner was distressed as they could always hear it. <S> Why? <S> Well because the home was wired with UN-Twisted speaker wire and the AM radio station in town was being received by the long wire antenna (Speaker Wire) and transduced in the speakers. <S> So <S> yes ALL Speaker/Audio wire should be Twisted.
Both shielding and twisting's purpose is to keep noise from your signal. Speaker Cable should always be twisted.
FTDI Chip to Serial port I am wondering if I have the right idea. I need to connect my computer to my servers serial port for some debugging, I have no other computers that have serial ports but I have FTDI serial boards for programming some arduinos. If I connect the pins of the FTDI board to a DB-9 connector and Cross the Tx<->Rx will that work? <Q> Beware that there are several versions of USB / SERIAL adapters. <S> The standard type , and the kind you want for connection to your server's D-Sub 9 connector, will be one that comes already with its own D-Sub 9 connector. <S> These have an internal FTDI chip that converts from USB to a serial logic level signal and then an RS232 transceiver part that converts the logic level serial over to the +/- <S> bipolar signalling used by the standard serial port. <S> A really convenient type of null modem adapter for this use looks like this: <S> The other type of FTDI USB to serial adapter is one that does not include the RS232 transceiver chip. <S> These bring out the logic level serial lines so that they can be connected directly to a microcontroller or other circuit. <S> It alleviates the need to put standard RS232 transceivers for a debug port or programming port on MCU hardware to save space and cost whilst at the same time when the usage model is for very short cabling lengths. <S> One example of this type of FTDI adapter looks like this: Note that is not possible to try to use a logic level serial adapter to "talk" to the standard RS232 port off your server. <S> The voltage levels do not match and the logic level signals are logically inverted from standard RS232 signals. <S> (i.e. the RS232 transceiver parts have a logical inversion through the part). <A> It may depend on whether the server serial port uses hardware flow control. <S> For a proper null-modem connection a few of the pins have to be swapped: <S> If no hardware flow control, then just connect pins 2,3 and 5, with 2 and 3 crossed over appropriately, and no other pins connected. <S> If that doesn't work it may have flow control, and jumpering pin 4 to pin 6 as well might work. <A> You mention Arduino, and that led me to assume that your computer is a microcontroller where you have access to the <S> I/Os. <S> In that case this is a possible solution. <S> This breakout board has connections for TxD and RxD, which you simply connect to the same pins on your microcontroller. <S> Check the I/O voltage; default the board is wired for 3.3 V <S> but you can change that to 5 V . <S> geometrikal mentions modem control signals, but there are very few microcontrollers out there which have a full modem implementation; for most it's just TxD and RxD. If you would need the control signals as well though, you can find them on the two rows of connections at both sides of the breakout board. <S> If you don't have access to the controller's I/ <S> O you have to do it with the 9-pin DB-9 connector. <S> FTDI, a.o., has products which interface your USB to EIA-232 as well: <S> The Chipi-X contains a USB-to-UART bridge like I described above, followed by a level shifter to convert the UART signals to EIA-232 levels. <A> These boards are great for connecting any sort of equipment with serial ports to a computer that has only USB ports. <S> Just solder on whatever cable and pinout you need. <S> And you're already familiar with the drivers for the FTDI chips inside. <S> There are options for RS-232 voltage levels, RS-232 signalling in 5V TTL, 3V TTL, as well as <S> RS-422 and RS-485. <S> They're available from most distributors including Digikey, Mouser, and Newark. <S> In my experience, Newark has been the cheapest source.
You will most likely need a null modem adapter between the USB/SERIAL adapter and the server computer serial port connector.
What is the origin of on and off power switch symbol? I know I (line) and O (circle) symbols are used to specify a switch that turn on and off the power supply. My question is What is its origin? Because I thought that it represent a power line that can be plugged (on symbol) and a closed line (and thus without power supply) but seen that in Wikipedia said that it can come from 1 and 0 used in binary to represent on and off bits, I don't know what is the correct answer. Note: In Wikipedia, it didn't have verified sources, so I need other source. <Q> I'm pretty sure it comes from the binary 1 (on) and 0 (off) <S> It's an IEC standard symbol, the on symbol is IEC-5007 and the off symbol is IEC-5008 The full standard document they come from is IEC 60417, which you have to pay for, but here is a small reference document with just the power symbols reproduced. <A> I never understood the symbols to be representative of binary 0 and 1, just that the circle disconnected the circuit and prevented current flow and the line allowed current flow. <S> I'm not sure I believe these symbols are representative of binary numbers. <S> Yes, they are an IEC standard, but how the IEC came up with these symbols still seems to be a mystery, and I wasn't able to pull up any sources with a cursory Google search. <S> Using binary doesn't make sense to me personally - 0 in binary is not defined as "off", its just 0. <S> You can have active low signals that are binary 0 but considered "on". <A> the power switch symbol with the 1 and 0 overlay-ed indicate a toggle switch as opposed to a rocker switch that would have the 1 and 0 separated. <S> EDIT: http://energy.lbl.gov/controls/overview/docs/symbols1.pdf <A> The origin of the word "On" in itself is a marvelOsiris was the light referred to as "On" in prayer in the land of Khemet where the science of Alchemy originates. <S> As most of the original inventors of the modern age where practicing alchemists or initiates I would search for answers there. <S> Look for corresponding alchemical symbols and early electrical ones. <A> A Certified Master electrician <S> I know first explained this to me years ago. <S> According to him the off symbol "0" represents an uninterrupted electrical circuit (circle), that has electricity traveling from the power source through the wiring in a continuous loop <S> Once a device's switch is turned on the electrical current flows, more or less, from the power source to the device in a straight line; which explains the "1" symbol. <S> Actually, more often than not, the symbol used is..."l"
Binary uses 1's and 0's for on's and off's to represent the switches that would be on and off in mechanical relay systems.
Is a switch considered an active component? Most of the definitions of "active" components that I have found define them as components able to control current flow. A switch fits this definition, but I am just curious to see opinions on this. <Q> A switch is a passive component. <S> The main difference between active and passive, is that active components require a power source to perform their function, i.e. using electricity to control electricity as in a transistor. <S> They can be a source of power in the circuit or provide an electrical switching function. <S> They can provide amplification, whereas a passive component cannot. <S> So Valves(Tubes) <S> , Transistors, SCRs, LEDs, Diodes, ICs, etc are all active devices. <S> Passive devices are things like Resistors, Capacitors, Inductors, Transformers, Thermistor, Speaker, Microphone, etc. <S> To be honest I think the definition is a bit muddy, and I've never seen a formal definition that satisfies me completely, but the above is the usual sort of answer. <S> For example, take the diode - this often causes a bit of debate on how it should be classified (I think it probably has to be an active device) <S> Either way I think it doesn't really matter much as long as you get the general idea. <A> A switch would be considered an electromechanical device. <S> Active components are semiconductors (diodes, transistors, ICs), and things like vacuum tubes. <S> Passives include resistors, capacitors, inductors Electromechanical includes switches, connectors, circuit breakers <A> A difficult one, switches are passive since they do not require an external power source to cause change in the flow of energy. <S> However I do feel the term switch and relay have been interchanged far too often. <S> A lot of switches require external power in order to throw the switch into a position. <S> Switches can also be tricky to define because even if an external power source is required to switch poles it in most cases is not required to be continuous. <S> Thus making the switch passive. <S> So if you remove external power and the switch becomes open it is in fact a relay. <S> if you remove external power and still have the same output it is a switch. <S> In any case the first step in defining your component as active or passive is to make sure you define the component correctly. <S> Relay or Switch. <A> No. <S> A better description of an active components would be one with transistors (or tubes) in it. <A> A more restrictive definition would be "linear components" which excludes things like diodes or switches. <S> What you really mean by "active components" depends on context AFAICT. <S> For example, the rated lifetime of most electrolytic capacitors is much shorter than the rated lifetime of most transistors, so "no active components" does not mean "long MTBF."
Switches, resistors, capacitors, inductors are all passive.
robots communicating with each other Is there any possible way of designing robots that can communicate with each other? As in, one of the robot can be programmed to act as a master, while the other robot, situated somewhere else, can be programmed to act as a slave and obey the commands given by the master to him? <Q> You are basically asking how two objects/circuits can communicate with each other. <S> There are of course many ways this can be accomplished: <S> Wired communication: SPI, I2C, UART, RS-232, etc. <S> Wireless communication: 2.4Ghz, Sub-Ghz, Infrared transmission, etc. <S> Clarifying what exactly are the application of the robots, the environment, the desired distance between them, etc. <S> could help decide on a specific answer/recommendation. <A> Robots are nothing more than computers with actuators. <S> If computers can be in a master-slave relationship, then robots can be in a master-slave relationship. <A> There are many flavors of communication between robots. <S> The internet of things applies to robots as well as your standard household items. <S> You could: Build a master device that would act as a bridge or router. <S> It could use wifi on one side to communicate to the internet to receive commands or transmit data. <S> It could then on the other side have a zigbee device that would receive data and transmit instructions to the slave devices you mention. <S> But you could also setup a hive type network where the queen has a directive or directives and it uses the slaves / drones to complete the directive. <S> You could use simple IR or something like zigbee to accomplish this and not need internet connectivity. <S> Zigbee if you need a mesh network, wifi if you need bandwidth and power, or IR if you will have line of site and need a cheap solution.
It all depends on the variables as to which type of network you use.
Measuring high frequency current with Adrunio Is there a way to measure the current of a high frequency signal (100Khz) with an Ardunio? I am thinking that some form of analog circuit could be made whose input takes AC current and whose output is DC current (or voltage), and that this would be readable by any uM's analog to digital inputs. Edit: The waveform is a sine wave; the output of a chopper stepper driver. The average current is required and I don't expect more than 2 amps of current. <Q> You actually need to detect the envelope. <S> It's useful to think of this as a demodulation problem, as that's what it is! <S> Send the current through a small sense resistor that feeds a difference amplifier or instrumentation amplifier. <S> Then, feed that output through a precision full wave rectifier, followed by a low-pass filter. <S> If you don't rectify first, the low pass filter simply zeros everything out. <S> Rectifying prevents this, giving a non-zero mean that moves with amplitude. <S> Similar processing is routinely done for electromyography signals (muscle-related electrical signals) which are very AC, but most folks are interested in some average activity. <S> I've seen the rectification/low-pass arrangement called a "Paynter filter" in this particular case. <S> Filter at whatever corner frequency reliably tracks the changes you're looking for, then sample fast enough to avoid aliasing. <S> Depending on what your corner frequency is, and what filter you use, you might have some phase distortion. <S> rectifier circuit from sound.westhost.com/appnotes/an001-f4.gif <S> As an aside, I've found this circuit to be trickier to use than it should be. <S> Perhaps it needs faster diodes than I use, but a small cap across the feedback path of the first op amp seems to do wonders. <A> You don't specify what kind of signal that is, so I assume, for simplicity sake, that it does not go below microcontroller ground. <S> You must put your signal thru a resistor and use differential amplifier to measure voltage drop on this resistor. <S> Then you have to amplify output and maybe shift it (if it's signal <S> going below your arduino ground rail) using another opamp stage. <S> You can find op amps specially designed for this task, they are called current sense amplifiers. <S> But there is a problem - maximum ADC sampling frequency of atmega microcontrollers <S> is 200KHz - two times the sampled signal - <S> it's theoretically (lookup Nyquist sampling theorem ) <S> juuust enough to reconstruct the signal, but accuracy will be poor. <S> If you are interested in average of current - you can pass output of differential amplifier thru RC low pass filter and sample that. <A> See this link: http://www.analog.com/static/imported-files/tutorials/MT-081.pdf . <S> Alternatively, you could rectify the analog signal to drop any negative components and sample the analog signal yourself to compute the current value. <S> As miceauz said above, however, you will be limited by the sampling frequency of the Arduino. <S> Using the RMS-to-DC converter will forego the problems with the sampling frequency. <A> Either use a shunt resistor or a current transformer with low winding ratio (like 1:50). <S> Then rectify and filter, or simply use an RMS-chip such as AD734. <S> Or take a look at Si8501-C-S, which is an integrated circuit like the ACS712 but with a bandwidth to 500kHz.
I believe you could accomplish this with the use of an RMS-to-DC converter, which will give you the RMS current value of the analog signal input as a DC value, which can then be sampled and read by the Arduino.
How do I calculate the power rating for zero-ohm resistors? Based on my earlier question , since there supposed to be zero voltage (V=IR) drop across a 0 Ω resistor, how do we select the power rating of such a component? For example, let's say I were to connect a zero-ohm resistor in between 5 V power source and a load (circuit variant) which take current ranges from 20-200 mA. What is the power rating of the 0 Ω resistor I should select? <Q> Yageo specifies both maximum current and maximum power, see page 5 of the datasheet: <S> \$P_{max}\$ <S> : 100 mW <S> \$I_{max}\$: <S> 1 <S> A <S> and you'll also see that for the jumper <S> \$R_{max}\$: <S> 50 <S> mΩ <S> That seems inconsistent: <S> 1 A through 50 mΩ is only 50 mW, not 100 mW. <S> In these cases you have to work with the lower value: <S> 50 mW, since 100 mW would mean a 1.4 A current, which exceeds the 1 A limit. <S> EEs often scoff at the 5 % tolerance specification for the 0 Ω resistor. <S> The engineers at Yageo know that that doesn't make sense, and if you take a good look at page 2 you'll see that they don't specify 5 % for the jumper at all: <S> F = ± 1 % J = <S> ± 5 % (for Jumper ordering, use code of J) which should be read as "we use the same code for a jumper as the tolerance for other values". <S> It does not implied that the 5 % tolerance would apply to the jumper. <S> Specifying maximum power isn't silly either: the part's weight and specific thermal capacity determine that, regardless of resistance value. <A> Zero-ohm resistors don't have power ratings, but they do have current ratings. <S> You just need to select one that fits your needs. <A> A zero ohm resistor (a.k.a. jumper) is a conductor. <S> A piece of wire. <S> If a wire is asked to carry too much current for its resistivity (and other attributes), then its temperature can rise, and that can happen to the point that it damages the circuit or even starts a fire. <S> You wouldn't run small-signal hookup wire to a household socket, right? <S> The conductor has to have the appropriate load carrying capacity for the current and for the application. <S> At only 200 mA, you do not have to worry about current, if you are using bare wire. <S> According to the load capacity table in the Handbook of Electronic Tables and Formulas for American Wire Gauge , even 36 gauge wire can carry 200 mA when it's used for chassis wiring (not bundled into a cable for power transmission). <S> This is only 5 mils thick. <S> Some human hair is that thick, evidently. <S> Basically, you can use the clipped off terminal from just about any passive component as a jumper that will handle more than 200 mA. <S> 22 gauge wire is about 25 mils thick and will take 7 amps. <S> That's still thin enough to fit through 25 mil holes on a PCB, so why not use something close to that size. <S> The less resistance, the better. <S> On the other hand, anything with significantly less resistivity than the PCB traces it is soldered to is overkill. <A> Some datasheets provide a power rating for the 0Ω resistors. <S> From what I have seen, some companies use the maximum resistance value to calculate a power rating. <S> Others use the same rating value as the low ohm resistors in their product range. <S> Some will clarify that jumpers only have a current rating. <S> Other datasheets might just be wrong. <S> This jumper datasheet from Vishay for example has current and power ratings for every component: <S> This datasheet on the other hand, again from Vishay, only gives a current rating. <S> The same is true for this from NIC Components. <S> If in doubt, it's probably best to contact the manufacturer and ask them to clarify. <A> Zero Ohm resistors are basically wires, packaged in a standard resistor package, and they mainly exist for easy handling in pick an place machines. <S> Because the resistors come in a standard size package (foot print) <S> the machine can grab and hold them properly, (bend the wires to the right pitch when through hole) and place them in or on the the PCB for soldering. <S> My guess is that the power rating is more related to the package the resistor comes in, so the machines can be configured with standard component shapes. <S> Zero ohm resistors are commonly used for 'configuring' behaviour of a circuit in such a way that only a single PCB design is required to do two or more slightly differing tasks. <S> Zero ohm resistors can also be used when routing the PCB turned out to be impossible and an extra wire between two tracks is needed. <A> There is no Zero Ohm Resistor. <S> That would contradict with the laws of Physics... <S> Oooops, I mistakenly thought that even superconductors do have some resistance. <S> Thanks @stevenvh for shedding light on this fact! <S> (Though I still have a hard time accepting the fact that current can flow without inducing voltage, I need to catch up with the topic.) <S> But the rest still applies: <S> So your question is "how to calculate the power requirements of a very low resistance resistor". <S> And mystery resolved. <S> If I had to do so, I'd assume the worst case, and assume that the 0Ohm resistor has the maximum actual resistance permitted by the datasheet, and calculate with that. <S> Also, why would anyone specify a 0Ohm resistor between a driver and a load? <S> I would understand a small resistor (0.1-1Ohms) for overcurrent os short circuit protection, but for 0 Ohm resistors I can only think of some PCB layout, where two layers were not enough, and using some resistors, a "third layer" can be used for wires to jump over each other. <S> Using that however isn't a clean design in my mind...
A short piece of wire may have negligible resistance, but you can look at the resistivity: ohms per unit distance.
Are there any micro-controllers produced by companies based in the UK? The closest I've got is a company called FTDI which produces USB ASICs. Are there any micro controllers manufactured by or built for uk-based companies? If they do indeed exist, can you tell me how they compare with their better known counterparts? (PICs for example) <Q> I don't know of any Micro-controller manufacturer specifically in the UK, but under the broader umbrella of integrated circuit manufacturers, there are a small handfull. ' <S> Silicon-fen' in Scotland (think the scottish version of silicon valley) or the Cambridge and Bristol areas are where most of them are based. <S> I'm personally aware of e2v in based in Essex, who manufacture high reliability semiconductors/electronics for space and defense applications. <A> XMOS is one such company: http://www.xmos.com/ <S> The chips are actually made by TSMC in Taiwan. <A> Though NXP has a wide range of products and I'm not sure exactly which products are manufactured in Manchester. <A> You had mentioned FTDI in your question. <S> They have a programmable 16-bit MCU called the Vinculum-II. <S> This device is quite powerful and even has the specialization to be a USB host controller. <S> There is a rich array of on board hardware peripherals on the part including USB, UART, FIFO, SPI, PWM, DMA, and TIMERS. <S> This is the link to the FTDI page for the part.
According to this list , NXP (headquarters in the Netherlands) has a fab in Manchester.
How should unused I/O pins be configured on ATMega328P for lowest power consumption? I'm trying to reduce power as much as possible in an Arduino board I have created. How should the unused input pins be configured? There are a few answers ( here , here ) already for this, but I'm after something specific to the ATMega328P. Set pin to input, drive pin high to engage internal pull-up Set pin to input, drive pin low Set pin to input, external pull up Set pin to input, external pull down Set pin to output low Set pin to output high Set pin to output low, external pull down <Q> After digging through the datasheet , I found this: 14.2.6 <S> Unconnected Pins <S> Even though most of the digital inputs are disabled in the deep sleep modes as described above, floating inputs should be avoided to reduce current consumption in all other modes where the digital inputs are enabled (Reset, Active mode and Idle mode). <S> The simplest method to ensure a defined level of an unused pin, is to enable the internal pull-up. <S> In this case, the pull-up will be disabled during reset. <S> If low power consumption during reset is important, it is recommended to use an external pull-up or pull-down. <S> Connecting unused pins directly to VCC or GND is not recommended, since this may cause excessive currents if the pin is accidentally configured as an output. <S> update in relation to comment/question: <S> According to table 14-1, the pull-up resistor is only active when the the following conditions are satisfied: <S> The pin is set as input (DDxn bit is logic low) <S> PORTxn is set logic high PUD is logic low <S> The only way you'll get significant current flowing through the pull-up resistor is if the pin experiences a low level with the pull-up enabled. <S> This means either Atmel messed up badly (unlikely) or you have the pin configured as input with the pull-up enabled and the pin is somehow connected to ground. <S> Section <S> 14.2.5 <S> discusses digital input enable and sleep modes. <S> To summarize, the digital input is clamped to ground at the input of the Schmitt Trigger to prevent a floating level while in sleep mode, unless the pin is configured as an external interrupt. <S> I can't tell if digital output is disabled in sleep mode. <S> It doesn't look like it is disabled according to figure 14-2 , though I wouldn't be too surprised if it was. <S> The best bet is to use either an internal or external pull-up resistor. <A> Set pin to input, drive pin high to engage internal pull-up : I think this should read: " make input high by engaging internal pull-up ". <S> (I would use the word "drive" only if you do so actively, by means of a FET to Vcc or ground.) <S> It's clear that you want a defined level, and the pull-up takes care of that. <S> Make sure enabling the pull-up is one of the first things you do after reset. <S> That goes for I/ <S> O initialization in general. <S> The only current will be the leakage current of the NFET of the push-pull pair, and the gate leakage of the input FET. <S> Less than 1 µA: <S> OK. <S> Set pin to input, drive pin low : Not a good idea. <S> If the software goes bananas and would switch the pin to output high you're shorting the pin, damaging the PFET of the complementary pair. <S> Set pin to input, external pull up : Is the same as 1), only more expensive. <S> But has the advantage that the pull-up will always be there; you may forget to enable the internal pull-up (which is disabled by default). <S> If the I/O would accidentally switch to output low you'll have a small current drain. <S> Set pin to input, external pull down : <S> Again the cost of a resistor (yes, I know they're cheap, but cheap + unnecessary = expensive.) <S> The same current as in 3) if the pin would go to active high. <S> Set pin to output low <S> : Has a higher leakage current than when configured as input, but still below 1 µA, so nothing to worry about. <S> I would still enable the internal pull-up. <S> It won't be active with the I/O as output, but if it would accidentally be switched to input the pin wouldn't remain floating. <S> Set pin to output high : Same as 5) <S> Set pin to output low, external pull down : The pull-down resistor is an unnecessary cost: it would make an output low, which is already low. <S> But compared to 5) has the advantage that you're sure the pin won't float if unintended switched to input. <S> I would go for 1): input with internal pull-up; no external parts required. <S> In an FMEA 5) may fare better, but that depends on how high you estimate the risk that you forget to enable the internal pull-up. <S> A software design peer review should give you insurance. <A> The pins dont usually make a huge difference themselves. <S> You will see each pin has a specific function too - disable <S> the function of the pin volatile uint8_t timer2sum <S> ; // see interrupt handlervoid Initialize(){ // configure pin for output DDR_LED <S> |= LED; // set Power Reduction Register <S> PRR = <S> (1<<PRTWI) <S> // turn off TWI | (1<<PRTIM0) // <S> turn off Timer/Counter0 | (1<<PRTIM1) <S> // <S> turn off <S> Timer/Counter1 <S> (leave Timer/Counter2 on) | (1<<PRSPI) <S> // turn off <S> SPI | (1<<PRUSART0) <S> // <S> turn off USART <S> (will turn on again when reset) | (1<<PRADC); // <S> turn off <S> ADC // <S> select POWER SAVE mode for sleeping, which allows Timer/Counter2 to wake us up set_sleep_mode(SLEEP_MODE_PWR_SAVE); // <S> configure <S> Timer/Counter2 to wake us up as infrequently as possible <S> TCCR2B <S> |= (1<<CS22 <S> ) | (1<<CS21) | (1<<CS20); // clock at 14400 Hz TIMSK2 <S> |= <S> (1<<TOIE2) <S> ; // interrupt on overflow, 56.25 Hz timer2sum = 0; // see interrupt handler sei(); // enable interrupts} taken from http://www.nerdkits.com/library/lowpowerexample/ <S> who also use the same chips.
If some pins are unused, it is recommended to ensure that these pins have a defined level.
Logic gate counter on 7 segment display Using logic gates with general purpose transistors, I want to display numbers on a 7-segment display depending on the 2 pushbutton input. If both buttons are not pressed, I want it to say 0. If 1 is pressed, I want it to say 1, if the other one is pressed, I want it to say 2, and if both are pressed, I want it to say 3. I know how to do this with separate LEDs, ( 4 Different  LEDS are lit depending on the switches inputs) ,but I am having troubles figuring this out for a 7-segment display because of the overlapping digits on. I may have done a terrible job explaining this, but any info is helpful. <Q> I'm not sure I can agree with Dean's answer; you can't answer the question <S> "how can I make a BCD-to-7-segment decoder? <S> " with "use a BCD-to-7-segment decoder". <S> His truth table a good start, however. <S> Cut away the bottom part so that you retain a table for the digits 0 to 3: <S> This shouldn't be too hard. <S> What do we see? <S> First thing we notice is that segment \$b\$ is always on, so that's not a decoded output. <S> The codes for column \$g\$ are the same as the \$B\$ column. <S> Columns \$a\$ and \$d\$ are identical. <S> Columns \$a\$, \$c\$ and \$d\$ have one 0 and three 1s. <S> That's what the truth table of an OR-gate has. <S> Check which of the inputs you have to invert to make those outputs an OR-function of the (inverted) inputs. <S> Similar for column <S> \$f\$: it has one 1 and three zeros, which an AND-gate will give you. <S> How do you have to change the inputs to use an AND-gate here? <S> Columns \$e\$ can be created from just one input. <S> Which one? <S> If you can't see the relationships right away, then add two intermediate results, which you derive from the inputs: that's \$A\$ and \$B\$ inverted. <S> Your function table could look like this: \$ a = \overline{A} <S> + <S> B \$ <S> \$ <S> b = 1 \$ \$ c = <S> A + \overline{B <S> } \$ <S> \$ <S> d = \overline{A} <S> + <S> B \$ <S> \$ <S> e = \overline{A} \$ <S> \$ <S> f = \overline{A} <S> \cdot <S> \overline{B <S> } \$ <S> \$ <S> g = <S> B \$ <S> If you think I've done all the work for you, think again. <S> The real work starts now: create a circuit from this using as few gates as possible. <A> I'd do this in 2 steps. <S> First make a circuit that has 4 outputs that correspond to your 0-3 codes. <S> You can test this by hooking common LEDs to the outputs. <S> I believe this is a common decoder circuit. <S> The second step is to connect the transistors to the LED segments. <S> Place a transistor on each segment. <S> Put power on the collector appropriate for the type of LED. <S> Connect the emitter to a specific segment. <S> The base should be connected to your decoder's outputs. <S> Say you have an 7-seg LED with segments numbered from 0 to 7. <S> You decide segments 1 and 2 need to be lit for decoder output #0. <S> Connect #0 to the bases of the transistors responsible for segments 1 and 2. <S> Repeat for the other 3 outputs. <S> Where you have different outputs sharing a transistor base, you may need diodes to prevent current from flowing 'backwards' and lighting up segments unexpectedly. <A> Connect one pushbutton to input A, and the other pushbutton to input B. Leave C and D disconnected. <S> Reference <S> the the sample circuit below. <S> Since this is likely homework, however, I'm guessing that you need to do it with discrete logic gates and transistors. <S> I'd start with the following truth table and design your gates from there. <S> I'm sure you can figure out how to drive the transistors so as to sink current out of a common anode display. <A> The design depends on your goal; To learn logic design with Boolean Algebra perhaps with Karnaugh mapping to reduce the solution to simple logic equations... such as stevenh's good explanation To implement the design with the fewest parts... such as Dean's solution or a CPLD with stevenh's implement the design with easiest way ... depends on your desire to learn new skills, but Boolean Algebra is a must with de Morgan's Law and perhaps Karnaugh mapping are things you should know. <S> It just looks hard at first, but then it becomes really easy to implement any complex requirement of logic once you learn these methods. <S> Firmware solutions with 1$ PICs become valuable tools for any logic as are CPLD chips. <S> There is always a learning curve on new skills. <S> implement the design in the cheapest way for mass production, depends on your budget for time and parts, experience, creativity, tools just finish an assignment.. nuf said. <S> The best answer depends on a well phrased question.
This can be done with a single BCD decoder IC like the 4511.
Op-amp inverter amplifier, low current, with AC noise at 50Hz I was doing some measurements for a coursework. Op-amp, LM741 in an x10 inversor configuration. When the resistances in use become high enough, 1MOhm and 10MOhm, the output is correct but it has a 50Hz noise on top, of amplitude that would suggest an extra 80nA through the resistors.That effect isn't seen while simulating on PSpice, but it is expected behaviour since other people measured it too. Now, the datasheet gives 80nA as the bias current, so I, who still don't know much of how an op-amp works internally, suspected it was to blame.However, I've been told that the bias current is always DC so it can't have anything to do with that, and that it has to do with something acting like an antenna, but no clear explanation was offered to me.Is that true? I have no clue what's going on and would appreciate orientation EDIT The objective is just educational, it's to understand the behaviour. With 1k-10k resistors it works perfectly. 50Hz is the mains frequency so the noise is surely somehow due to that. But I'd like to know more why that noise happens, how to model it in a way that it explains the fact that it's there with 1MOhm resistors but not with 1K. Also, if it's related to some parameter in the LM741 datasheet that explains the amplitude of the noise <Q> Reading your description one can tell you're in a country that has 50 Hz mains power. <S> You don't say how you're putting the circuit together, breadboarding or otherwise. <S> But there is no reason to have such high resistor values. <S> The Johnson noise will also be too high and the main issue is that your wiring is picking up stay fields and the high resistance is preventing the op-amp from being able to dominate the aggressor signal. <S> Further improvements you can do: place a resistor equivalent to the parallel resistance 1M||10M from the non-inverting input to ground. <S> shield the inverting input to reduce the chance of pickup. <A> I won't try to answer the whole question, but I'll try to explain why you're getting pick-up, and why the resistor values matter. <S> The pick-up, is, like other said, coming from your mains voltage. <S> It might be coming from a small ripple leaking through your power supply regulators to your circuit rails, or it might just be coupled in from nearby power lines. <S> In any case, the fact that changing the resistor values affects it strongly suggests this is capacative pick-up: <S> The main idea is that electric field from someplace with a 50 Hz signal on it is terminating on the copper connected to the inverting input of your op-amp. <S> This has the same effect as if there's a (very tiny) capacitor between that source and your op-amp input. <S> So why do the resistor values matter? <S> I'll assume that the driving circuit supplying the desired signal at the "in" port of your circuit has a low impedance. <S> And we know the output of the op-amp has a low impedance, and the inputs have very high impedance. <S> So the AC equivalent circuit for the interference source reaching the op-amp input looks like this: <S> Here, the op-amp inverting input is connected to the mid-point where the capacitor connects to the two resistors (just like in the real circuit). <S> We can immediately see this is a voltage divider. <S> For a fixed frequency, the capacitor will have a fixed impedance: 1 / (2 * pi * f * C). <S> So as you increase the resistor values, you'll directly increase the signal seen by the op-amp, up until the parallel resistance is much more than the capacitor's impedance and you are near 100% coupling. <S> This divider effect explains why we often hear about shielding or isolating the "high-impedance nodes" in op-amp circuit designs. <A> You explained that you are doing this for your education, so I would recommend something that has educational value: try moving around the circuit, and measuring the amplitude of the 50Hz noise. <S> You'll find that not only the place, but even the orientation of the circuit can play a role in how the noise is received and amplified. <S> You'll probably also find other frequencies appearing near other electronic devices... Or even, for educational purposes you can touch the input to various objects (not mains, or other hayardous voltages of course...), like your hand. <S> Also: no, it does NOT work 'fine' with 1k-10k resistors - just the noise is a lot smaller! <S> Turn up the sensitivity on the scope, and you have a chance to see it. <A> 50Hz noise will be from the mains. <S> Since you are learning you will probably be powering your circuit from a lab voltage source. <S> If you look to about 10kHz you should see some more distortion, provided your noise floor is low enough, this lower peak at higher frequency is the signature of the power switching devices in your power source. <S> In most cases higher resistor values mean higher noise power.
As others have noted, the circuit is picking up the mains frequency of 50Hz. The noise is in your circuit is lower when you use lower value resistors because your circuit is dominated by thermal noise generated within the resistors.
components within a triangle in an electronics diagram I'm trying to understand the following circuit diagram: Specifically, the four triangles within the L293D component. So I understand there are two transistors in there, connected in series from 24v to ground, but what is connected to the bases of the transistors, the lines just end... From what the circuit should do, I guess that the line coming in to the triangles from the 'and' gates (at the top left of the triangles) should some how enable the whole triangle, and that the line coming in from 1A\2A\3A\4A should toggle 5v between the two transistors. Is that right? And how do I deduce that from the schematic? <Q> The triangle is a symbol for a buffer, driver or amplifier, whatever you call it. <S> The transistors drawn inside the triangle are there to let you know what is the type of your output . <S> Thanks to this drawing you can see that the outputs are switched via BJTs between the power supply rails using some kind of Push-Pull topology. <S> Knowledge about the type of output is useful. <S> If those were power MOSFETs, you would expect them to exhibit different behavior than BJTs. <S> A BJT will have a voltage drop whereas a MOSFET will have a resistance between drain and source. <S> The drawing doesn't provide the exact schematic for the amp/buffer and it doesn't have to. <S> The exact schematic would be a lot more complicated and this image is there to clarify things, not complicate them. <S> So, in short, the triangle symbolizes your driver/buffer and the transistors are there to let you know that the output was made using bipolar transistors. <A> That is just a notation , not by any means a schematic . <S> The "triangles" themselves symbolise high current drivers, the two "transistors" drawn there are just to symbolise what the circuit is doing. <S> There more components "inside the triangle", that for sake of brevity are not displayed. <S> This is similar to pseudocode and real source code in a given programming language. <S> This is a "pseudo-schematic" of the chip. <S> BTW: Why do you want to get to know what's inside the IC? <S> Would you like to get higher current output, because the chip itself could not drive the motor you want to use? <A> Those transistors are probably exactly what the output stage looks like: a PNP transistor connected to the power line and an NPN connected to ground, only one of which is on at once. <S> A triangle with two inputs and one output usually represents an op-amp . <A> The simplified schematic of the buffer inputs "just ending" is supposed to be intuitive to indicate the decoupling of noise from the load to the input as well as source supply. <S> When you drive high currents with logic you risk getting supply noise back into your logic and this degrades the reliability of your signals which can cause glitches or false triggering. <S> This is especially true of any reactive loads and motor loads with commutation noise. <S> The beauty of this design is that the logic and drivers use separate supplies. <S> Although they share common ground potentials, careful design (beefy ground tracks and/or ground plane and/or isolated ground distribution can mitigate noise ground-shift false triggering from EMF kickback diode shunt current or other surges. <S> By the way these drivers also have ESD protection and diode clamps built-in for inductive loads. <S> Designers are wise to use common mode chokes on stepper motor loads to reduce EMI. <S> The complementary driver is often called a "half-H" or "half bridge" switch. <S> When the load is connected between two such half-H drivers with one side inverted, you can get twice the load swing useful with bi-directional motor control with PWM controlled by the enable signal <S> then you have a full-bridge of full-H driver configuration. <S> Dead-time control to prevent shoot-thru or shorting of the supply to ground via the complementary outputs becomes a critical design factor in high current inductive loads. <S> TI describes it as follows: <S> The L293 and L293D are quadruple high-current half-H drivers. <S> The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. <S> The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. <S> Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications.
A triangle with one input and one output usually represents a buffer : it copies its input to its output, usually at a greater signal strength, usually cleaning up the input signal to logic 0 or 1.
Behavior of RLC circuit elements at t = 0 I'm wondering what are the behaviors of the inductor, L, and capacitor, C, at t = 0+ Please correct my understanding of the above circuit if I am wrong. At t = 0, the capacitor acts like a wire. So I think that Vc must = 0 since a theoretical wire has no voltage across it. However, if that is the case wouldn't Infinite current be flowing through the capacitor at t = 0 ? What would the current flowing into the inductor be? Shouldn't inductor act like a open (broken) circuit at t = 0, which mean no current? Clarification: The switch is closed for a long time before time 0, at t=0 the switch opens <Q> You confuse the role of capacitor and inductor. <S> = 0- you have iC <S> = 0, iL = 0.5A <S> and vL = vC = 0 <S> At t <S> > 0 you have iL <S> = -iC, vL = vC and Ic = C*vC', vL = L*iL' As a consequence of vL = -L*C*vL'' <S> (and iL = -L*C*iL'') <S> you get an oscillation of infinite duration for t <S> > 0. <S> I.e. the voltage at and current through inductor and capacitor are sinusoids with frequency of 1/(2pi*sqrt(LC)) = <S> 1/12.6 <S> Hz. <S> This is also easily understood: The energy stored in the inductor (supplied at times t<0) is at times t>0 continuously oscillating between the capacitor and the inductor at a frequency corresponding to the resonance frequency of the L-C circuit. <A> I'm not sure where this "behaves like a wire" and "behaves like an open circuit" stuff comes from, but you're not the first one to bring this up, so it must be how they're teaching this stuff these days. <S> To an old-timer like me, it doesn't seem like the clearest way to go about presenting this material. <S> To solve this kind of circuit, first solve for the steady-state conditions at <S> t = 0-. <S> What is the voltage across the capacitor, and what is the current through the inductor? <S> Keep in mind that a capacitor does not pass DC current, but an inductor does. <S> At t = 0 <S> +, you know two things: <S> The voltage across a capacitor can't change in an infinitesimal amount of time, and the current through a coil can't change, either. <S> These facts are implicit in the definitions of these components. <S> The voltages and currents in the rest of the circuit will redistribute themselves in order to meet these conditions, and based on that, you can determine how they evolve over time from there. <A> I wondering what are the behavior of the inductor, L, and capacitor, C, at t = 0 <S> + (1) the capacitor and inductor are in parallel regardless of the switch position. <S> Thus, at all times , \$v_C = <S> v_L\$ (2) just before the switch opens, by virtue of the fact that the switch has been closed for a long time , the circuit is in DC steady state <S> *, i.e., all transients have decayed. <S> In DC steady state, \$i_C = 0\$ <S> and \$v_L = 0\$. <S> (3) <S> The voltage across a capacitor and the current through an inductor must be continuous. <S> By (1), (2) and (3) , \$v_C(0+) <S> = v_C(0-) = v_L(0- <S> ) = 0V \$. <S> It follows that \$i_L(0 <S> + <S> ) = i_L(0-) = <S> 5V / 10 <S> \Omega = <S> 0.5A \$ <S> These are the initial conditions for the transient solution when \$t > 0\$ <S> UPDATE: <S> the capacitor current must discontinuously change from 0 to \$-i_L\$ across the switch opening time. <S> To summarize the initial conditions: \$v_C(0+) = v_C(0-) = 0V, i_C(0-) = 0A, i_C(0+) = <S> -0.5A \$ <S> \$i_L(0 <S> + <S> ) = i_L(0-) = 0.5A, <S> v_L(0+ <S> ) = 0V \$ <S> *if it exists. <S> Some circuits do not have a DC steady state solution.
The inductor acts as a wire and the capacitor is an open circuit in static conditions At t
Conductive object to raise 6mm height off PCB I am designing a PCB where I expect to have a certain part assembled at the edge of each board (blue in the picture below). However, this part needs to be at connected/soldered at a height of about 6 mm above my PCB. Therefore, I'm considering using some conductive object/part to create the vertical displacement (green in the picture below). So far I have considered right-angle header pin; but may be too thin/flimsy. zero-ohm resistors (0402-sized or 0603-sized); but I'd need to stack too many of them to get the 6 mm height. I am interested in ideas for some object/part I could use for the 6mm height-creation ; anything as long as it would be: inexpensive widely available conductive preferably NOT through-hole (soldered on PCB top surface) What would be ideal is if it were just a 6mm cube of conductive material, but no such normally-sold object seems to be readily available! (Note: This height-creator needs to be strong in its soldering to the board, just as any standard part soldered on a PCB, but it does NOT need to be strong in its soldering to my blue part.) <Q> Zierick manufacture a range of surface mount PCB spacers. <S> Part number 1258-236-0 is 6mm long. <A> Use an inverted brass flat head machine screw. <S> These will solder easily and depending the mechanical strength you want the part can be selected from a range with various head sizes. <S> Some possible candidate machine screws would be these part numbers from McMaster-Carr . <S> Length of 6mm 99658A524 <S> M3 <S> $9.68/100 <S> 96686A150 M2 $10.58/50 <S> 96686A210 M3 $7.94/50 Lower Cost with length of 6.35mm 92451A092 #3-48 <S> $4.21/100 <S> 92451A106 #4-40 <S> $4.29/100 <S> 92451A124 #5-40 <S> $5.27/100 <S> 92451A144 <S> #6-32 <S> $5.90/100 92480A106 <S> #4-40 <S> $4.72/100 <S> 92480A144 #6-32 <S> $5.85/100 <S> This would certainly meet your criteria of being inexpensive, widely available, conductive and NOT through-hole. <S> See the search page here . <A> What you are looking for is a solder in buss bar, or bus bar which is normally used to carry large currents. <S> Height accuracy will be limited. <S> And in some cases the bus bars are not soldered down but are press fit (which requires special through hole plating requirements. <S> Here is but one solution. <A> Depending on your production volume, it should be pretty easy to fabricate something suitable.
My local home store sells square brass tubing in a variety of sizes, or they also sell copper sheet blanks. They key problem that yo will have is that anything large will have have large thermal mass and will be difficult to solder to the board.
Using IntelliJ to for Arduino IDE I'm on Mac OS X and have a license for IntelliJ Ultimate. Is it at all possible to use IntelliJ as an IDE for Arduino projects? <Q> Just grab the Arduino plugin! <S> Open Clion and go to Configure/Settings/Plugins. <S> Choose 'Browse Repositories' search for Arduino, and click install. <S> (There are two. <S> One is a fork of the other. <S> I recommend picking the one that was updated more recently.) <S> Then restart Clion. <S> You'll now see the option to create a new Arduino Sketch Project! <A> I've opted for using XCode, managed to find some templates online. <S> Way better than using the standard Arduino IDE. <A> You can use PlatformIO together with any IntelliJ product. <S> Here is an article about how to wire them together: http://jandevblog.blogspot.com/2016/01/how-to-use-intellij-idea-to-develop-and.html <A> You will only get limited support. <S> There is a plugin available for C/C++, which will help you with stuff like code completion and syntax highlighting (you will need to define the sketches file type as C files). <S> You also can integrate external tools (in the global settings), to add support for e.g. compiling and uploading sketches. <S> But you won't get any specialized support (like choosing which board you have, or browsing sketches) <S> , you need to configure everything manually. <S> If you can live with that, IntelliJ IDEA might even be better for day-to-day editing work. <S> 8Note that I didn't try anyone of these things...) <A> A late answer, but perhaps of help to someone: <S> IntelliJ ReSharper C++ comes quite close to supporting Arduino. <S> Here's a ticket for the key tweak, supporting the .INO file extension: http://youtrack.jetbrains.com/issue/RSCPP-5683 <A> As was mentioned in a previous answer, the best bet for someone who is already familiar with the IntelliJ family of products is to use CLion with the Arduino and Serial Port Monitor plugins. <S> Here are the steps to get started: (Preliminary - if you are on Windows 8 or 10, make sure you have installed the Arduino IDE using the full-download from https://www.arduino.cc/download_handler.php . <S> Do NOT install it via the Windows Store because it will not install the SDK at the expected location.) <S> Download CLion: <S> https://www.jetbrains.com/clion/download/#section=linux-version <S> Start CLion and open up the Settings->Plugins dialog, then click on the "Browse Repositories" button. <S> Enter "Arduino" in the search field - this will result in two plugins being displayed: Arduino V2, and Serial Port Monitor. <S> You will want to install both of them. <S> (Arduino plugin can be downloaded separately here: https://plugins.jetbrains.com/plugin/9984-arduino ) <S> (SerialPortMonitor plugin can be installed separately here: https://plugins.jetbrains.com/plugin/8031-serial-port-monitor ) <S> Restart CLion. <S> When you have completed these steps, you can create a new Arduino Sketch project which will automatically create a CMake file for you, which you can edit to configure the type of board you are using and the serial port, etc. <S> Here is an example: cmake_minimum_required(VERSION 2.8.4)set(CMAKE_TOOLCHAIN_FILE $ <S> {CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)set(PROJECT_NAME HelloArduino)project(${PROJECT_NAME})set(${CMAKE_PROJECT_NAME}_SKETCH hello_arduino.ino) <S> #### Uncomment below additional settings as needed. <S> # set(${CMAKE_PROJECT_NAME}_BOARD mega) <S> # set(${CMAKE_PROJECT_NAME}_PORT /dev <S> /ttyACM0) <S> # set(mega.build.mcu atmega2560) <S> # set(mega.upload.protocol wiring) <S> # set(mega.upload.speed 115200)generate_arduino_firmware(${CMAKE_PROJECT_NAME})
You can now use Jetbrains' CLion to develop and run Arduino sketches.
Turn on LED when an electrode or contact is submerged in saltwater this is my first post here, thanks in advance for any help you can render. I am working on a project that turns on one 5mm white LED running on a 3.7v lipo battery when it comes in contact with saltwater. I want to mount this on my dock pole so when the tide comes up I can look out my window at night and know its high tide. I want it to be as small as a package as possible. I have a Suunto mosquito dive watch that has some sort of water contact in it that turns on automatically when I go diving. This is the same kind of approach I am looking for. I have searched the internet for days looking for mini water contactor, micro water contacts, submersible underwater nano switches, etc. to no avail. What is the best way to make this happen. I don't want to have to use a micro controller. If I could somehow modify a mini led flashlight by adding a water contact that would be suffice. So the question is what parts I could use to get it done and where to get them. <Q> When the water rises it can trip a mechanical switch that's been sealed against the elements. <S> Maybe a commercial one or just build one out of a spring. <S> Or you could have a little IR sensor also sealed up that when it reflects off the float it sends you your signal. <S> Here's some waterproof switches <S> I'm sure there are others: <S> http://www.cpi-nj.com/products/waterproof-switches/limit-switches <S> http://www.ottoexcellence.com/store/item.aspx?ItemId=28 <S> You could make a simple switch out of two strips of metal, when the two strips of metal are in the water they'd conduct. <S> You could hide them in a PVC pipe with a capped top and open bottom to keep out the rain. <S> That would corrode over time though. <S> You might also try a hydrostatic pressure sensor like this guy: https://www.sparkfun.com/products/10221 <S> There are other more expensive probably more reliable ones out there as well. <S> The hydrostatic part of it will keep it from going off in the rain. <S> It says it holds up in salt water. <A> Use a FLOAT SWITCH like these . <S> They're usually used in tanks, to activate pumps when the level is higher or lower than a set point. <S> Mechanical ones are really simple to use, just hang them at the desired level. <S> When water goes above that level, the switch close, and you can use the contact to switch on whatever you need. <A> I've always been a fan of zinc and copper as a conductor which allows the circuit to close and conduct, (when introduced into saltwater.) <S> Under normal circumstances it should not react to rain or tap water, however if it did; a current limiting resistor can be sized for optimal behavior. <S> You would want the Zinc and Copper electrodes close together. <S> This can be made very small.
How about just using float on a rod.
Can I stack two l293d h-bridge IC's to drive more current? I need more current but I do not want to change my pcb board so can I piggy back two L293D pin for pin? I am driving dc motors and I am not seeing any gross failures but I am very close to the max ratting and so I wanted just a bit more headroom. <Q> That's not generally recommended. <S> If you know the devices are from the same batch (i.e. are more closely matched) and you can ensure that they are thermally coupled (hard to do since they are in packages) <S> then it's not recommended. <S> It would safer to get another similar device that has lower Rds(on). <A> I've definitely seen this done with exactly this chip, so it can work. <S> As rawbrawb indicates, though, it's a hack - it might work, but it might cause problems due to mismatched components. <S> Your worst case scenario: you burn out both of them from excessive current. <S> Since they're cheap parts, it might be worth a try anyway, depending on your constraints. <A> As explained in the datasheet, the safe way to double the power of l293 chips is to use 1 chip per motor. <S> To do that, you have to connect channel 1 to channel 4 and channel 2 to channel 3. <S> In other word, if you want to connect two chips, you'll have to solder them above the board next to each others. <S> One chip for the left side and one chip for the right side. <S> The tricky part is to have both pin enable, vcc connected correctly as they are not parallel to each others. <S> I'd flip the chip on the side like this: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The advantage of this method against piggy backing two chips is that if one chip fails, then the second motor will still work. <S> And you only have to replace one chip. <S> One way that would look less like a hack would be to have a new PCB that you can stack on top of the l293d socket.
If you have through hole chips, it could be feasible to increase the amount of power on your board in a safer way than soldering two chips on top of each others.
Heating up a container - most efficient I got a container that must be heated up to atleast 250 celsius, but I don't have alot of space to work with and I am also not so familiar with this kind of topic. So I've attatched an image which shows my design. Everything in the color dark blue or red will be in iron or steel or even stainless steel , the red container will be in the same material as the blue discs, but I've colored them to visualize what that will be going to 250 celsius and what that should not be heated at all. I was thinking about heating it up by using the container as a resistor, shown on the second image I would have a circuit of a copper cable going into red through the container out from green and then to a power supply unit (400W, same thing that powers most stationary computers) which leaves me at 12V and X amps. I do have an N-Channel MOSFET 60V 30A and an arduino and a Thermocouple Type-K for controlling the heating. So my question to you is: Will it even work having the container as a heater? Or do I need some heating-resistors? On the image below I've shown the diameter for calculation purposes. The resistance got something to do with the area through the material, and I'm sadly not sure how to exactly calculate it since it's going sideways rather than vertical. I will be checking out this topic about once per day so if there's any extra information you need or even the model itself then I'm happy to give it to you, but since it's a blueprint of something very valueable to me I don't want to give it away unless it's necessary. <Q> The problem with using the container as a resistor is that it's actually a very good conductor. <S> Your wires will have more resistance, and will therefore get hotter than the container. <S> What would be amazing is if somehow you could deliver a very high current to the container, using a lower current flowing in the wires. <S> Well, you can! <S> A very efficient way to heat an iron or steel object is by Induction Heating . <S> It's used a lot in industry for heating bearings and things. <S> It's also quite possible to do it yourself. <S> Many people do. <S> It works by inducing an alternating current in the object to be heated. <S> Essentially you're creating a transformer, where your object is the (single turn) secondary coil. <S> Much more current can be made to flow in the secondary coil simply by using many turns in your primary. <S> An induction heater can get things really hot if you want: <S> And you can even use it to heat large containers: <A> I'm not sure this is entirely an Electrical question, but I will give it my best effort. <S> To answer your first question <S> "Will it even work having the container as a heater?" <S> My answer is 'probably not' whatever material you use in the construction of this container will most likely not be ideal for direct heat production. <S> For example, while these materials may have good thermal conductivity properties, and may even heat up sufficiently, they are also fairly electrically conductive so you will be wasting a large amount of power. <S> To answer your second question <S> "Or do I need some heating-resistors?" <S> The answer is yes. <S> I would suggest finding a material or device that can wrap around your container and use that to heat the container. <S> Then just make sure your container is made out of a sufficiently thermally conductive material (e.g. Copper or Aluminum) as you can see from this image from Wikipedia <S> These materials offer the best conductivity properties which will ensure the entire container (and whatever is in it) will be properly heated. <S> Let me know if you have any further questions or if I misunderstood what you were asking, and best of luck to you! <S> Edit: <S> Rocketmagnet and I were apparently working on our answers at the same time. <S> His solution appears to be a very good solution as long as your device is not magnetically sensitive and you have the space to wrap an inductive element around the container. <S> Edit2: <S> After looking into more solutions, I really think wrapping your container in Nichrome wire would be a very viable solution. <S> This website seems like a good place to go to get a better idea of what the wire is capable of and how much power you will need to supply. <S> Let me know if you have any more questions <S> and I will do my best to answer them. <S> Upon further research, it seems I made one assumption that I shouldn't have. <S> The nichrome wire is of course conductive, so putting it in direct contact with the container will most likely cause it to not work. <S> So you would need to electrically isolate it somehow, but that really seems like a question better suited to a materials specialist. <A> The easiest way (and by no means the cheapest!) would be to use a high temperature heating blanket (common in the composite industry). <S> This allows you to cover only the area you wish to heat and have the benefit of precise temperature control as well.
For maximum efficiency, if it is practical, I would wrap the container in wire, then wrap the wire in thermal insulation.
'Stiffening' capacitor/s for DIY flash battery pack? I'm planning to build a DIY battery pack for one of my camera flashes that involves basically wiring a bigger external battery to the battery leads in the flash. Admittedly I don't know much about electronics but keep my feet just oh-so wet in it. The main goal for doing this is actually to improve recycle times of the flash with the added benefit of longevity from the battery. Question #1 is: Whether or not there would be any benefit to adding a capacitor or two to provide a limited rapid-charge for a quicker, subsequent re-charge after the flash goes off the first time. My rationale is: often the flow of taking photos involves a flash or two; or three; change spots/framing/talk to subject (which by then the capacitor/s might be recharged to supply the benefit again) Question #2 is: Is there a formal word/phrase for what this process (a capacitor used for rapid discharge in tandem with a battery) is so I can do further research for academic purposes. More details:The battery supply is 6V - there's a variance on how much the flash is willing to draw based on the supply (4AA's vs. the bigger battery mentioned in my links); I don't know what, or if there are limitations on what kind of current the flash can draw (hence if it can benefit from caps). There's an external AC adapter that supplies 200V@4mA for the flash. <Q> I doubt that there would be much benefit to adding a capacitor across your battery. <S> Consider the following: <S> The charging of the flash can be seen as a process of moving energy from the battery to the high-voltage capacitor in the flash. <S> Based on some quick searches, the capacitor in the Vivitar 285HV is 1000 uF. <S> Assuming it's charged to 200V, it stores 20 J of energy <S> A capacitor to hold 20 J at 6V would be 1.1 Farads, and that's just enough energy for a single charge of the HV cap. <S> Assuming 50% conversion efficiency, and that we want 3 shots that's a 6 F capacitor. <S> The least expensive capacitor I found with some margin over the 6 V working voltage and with that kind of capacitance was over $100, and 8 inches long. <S> Just to supply 20 J directly from a 6V battery in 1 second with 50% efficiency would mean a current draw of about 6.7 A. <S> That's a lot of current, but it's something that a large battery can do. <S> The charging circuit in the flash will limit how quickly we can charge no matter how much power is available at the input. <S> An easy way to see if the charging circuit is the limiting factor rather than the input power is to measure the voltage across the battery while the flash is charging. <S> If the voltage remains close to the open circuit voltage of the battery, then it's the charging circuit that's limiting, not the battery. <A> Assuming that you're using a professional-grade flash, it has a pretty big capacitor inside it already (at high voltage, so don't mess with it). <S> Your flash has what's called a DC-to-DC converter inside it that takes battery voltage in, increases the voltage substantially (usually to several hundred volts), then uses it to charge a very large capacitor internal to the flash. <S> When the flash fires, the capacitor partially or fully discharges into the flash tube. <S> Most flash heads allow several flashes before a recharge interval is required; it's this internal capacitor that makes that possible. <S> The classic flash recharge "whine" is the sound of this DC/DC converter working - older units <S> ran at an audible frequency that increased as the capacitor reached full charge. <S> Newer flash units have a switching frequency above the audible range, so the whine can't be heard in most cases. <S> Batteries have something called parasitic series resistance, which is undesirable and causes the voltage at the terminals to droop as more current is pulled from the battery. <S> This limits the peak power that can be pulled from a battery, which is likely a limiting factor in your flash's cycle times using internal batteries. <S> Usually, a larger capacity battery will have a lower parasitic series resistance, and therefore can supply higher peak power. <S> This changes with battery chemistry, state of charge, temperature, etc., <S> but for your application a larger battery pack, with a likely lower series resistance, will likely improve your recharge times even without an additional external (low voltage) capacitor. <S> I'd suggest that you try it just with a larger battery and see if it meets your expectations. <A> What you are looking for is a SuperCap which are intermediate between Caps and Batteries for energy density. <S> It's not recommended that you plug in a uncharged supercap to a battery because of the high current flow. <S> But this will certainly smooth out the voltage droop from high current draw.
If your goal is reduced cycle times on your flash, a good quality external battery and decent sized wire between the external battery and the flash may be all that is required.
Precise timing with a PIC18 microcontroller? I'm trying to write a software serial implementation and am having trouble with timing. I'm using Timer0 on a PIC18F242 and for some reason it does not seem to be very accurate. I've been trying to debug the problem by toggling a pin on the microcontroller and watching the frequency on my oscilloscope. The oscilloscope shows that the period is greater than it should be, and I don't know why. With my full code the period was something like 10us too long, if I remember correctly, but even with a very simple example, such as the one below, the timing is off. Here is an example: #include <p18f242.h>// fuse configurations#pragma config OSC = HSPLL#pragma config OSCS = OFF #pragma config PWRT = OFF #pragma config BOR = OFF #pragma config WDT = OFF#pragma config LVP = OFF #pragma config CP0 = OFF// CALCULATIONS:// 8Mhz crystal with PLL enabled// FOSC = 4*8Mhz = 32MHz// TOSC = 1/FOSC = 31.25ns// TCY = 4*TOSC = 125 ns// timer has 1:8 prescaler, therefore timer increments every 8*TOSC = 1us.main(void){ // port configuration TRISBbits.RB1 = 0; // make RB1 an output // configure Timer0 T0CONbits.TMR0ON = 0; // disable (stop) the timer T0CONbits.T08BIT = 0; // 16-bit timer T0CONbits.T0CS = 0; // use internal instruction clock T0CONbits.PSA = 0; // use prescaler (prescaler assigned below) T0CONbits.T0PS0 = 0; // 010 = 1:8 prescaler T0CONbits.T0PS1 = 1; T0CONbits.T0PS2 = 0; T0CONbits.TMR0ON = 1; // enable (start) the timer while(1) { if(TMR0L >= 100) { PORTBbits.RB1 ^= 1; // reset the timer TMR0H = 0; // MUST SET TMR0H FIRST TMR0L = 0; } }} My oscilloscope says the period of this signal is 204.0us, which means that the pin is toggling every 102.0us. If my oscilloscope is correct, then the pin is toggling 2us too late every time. Interestingly, changing if(TMR0L >= 100) to if(TMR0L >= 102) results in the same period, but going below 100 or above 102 results in the period decreasing and increasing, respectively. Why is this happening? Also, as I mentioned, having additional code in the main loop seems to exacerbate the problem. Why would that be? <Q> What you see here is the delay between the moment the timer has reached 100 (meaning your if-condition is true) and when you reset it. <S> In your case this is 2 timer ticks, meaning you get a longer period. <S> As already said, if you want to have precise timing use interrupts. <S> Alternatively, you can configure your timer to overflow exactly in the right moment. <S> That way, you just need to check for an overflow to occur, and don't need to reset it. <A> As you have it it only checks the timer value once per loop, so if you add code into the loop the checks become spread out. <S> The interrupt will switch context as soon as the timer overflows, so <S> it doesn;t matter how much code is in your loop then. <A> This isn't the most effective way to use a timer. <S> If you want precise timing, set an interrupt for when the timer rolls over. <S> The interrupt routine should set a timer flag and do whatever else is quick that needs to be dealt with in a time critical way, and reset the timer count (reading the current timer value so you can account for any delays associated with interrupt servicing). <S> Everything that's not quick <S> , you put in an if loop that checks the timer flag. <S> The first thing you do in that loop is reset the timer flag, and then do all the non-time-critical stuff associated with your loop. <A> The extra delay is due to the time it takes to execute the while, if compare, toggle and reset instructions, because when you zero out the timer you lose up to all those counts, depending on when exactly the timer reached 100 in that particular cycle. <S> Tcy is 125 ns , so only 16 assembly instructions are needed to account for the 2us extra delay. <S> Take a look at the assembly listing and you'll realize how much overhead you are adding. <S> Like others have said, use an interrupt for least uncertainty and jitter. <S> Instead of resetting the timer, let it overflow and keep counting, that way you don't zero out counts, which are added to the total period. <S> If you don't want to use interrupts (but you should), also set the period so that it overflows, and check the overflow flag. <S> This will allow you to not zero out the timer and will preserve the calculated period, but you'll have jitter. <A> If you use a prescalar with Timer 0, it is not possible to accurately generate interrupts at rates which are not power-of-two multiples of 256. <S> If you want to generate a rate which is not a power-of-two multiple of 256, your best bet is probably to use Timer 2, which is configurable for any number of the form (A*B*C) where A is any number 1-256, B is any number 1-16, and C is an allowable power of two (I forget which ones are allowed). <S> Otherwise, if you want to use timer 0 efficiently in 8-bit mode with no prescalar, saying TMR0L += <S> N will advance the timer by N-3 cycles. <S> Thus, if you wanted to have timer 0 wrap every 200 cycles, you could after each time it wraps, add (259-200) cycles to it ( <S> since advancing the timer by 56 cycles after it wraps would leave 256-56 cycles, i.e. 200). <S> Note that using this technique, it doesn't matter precisely when the "add" takes place, provided it occurs soon enough that it doesn't push the timer "over the edge".
If you want accurate timing, use interrupts (i.e. reset the timer value in it's interrupt routine).
For a lower voltage drop one could use Schottky diodes, but what are the disadvantages of Schottky's? In other words, why don't we always use Schottky diodes if they are so much better? What diode properties do Schottky diodes have that makes them unfit for certain applications? <Q> They cost more, have higher reverse leakage current, and are physically larger according to a quick search. <S> Of course they're much faster though :) <S> Looks like <S> in a same size comparison they can't dissipate as much power as a typical power diode. <S> Also with larger currents you lose that Vfw advantage. <S> Oh and wiki says they normally have lower reverse voltage rating on the order of 50V. <A> Far from a comprehensive list: Schottky diodes of a comparable rating are generally more expensive than PN silicon diodes. <S> I've seen price differences of 20% - 200% depending on the rating. <S> Schottky diodes have a lower maximum reverse voltage rating than is possible with PN diodes. <A> For essentially the same reason that schottkys have low forward drop, they have large reverse currents. <S> From the diode equation: <S> \$I_f = <S> I_s\cdot e^{\frac{-qV_f}{kT}},V_f = \frac{kT} <S> {q}\cdot \ln\frac{I_f}{I_s}\$ <S> -- having a large Is term is what makes Vf small. <S> However, the reverse leakage current is also equal to the Is value. <S> From their structure, silicon schottkys can only withstand about -30 V alone. <S> Higher voltage ones are created, but basically these have an internal JFET in series with them -- this is what actually withstands most of the reverse voltage. <A> Here's one that may sound a bit strange, but is important in some uses: low forward voltage drop. <S> Sometimes it is useful to distribute the heat dissipation among the components in a device. <S> Take for example the traditional linear voltage source <S> : You have a transformer, a full wave rectifier, large capacitor and a voltage regulator plus some smaller capacitors near it. <S> Let's say the transformer has nominal output voltage of 12 V AC. <S> Once we rectify that and fill up the capacitor, we have around 17 V DC on the capacitor in the case of ideal diodes with no voltage drop. <S> If we want to power a device regulated by for example LM7812, we'll need to somehow dissipate away 5 extra volts. <S> The typical dropout voltage for the regulator is 2 V, so we're left with around 3 V to get rid of. <S> That would go into the regulator's heatsink and will increase the amount of heat the regulator dissipates. <S> On the other hand, if we take a look at say 1N4007's datasheet, we can see that the forward voltage drop is between 0.7 V and 1 V in the forward current region that would be interesting to the users of LM7812. <S> So with low current consumption, those 3 remaining volts would turn into at most 1.6 V (since we have two diodes conducting in the rectifier at any one time) that need to be dissipated into the heatsink of the regulator. <S> At higher currents, the remaining 3 V would turn into 1 V which isn't as big problem and gives us some margin if the drop-out voltage of the regulator is higher than the typical 2 V. <S> If we used Shottky type 1N5819 diodes for the bridge rectifier, we'd have voltage drop on the diodes of around 1.2 V, leaving us with much more heat to dissipate on the regulator itself. <A> Silicon schottkys can be found at 250 Volt easily but at 250V there is a VERY limited selection. <S> Manufacturers via their sales reps state that they can not make them above 250 <S> V.There is the problem of increased reverse leakage current that can upset some circuits AND cause thermal runaway at elevated temps below Tjmax at voltages below Vrmax .This <S> runaway can occur at low voltages when using low voltage devices just as easily as in high voltages . <S> OK keep them cool unless you really know what you are doing. <S> Sic devices have significant bulk resistance .The <S> overall tempco of the foward volts is positive at modest currents meaning that thermal runaway is possible despite the low leakage of the high band gap semiconductor.
SiC schottkys are available at high voltages and are fast and expensive but the foward drop can be worse than a normal diode at realistic currents .These
Using GPIO in PC I've got a simple project on host device that should drive 2 pins with high logic level (voltage 3.3V, 5V or 12V - doesn't matter) and wait for 2 others pins become driven high level by the peripheral device. Can I implement such host device with a standard PC and what hardware (built-in or extra) should I use? <Q> If you can still find one, it's worth mentioning that a true parallel port is about as close to a GPIO as you'll find in an off-the-shelf PC. <S> Classic implementations lack some flexibility in that many of the pins have fixed direction, and some are inverted, but people have been working around that for years. <S> The greater limitation is that such ports are becoming extinct. <S> The more abstract replacements such as USB-parallel converters are typically usable only to control actual printers, and lack registers which you can directly read/write to set or monitor pin state. <S> There have been rumored to be a few which do have this capability, but they can be hard to find, and require detailed attention to drivers. <S> At that point it tends to become more practical to use a USB-connected I/O device. <S> Often this is a microcontroller running a simple firmware, either from the manufacturer or custom. <S> One major advantage of a custom implementation is the possibility to offload the lowest level, most repetitive, <S> and/or timing critical parts of I/ <S> O manipulation to the processor on the device, instead of trying to do it from the PC where the latency of USB packetization, traversing multiple buses, and multitasking operating systems tend to make bit-by-bit operations painfully slow. <S> If you haven't yet figured out exactly what form your solution will take, one possibility is to grab something like an Arduino which is packaged in both the hardware and toolchain sense for ease of use, and could operate as either a stand alone solution or as an I/O helper to do low-level tasks under command from an attached PC. <A> I'd recommend using an FTDI <S> FT232RL <S> using a special driver that enables it's bitbang mode . <S> This method will work on virtually all PC's and allows decent latency access to a simple GPIO. <S> There are many FTDI chip breakout boards out there, but I personally use this one . <A> It's not clear what you want the PC to do and what the device is supposed to do ("host device" makes no sense), but it seems you want basic digital <S> I/ <S> O from a PC. <S> PC's are not really designed for direct digital <S> I/ <S> O to external devices. <S> But, you can buy digital I/ <S> O modules that connect to the PC via USB, which then allow you to read and write individual digital signals. <S> However if this is really just a simple control problem, why do you need a PC at all? <S> Have a small microcontroller do the whole task itself. <S> That's exactly what micronctrollers are for. <S> They are small computers with digital and other I/ <S> O lines coming out that are intended to connect directly to external hardware.
You can do this yourself most easily by having a microcontroller communicate with the PC via a COM port.
What is causing the oscillation in the feedback loop of an SMPS? I am trying to make a switching constant current regulator for a Ni-MH charger. It accepts a current set input from the microcontroller using a PWM DAC. I basically want to source 2000mA and 200mA for 1C and 0.1C relatively for charging the 2700mAh battery. The way that I've tried to accomplish this is as follows: An OP-AMP which is configured in negative feedback, takes Vset (PWM DAC) as non-inverting input and Vsense (the voltage on sense resistor) as inverting input. It drives a small signal MOSFET with its output so that buck converter's voltage output is for desired current at the load. However, I am getting oscillations on TP1, which affects the whole system. Here is the schematic, I am sorry that it is 3500 x 2500px : I have connected a short instead of R6, since Rdson of Q2 is about 50mohms. Also, I have connected a 1R 11W ceramic power resistor instead of a battery. Q3 is set off and Q2 is ON. I have connected an ampere meter and it shows about 1.9A through the resistor. Here are some scope-shots of various test points which I have used very short ground lead on the probe to capture. Test Point 5; non-inverting input of the OP-AMP: Test Point 6; inverting input of the OP-AMP, voltage on the sense resistor: AC Coupled: Test Point 1; Vsense pin of the switcher, drain of Q1: Test Point 2; switch node: Test Point 4 - Test Point 6 ; probe on TP4, ground clip on TP6, or in other words, voltage on P3 connector, or output voltage: AC Coupled: <Q> Fundamentally, you have way <S> too much gain in your feedback loop, along with enough phase shift to create a very nice ~50 kHz oscillator. <S> First, I would simplify the circuit by eliminating the MOSFET Q1; instead I would consider swapping the inputs of the LM393 and using its open-collector output to drive the Vref node directly. <S> Secondly, I would add a significant amount of negative feedback around the LM393, along with a capacitor to roll off the frequency response. <S> You really do not need a lot of bandwidth in your control loop for a battery charger — a battery is not a highly dynamic load. <S> Edit #1, incorporating comments: <S> I understand about limiting the voltage swing on Vsense; that's what R1 and R2 are for. <S> I'm saying eliminate Q1 and R3 and connect the LM393 to the junction of R1 and R2. <S> Then, you need to swap the inputs to the LM393 in order to preserve the correct polarity of the feedback. <S> For negative feedback, just connect a capacitor between pins 1 and 2 of the LM393. <S> Since pin 2 is now connected to your reference source, you'll also need a resistor between C7 and pin 2. <S> Together, these components will roll off the frequency response of the comparator. <S> I would start with values like 10K and 100 nF, giving a corner frequency of about 160 Hz. <S> I don't know if this will be enough to make the system stable, but at least it gets you started in the right direction. <S> Edit #1, additional thoughts: <S> Let's take a step back for a moment. <S> If we ignore PWM_Vset for the moment, what's really needed is to take the 200 mV that appears across the sense resistor and translate this to the 1.221 V that the regulator expects on its Vsense pin. <S> This requires a simple noninverting amplifier with a gain of a little more than 6. <S> Based on the new circuit , it would be an interesting experiment to short out C7 and reduce R3 to 51K (gain = 6.1) and <S> see if the regulator is now stable. <S> If it is, we can then think about ways to make the setpoint adjustable. <A> Your control scheme is puzzling me. <S> U3A is an LM393. <S> A comparator. <S> The output is either high-impedance or ground. <S> The TPS5430 is meant to take an analog voltage at pin 4 and use an internal reference of 1.221V and an internal error amplifier to generate PWM. <S> You have Vsense tied to 2.5V, so when Q1 is off the duty cycle will go to zero <S> (sense > reference), and when it's on it will go <S> to maximum (sense < reference) at some slew rate controlled by the internal compensation. <S> You're essentially driving an analog pin with a digital signal - this is a hard way to go about things. <S> You also have zero hysteresis on the comparator, so the output may chatter if the inputs are close to each other. <S> Your idea about using the DAC to make a reference voltage, to control the output voltage (and the current) is valid and correct. <S> (You set up the buck controller so that the internal error amplifier is always high, then tie your external amplifier to it so that it can pull down the signal and control the duty cycle.) <S> EDIT: <S> Your revised solution will work. <S> Replacing the comparator with an op-amp error amplifer to set the external operating point is a good compromise. <S> You're essentially feeding a loop (the internal compensation of the buck) with the output of another loop (your external error amplifier) but that's the price you pay using one of those tiny-buck control chips with integrated feedback. <S> I would experiment with load steps to see if the output has any oscillatory tendencies, just to make sure that there's no chance of instability. <A> Solution to this problem I had, is a combination of both of the answers by Dave Tweed and Madmanguruman. <S> Thank you guys. <S> I have replaced the comparator <S> LM393 by a LM358 which has almost the same price, at least in Digi-Key. <S> $0.0797 for LM358 and $0.0756 for LM393, both in 100 quantities. <S> I also added some negative feedback with a capacitor, so that output will ramp up slowly enough, letting TPS5430 control the buck regulation. <S> Oh, and let's not forget that I have swapped the input pins. <S> Test results are great. <S> I have tried stepping the load, no problems. <S> I have also shorted the output or applied very little (less than half an ohm) resistance and again, no problem. <S> For a 5 ohms load at 1A, efficiency is about 91%. <S> For a 2A current at the same load, efficiency is at 90%. <S> Output noise is about 60mV peak to peak. <S> I am pretty happy with the results. <S> My goal now is to add some voltage regulation mechanism too so that I can implement Li-Ion charging. <S> Here is the latest schematic:
What you really need is a buck controller that gives you access to the internal error amplifier output, so that you can replace your comparator circuit with an actual error amplifier (bypassing the internal one) and have closed-loop control with whatever compensation you need.
Any reason power supplies always use single sided PCB's? I am designing a PCB that has an onboard power supply switching module which requires filtering and protection on the input and output side. Its going to be a double sided PCB but I was wondering if the power supply section should be kept to a single layer. Just about every power supply I have seen always uses a single sided PCB. The switching module is a 120VAC-24VDC. I am using a common mode choke, power factor correction cap, bypass caps, MOV, fuse and thermistor on the input side and filter cap, bypass cap and transient voltage suppressor diode on the output. I used a few topside traces to make everything fit neatly together. I imagine the single sided PSU's are solely for cost but is there anything I should be concerned about? <Q> In high-volume production, installing a few jumper wires or zero-ohm resistors is much cheaper than using a 2-sided PCB. <A> As others have said it's cost, but you'll notice that these boards are different too, a light brownish color. <S> They are typically phenolic (as opposed to FR4 - fiberglass) <S> so they are even less expensive. <S> They only have copper on one side -> even lower cost again and they are made via a pierce and blank method a punch like method (as opposed to drilling) which is even lower cost again. <S> Even a single sided FR4 board will be way more expensive than these boards. <A> Cost, for sure. <S> My work experience has been at companies doing power supplies for industrial and datacom applications, and we generally use 4- or 6-layer boards to allow sufficient copper for the powertrain and sufficient layers to efficiently route the control circuitry as densely as possible. <S> 1 and 2 layer approaches are fine where power density isn't a concern.
For most power supplies, the circuit is simple enough that it lays out with few, if any, crossovers required. It's entirely about the cost.
Multiplex dip switch input to microcontroller I have 3 DIP switch packages with 8 switches each, and not enough inputs on my microcontroller. This article (you have to download the pdf to see the schematic) gives an example of what I want to do. In the comments section, many people say the circuit won't work. I disagree; It looks like those commentators missed the fact that one of the lines is drawn as an 8 pin bus, and the fact that unused RA pins will be set as high impedance inputs. Still, I wanted to get a second opinion from the experts here! Edit: After reading the many good answers to this question it seems my initial impression was wrong. This circuit will only work for momentary push buttons, not dip switches. <Q> They'll add less than a buck to your BOM, and can be useful for other pin expansion needs, too. <S> I'm using this DIP package (also available in SOT and QFN)There are others. <A> The schematic in the article is poorly drawn. <S> I think he probably meant to imply an 8-bit bus, but the dots imply discrete connections. <S> On top of that, there isn't a bus width called out (which would disambiguate things). <S> As DaveTweed points out, there is a risk of false switch closure detection in certain switch combinations unless a diode is used in series with each switch. <A> Instead of using the circuit from the article, you could try this: <S> If you have a free ADC input, you can use the switches to produce a voltage, then use the ADC to convert to digital. <S> You could connect the switches to some DACs, or make a DAC from an R-2R ladder of resistors. <S> There's a decent explanation of R-2R ladders here . <S> As long as the resolution of the ADC is greater than the resolution of the DAC, you can measure combinations of input switches. <S> For example, with a 12-bit DAC, you could easily determine the states of 10 switches. <S> Pay attention to buffering the input to the ADC (an opamp is a good idea, but a cap could be enough). <S> Also, make sure that the DAC output for any combination doesn't fall exactly on the expected ADC switching threshold (ie, if the ADC's most significant bit switches between 0 and 1 at 0.5V, make sure the DAC output is a little more than 0.5V when the most significant switch is turned on). <A> Yeah so long as you only drive one of those 4 row pins at a time and then read the 8 inputs it looks like you are right. <S> I only looked at it for about a minute though :)
You could also use an I2C (or SPI) input multiplexer to read as many DIP switches as you want with only 2 (or 3) wires. Note that if the design requirement only requires reading one closed switch at a time, the circuit will work just fine.
Gerber to DXF converter What's a good utility to convert gerbers to DXF/DWG? The reason I ask: I'd like to create gerbers to give to mechanical engineers for use in SolidWorks to look for interference due to solder fillets on pads and other interferences. I'm using PADS Layout and it has a DXF export but the output is messy and the export utility offers few options to control the DXF output. A gerber to DXF conversion utility could provide enough flexibility and control what goes into the DXF. I'd welcome insights or suggestions to close the EE / ME gap - methods to get realistic models of PCBs into 3D cad. Meanwhile, I'll try a free trial of ViewMate Pro. <Q> Another answer suggested an excellent solution for: <S> those who looking free way to convert gerber to dxf can try gerbv and pstoedit install gerbv and pstoedit first convert your gerber to ps through gerbv and >then using pstoedit export it to dxf gerbv -x ps mygerber. <S> GTS pstoedit -f <S> dxf output.ps <S> mydxf.dxf remember pstoedit need ghostscript to work <S> But an important improvement to the pstoedit is to add the -mm option so that the file generated will be in mm and not in pxls. <S> In my case I made it into a ps2dxf. <S> BAT file that is: pstoedit -f <S> dxf:-mm <S> % <S> 1.ps %1.dxf and <S> a name.ps file is converted with: ps2dxf name <A> DeskPCB from <S> IMService <S> does this. <S> It's intended to convert gerber to g-code for isolation milling, but dxf is an output format. <S> It is not free and I don't know the current price, but by way of comparison it cost me $90 back in 2007. <A> CAM350 from DownStream Technologies does that. <A> Pentalogix ViewMate Pro ($500 or free and un-crippled for 30 days) will export gerbers and drill files to DXF, HPGL etc. <S> It also has DXF import and some manipulation capability <S> (Move layer XY position, delete or move elements etc). <S> DXF export options: separate file per layer or all layers combined, Export as polygons, filled or unfilled. <S> Update: <S> CAM350 from DownStream Technologies does that. <S> A colleague recommended LinkCad , $2500 USD. <A> I love Diptrace. <S> Great as a gerber viewer, board creater, etc. <S> I use PADS Layout at work but prefer Diptrace at home. <A> Try GerbView ... <S> it is not free but not expensive. <A> GTSpstoedit -f <S> dxf output.ps <S> mydxf.dxf remember pstoedit need ghostscript to work
those who looking free way to convert gerber to dxf can try gerbv and pstoedit install gerbv and pstoeditfirst convert your gerber to ps through gerbv and then using pstoedit export it to dxf gerbv -x ps mygerber.
Use transistor to auto swap power source Basically I'm looking to use a simple transistor circuit to diconnect one V+ (or ground) when another is connected and automatically switch back when the switching source is removed.Like having a small lithium batt in a device with charge circuit external. When the charge supply is connected I'd like to run the device from the external supply while charging the battery and automatically swap back to battery supply when the charger is removed.Planning to work with 5VDC. Basically looking for pointers on how to setup such a switch?already have the external charger worked out. For clarity's sake:I'd like to charge the battery while still in circuit with the load device while powering the device.Wouldn't the batt need to be removed from load to do this safely? Could this be achieved by detecting the charger input with transistor switching and how? <Q> This is often called "Power Path" and you use FETs connected as ideal diodes. <S> Many chargers have this functionality built in, like the <S> LTC4160 from Linear. <S> TI also have a number of battery chargers with Power Path. <S> (No direct link, you have to search the TI site). <S> Microchip has an app note about load sharing if you want to roll your own simple version. <S> You can also get ideal diodes nicely packaged. <A> If you can live with a diode drop on the battery, then using two diodes is the easiest approach. <S> Use Schottky diodes for lower voltage drop. <S> For such low voltages and modest currents you can probably get down to 200 mV or so. <S> If the 200 mV drop is acceptable, then I would just go with that. <S> If the diode drop is not acceptable, then you still use diodes but put a FET around each one. <S> The circuit then has to sense whether the external source is available and enable/disable the appropriate FETs. <S> This is more complicated, and you have to consider how fast the circuit can react, but you should be able to find FETs with Rdson of a few 10s of mV, so the drop is virtually eliminated at modest currents. <S> Perhaps you only need to do this accross the battery diode if the external source can be arranged to have high enough voltage. <S> After all, the battery will vary in voltage with state of charge and temperature, so even after a Shottky diode drop you could arrange for the external supply to provide at least as much voltage as the worst case battery level the circuit has to operate with. <A> What you are asking for is an Exclusive OR switch (diode or transistor) when all you may need is Inclusive OR. <S> This is already done by simply running off the battery all the time and relying on the charger manager to decide if the battery needs to float or receive charge by testing its capacity momentarily when connected. <S> Explicit with this design logic is that the load will get its power from the same connector and the charger <S> OR battery will supply power from whichever <S> is higher in voltage. <S> However if your charger does NOT determine when/how to float the charge voltage your battery may NOT get a change to rest at full charge and the thus continual leakage charging current may reduce lifetime. <S> After thinking about this, now it seems this is how mobiles and laptops are designed with smart chargers. <S> So it depends on your charger.
Smart chargers are designed to shutoff when full charge is reached. If it is not a smart switch then you may need to research this more or use an Exclusive OR switch such as the contact in the DC power jack (gnd) or diode bridge or FET bridge.
DIY small motor that turns for x seconds every y seconds I'm a civil engineer, hiker, and hobby photographer. I am trying to build a little device that gently turns a small motor on every x seconds, keep it on for y seconds, and stop it for z seconds. For example, Set the motor to run every 30 seconds, have it run for 45 seconds, and stop it for 37 seconds. In addition, the movement of the motor must be such to minimize vibration on the camera that it will support. Above all this device must be portable in a regular backpack. I have played with the raspberry pi a little bit (I don't own one) and have dabbled in electronics a touch <Q> Even after your edit the data on timing don't make sense: you can't run a motor for 45 seconds every 30 seconds. <S> But the pattern isn't important for the solution. <S> I would use a small microcontroller like the PIC10F200 , which doesn't need any external components to create the on/off pattern. <S> You can have the 10F200 in a DIL package (left), or a 3 mm long SOT23-6 package. <S> The microcontroller can't drive a motor directly, so use an output pin to control a transistor which drives the motor: <S> You don't say anything about RPM, but this small geared DC motor is available gear-ratios from 4.4:1 to 499:1 for 2020 RPM down to 12 RPM. <S> For even slower you can add an extra gearbox. <A> Pi may be an overkill, but that can be justified. <S> Pi is a development platform that the O.P. already has some familiarity with. <S> It fulfills the portability requirements. <S> If it's wired in the astable circuit with variable R1 and R2, it can produce a square wave with variable frequency and duty cycle. <S> Like microcontroller, 555 can't drive the motor directly. <S> It will require a BJT arrangement similar to one in the post by @stevenh, or a MOSFET. <A> I recommend using a 555 timer for your 30-second intervals. <S> It's not terrifically accurate, but I imagine it will be close enough <S> : You can calculate the on-time (t1) and off-time (t2) using the values for Ra, Rb, and C. <S> You'll need to drive the motor through a transistor though. <S> Make sure you choose a transistor that not only can handle enough current to properly run the motor, but that can also be driven by the 555 timer. <S> [This answer have arrived to this thread as a result of a merge.]
The resulting gadget is a one off (as opposed to mass production), so I would think that cost of parts is not so critical. Stepper motors are also often used with microcontrollers because you can control their position very accurately, but they require more complex control signals than the simple on/off, and especially at low RPMs don't run smoothly: they're not called "steppers" for nothing. On the opposite (low) end of complexity is the venerable 555 timer.
How do I dead bug solder this SOT-23 to my PCB? I swapped the base and emitter of my NPN transistor land pattern. If I flip over the part, the pins are in the correct orientation, although there is a 1mm between the pins and the pads. When I tried to solder one I just made a mess. I soldered wire wrap wire in the vias and then tried to solder the wire to the pins. Is there a better technique? Here is a photo of the part before I would desolder: Here is the mess I made of a different one: <Q> This will leave the third pin up in the air, and you can then run a short wire down onto its pad. <S> A picture should be worth a thousand words, but this one only runs to about 250 because of the focus, sorry: <S> The main advantage of this method is that no pins are bent, and only a single short and straight wire is needed, so it is easily removed and the component recovered. <S> Sits within the existing footprint too. <A> One way is to leave the SOT-23 soldered to the board, simply cut those two traces on the PCB, and solder jumper wires to the base and emitter on the part, swapping the wires over to the correct vias. <S> Cleaner, less risk of mess-up. <A> If you are careful you can bend the lead frame and invert them. <S> It's entirely possible to break the leg off. <S> Using two tools and you can bend the outer portion of the lead down. <A> If you have the space around the transistor's location in the layout, you can leave it in its normal orientation and solder any two of the transistor leads directly to their pads, and then run a single wire between the remaining lead and its pad. <A> Here is a crazy idea. <S> There is likely plenty of clearance on the other side of the board for a small SMT component. <S> If this is a simple two-sided board, and pads of this surface mounted device are not over any traces on the other side, I'd just drill them through to the other side to create a mirror image footprint on the opposite side of the board. <S> (I have a set of very fine drill bits, and a thumb drill just for this sort of thing.) <S> To create pads, I would find the smallest brass nails I could get my hands on. <S> Check out the following link: these mini nails have only a 20 mil diameter: <S> http://www.micromark.com/mini-nails-3and32-inch-long-x-020-inch-dia-pkg-of-100,6561.html <S> Push these through the drilled holes from the opposite side until flush with the board, then solder from the original side, exactly if these nails were through-the-hole components being installed in a one-sided board. <S> Then trim them, just like component terminals. <S> Presto: the nail heads give you brass pads.
A quick and simple way of doing this is to flip the SOT23 on its back then solder the side with two pins onto the pads.