source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Stabilize 12V to 12V How can I stabilize a 12V input to a 12V stabilized output voltage? I have a battery that supplies 12V but not regulated and a device that uses 12V regulated, how can I supply power to that device using thus battery? EDIT I just searched on the subject a bit more and found a part called a " zener diode " it seems from a quick reading on Wikipedia to do what I want, make an unclean 12V to a regulated 12V. but I'm not sure. Can someone please clarify if this is in fact what I want? My "needs": 12V @1A from a ~12V lead acid battery - can go down to 8V - to an XBOX Kinect. <Q> This looks like a good target for a SEPIC or Buck boost converter, which can allow an output voltage higher, lower or the same as the input voltage Zener diode only limits the voltage. <S> If the output is 11.6V, the zener diode will not do anything. <S> You didn't specify your current requirement, so its hard to give you a part as a starting point. <A> A boost switching regulator can increase the battery voltage high enough for a buck switching regulator to bring it back down to a regulated 12V. <S> It won't have the efficiency of, say, just a large capacitor, but it will be regulated as closely as part specs allow. <A> There is two simple options. <S> The first is checking to see if that 12v regulated part actually uses or needs 12v. <S> Assuming the 12v battery never goes beyond 12.7v (typical max charge of a 12v battery), the only way to go is down. <S> A Boost converter with passthrough region or feature is your best bet. <S> If the VIN voltage is at 12v, it simply allows it to pass through without regulation. <S> Once the voltage drops, it starts to regulate it up to 12v. <S> Update: Since you are going for a Kinect, as shown here the Kinect can still work from an input voltage lower than 12v. <S> So you would not need to have a steady regulated 12v rail unless you need it for something else. <A> Yes, you are right! <S> Because of the low difference of voltage between the input and output, you can't use a ic for to regulate the voltage like the 7812. <S> But maybe you can use a Low-dropout regulator . <S> So you can use a zener diode to control the voltage. <S> But it will only regulate the overvoltage , so if the voltage drops 12V you will need a big capacitor to mantain the voltage. <S> A batery normally the voltage will be under 12V not, over 12V, so this probably its not a good idea to stabilize the output voltage. <S> Vin <S> > <S> Vz -> <S> Vout = <S> Vz Vin < Vz -> Vout = <S> Vin simulate this circuit – <S> Schematic created using CircuitLab Vz = <S> 12V <S> R1 = <S> (Vin - Vz <S> ) / I <A> I found something rather affordable that can do the trick if I didn't screw up. <S> It's a stock built Buck stabilizer. <S> Maybe it can help you? <S> https://www.amazon.com/Yeeco-Regulator-Converter-Converters-Adjustable/dp/B00XM8SM66/ref=sr_1_11?s=electronics&ie=UTF8&qid=1492180208&sr=1-11&keywords=dc+power+regulator <S> Just be sure NOT to plug any standard USB device into the USB outlet when you have it set for anything other than 5V. <S> The USB port voltage is the same as the voltage at the output wire coupler.
If it regulates down inside and only uses the 12v into a regulator, modify that, or figure out the tolerances/dropout it needs and work around it. Otherwise, you can use a boost converter.
USB to Serial Converter using the CDC/ACM specification I try to use a Usb to Serial converter in a windows store application. As the windows store application does not Support SerialPorts i need to find a USB/Serial Converter that supports CDC/ACM. Here is what i tried: Create a customer inf file for a FTDI controlled serial converter (which didn't work because i later found out that FTDI does not support CDC) Find a serial converter that supports CDC (i didn't had any luck with that either) Can somebody tell me where i can get a CDC compatible Usb/Serial converter? <Q> The Microchip <S> MCP2200 is an FDTI-like device that implements CDC protocol. <S> (This will be most manufacturers that sell USB-capable micros.) <A> My advice would be to use the Arduino leonardo board since the product guide says " The Leonardo is an instance of USB's Connected Device Class (CDC) driver." <S> And then just use the <S> RS232 Shield to get the level shifting for RS232. <A> http://sabrent.com/category/cables/CB-FTDI/ <S> That device appears to support CDC mode natively: <S> Compatible with USB Specification v1.1(0) & USB CDC v1.1, USB 2.0 <S> It comes with a driver CD, but in the description is another interesting line: Utilizes the FTDI chipset; plug and play, driverless installation. <A> Exar makes USB UART chips that support CDC/ACM. <S> However, you have to watch out as they come up with hardware flow control enabled <S> and you can't turn it off unless you use their proprietary driver. <S> If you don't need it, just make sure you tie off the flow control pins properly <S> and it isn't an issue. <S> http://www.exar.com/connectivity/uart-and-bridging-solutions/usb-uarts/xr21v1410 <S> I'm not aware of any particular USB to serial cables that use this chipset, though.
Otherwise, you can choose a USB-capable microcontroller from a manufacturer that supplies CDC example code.
Designing CAN for a 3.3V system I am currently designing a CAN system for a 3.3 V board and I am looking for some insight regarding CAN transceivers. These are my goals from the CAN system: No influence on the CAN bus if in read-only mode. Terminating resistor - a unit may sometimes need a terminating resistor. Is there a method to overcome that? Voltage - there are not too many 3.3 V operated CAN transceivers. Is it worthwhile to look for one to save a regulator or is the special transceiver with higher cost and performance worth it? Security - the system is installed in a car. The main importance is that the system will do no harm either in receive-only mode and in trasmit mode. What should I look for in the datasheet to accomplish these goals? Are there special methods I should look for and read about? <Q> No influence on the CAN bus if in read-only mode. <S> The CAN controller which is (should be) integrated in your MCU most likely has a listen-only mode. <S> When you set the controller in this mode, it will not ACK frames. <S> Terminating resistor - a unit may sometimes need a terminating resistor. <S> Is there a method to overcome that? <S> The most convenient way is to put one such 120 ohm resistor on your board, in series with a jumper or similar, so that when the jumper is present, the resistor is connected between CAN Hi and Lo. <S> Voltage - there are not too many 3.3 V operated <S> CAN transceivers. <S> Is it worthwhile to look for one to save a regulator or is the special transceiver with higher cost and performance worth it? <S> I don't think 3.3V transceivers are more expensive. <S> As usual, the price depends more on which brand and which supplier you specify, rather than the details of the actual IC. <S> Though of course, if you specify some 48 pin QFN monster, it is going to cost you... <S> I'm using TI's HVD232 which is small and affordable. <S> Security - the system is installed in a car. <S> This is all on the application level. <S> There are many things to consider. <S> For example, what happens if your MCU flips out in the middle of a CAN transmission, will it sink the whole bus or leave it gracefully? <A> Unless you're building a CAN sniffer/snooper that <S> only listens, there isn't really a "read-only mode". <S> All other nodes on the CAN network simultaneously provide ACKs, check for collisions, and message validity. <S> If you use a commercial CAN transceiver/controller combo there isn't much to worry about. <S> As far as termination goes, you should either know if you need a terminator or not; if you're tapping into an existing network then probably not. <S> The cheap-but-hard-to-configure-on-the-fly method is to put a part on your board and populate it as needed. <S> If the user needs to configure it, either add a switch (costly) or provide a separate resistor with an appropriate connector (also costly, unless you leave it up to them to source it/include it in their harness) <S> Some CAN transceivers are designed to be powered directly from the car's electrical system (e.g. Freescale , some of which also include an embedded regulator to power a microcontroller), others have other features... <S> the combinations are too numerous to list. <S> I would just look at offerings from several companies (TI, Microchip, Freescale, and literally every other semiconductor manufacturer, just click "Automotive" on their homepage) and find one that fits your criteria. <S> Better yet, ask your supplier's applications engineer. <A> In regards to the terminating resistor, you will need it at the end of the bus to balance the impedance, but in my experience if the speed of the network is not too high <S> (I've used it at 125kb/s), it works without the resistors. <S> Also, apart from the 120 ohm resistor (standard termination), there is another method that improves EMC called split termination (the one I use), that involves two 60 ohm resistors and a capacitor: <S> http://digital.ni.com/public.nsf/allkb/C03609ECFF16A14E86256E5A008293EA <S> I recommend also reading this application note on 3.3V <S> CAN transceivers from TI: <S> http://www.ti.com/lit/an/slla337/slla337.pdf <S> Finally, for ESD protection I use this CAN bus protection diode from NXP: http://www.nxp.com/products/automotive/discretes/esd_protection/PESD1CAN.html
The main importance is that the system will do no harm either in receive-only mode and in trasmit mode.
What does it mean that a multimeter is four and a half digit? The fluke 87-V is advertised as a "four and a half digit" meter. What does that mean, how does half a digit fit into the equation? <Q> At most ranges, the smallest reading is 1/19,999 of the maximum (e.g. on the 20 volt range, values range from 2.000 to 19.999 in steps of 0.001). <S> Although it may seem odd to regard a meter that can read up to 19,999 as being a full "half digit" better than one which can read up to 9,999, common terminology for many decades has been to use the term "1/2 digit" to mean a leading digit that's zero [blank] or one, "2/3 digit" to mean 0, 1, or 2, and "3/4 digit" to mean 0, 1, 2, or 3. <S> The fraction is explained thus: the numerator is the maximum display value for the MSB - '1' or '1/2', '3' for '3/4'; the denominator is the total number of possible display values '0, 1' (hence '2' for '1/2'), '0, 1, 2, 3' (hence '4' for '3/4'). <S> Thus, "3 3/4 digit" doesn't mean that the numerical significance is 3.75 times as much as much as for a 1-digit meter, but instead that there are three full digits, plus a digit that shows a value 0-3. <S> Source: <S> What's a half digit anyway? <A> The final answer given in not completely representative of what will be found on a meter. <S> A small correction to the description is needed. <S> The '19,999' really means 20,000: 4 digits for the 0,000 and an implied 1. <S> Because it is implied it is give 9,999 but really means 10,000:1 of the full scale value. <S> That is the missing bit. <S> If the scale is 0-5 volts, then the reporting display show 0-5 volts divided by 10,000 for 4 digits, and 20,000 for 4.5 digits. <S> In other words the extra 'half digit' means it can display a change of 1/2 the amount indicated by a 4 digit machine. <S> If it was a 0-10,000 volt meter, it can show 1 volt steps with 4 digits (really only going up to 9,999 volts). <S> An extra half digit means it can show 0.5 to 9,999.5 volts, but not 9,999.2 or 9,999.8. <S> The last digit is either 0 or 5. <S> That is the '1/2'. <S> A 5-digit machine could display 9,999.1 and 9,999.7 <S> and 9,999.5. <S> That is a 'full 5 digits'. <S> Some scales show 0.2 g resolution, not 0.1 so they can show 999.2, 999.4, 999.6, 999.8 and 999.0. <S> How many digits is that? <S> :) <A> That means that the maximum reading on the display is 19999 - the first digit can only be 0 or 1. <A> I posted this answer on the 4.75 digit topic , but I thought it would be useful here too. <S> Background <S> Digits is an old way of describing the resolution of a digital multimeter. <S> The meaning of half-a-digit is pretty well established - it can only display the value "1". <S> Problems started when manufacturers came out with things like 4.25 digits or 4.75 digits. <S> Since there is no standard as to what the 0.25 or 0.75 mean, manufacturers are free to come up with their own interpretation, which just causes confusion for everyone. <S> For this reason, vendors started using counts . <S> A number of counts is the maximum value the multimeter can display, plus one. <S> For example, a 4000 count meter can display values up to 3999. <S> The answer Let's start with the most standard option of 0.5 count. <S> A 4.5 digit meter would be capable of displaying at least 20,000 counts (max value of 19999). <S> The 4.75 digits is a more of a marketing term and could mean anything between 30,000 and 50,000 counts. <S> Note that the Fluke 187 , which is a 50,000 count meter is still described as 4.5 digit meter by Fluke themselves. <S> But wait! <S> Then there's also 4.25 counts. <S> Does your meter have 4.5 digits, but does not go all the way to 19999? <S> No worries, just describe it as 4.25 digit multimeter! <S> See this Aim-TTi 1705 spec sheet as an example. <S> It is a 12,000 count meter, by the way. <S> Further reading B&K Precision: <S> Difference Between Counts and Digits <S> EEVblog <S> #26: <S> Multimeter Tutorial - Counts, Accuracy, Resolution & Calibration
It means you have four full digits and one half digit, only capable of displaying 1.
What are the smallest microcontrollers? I am looking for a microcontroller to use in a project which is very space-limited. What microcontrollers have some of the smallest packages? This does not need to be high performance, most microcontrollers are more powerful than is necessary in this case, but it does need to be tiny. Atmel's ATtiny20 comes in a WLCSP-12 package which is 1.55x1.4x0.53mm, this is not bad. What other options are there along those lines or smaller? (From any family, doesn't have to be Atmel) Update: with at least 4 I/O pins. <Q> Thanks to everyone who pitched in with suggestions, I have tried to collect all the info in the same answer. <S> The smallest microcontrollers from each family: <S> Atmel ATtiny20-UUR: <S> 1.55 x 1.40 x 0.53 mm, WLCSP-12, 10 gpio,0.4mm pitch (the winner) <S> (new) Cypress CY8C4014FNI-421: 1.56 x 1.45 x 0.4 mm, WLCSP-16, 12 gpio, 0.35mm pitch <S> (new) Maxim MAX32660GWE: 1.55 x 1.57 x 0.64 mm, WLCSP-16, 10 GPIO, .35 <S> mm pitch (new) Freescale Kinetis KL03 MKL03Z32CAF4RTR: <S> 2.00 <S> x 1.61 x 0.56 mm, BGA-20, 18 gpio, 0.4 <S> mm pitch Freescale Kinetis KL02 MKL02Z32CAF4R: <S> 2.00 x 1.95 X 0.56 mm, BGA-20, <S> 18 gpio, 0.4mm pitch <S> NXP LPC1102UK: <S> 2.32 x 2.17 x 0.60 mm, WLCSP-16, 11 gpio, 0.5mmpitch <S> Ambiq Apollo2 2.5 x 2.5 <S> x 0.45 mm, WLCSP-49, 34 gpio, 0.35mm ST STM32F042T6Y6: <S> 2.70 x 2.60 x 0.55 mm, WLCSP-36, 36 pins, 0.40mm pitch TI MSP430G2252: <S> 2.65 x 2.55 x 0.28 mm, bare die, 22 pads <S> TI <S> MSP430G2x01: <S> 4.00 x 4.00 x 0.90 mm, QFN-16, 16 pins, 0.65mm pitch Microchip <S> PIC12LF1552T: 3.00 x 2.00 <S> x 0.50 mm, QFN-8, 5 gpio, <S> 0.5mmpitch <S> Sometimes there are other options in the same family which use the same package, but I haven't found anything with a smaller package. <S> This doesn't take into account how much supporting circuitry each chip needs, of course. <A> ATtiny4, ATtiny5, ATtiny9 and ATtiny10 are packed in different 6pin packages some of them very small. <S> They all have 4 I/ <S> O pins. <S> Some of them ADC. <S> Check for details on ATMEL site . <S> EDIT: <S> After some more search. <S> Well, ATtiny20 in WLCSP package is even smaller. <S> So, it becomes the smallest available Atmel microcontroller. <S> (only in ATtiny20-UUR variant) <A> The NXP LPC11A00 is an ARM Cortex-M0 controller that comes in a 20-pins WLCSP package: <S> Comparable in size to SOT-23, but those (AVR and PIC) only have 6 pins. <S> ARM is also 32-bits. <A> These come in SOT-23 packages: <S> Added: <S> I should have mentioned that these things also come in a 2x3 mm DFN package, but I didn't have a cool picture of those available. <A> You can also obtain microcontrollers as dice - the actual semiconductor after cutting from the silicon wafer, but before packaging. <S> These can be used as Chip On Board (COB) assemblies and can be much, much smaller than a packaged part. <S> Some companies also offer Chip Scale Packaging (CSP), which is only slightly bigger than that actual silicon dice inside the package. <S> These are often under 0.5mm high, and between 1mm and 2mm in length and width. <A> You can add to your list the new CY8C4014FNI-421 , with a 16 pin WLCSP at 1.56 x 1.45 x 0.4 mm, only slightly larger than the attiny, and has 12 gpio, 16k flash and 2k sram. <A> I can think of the freescale <S> kinetis <S> KL02 <S> 1.9mm X 2mm its a ARM Cortex-M0+ 20 pin, its a BGA though here is the package info
The smallest microcontrollers I know about are the Microchip PIC 10Fxxx series.
Fundamentally knowing when to use capacitors / inductors I've always stumbled when looking at even simple circuits that use capacitors or inductors and trying to work out why it is there, without using "past experience". What I mean is, if we need to limit the current we know that we need to use a resistor and we know how to work out which we need. If we need to reduce the voltage to something we again know we can use a resistor. If we need to stop the flow of current in a specific direction we know that we need to use a diode. All this can be worked out mathematically and "learnt" as circuits 101. But I can't seem to find out information how to know when to use a capacitor, for example: We have X and Y and wasn't Z... "Oh so we need a capacitor here". All the explanations for capacitors I've seen in circuits have been from peoples practical knowledge or past experience... without that, you wouldn't have known that you would have needed a capacitor. My brother who's doing some electronics in school brought a simple circuit diagram home that they are making and yet there's a capacitor in it. How do you work out and know that you need a capacitor without relying on past experience "I found if I stick in a capacitor it helps..." how do you learn or know when to use a capacitor from the start / design stage? <Q> The best way to visualize, without proper knowledge, is that a capacitor allows high frequency signals to pass through it. <S> An inductor allows low frequency signals through. <S> Knowing this, you can use it in a circuit in the following ways: Capacitor: <S> If you have unwanted noise (high frequency) on the power line going to an IC, you can put a cap in parallel to the IC. <S> This will "let" high frequency noise go to ground instead of through the IC. <S> If you have a part switching on and off quickly, it wants to grab instantaneous current from the power line (high frequency). <S> The power line will dip , which looks like a high frequency blip on the power line. <S> The capacitor stops this by "giving" some if its stored charge to the IC until the power supply can catch up. <S> If you have unwanted DC voltage (low frequency), it will block the DC signal and only allow the AC/RF (high frequency) to go through. <S> So, if you have an AC signal, you can put a series capacitor to make sure no DC goes through and hurts the rest of your circuit. <S> Inductor: <S> If you have unwanted noise, you can use an inductor in series in a similar way to a capacitor in parallel (shunt). <S> So, your 5V line is going through a long cable and may have picked up some noise along the way. <S> A series inductor might help. <S> Anything more specific/complicated than this will require real knowledge of circuits. <S> So, if you're a hobby electronics sort of person, and your 5VDC line is rippling a little bit, trying out a few capacitors to ground is the type of solution you might try. <S> Again, just a very basic example. <S> edit <S> : There are many, many uses for these components that are used for complicated reasons. <S> The things I stated are an example of the more arbitrary uses of them. <S> Capacitors/inductors in gain stages, op-amp circuits and filter structures are a different beast and are chosen by analysis, not by "experience". <A> If we need to stop the flow of current in a specific direction we know that we need to use a diode. <S> If we need to block DC we use a capacitor. <S> If we need to block very high frequency AC we use an inductor. <S> If we need to design a filter we (can) use resistors, capacitors and inductors (and op-amps and transistors etc..) <S> If we need to design a switch mode power supply we use capacitors and inductors and diodes. <S> If we need to design a better switch mode supply we might replace the diode with a MOSFET. <S> If we need to reduce ripple voltage on a power supply we use a big capacitor. <S> If we need to reduce ripple some more we might also use an inductor. <S> If we need to provide isolation between circuits we might use two inductors magnetically coupled to make a transformer. <S> If we need to convert a squarewave to a higher voltage we might use diodes and capacitors. <S> If we need to make a Tesla coil we use capacitors and inductors (and stand well clear). <A> There are several intuitive approaches to the capacitance and inductance elements, depending on what schematic we are thinking about. <S> The frequency dependent resistance - when the schematic is linear, working with sinusoidal or close to sinusoidal signals. <S> This approach is working pretty good. <S> One example is using the capacitors and windings as a filter elements, blocking some or all of AC signals. <S> An energy saving devices - this approach is very useful when the capacitance or inductance work in some pulse schematic, as a time preset element - different RC, LC or RL oscillators, pulse generators. <S> In this case, the proper approach is to think for capacitors and inductors as a energy accumulator. <S> The capacitor stores the energy as a charge/voltage and the inductor <S> stores the energy as a current. <S> As long as the energy needs some time to be accumulated/dissipated, this approach explains why the voltage on the capacitor and the current through the inductor can not be changed instantly. <S> All these are of course very rough idea of the reality, but it allows quick intuitive analyze of the schematics and understanding how it works in generally. <S> For more precise analysis of course exact equations have to be used. <A> Capacitors may have many different uses in an electronic circuit. <S> These are some I can think of : as energy tanks on power supply lines. <S> Either to reduce the voltage ripple due to the power supply itself, or to reduce the influence of the changes in power consumption in some part of the circuit (for example, power stages) on the supply voltage. <S> in conjunction with resistors and/or inductors as a part of filters. <S> Filters are designed to provide a specific frequency-response curve. <S> Some eliminate high frequencies (low-pass filters), some allow a specific band of frequency to pass through (band-pass filters. <S> This is what make a radio receiver receive ONE station only), ... as coupling capacitors, for linear transistor amplifiers. <S> A DC bias must be applied to this kind of amplifier to operate properly. <S> The problem is that two consecutive amplifiers do not usually operate at the same voltage bias. <S> You must prevent the DC current from flowing from a stage to an other, whereas the AC signal you want to amplify must go through. <S> This is why you put capacitors.
Any arbitrary placement of capacitors or inductors is likely EMI/ripple/noise mitigation.
Will I need diode if I add button to this schematic? Here is some pre-story. I removed ignition switch in my car which had five wires connected to it (accessories, ignition, starter, +12V for ACC&IGN, +12 for STARTER), and connected the wires to the relays. Relays are controlled by arduino board. The arduino board is controlled by phone over bluetooth. Everything works great, just like I wanted it to be. However, I noticed that in some cases I might want to have a button to control starter relay without arduino. This might be useful if I stall the car and have to re-start the car. In this case I wouldn't want to reach for the phone, but just use starter button. So I bought 3A@125VAC/1.5A@250VAC pushbutton just for that. Now I have three options of connecting this pushbutton. Put it between 5V and resistor that goes before transistor. Put it between ground and relay coil wire Connect the button to arduino. Read the input on arduino and then set the output for +5 control pin. Here is the picture of schematic. "Digital pin" is some digital pin on arduino board that send +5V. On the top "+-12V" is just a sing +12V wire. And finally RLY1 is the relay. I kinda see why and how I would want to have a diode for case 1 and 2 so that the current doesnt flow to the collector side of transistor. Or similarly have diode so that current doesnt go to the digital output pin on arduino. Does this make any sense? <Q> The easiest solution is your solution 2. <S> It is best fit for future changes to your requirements. <S> If you change your mind, eg. <S> you don't want the push button to work under certain conditions, it is easy to implement in software without having to change the wiring. <S> Do add some extra input protection on your Arduino though to protect from overvoltage and noise. <S> Use a series resistor and a couple Schottky diodes to clamp the input to Vcc and GND. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> The easy way: I think that the easy way is to connect the button in a input of the Arduino, then, Arduino send the command normally to the transistor. <S> But its not the most reliable way, because if the Arduino for some reason doesn't work, your car won't work too. <S> The reliable way: Is just put your button in parallel with the transistor, that will work as the example below. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The 3rd solution will work too, but you will have more work, because you will need get 5V somewhere to power it, and putting in parallel with the transistor is already there 12V. <S> It is helping to raise the lifetime of the relay. <A> Outside of this making it absurdly easy to steal your car, the pushbutton would go around Q1. <S> Keep the diode where it is. <S> The diode is acting as a flyback diode and absorbing the "kick" the relay coil gives off when the power is stopped. <S> You need one diode per relay coil, not per switch (the transistor counts as a switch). <S> If you omit this diode, the relay's voltage spike is going straight back into your +12V system, and that spike can be hundreds of volts. <A> The diode will prevent arcing on the switch, which would otherwise reduce its lifetime. <S> You only need a single diode to protect all parts in line with the coil though.
The diode in parallel to the relay is cheap and protects the transistor (and in turn the Arduino's microcontroller) in all three of your solutions. Connect the push button from relay coil to ground, across the transistor. The best solution in my opinion is your solution 3. All the methods will turn your car unsecure, do it with caution. Keep the diode the way it is.
Turning on LED when input voltage has desired frequency. I want to design a circuit that turns on an LED when the frequency of the input signal is between 950-1050 Hz using only passive elements and op amps aside from the actual LED. I have designed the band pass filter but I am stuck on the best way to make the LED turn on only when the input signal has the desired frequency since an input of 925Hz wont be attenuated significantly more than 950Hz. I should note that I want the input signal to have a DC offset of 2V and an amplitude range between 2 and 5 V for the sinusoidal portion. My initial idea was to use an op amp with no feedback to turn the LED on however I also want the input signal to power the LED so it can then be detected by a photo transistor. Is there a better way to do this? <Q> Use a voltage to frequency converter - it will produce a dc output voltage that is proportional to frequency. <S> Try the LM(C)567: <S> - Then use a "window" comparator to "accept" voltages between the appropriate two limits that correspond to 950Hz and 1050Hz. <S> The LM(C)567 effectively does this by using a phase-locked-loop and phase and amplitude detectors <S> , in effect it is a synchronous detector. <A> Depending on the amplitude of your input you may or may not want to amplify that signal. <S> Then, just feed it to a comparator which would drive the LED when the voltage is larger than the offset. <S> You would have to experiment with your filter and offset to make sure it turns on and off at the desired frequencies. <A> Essentially, you want a "Color Organ". <S> A simple bandpass filter will do. <S> As seen here and here <S> You could simply replace the opamp with a transistor, or use both.
You probably need a higher order bandpass filter followed by an envelope detector (diode followed by capacitor in parallel with a resistor).
What are ESD (Electrostatic Discharge) precautions? In some device datasheets there is a caution about ESD (Electrostatic Discharge) precautions. These devices are prone to damage because of electrostatic charges made by human body. These charges may be up to 4000 volts and cause damage without being noticed. It is recommended to follow ESD precautions during manipulation of these devices. I have bought a pair of gloves that the manufacturer claims these gloves will eliminate ESD risk . Is there any other thing that I should care about ( I even thought about putting a wire on my arm and connect it to the ground !). What are standard ESD precautions? <Q> There are special bracelets that to ground you safely. <S> Of course you can use simple wire as well, but better connect it to the ground through 1.. <S> 2MOhm resistor. <S> Be careful with your clothеs - use 100% cotton fabrics (or other natural) and not synthetic. <S> Of course, there are special ESD clothеs and shoes, but for hobby work they are superfluous IMHO. <S> Be more careful in the winter season. <S> Remember, that even if marked with ESD precautions, most electronics parts and devices are pretty resistant to ESD, because they have internal protection circuits. <S> So, don't be paranoid. :) <A> I (nearly) always say to myself: - I need to handle that sub-assembly <S> but, I (or it) may be charged up by static - so what is the safest place to first touch that sub-assembly <S> so our potentials can equalize? <S> If you can't figure out an answer <S> and you know the sub-assembly is sensitive to static, then that sub-assembly might as well be damaged. <S> So, it's important to handle things correctly but its equally important to store stuff "safely" or know how to go back to it and make that first contact in a manner that doesn't cause static damage. <S> There is no option with chips - they have to be stored in things that can discharge static and before touching that chip, touch the "container" that houses it. <S> Before putting the chip in the "container" touch the container to equalize potential differences. <S> They are my personal rules. <A> There are also ESD floor mats available. <S> As Johnfound already pointed out, most devices are pretty resistant. <S> But if you make ESD protected handling part of your production flow, you can be pretty sure that defects that occur during product lifetime are not the result of pre-damaged components due to ESD.
The people that do testing and manufacturing at our company use antistatic wrist straps and ESD mats when handling potentially sensitive electronic components.
How big current I can commutate using D-sub connectors? The question Did someone knows what are the current capabilities of the standard D-sub (aka Cannon) connector. I want to use it for power source connection together with the signal. I need pretty high currents - something like 10A or even higher and also, I can use several pins for this task. Even more pin connector (15 or 25 instead of 9) is acceptable. Special modifications (special power D-sub connectors) are not acceptable. I want to keep the element base very standard and cheap. Did someone has personal experience with such D-sub use? The experiment After some not very informative search, I decided to make some experiment. I connected all the pins in a pair of D-sub 15 pin connectors in series and then connected it to a 3A current source. This way, through the whole connector, 45A of current is flowing (15pins x 3A each). The total voltage drop on all pins is 0.12V and the power is 0.36W total. Now I will leave it for a while in order to see how it will degrade with the time. Experimental results 1 After 1 hour of work on 3A per pin (45A total) the temperature of the external metal body of the connectors raised to 39 deg. Celsius (27 deg ambient temperature). The average contact resistance is 3mOhms per pin. I leaved it to work for a night and tomorrow will try to couple/decouple them several hundred times and to check what will happen. Experimental results 2 After a night of work nothing changed. The body temperature is stable, 12°C above the ambient temperature. After several tents of times coupling/decoupling under voltage, the contact resistance has been increased from 2.4mΩ to 2.7mΩ per pin. <Q> The obvious answer is to READ THE DATASHEET . <S> I haven't looked up the datasheet for a "D-sub" connector since that's your job (you also need to explain which D-sub connector), but anything normally understood as a typical "D-sub" connector, like a DB-9, isn't going to do 10 A per pin. <S> Not even close. <S> You can parallel multiple pins of a connector to get effectively higher current rating at the expense of fewer connections. <S> You should derate the total current capability somewhat since the pins won't share the current equally, but you don't have to go too far with that since individual connections are mostly resistive. <A> Have a datasheet: <S> http://portal.fciconnect.com/Comergent//fci/drawing/c-dsub-0071.pdf for http://www.digikey.com/product-detail/en/865609SLTLF/609-1467-ND/1001781 which claims a max of 5A per contact! <S> Personally your 45A total seems like a horrifyingly high number, but if you wanted to split your 10A across 10 power and 10 ground connections in a 25 way connector that seems OK. <S> Don't forget the wire gague; <S> http://www.powerstream.com/Wire_Size.htm <S> says 20 AWG or larger (smaller AWG number), but it also needs to fit the D connector. <A> On Megasquirt EFI they regularly run currents of 5A through a single or pair of pins on a D-37 connector. <S> I've run the system on several cars for years and it's been very reliable. <S> As someone said above, proper manufacturers like Tyco, Amp, ITT Canon adhere to the spec & will publish a data sheet you can believe in. <S> However, they also do mixed-signal D connectors which have different contacts allowing for high-current, co-axial cable, and normal signal pins in one connector body. <S> They cost more but may be a better solution. <A> the contacts and wires, both plus and minus. <S> For too much more than that, you should be using a different connector designed to carry the power. <S> Yes, you can parallel the contacts and wires even more <S> but then you start getting into the heat issues of parallel pins and wires in a cable. <S> It's a whole different game if you'll be connecting and disconnecting the connector while powered. <S> Regardless, beware of using any connector that does not list the current carrying capacity of the contacts. <S> Lot of cheap (Chinese) junk out there and there is a BIG difference.
While Sub D connectors were never intended to carry a lot of power, 10A is OK if you double or even triple (if you're not using gold-plated contacts) The current rating is one of the important specs for any electrical connector, so even marginally reasonable datasheets will tell you this.
What is the purpose of 8b/10b encoding? In the physical layer of USB 3.0 there is an 8b/10b encoder . Wikipedia says that this eliminated DC offset, while the tutorial I am reading says it is a common encoding scheme in high-speed serial designs What is the purpose of this encoding in the context of USB? Additionally, what other applications and benefits does this encoding provide in other types of devices? <Q> The simple answer for an encoding like 8b/10b is that it ensures that the encoded data stream has at least a certain amount of data transitions. <S> Without such encoding a long stream of 0's or 1's would tend toward looking like trying to send DC through the channel. <S> The same philosophy applies to Manchester encoding where the net bandwidth to transmit through the channel is two times the actual data bandwidth. <S> The advantages touted for 8b/10b is that the transmission bandwidth used is much less than the 2X imposed by Manchester. <S> One wants to avoid DC through the channel for a number of reasons. <S> Whilst each transmission channel has different types of requirements <S> the main consideration is that DC does not go through capacitor or transformer coupled circuits very well. <S> The other big consideration, even for direct coupled circuits, is that transitions are required to be able to sync a PLL circuit on the receiver end so that clocking can be recovered to allow strobing the data bits at the correct time. <A> Apart from the nice properties mentioned by others, the other good things that 8b10b gives you include:1. <S> Easy discrimination at the receiver between link control and data symbols2. <S> Easy detection of ~75% of errors. <S> It's also surprisingly easy to build 8b10b transmitters and receivers in programmable logic; the original IBM patent specifies all of the logic operations required <S> (and if you're too lazy for that, Chuck Benz has done it for you in Verilog). <S> Wikipedia has a very useful page on 8b10b as well. <A> It is explained later in the linked tutorial, on page 15. <S> The listed reasons to apply this encoding to USB 3.0 are: clock recovery - without the encoding, long streams of 1s or 0s would look like DC error detection - when the receiver decodes the 10 bit symbol, there are many impossible symbols; receiving one of them signals an error. <S> A colleague has another hypothesis. <S> Paraphrasing: <S> The cable has inductance and capacitance. <S> This smooths the attacking front of the pulses. <S> Thus, transmitting a single 1 would leave the bus in a certain electrical state, while transmitting several 1s will leave it in a different electrical state (closer to steady-state). <S> Consequently, sending a 0 afterwords will be at a different potential in the two scenarios. <S> Thirdly, here is a quote from the standard, section 3.2.1 <S> The receiver needs enough transitions to reliably recover clock and data from the bit stream.
To assure that adequate transitions occur in the bit stream independent of the data content being transmitted, the transmitter encodes data and control characters into symbols using an 8b/10b code.
Can you choose any crystal for a PIC Microcontroller? I am using the PIC16F690 and I know that the internal oscillator has certain values (20,8,4...). I would like to put an external 8MHz crystal, but I could find only 8.8MHz or 7.6MHz. I would like to know if it's possible to put any of these to the PIC, or must it be exactly 8MHz? Also, how should I choose the capacitors for each? <Q> You can use any crystal so long as it is within the frequency range that the PIC crystal driver is specified for. <S> The crystal driver of most PICs <S> (I didn't look up your PIC specifically, that's your job) can be set to three different drive levels, usually called LP (low power), XT (crystal), and HS (high speed). <S> The slower ones use less power but also have a lower maximum crystal frequency they can support. <S> HS mode might overdrive and damage sensitive low frequency <S> 32768 Hz crystals, like are used in wrist watches. <S> Together the three crystal drive levels cover the range from a few 10s of kHz to 20 MHz, which is the fastest that PIC can be driven at anyway. <S> Another point is that you want to use a crystal specified for parallel resonance application. <S> That means its frequency is specified for the way the PIC crystal driver will drive the crystal. <S> These crystals will be specified with a load capacitance. <S> Series resonant crystals will work, but the frequency probably won't be within tolerance. <A> The datasheets will explain which capacitors to use. <A> As the datasheet said, you can to use up to 20Mhz oscillator. <S> For capacitor the datasheet can say to you that use of what type of those but for amount of capacitor you should use of your experience.
Assuming you don't exceed the clockrate spec in the silicon, programmed fuses, and application code, you can use any crystal you like.
How are those connectors called? (see images) How are those connectors called? <Q> It is a widely-used 4-pin female connector, a crimp housing with four female crimp terminals inserted. <S> There are many manufacturers that make a connector like this, but Molex makes one Part Number: 50-57-9004 (SL™ Crimp Housing, Single Row, Version A, Non-polarized, 4 Circuits) in the SL Modular connector line. <S> You can order this housing on Digi-Key . <S> You can easily crimp these terminals yourself with a low cost hand crimping tool if you want to make cable assemblies with this kind of connector. <S> You'd need to buy a bag of female crimp terminals to use, then after crimping the wires, you insert the terminals into place in the housing. <A> You'll find that Molex manufactures these connectors, part of their SL line - non-polarized housing, in particular. <S> In my experience, however, they're far more commonly termed "DuPont connectors". <S> (People more often relate latched connectors to Molex.) <S> Edit: <S> Almost forgot, the proper name, I believe is "Mini-PV", originally produced by DuPont, hence "DuPont connector", even though they made others. <A> If you search for 4 pin Molex connector, you'll find what you are looking for. <S> Molex isn't the proper name for it, but the company is like the Kleenex of connectors.
They are also colloquially referred to as "jumper connectors" or "pin header connectors" on occasion, which is a bit vague, but since 0.1" pitch is most common, the terms are more often than not in allusion to these guys.
Continuing execution after ISP in LPC81x series I am uploading software via serial ISP in to an LPC81x series microcontroller. This is a Cortex-M0+ chip. After software upload, I would like to start the execution of the uploaded software without having to reset the CPU externally. There is a "Go " command in the serial ISP and the "lpc21isp" software uses it as such: "G 0 T\r\n". However, this does not seem to work as it has several problems: The part of the program residing at address 0x00000000 is the interrupt vector table, not program code. Starting thumb mode execution at that address is just going to fault. However, I do not know what the "go" command really does. Somebody needs to set up the interrupt table pointer (VTOR), reset all the pin configurations and invoke the reset handler. This is quite different from starting execution at a certain address. The documentation says that using the "go" command on an address below 0x00000200 is not supported. In my case atleast the reset handler resides below that address. I am open to any suggestions that would allow me to continue execution after ISP. Just as extra information: the reason I wish to do this is that I do not have spare communication lines for reset or forcing ISP. I can, however, toggle the power to the chip. I would like the chip to unconditionally start in ISP mode, so I can update the software on every chip bootup if I wish. <Q> I have the same problem. <S> The ISP 'GO" command does not work for Cortex. <S> In fact it can't work, because on a Cortex the initial SP is loaded from a particular address, not set by the code as for ARM chips. <S> That's the only real way, because (at least on the chips I use) the 'reset' pin can be configured as GPIO. <A> I have the same problem with the LPC 8xx in an application, where the only connection to the outside is RX and TX, power cycling and triggering the reset pin is not an option. <S> I opened a support case at NXP, While I'm waiting for their answer, I found the following workaround. <S> Make sure you have a soft reset function in your code. <S> E.g. NVIC_SystemReset Link this function to a fixed location in flash memory on address 0x200 <S> or above. <S> Look in the documentation of your IDE/Linker how to do that. <S> After programming, execute the "Go" command. <S> For 0x200 use "G 512 T". <S> This works fine for me, but I cannot understand why they haven't implemented a reset command in their bootloader. <S> Can you specifiy you own GO address in lpc21isp? <S> If no, try using mxli, this works fine for me using the -j[address] option. <S> Also check out the "reinvoke ISP" command described in the IAP section for entering ISP mode from application. <S> I got an answer from NXP: <S> If you know the address of your startup code (from the linker map) you could use the GO command to start the user code. <S> The way you do it, using the SystemReset function is even better, because it generates a real reset and initiates all register values to their defaults. <S> There is no better way to start program execution after a firmware upgrade. <A> Using the Watchdog is not an option? <S> The LPC81x features a watchdog which can be set/disabled and also contains a flag if the reset was triggered by a watchdog reset.
My workaround is to reset the chip to force a reboot, by removing (and reapplying) the power.
Solid-state Electronic switch for low level signals I need a very simple circuit to connect a signal to one of two ways like this: My com signal is actually a microphone input, so very low voltage, <200mV , how can I make a solid state switch that not interfere with the low voltage signal? So com can go to L1 or L2 with no distortion. Im planning to actuate the switch with TTL voltage. <Q> If the signal you want to switch is a pure AC signal you might also be able to use a diode that is switched between forward and reversed biased. <S> See for example here in section "Analog Switch" . <S> This method is often used with signals in the RF range. <A> Using a dedicated analog MUX, as stated above, would probably be the best solution. <S> You can, however, build it from discrete components. <S> Following circuit should do the job. <S> Each switch (otherwise known as a transmission gate ) consists of two MOSFETs, P- and N-Channel respectively. <S> It is activated by applying VCC to N-FET's gate and by pulling P's gate to GND . <S> Applying voltages in the opposite order will disable the switch. <S> That's what the inverter's doing (it can be realized by two MOSFET's as well). <S> Note that this is only guaranteed to work when used in the form of an off-the-shelf IC. <S> It may or may not work when bodged together using discrete CMOS <S> It will function properly - more or less linearly - if the INPUT voltages remain below VCC - Vth , where Vth is the switch-on threshold voltage of the MOSFET's. <A> The electronic solutions proposed are fine and will do what you want. <S> You are not limited with supply rails in this method and the input can be totally floating and isolated from your control voltage. <S> Here is a decent offering from Pickering relays. <S> It can be driven from TTL and is suitable for switching thermocouple inputs (this means it will be fine for low level audio signals too).
Two suggestions: You can use e.g. an analog switch/MUX like the 4053 . However, if you want a more generic and flexible solution I'd consider using a decent quality reed relay.
Is there a terminal-on-chip? What I want is a chip that can be connected to an MCU over an UART which outputs textit receives over VGA or composite in text mode to a display in monochrome or color and optionally accepts VT100 escape-sequences (or something similar) to format text. Optional graphic mode would be nice. I already asked this question on reddit but I did not get many answers. Personally I found the TVT-KVGA20 , but its resolution (50×18 characters) is a bit too low. Someone on reddit suggested the µVGA , which looks really sweet but is not quite a single-chip solution. Are there other options? <Q> Many fast microcontrollers can do this or you could 'easily' implement an FPGA solution. <S> Enough such solutions exist that it's just a matter of finding the one that best suits. <S> I imagine that FPGA vendors offer VGA implementations as library items. <S> The colour Maximite uses a PIC32 + Colour Maximite circuit diagram here <S> The maximum resolution is below what you would desire BUT is essentially a function of available memory and processing resources. <S> Colour Maximite home page <S> Building ... <S> Monochrome VGA - Monochrome Maximite page here See above page for more details, but they say: <S> The video is generated by a standard SPI peripheral within the PIC32 chip. <S> This is continuously fed with data by the DMA circuitry which reads a section of memory and feeds the data to the SPI peripheral so that there is a constant stream of ones and zeroes being clocked out on pin 6 of the chip. <S> These bits represent the video signal for a horizontal line with each bit being a pixel. <S> The beauty of this scheme is that it happens independently of the CPU which only needs to write the required pixel data to the allocated section of memory and service an interrupt for the horizontal sync pulse. <S> The technique is described by Lucio Di Jasio in his book "Programming 32 bit microcontrollers in C” which is well worth reading if you are interested in learning more about programming for the PIC32. <S> An important part of the circuit is R5 which feeds the horizontal sync pulses back to the SPI peripheral so that the start of the data stream is synchronised to the pulse. <S> This removes any jitter that may be caused if the CPU was used to start the data stream and results in a very steady image on the screen. <S> Choose a suitable main processor and you have a zero added chip solution. <S> Undergrad project VGA in FPGA <A> Besides the chip, even in "one chip solution" there are always more parts in the schematic - power filtering, input/output signals shaping, protection, connectors etc, etc. <S> Anyway, I wanted to point to several software solutions that generate VGA text/graphics directly from the AVR controller outputs, using only 5..6 resistors as external components. <S> Two (of many) examples are here and here . <S> Example view: <S> Breadboard view: <A> The Parallax Propeller chip makes a very nice single-chip serial-to-VGA translator. <S> There are many examples of how to do this on the web.
A typical example of a minimalist microcontroller based solution is the "Maximite" which uses a PIC32 processor.
Is there a standard DC power jack that prevents devices from being damaged by the wrong voltage? USB is by far the most widely used serial bus by consumers. Plugging any device in any USB port is safe from hardware point of view. On the other hand, the common DC power jack . For example this guy is quite common, but without regard for the output voltage shape or size: I recently ruined an expensive device by plugging a 12VDC power supply into it, instead of 5VDC (I was using two devices, that need different voltages, but have the same connector). Is there a standard that prevents connecting a device with a power supply of the wrong voltage? E.g. square plugs for 5V, triangle for 12V etc. Or PC-like molex connector with the not needed voltages hallow? <Q> I guess it's a real problem trying to standardize on connector size/shapes for different DC supplies - what to do the with AC supplies as well? <S> The op has "smoked" equipment that cost hundreds of bucks by mistakingly plugging in a 12V dc adapter instead of the 5V adapter <S> and I can't understand why the expensive equipment didn't use a fuse and zener to protect itself. <S> Providing that the equipment running nominally from 5V took no more than 1.5A (and 2A under overload) <S> the values shown would work: - To the left above <S> there is the time limit graph of the 1N5339B 5.6V 5W zener diode and to the right is a typical characteristic of a 2A fast blow fuse. <S> It can be seen that the zener can take 6A for 1 second or 9A for 100 ms, whereas the fuse gives up the ghost at 4.1A in one second and (for comparison) 6.6A in 100 ms. <S> This on all but the worst days means the zener will survive and the fuse will blow. <S> It's a little close <S> but I'm trying to demonstrate the principle and my earlier guess at values is about right. <S> Thanks to supercat for reminding me I needed to justify this. <S> A zener would also offer some protection against the power being applied in reverse (all barrel connectors do not observe same polarity). <S> Different values will suit different applications of course. <S> There are better circuits that can take bigger overloads such as crow-bar circuits <S> but my point is made and my deapest sympathies to the OP's wallet! <A> Here is the obligatory XKCD post: http://xkcd.com/927/ <A> Because there is a standard plug type by voltage. <S> It's called EIAJ RC-5320A. ( http://en.wikipedia.org/wiki/EIAJ_connector ). <S> For example I had a laptop that used these plugs. <S> The connectors are slightly more expensive than the (non-)standard barrel jacks. <A> 2(two) because the physical, form factor, locking action or no locking, number of conductors, etc, etc are all different. <S> each requirement is a little bit different and different connectors have sprung up. <S> 1(one). <S> Manufacturers make more money on accessories if you have to buy it from them before the hordes start cloning it. <S> Standardizing it cuts their profits from the start. <S> 3(three) <S> In an attempt to save money manufacturing cheaper goods, manufacturers use plugs that already commonly used for one thing, for another, without much regard for consumer usability. <A> Speaking from the dangerous area which is my personal opinion, there really should be no need for standardisation here. <S> I expect to be able to connect a 12v supply to a device which expects 5v and expect it not to be damaged, and from my experience this is usually the case.
A more realistic reason may simply be cost, using the same power connector for multiple devices would be much cheaper then having to use a specified connector for a certain power rating, and much cheaper then using proprietary connectors. The only standardisation I like to see in power connectors (at least low power ones) is the use of either USB or 2.1mm barrel jacks (a little part of me dies inside when I see a device using something else when it doesn't need to).
Very low power: Most power-efficient way of storing charge for hours I'm researching the feasibility of doing an art project that involves soaking up ambient RF power in a city (energy harvesting) and then playing a 1 second sound clip through a speaker as soon as there is enough stored energy to do so. There will be no other source of energy -- not solar, not anything, just ambient RF harvesting. It looks like RF harvesting might give me about 10 microwatts. And my 1 second sound clip, played at human speaking volume with an efficient amplifier should need about 10 microwatt-hours. So I would need to charge some kind of battery or capacitor for say 1-5 hours at 10 microwatts, and then discharge it in 1 second and repeat. Given that, what might be some options for storage devices/circuits? Which are the most efficient and most inefficient setups for the parameters stated? In other words, is there any charge storage tech that could achieve the above behavior? <Q> Energy in a capacitor = \$ <S> \frac{C V^2}{2} \$Energy when a capacitor is discharged from \$V_1\$ to \$V_2\$ = <S> \$E = <S> \frac{C(V_1^ <S> 2 - V_2^ <S> 2)}{2} <S> \$Rearranging \$ <S> C = <S> \frac{2E}{V_1 <S> ^ <S> 2 - V_2^2 <S> } \$Plug in some made up figures to get a feel for magnitudes.:Vmax = 5 V, Vmin = <S> 3 V. E = 10 µWh = 36000 µW seconds = 0.036 <S> watt seconds = 0.036 joule. <S> \$ <S> C = \frac{2E}{V_1^ <S> 2 - V_2^2} = 2 <S> \cdot 3.6 <S> \cdot <S> \frac{10^{-2}}{5 <S> ^2 - 3^2} = <S> 7.2 <S> \cdot \frac{10^{-4}}{16} = <S> 4500 \$ <S> µF.Ceramic and most plastic capacitors would be liable to be low enough loss. <S> Any electrolytic capacitor is liable to be excessively lossy. <S> 4500 uF is an immensely large value for a non electrolytic capacitor. <S> Storage at higher voltage will decrease required capacitance by the square of the voltage. <S> eg at 50 V you need \$ \approx \$ 47 µF <S> or less <S> However, I'd at least consider battery storage. <S> It's possible that a small Lithium ion battery may do the job. <S> If you want say 36 mJ in 1 second that's \$ 0.036 <S> \cdot <S> 3600 \$ <S> W <S> \$\approx <S> 130 \$ <S> W !!! <S> . <S> That's FAR more than you need for the stated application. <S> E&OE - going to sleep at keyboard (long day on 3 hours sleep) <S> - I'll post this now and check figures later and look at battery implications. <S> More anon ... <A> The only possible (and often used in practice) is a capacitor. <S> You will need some low leakage capacitor with big enough capacitance. <S> You have to estimate what capacitance will be enough and if it is up to several tens of microfarads, you can use some SMD ceramic capacitors. <S> They have very little leakage. <S> For higher capacitances tantalum capacitors are suitable. <S> Also, some micropower, switching converter should be designed in order to fit the voltage to a reasonable values. <S> I saw somewhere resonance LC converters that can work from 50mV power supply. <S> (You will need some Ge BJTs for this) <A> It looks like RF harvesting might give me about 10 microwatts 10 microwatts of received power via an efficient antenna into a 50 ohm load <S> means the voltage is: - \$V = \sqrt{10\times 10^{-6}\times 50}\$ = 22mV RMS. <S> This may have a peak voltage of 32mV. <S> I've not come across an energy harvesting device that can self-start at less than 200mV - <S> that's nearly ten times more than what you are considering. <S> Maybe you know of a device that will do this?
A capacitor may be the least lossy store BUT the capacitor size needed may surprise you.
Are Wi-Fi 'transparent' buildings superior to antennas mounted on the exterior? Looking in particular at wireless mesh networks in cities - is it advantageous to design a building that does not interfere with Wi-Fi (e.g. out of wood instead of steel and concrete), or would placing an antenna on the roof/facade resolve the problem? I appreciate this is quite open ended, I'm an architect running a design project looking at hertzian space, (the spatial quality of e.m. waves) and without sufficient technical knowledge I'm struggling to progress beyond this question. <Q> " <S> Wi-Fi" friendly? <S> As with any engineering task, you must first precisely define your objectives. <S> In your case, to be "Wi-Fi" friendly probably means that the users of your space get a consistent and "fast" connection to the Internet (or other network resource). <S> Bandwidth (communication capacity) is a shared resource. <S> All users of your space compete for it. <S> In a high density environment, like a hotel or office, it may actually be advantageous to use <S> Wi-Fi absorbing materials. <S> This allows you to reuse the same communication bandwidth in different physical locations. <S> This is how the cell-phone network works. <S> Basic concepts <S> There are really three things a material can do to a Wi-Fi signal: Nothing -- Signal transits without alteration Attenuate -- <S> Signal is absorbed by the material. <S> This prevents (or reduces) communication on the other side of the material. <S> Reflect -- Signal is reflected from the material surface. <S> This prevents communication on the other side. <S> Real materials do all three in differing combinations. <S> Application <S> "Wi-Fi," in common usage, refers to the 2.4GHz ISM band of frequencies (there are other Wi-Fi bands, notably near 5GHz). <S> That frequency band is near the natural peak absorption of water. <S> Accordingly, Wi-Fi will not perform well in moist environments (indoor pool decks, spas, near water pipes, etc). <S> However, absorption is typically fine. <S> Reflection is the bigger hazard in infrastructure planning because it results in interference. <S> It's like trying to have a conversation in an echo-producing cave. <S> The more you talk (and the more people talking) <S> the harder it is for anyone to be understood. <S> Large flat grounded conductive surfaces (metal, most oil-infused wood, metalized plastics, foils, etc) are the worst offenders in buildings. <A> If WiFi is more important than for example the building robustness and longevity, then yes - build if from wood, paper, whatever (btw, the most fabrics are pretty radio transparent). <A> In short don't compromise on the building design. <S> The technical guys on radio comms should be consulted on WiFi infrastructure and appropriate ducting and facilities designed in at an early stage.
If the important properties of the building is to be long lasting, robust and not to fall on the first storm, then build it this way and if as a result it is not WiFi friendly, it is not a big deal - the sysadmins will put an access point in every room if needed. :) It depends on what is important in the design.
In IC design, what is the Buffer for ? In CMOS design, we always use two inverters as a buffer, but at some point, I dont quite understand the functions or importances of the buffer. As I was told before, 1) the buffer could smooth the output, but why ? It is two inverters, for example, if I design a ring voltage oscillator consisting of many inversters, why do i still need two inverters to the output of the VCO ? How can this buffer to smooth the ouput of VCO. 2) Also, the buffer usually can drive the big load (cap or res ), this is totally blurry for me, I dont understand it. I just know these two buffer's function, and I even dont understand it why it has such functions, and for other use, I am not sure... Hope get more help to understand this small but important block... <Q> Fundamentally, a buffer is an amplifier. <S> It takes a small signal (lightly loading the source of the signal) and provides a copy of that signal that can drive a heavy (e.g., capacitive) load. <S> They are used in places where connecting the heavy load directly to the source would adversely affect the signal. <S> Such effects arise because the signal source has a nonzero ouptut impedance, and the output may also used for feedback (or to feed other loads) in some way. <S> Loading the output also affects the feedback, which then changes the behavior of the source in undesirable ways. <A> Buffer could smooth the output, but why? <S> Consider the following circuit : Ring oscillator. <S> The output from various inverters is being fed to the next stage of the inverter, any noise between the poly-silicon connection can cause the values of output of the inverter making it as a corrupt input to next cycle, having a high noise margin can help prevent this. <S> Hence the greater the value of the Noise margin <S> the better is the tendency of circuit to reject noise,CMOS inverter have sufficient noise margin that help cancel noise and make the output smoother. <S> Also, the buffer usually can drive the big load (cap or res ), this is totally blurry for me, I dont understand it. <S> Voltage buffer: <S> It reasonably depends on the type of the load you are driving and what you expect from it,A voltage buffer amplifier has large output resistance, hence prevents your circuit from loading the buffer circuit unacceptably, and a current buffer has low impedance output. <S> In CMOS inverter can drive any load, by supplying the current to the load, or by sinking the current from the load. <A> A CMOS buffer can also act as a level shifter. <S> For example, when you have a sine wave with 400mV Vpp, and you want that sine wave to be a square wave swinging from rail-rail (from Vdd to Gnd), you can have a output buffer. <S> Also, buffers are used as delay elements in logic circuits (for example reset), where you want an operation to happen after some time. <S> (For higher delay times, I would recommend using a Voltage controlled Delay element). <S> But for lesser delay times, we can use 2 cascaded inverters. <S> Hope this helps :)
The CMOS resistive inverters can act like a buffer smoothing out the output, if you do analysis on the circuit you will find the noise-margins for the input/output help cancel the perturbed noise from external influences. As rightly said by dave, you can drive a capacitive load with a buffer.
i2C : pull-up resistors "design pattern", Shielded cable and connector? I'm designing an arduino based board which will uses I2C port a lot. I want to be able to connect several slave devices, and/or connect several mother boards together (at least 4 would be great). The I2C will run at 400kHz @ 3.3V. The flat cable between the boards can be up to 2 meter long. Edit : When I say I plan to use 4 main boards at the same time, only 1 of them will be the master/host. Pull up resistors My problem is not really about choosing the right value of the pullup resistor (for that I found this interesting article ). It's more about "design patern". According the aforementioned article, I should use resistor between 4.7kR and 1.5kR. It's ok as long as I only have one main board with its pullups and slaves with no pullups, but if I connect several main boards together, the pullup resistor will be in parallel, and then too low. Should I add some jumpers to enable/disable the pull-up resistors ? I don't like this solution at all, it takes space on the PCB and is not handy. And I want my board to be easy to use, just plug things together and everything works. If I use 4.7kR resistors and hook up 4 main boards together, I will have a equivalent pullup of 1.2kR, which is pretty low, and then it will consume more current (my device is battery powered), the devices will have to sink all that current (I can't predict the sink capability of the slaves that will be connected to the I2C port). Shielded cable Should I use shielded cable between devices as it will be quite long (up to 2 meters) and the voltage quite low (3.3V)? Connector Finally, I didn't found any "regular" I2C connector. The most common seems to be 4 pin SIL connector with pins in that order : GND, VCC, DATA, CLOCK (on seeed's grove or tinkerkit for example). Sounds good to me, but any suggestion is welcome. Naming Bonus question : should I write "I2C" or "TWI" on my PCB ? According to wikipedia TWI seems to be an incomplete implementation of the I2C protocol. Tinkerkit uses "TWI", but "I2C" seems to be more common in electronics. <Q> wire capacitance is what you are fighting - you can only go as fast as you pullup resistors can charge the parasitic capacitance of the wires - in the real world <S> you make a good guess <S> and then once you start working with the circuits drop a 'scope on on the data line - if you see a bunch of nice square waves you're good to go. <S> On the other hand if you see a bunch of shark fins some of which don't make it all the way high before the clock edge <S> you're either going too fast or need a smaller pullup <A> Armoured cable has nothing to do with distances and voltages - if someone is likely to put a spade through the cable, armour it, otherwise don't. <S> so there isn't a standard connector <S> - the cables would have to be fairly short (your 2m cable is two times too long for any I2C implementation I've seen). <S> The prototyping board connections you mention aren't really how I2C works in the wild - it's within a single board, not a pluggable system. <A> Write capacitance or inductance is not very likely to matter at 2m and 400 kbit. <S> I2C does specify multi-masters arbitration, so you could have multiple masters if you wanted. <S> You could even have the same board be both master and slave. <S> I2C is not specified for long runs. <S> That's why there is no standard connector. <S> It may work still. <S> I'd try STP cable probably with two pairs if you need to supply power. <S> I'd use 4.7 or so kOhms pull up per master. <S> The current used when signaling zeros is the same outer main board, so you can count this into the power budget per board. <A> i2c does have multi-master, 4x 4.7k would be about 3mA or so at 3,3, which could be a problem for some i2c chips but not many. <S> The RasPi uses 1.8K pullups and they don't seem concerned with sink current. <S> Definately don't use anything less than 4.7k if you expect to use up to 4 devices. <S> Maybe even use 1% accuracy resistors as they aren't really much more expensive than common 10%. <S> Category 5 cable is only 52pf per meter. <S> If you use shielded stranded cat5, you could probably be just fine with 14-25K resistors. <S> Basically the cable capacitance makes an RC lowpass filter with the pullup resistor, and the capacitance times the resistance tells you how long it will take to charge to about 63% of its final voltage. <S> Most i2c chips use TTL levels that consider even 1 volt as a logical high, and there is no resistor besides series resistance of the chip pin limiting how fast it can be pulled down. <S> For i2c, you want to be sure the rising edge of the clock gets to the receiver before the data on the data line can change, and you want to be sure the data line has settled before the clock rising edge arrives. <S> If your lines have equal capacitance, the second concern mostly goes away because the clock is sent a bit after the data. <S> If using cat5, maybe use the two conductors in a pair for SDA and SCL? <S> It probably won't be an issue. <S> Because there is no resistor when pulling down, the data could change almost instantly at the end, The first concern means you probably want your time constant to be <S> at most a little more than half your bit time. <S> Long distance i2c is not considered the "right" way but can work fine. <S> Prototype first, try 18K or so with cat5 or similar good cable and see how far you can go, make sure i2c provides all the features that you need. <S> Also, beware that if you ever want to ass a soldered on i2c slave to the motherboard, you will need a separate i2c interface from the ones used or talking between motherboards, or else you might have address conflicts between the slave devices on the two motherboards.
If you want to be able to have multiple masters, they you probably don't want I2C, and instead could use one of several other protocols which do allow for that. Perhaps you meant shielded cable, which is a different thing entirely - armoured cabled is mechanically protected by having an mechanically strong barrier around it, shielded cable is electromagnetically protected by having a light weight conductive, earthed sheath. As I understand it, I2C is designed for communicating between chips within a PCB, the assumption is that you don't connect between PCBs Another option is to only pull up when not powered from the bus, and only put a battery on one of the boards.
What pad hole (drill) size is appropriate for a given through-hole lead diameter? I am making some new through-hole parts in Eagle for components that are not already in the various libraries. I've realized that the drill size needs to be a little larger than the lead diameter, but I'm not sure by how much. With some research , I found the following information: "It depends" based on whether the component is being hand or machine soldered add 6 mil to the lead diameter 7 to 15 mil (diametric gap) for 63/37 solder 5 to 10 mil (diametric gap) for lead-free/RoHS solder Is there a rule of thumb or guide to support this information? Someone referred to the Industry Standard for Printed Board Design (IPC-2221), but the IPC apparently only provides the table of contents of the document unless you pay $100US . I'm planning on soldering the components by hand using 63/37 solder. <Q> You need the pin or wire to be able to fit thru the hole, but otherwise tighter is better. <S> First, you look at the specs from your board house. <S> They will give you the tolerance of final finished hole diameters from what you specify. <S> In some cases, they will round to the nearest drill size, with then a resulting diameter range for each such drill. <S> In other words, it is best to stick to a set of discrete hole sizes. <S> Check with your board house, but <S> .020, .025, .029, .035, .040, .046, .052, .061, .067, .079, .093, .110, <S> .125 inches is otherwise a good list to stick to. <S> If your board house guarantees finished hole diamter is ±3 mil, for example, from one of these standard drill sizes, then the first would be .017-.023, the second .022-.028, etc. <S> Note that these ranges overlap a little for common tolerance values. <S> Now look at the datasheet for your part and see what the maximum lead diameter can be. <S> If it's a round lead, it will tell you this directly. <S> If it is a rectangular lead, you have to do the math to find the maximum possible diagonal. <S> Either way, you end up with the minimum diameter hole the lead will fit into. <S> Now look thru your list of hole sizes and compare the minimum guaranteed size for each of them to the maximum diameter of the lead. <S> If both come out to the same value, use the next higher drill size. <A> For most through-hole parts, I specify .035" finished hole size. <S> This is suitable for DIP ICs, 1/4 watt resistors, small transistor and capacitors. <S> .040" is needed for post headers, and larger holes are required for TO-220 transistors, larger diodes and electrolytic capacitors. <S> The 7 to 15 mil oversize suggested sounds reasonable to me. <S> If you are using a prototype board shop, you will usually be limited to their standard drill sizes, unless you are willing to pay a premium for custom sizes. <A> In the IPC 7251 <S> it is documented that: Hole Diameter = <S> Max Lead diameter plus the level value (Min 0.15 - Max 0.25) <S> On the PCB-3D website they added some extra info: <S> Minimum Hole Size is calculated according to equations below: Minimum Hole Size = <S> Maximum Lead Diameter + 0.25mm (for Level A of IPC-2222)Minimum Hole Size = <S> Maximum Lead Diameter + 0.20mm (for Level B of IPC-2222)Minimum Hole Size = <S> Maximum Lead Diameter + 0.15mm (for Level C of IPC-2222) <S> Hope this helps. <A> I am not sure about the machine placement needs (it will probably need wider holes), but there are several considerations: metalized holes must to be drilled wider in order to accept the metal layer and still to be wider than the lead. <S> Talk with your PCB maker about this. <S> For not metalized holes, simply add 0.1mm to the lead diameter. <S> Note that too big clearances will reduce the reliability of the PCB, because the solder has pretty bad mechanical properties. <S> For square or rectangle leads - add 0.1mm to the diagonal of the rectangle. <S> For very big flat/square/rectangle leads, better use slot/square holes, not round. <S> (because of the reliability reasons). <A> You need to allow for both the lead size and tolerance and the hole size tolerance. <S> Normally I allow a tolerance of +/-0.1mm for holes 0.3mm diameter to 2mm diameter. <S> Hence for leads which are round or not far off square add 0.1 minimum to the lead diameter / diagonal + the diameter/diagonal tolerance.
Specify the smallest drill size where the minimum diameter hole is larger than the maximum diamter lead.
Best way to reduce battery consumption for LED device? I'm building a device that needs to "light up" to indicate status to the user. I of course want to use LEDs to light the device up, but I'm worried about battery consumption since I would like it to last for a year on batteries if possible. The device will be using its LED(s) for around one hour each day. What are the best ways to get power consumption down for the LEDs? Using PWM? Is it better to use a high-intensity LED or several lower-intensity LEDs? Blinking the LEDs is ok, in fact that is the most obvious power-savings trick I've found. <Q> Power the LED by a small flyback converter. <S> The current limiting resistor can eat a lot of power. <S> Note, this schematic is only an illustration. <S> Some design/programming work have to be done. <S> Something like this: simulate this circuit – Schematic created using CircuitLab <S> Here is a simple model (for LTSpice IV) of the above schematic. <S> It demonstrated efficiency of 95% and higher: <S> Version 4SHEET 1 880 680WIRE <S> 256 -160 -288 <S> -160WIRE <S> 544 <S> -160 256 <S> -160WIRE 256 <S> -32 256 -160WIRE <S> 544 <S> -16 544 <S> -160WIRE -288 <S> 96 <S> -288 <S> -160WIRE <S> 256 128 256 <S> 48WIRE 544 <S> 128 544 48WIRE <S> 544 128 256 128WIRE <S> 256 <S> 176 256 128WIRE 208 <S> 256 -48 256WIRE <S> -48 304 <S> -48 <S> 256WIRE -288 416 -288 176WIRE <S> 256 416 256 272WIRE <S> -48 <S> 432 <S> -48 <S> 384FLAG -288 <S> 416 0FLAG 256 416 <S> 0FLAG <S> -48 <S> 432 0SYMBOL <S> nmos 208 <S> 176 R0SYMATTR InstName M1SYMATTR Value IRLML2803SYMBOL ind <S> 240 -48 <S> R0SYMATTR InstName L1SYMATTR Value 100µSYMATTR SpiceLine <S> Rser=1SYMBOL <S> LED 560 48 <S> R180WINDOW 0 <S> 24 64 <S> Left 2WINDOW <S> 3 24 0 <S> Left 2SYMATTR <S> InstName <S> D1SYMATTR Value <S> NSSW008CT-P1SYMBOL voltage -288 80 <S> R0WINDOW 123 0 0 <S> Left <S> 2WINDOW 39 0 0 <S> Left 2SYMATTR <S> InstName V1SYMATTR Value 5VSYMBOL voltage -48 <S> 288 R0WINDOW 123 0 0 <S> Left <S> 2WINDOW 39 0 0 <S> Left 2SYMATTR <S> InstName V2SYMATTR Value PULSE(0 4 <S> 0 10n 10n 3u 50u)TEXT <S> -322 <S> 456 <S> Left 2 ! <S> .tran <S> 1m <A> Indeed, blinking is the most obvious choice <S> and I'd say also the most used when energy is a concern. <S> You can make a blink as short as 50 ms and still have it visible, and if you blink every second that's a 5% duty cycle. <S> If, as you say, it operates only a hour per day, the effective duty cycle goes down to 0.21%. <S> It means that it will last about 500 times more than going at full power. <S> Let's make an example: say that you have a LED with a forward current of 1 mA ( <S> realistic, I bet you can find a lower power one). <S> The average current over the day will be about 2 uA, or 48 uAh over the whole day, 17.5 mAh for the year. <S> Depending on what battery, what microcontroller and what else you got in the device, you should be able to make your calculations. <A> A trick I really really like is to let the user decide when he needs to know the status be having a pushbutton for status display. <S> This does not work if you need "at a glance" visibility of the status. <S> Another trick is to use something like e-ink or memory LCDs, but that only works if there is light to see them, and besides they are 25$ or more. <S> They do let you display a lot of info. <S> Using narrow viewing angle LEDs can make it look brighter by focusing the light more but only if you are looking at the straight on. <S> But really, I would just go with a ultra bright LED green or something and blinking at low duty cycle as clabacchio suggests. <S> Do the math on how much power it uses vs the rest of the circuit.
For further reduction you can consider faster blinking, less frequent blinks, lower power LED or just feeding it a lower current.
Why emitter follower is so noisy and distorted in large signal? I have a signal around 20 V peak-peak. I want to feed it into an emitter follower BJT and I have no experience in working with such large signals. The BJT is well in bias point ( I tested the emitter DC voltage= 15 v with VCC=30V) , the result is awfully noisy and distorted. I included photo of input signal and the output. The frequency can be read on lower left corner of the photos and first issue is a voltage drop. The second issue is the flat bottom of the output as if it is not well in bias point but it is well biased. I thought about the VCC but a VCC=30v should well handle a 21.2v signal ( at leats I think so). For testing the bias point, I replaced the base resistor with a potentiometer . By turning the Pot, no better result found. I tried many BJTs like 2N2219, BC108, BC109A , all the same result ( best result was with 2N2219). All are with moderate speed and transition frequency around 120-300MHz. The frequency is not a main concern here as I tried many frequencies between 1Hz - 50MHz. Surprisingly the noise was far less in higher frequencies !!! The design is not a complicated one, just a simple emitter follower (there is a typo, VCC is 30V ). I put a photo of the input signal ( voltage can be read at left lower corner of the oscope screen and freq in the middle) and a photo of the result: EDITION: by reducing the input signal amplitude to 10vpp, everything goes well in low frequencies (<10MHz) but distortion gets worse in high frequencies. This may mean that the problem is with large signal size and I may need a faster BJT. How should I handle large signals? 1-Schematic ( VCC is 30 volts ) : 2-Input signal 21.2v 1MHz: Output: <Q> Emitter followers are perilously close to being UHF oscillators; it is quite possible for them to start oscillating during only a small part of the wanted signal cycle; this appears as periodic noise and may also cause the observed distortion. <S> (It is usually too high frequency to observe on a scope!) <S> The usual cure is a small value resistor (experiment with 22 and 47R) in series with the base, (aka "base stopper") as close to it as possible. <S> The base stopper lowers the Q of the resonant circuit to prevent oscillation. <S> (It is also possible, as Andy AKA is hinting, that R3 is too high in value and this is clipping the -ve peaks) <A> If you want to use simple emitter follower, you must design it properly. <S> You need big idle collector current and low emitter resistance. <S> The BJT must be powerfull enough to handle this working point: simulate this circuit – <S> Schematic created using CircuitLab <S> The proper solution here is to use more complex push-pull schematic. <S> It will be much more efficient. <A> Your emitter follower circuit won't work with a 21Vp-p input - it's only supplied from 0V and +15V. <S> Try changing the emitter resistor to 220R and connecting it to the -15V supply. <S> Directly couple your signal into the base - this assumes that your signal is centred around 0V. <S> OK I've seen you mention that Vcc is 30V - nevertheless follow what I have said to see what happens and if necessary try Brian's 22R in series with the base. <S> Screen shots at highest frequency and smaller signal level and <S> bigger signal level would be good. <A> Your circuit exhibits gross distortions with a high input signal because its peaks are past the supply rails. <S> The amplifier is powered from 15 V but the signal spans 20 V. <S> How did you expect this to work? <S> Smaller signals, like your 10 Vpp case work because the output fits within the supply limits, so <S> the circuit can operate as intended over the whole voltage span of the signal. <S> There are probably two reasons the output looks cleaner at very high frequencies. <S> First, there is always stray capacitance between various nodes. <S> This stray capacitance is working against the impedances in your circuit to form low pass filters. <S> Put another way, this circuit can only pass signals up to some maximum frequency. <S> Above that, the signals get progressively more attenuated. <S> This means that when you feed in a signal near the frequency limit, its harmonics, or any harmonics caused by distortion, are attenuated more than the fundamental. <S> This low pass filtering effect reduces distortion. <S> Second, you may be hitting the limit of what your scope can show you. <S> Perhaps more distortion components are there, but the scope is applying the low pass filtering so that you don't see them.
What happens is that the device capacitances in conjunction with the inductance of the base connection cause a parasitic series-resonant circuit, and Cbe provides positive feedback, the emitter current providing the power. In the base there must be a voltage divider.
How to tell monocrystalline from polycrystalline solar panels This is a very simple question, but I haven't found the answer yet. It seems to me that monocrystalline panels are always black (though I have seen some dark blue ones), and polycrystalline panels are bright with lots of patches of different shades of blue. However, I've seen some panels that still seem to have the patches but they are very dark overall. Is there a proper way to tell what kind of panel one has just by the looks? is the presence of shades/patches of blue a good indicator of a panel's polycrystalline structure no matter how dark they are? or for that matter, are monocrystalline panels always black? Thanks in advance. <Q> You can't trust the "blackness" which is determined by the cells BBAR (Broad Band Anti-Reflective) coatings. <S> If both cells had ideal coatings there would be no light reflected back and therefore you couldn't tell from this if it was Mono or Poly. <S> However, no AR coating is ideal, and in fact are far from it, so the fact that you have multiple different crystal orientations with be very evident. <S> non-uniformity. <S> 100's of nm thickness differences are noticeable by the human eye. <S> Poly will have abrupt transitions in the patterns. <S> On Edit: It is possible to have what are known as Slips and dislocations in a mono-crystaline wafer that would show up as a "grain-like" boundary. <S> It won't affect performance of the Si as such and won't be as mottled as Poly-Silicon but my statement above as to uniformity isn't an absolute. <A> Are the internal crystal boundaries not always visible in polycrystalline cells? <S> image from M0UKD <A> Another way is to look at the shape of the cell. <S> Usually monocrystalline cells have a rounded shape with cut corners whereas the polycrystalline cells are square. <S> This is due to the fabrication process. <S> The monocrystalline are created in an ingot with a cylindrical shape (by the Czochralski process ). <S> To have the minimum waste when producing the cells, the ingot is cut as cuboid with rounded corners. <S> On the other hand, the polycrystalline cells are made by casting the silicon in a mould. <S> This mould can have a perfect square or rectangular shape. <S> Some references and further differences between these 2 types of solar cells: <S> Monocrystalline silicon Wikipedia page (where the above image is used) Which Solar Panel Type is Best? <S> Mono- vs. Polycrystalline vs Thin Film <S> Monocrystalline vs Polycrystalline Solar Panels
Mono crystalline cells will be very boringly uniform, you might see broader more smooth transitions in a mono crystalline cell but that will be from surface layer (like SiO2)
Detect electrical signals from plants My daughter wants to do a science fair experiment that involves reading the electrical signals in plants, but the cost of a multi voltmeter with data logging is very high. Can anyone suggest a setup for less than $100? Maybe she doesn't need as complicated a set up if she tests one plant at a time? But I believe that the sampling rate has to be at least 3000 s/sec. Here's a setup for a similar experiment:A PXI-4071 digital multimeter (National Instruments, Austin, TX, USA) connected to .2-mm-thick non-polarizable reversible Ag/AgCl electrodes was used to record the digital data. The PXI-4071 high-resolution digital multimeter delivers fast voltage measurements from 10 nV to 1000 V, current measurements from 1 pA to 3 A and resistance measurements from 10 µΩ to 5 GΩ. A Update: One of the researchers in this field answered my daughter's email and said that she could use a KEITHLEY DMM. Would that still require an amplifier? The only affordable ones on ebay (models 169, 177, 179) only have a digital read-out, no PC interface. I'm guessing she needs some sort of output recording device, like an oscilloscope? What about a Radio Shack MM with PC interface and op-amp (on a breadboard?)? UPDATE: She ended up using a RS digital multimeter w/PC interface. The software was easy to use and the data could be saved to text files on the computer. For each test, the DMM took a reading every second for 100 seconds (there are other options too). The MM was set to record mA. I chlorided 30 gauge silver wires with bleach for the electrodes. Those worked OK, but maybe could have been thicker and not bent as much. The DMM did measure a strong reaction from the plant when it was stressed with high heat (brass wire attached to brass woodburning pen) applied for 5 sec. The baseline voltage seemed to vary alot from day to day (over 20 days), but I'm thinking that's because the electrode was touching a different leaf or part of a leaf on each day. Next time, it should be in the same place for each plant over all the days. Thanks for everyone's advice! <Q> If 3000 samples per second are needed, I would suggest the data logger to be build on some ATMega with built-in DAC and several analog channels. <S> Through the UART this setting will be connected to a simple PC. <S> The hard part is to build the mV precise amplifier for the ion probes. <S> This amplifier has to be very high impedance, with high gain and probably with differential input. <S> But there are cheap and precise opamps these days, so it is not a big problem IMHO. <S> At least $100 should be more than enough. <S> I can't point you to exact reference for this analog part of the project, but I have some memory that I saw something similar in the great book "The Art of electronics". <S> Search there for some schematics. <A> I'd go with some low cost DAQ solution like <S> http://labjack.com/u3 <S> or http://www.mccdaq.com/usb-data-acquisition/USB-1208FS-LS-1408FS-Series.aspx (haven't used either, but <S> both look OK-- <S> this is simple stuff) or any usb oscilloscope hardware/software package. <S> You will need a preamplifier for the Ag/AgCl electrodes, which can be built with an instrumentation amplifier like the AD623, whole circuit probably about $20. <S> As an alternative, http://www.backyardbrains.com have a bunch of little kits with fairly high gain amps for biopotentials, and some of that might be adaptable for your purposes. <S> 3KHz does sound high. <S> If you could be a bit more exact about what responses she'd like to measure, I might be able to be a little more helpful. <S> Encourage her to build the experiment to address a hypothesis that she can answer. <A> A DSO-nano or similar oscilloscope might be better for the money, it would allow viewing of waveforms (a cheap old CRT scope for $20 plus a digital camera is another method). <S> TBH <S> I wasn't aware that plants gave off any electrical signals, you'll likely have a hard time proving it's the plant and not just stray EMC and the plant acting as an antenna. <A> I find it very hard to believe that 3000 samples per second is needed. <S> Human cell processes are on the order of 10's to 100's of Hz and we move a lot faster and have a little more processing/response capability than plants do. <S> I'd be surprised if you need anything faster than a few Hz. <S> As a test case, I believe that a venus fly trap is one of the fastest moving plants and they move slowly (yes there are seed pods that erupt at Km/Hr <S> but that is stored energy). <S> There is a reason why this eqt is expensive, detecting small signals is very hard to do. <S> There are electrometer grade Instrumentation amplifiers available but <S> even using these devices is very tricky as leakage currents across the surface of material being used can cause notable signals. <S> HAving lower bandwidth/speeds will be key to reducing noise in any circuit you come up with. <S> Ironically, the least expensive way of assembling this circuit will be the best (i.e. dead bugging) as you will not want to build this on a perf board, or proto board, leakage currents will be too high. <S> There are probably Instrumentation amplifiers that are electrometer grade as well. <S> I will note that a lot of the devices at www.analog.com <S> that were the "go to" devices <S> are now obsolete. <S> Now this only takes you to a buffered and amplified signal that you then need to stuff into the digital domain, but I note that others have already given you leads. <A> . <S> 100 samples per second is even enough - if you think an action potential lasts maybe 30 ms. <S> Read the second part of this paper - an artists guide to plant electrophysiology http://plasticites-sciences-arts.org/PLASTIR/Leudar%20P34.pdf - and let us know how it goes !
You need at least 10 gigaohms impedance - ie higher than the impedance of the plant - texas instruments do a good opamp for around 5 dollars for this purpose - otherwise the current will find it easier to enter your measuring equipment than continue its path through the plant. Also note that a lot of manufacturers will sample devices for free, especially for kids and science projects ...
How to achieve Better power consumption (operation of automatic chicken coop door) Newbie to electronics and am looking for help with a project I'm working on.I have a 12 v light detecting relay module which I'm using to drive a 12v motor in h bridge relay figuration, taking the + signal from the n.c or n.o contacts of the light sensor relay to drive the motor in one direction or the other until reaching a switch cutting the power to the motor driver.here are my issues. Power consumption.. As the relay of the light sensor is activated the whole time during daylight hours the battery(12v 2.3ah)is not lasting very long. The light sensor keeps flicking from on and off at the switching point.is there a way of latching the relay(or by using other components)once the trigger point is reached then resetting once the light sensor deactivated Can I some how use the signal which switches the light sensor transistor, to operate an ic or some other arrangement of components to achieve the function I require-being To drive a 12v motor (using a 12v 2.3ah battery)forwards and backwards which open/closes a door with relation to if it's light or dark? As i said i am very new to electronics so have no idea where to even start looking for the info to solve my problem so any help would be much appreciated <Q> If you dont want to use arduino.look at the rough sketch if you wish to make this then i would post the exact schematic. <S> Alarm clock would make an alarm at a preset time.the alarm would trigger a IC555 then that would clock the CD4017 one of the first output of CD4017 would go high and that is given to a diode and the another diode is connected through a limit switch if the door touch the forward limit switch the the motor must be stopped (diodes are wired as AND gate during normal operation the output of gate is 1) <A> here is the full schematic.it uses IC555 & CD4017.if <S> you get problem in driving relay transistor <S> do some modifications.put <S> a fly back diode across the relays. <A> Perhaps a change in design direction might produce a better solution. <S> So here is a proposal. <S> ( you might also want something to raise an alarm if it fails to work ) <S> If you don't want to build your own there are many ready built low cost micro controller boards available such as the arduino. <S> Relying just on the sun to illuminate the day/night cycle will never produce reliable results - e.g <S> the presence of storm clouds, a chicken blocking the view (or worse!). <S> So how about having something that is also aware of the actual time of day (a 'counting' program) as well as monitoring the light level (input), sensing the door positions (inputs) and controlling the motor (output). <S> If you know the time and the day of the year you can estimate sunrise and sunset. <S> Then you can set a window of time to check light levels (if required) and open and close the door as needed. <S> Great resolution in time is not needed so counting up in 15 min periods would be fine - <S> I'm certain the chickens will not possess Omega watches.
As you need your monitoring electronics to be as low power as possible so think about using a small micro controller (one of the 8 pin varieties). With only 5 input/output lines you could use it to sense the light level, the door being opened or closed ( a couple of microswitches) and control the motor to open and close the door (your H bridge/relay circuit).
Board to board communication (Backplane) in possible noisy environment- UART, RS232, RS422, RS485? I've seen alot of references for RS422 and RS485 using cables and twisted pair wiring, but how well do they do over short distances and with just a PCB layout (no cables at all) ? Do people do that ? Is it recommended ? If I'm looking to create a bus to communicate with 5+ more boards all connected to a backplane, what would be the suggested protocol ? <Q> For medium and low speed signals (UART, I 2 C, etc.), the direct approach of using logic-level signals is usually fine. <S> You just need to make sure that the signals being driven onto the backplane have sufficient drive for the maximum anticipated load. <S> Use buffers if necessary. <S> You can add a ground plane to your backplane to help shield it, if the enclosure it's in isn't sufficient. <S> For high-speed signals (SPI, etc.), you can still use logic levels, but now the lines start to behave as transmission lines. <S> You need to pay more attention to trace impedances, stray capacitance (particularly in connectors) and crosstalk. <A> Using special interfaces like RS485 and similar inside the board is simply pointless and over-engineered. <S> The PCB itself (if properly designed of course) provides some noise suppression - by proper grounding <S> , ground plains, routing the tracks near the ground or in the internal layers, etc. <S> Observation: <S> You simply can't connect all pins by RS485, after all. <S> If the environment is very, very (very) noisy (rare case) you must provide some shielding of the whole PCB, because the remaining tracks will be vulnerable as well. <S> (see the observation above). <A> If I'm looking to create a bus to communicate with 5+ more boards all connected to a backplane, what would be the suggested protocol ? <S> If the 5+ daughter boards are already designed and they use RS485 then it makes sense to route 485 across the backplane as tracks. <S> RS 485 needs terminations (120 ohm is standard) and <S> the backplane "slots" for the two furthest points should have terminators fitted. <S> Loop <S> the 485 tracking from one end of the backplane to the other observing impedance rules for PCB tracks. <S> Try not to create spurs that are too long. <S> There are a few on-line calculators that will give you track dimensions to suit 120 ohms impedance. <S> If your daughter cards are not designed then using a non-differential bus is probably easier and won't be a problem providing you haven't got some extreme power current requirements that could interfere with the data.
For really high bandwidth, the trend is to use LVDS signalling; PCIe is one example of this.
Does opto-isolation matter when there's only one power supply? Optoisolators are often encouraged for isolating signals controlling higher voltage loads. The typical example is a low-voltage microcontroller controlling a motor or solenoid operating at a higher voltage. In this hypothetical scenario, the power supply for the microcontroller and the power supply for the high voltage load are entirely separate. In a lot of real cases, though, the microcontroller is actually being powered by the same power supply, just via a voltage regulation circuit. So this is my question: Let's say there's a single 10 V power supply. One subcircuit regulates the 10V down to 5V that powers a microcontroller. The microcontroller sends a signal that controls a solenoid operating directly from the 10V supply. Does putting an optoisolator between the microcontroller and the solenoid control circuit serve any purpose or is it pointless because, ultimately, the two power supplies are connected anyway? <Q> Your concerns are not ungrounded <S> **. <S> Ground loops remain unbroken. <S> EMI can propagate through power and ground rails. <S> Often, there is an isolated DC-DC converter, which provides ohmic isolation of the power supply and ground. <S> Here's just one example of such power supply, from the dozens of models that are available. <S> You can also roll your own. <S> ** <S> pun intended <A> Shortly - no, using opto-isolators in these conditions is pointless at all. <S> It is, btw, common mistake of the beginners. <S> Once I saw even more "advanced" design - opto-isolator, then power MOSFET that drives a relay that switches the load and all this powered by one single power source. <A> If the motor/solenoid supply and the micro are not galvanically isolated it's difficult to see how a case can be made to use an opto isolator in the drive circuits from micro to motor/solenoid. <A> Depends on what you're using to "regulate" the 10V down to 5V. <S> If you're using a voltage regulator, isolation won't buy you much. <S> If you're using a 10V to 5V isolated DC to DC converter (not all converters are isolated), that device will give you isolated 5V with respect to an isolated ground. <S> If you're careful not to connect your grounds or connect your power supplies through any devices, optoisolation will work <A> Opto-isolators are useful in cases where there is a substantial potential difference between the processor's control voltage and the thing it's controlling. <S> For example, if one is using a processor to switch the positive of a thousand-volt electronic flash supply, even if the negative rail shares the processor's ground, having an opto-isolator may be preferable to trying to couple the signal via other means. <S> Opto-isolators may also be useful in cases where the controlling circuitry and the circuitry being controlled nominally share a ground rail, but a potential difference may sometimes exist between points on that rail. <S> For example, a system may have a nice quiet ground rail when it's idle, but an extremely noisy one during operation. <S> If one may need to take some analog measurements while things are idle, but will need reliable control even when things are noisy, one might use a shared ground for the analog measurements but use optos for the control signals. <S> Note that one must be careful to ensure that the noise on the controlled side of things does not disrupt processor operation, but there are a variety of means through which that can be accomplished. <S> One other point is that even if one part of the overall system will require a common ground, having things designed so that one can break that ground connection while troubleshooting parts which do not require it can sometimes be helpful. <S> That can often only be done, however, if things are connected via optos. <A> Does putting an optoisolator between the microcontroller and the solenoid control circuit serve any purpose or is it pointless because, ultimately, the two power supplies are connected anyway? <S> It most often doesn't serve a needful purpose, but occasionally might. <S> If the two are separated by a large distance, even on the same power supply, there might be issues with the signal. <S> If the solenoid driver is not well designed then surge damage can be prevented with an optoisolator. <S> If you're dealing with a dodgy power supply that puts noise on the power lines an optoisolator may help. <S> However if you're designing the whole device, and don't have to connect to other people's lousy solenoids, drivers, or powersupply, can specify and test every component, and know that they will all be physically close with a single ground point, then an optoisolator is overkill.
Lack of ohmic isolation of power supply and ground rails defeat the purpose of the opto-isolator.
What to do when a device doesn't specify it's DC polarity? This is probably a very simple question but.. I've been trying to find replacement AC->DC adapters for various electronics around the house, but I ran into one which doesn't list its polarity. It simply has "12V " printed next to the power socket, without either of the polarity symbols! I found the owner's manual online and checked it, and it wasn't any more specific.. .. So, what does it mean when a device doesn't list its polarity? Is there a default assumption of positive or negative? Or does it mean that the polarity of the power doesn't matter?? <Q> If you have a device that is not marked, you can't necessarily assume one polarity or the other. <S> I have, for example, electronic music keyboards and MIDI controllers which sometimes are swapped (Casio is center negative on one, Korg and Yamaha are center positive). <S> If you have the original adapter, check what its polarity is, either by its label or use a voltmeter to determine its polarity. <S> If you don't have the original adapter, you could try assuming that the device is center positive, but you risk causing damage to it if it does not have polarity protection. <S> Instead, consult its manual, look online, or as a last resort, take it apart! <S> If you have an adapter that isn't marked, determining polarity is simple with a voltmeter. <S> If you get a positive voltage then the side connected to the black/common terminal of the meter is negative/ground. <A> If the device has any metal part or other known ground point you can use the continuity test function of the multimeter ("the beep") to check if the center contact or the outer contact of the power supply socket is connected to ground. <A> As JYelton mentioned in his post, you should not assume the polarity. <S> 12V means that the adapter outputs 12V and the symbol next to it means "DC". <S> You can confirm the polarity by using a digital multimeter. <S> One of the quality of a good digital multimeter is that it can display negative values. <S> This feature is needed as you don't know the polarity. <S> Connect your adapter as pictured below. <S> In the picture below, adapter's center conductor is being probed by positive (red) lead of the multimeter and the outer of the barrel is being probed by negative (black) lead. <S> If you get a reading with no minus sign on the meter then your inner conductor is positive and outer is negative. <S> If your multimeter gets a negative reading or displays a minus, then the inner conductor is negative and outer is positive. <S> Make sure that the read lead goes to positive terminal and black to the negative terminal at the multimeter end. <S> If looking to buy a multimeter here is another post to refer to. <S> Wire up a LED + 1K ohm resistor like the image below <S> : Note the polarity of the LED; the flat side of the LED is negative. <S> Polarity of resistor doesn't matter. <S> Now connect the other end of the resistor (top of the diagram) to the center conductor and the LED flat side wire to the outer conductor of your adapter. <S> If the LED glows then your center conductor is positive and outer is negative. <S> If LED doesn't glow reverse the wires. <S> If LED glows in this case, then your center conductor is negative and outer is positive. <S> If LED still doesn't glow, check your wiring and your adapter. <S> If you have LED + resistor and no multimeter, you should get one. <A> I have suggestions for anyone with this problem. <S> Take the device apart and trace either of the input paths to any polarized component and then verify with a meter. <S> It is best to see if you can do this multiple times or on each line. <S> If this proves to be too difficult you can also try detecting a DEAD short from a polarized component to an input terminal. <S> This is usually easiest with negative. <S> Put the meter probe on a negative terminal of a polarized component and see if it is a dead short to either of the input terminals. <S> If it is not a dead short (almost infinite resistance) keep looking. <S> A TINY bit of resistance on your highest scale may indicate the resistance of the wire and connections between the component and the input but be wary of much more than double the resistance of your meter's leads touched together. <S> Electrolytic capacitors, LED's, PCB markings, red and black power input wires, and outputs to polarized dc motors or linked PCB's can all be used for this purpose. <S> I have the same problem with a 12v cooler/heater by Mobicool. <S> The input just indicates 12v dc with no polarity. <S> The manuals I found online have nothing to say about it either. <S> I have not taken it apart yet <S> but with the above techniques it will be easy <S> I am sure. <S> Well, as easy as they make taking it apart and putting it back together in the first place. <S> Gary, lifelong hardware hacker. <A> I give you a simple methode to determining polarity for your DC or ac power source not marked1st circuit just 02 LED if the LED1 glow == <S> > 1 negative pole, 2 positive pole if the LED2 glow == <S> > 2 negative pole, 1 positive pole 2nd circuit just by using a bridge rectifier <S> No matter what is the input (dc or ac power source) you got a positive voltage with marked polarity, just all
Another way to test the polarity is by using LED and resistor if you don't have a multimeter.
Looking for small motion sensor Are there other options for a small (< 5mm long) low-g motion sensor than accelerometers? I don't need to measure the acceleration picking up my device causes, I just want a 1/0 signal when it happens. Preferably very low power, <10µA would be nice. (IIRC I once saw a purely mechanical small sensor mentioned in an answer here, but I can't find it anymore. Purely mechanical means zero-power.) <Q> Found this one: <S> This is the SignalQuest SQ-MIN-200 . <S> It acts as a switch and chatters open and closed when moving: <S> It's only 3.6 mm long and 1.9 mm diameter and consumes <S> as little as 50 nA. <A> I found this accelerometer (Freescale MMA8453Q) , which looks interesting. <S> I know, it's an accelerometer, not on/off, but at least it can operate at very low current (6 µA) at a data rate of 1.5/second, which should be enough to detect picking up. <A> +1 for the Signal quest product, I have used it with several designs. <S> A product to avoid is the Switronics RBS020902-G. I had lots of failures (Stuck balls) with this one. <S> Sensolute has an even smaller solution: http://www.sensolute.com/en/products/index/ <A> Accelerometer manufacturers are making amazingly low power accelerometers for mobile devices, and including features such as movement detection. <S> ST has one which consumes 2uA with two interrupt outputs, one of which can be used for motion sensing: <S> http://www.st.com/web/catalog/sense_power/FM89/SC444/PF250725 <S> But the easiest thing for you is probably to put a series of parallel but jagged exposed pcb traces on your PCB, and capture a BB on them with a small metal shield. <S> Using three lines (one for the shield, one for every other jagged line, and one for the other jagged lines) and attach them to three interrupt on pin change inputs to your processor. <S> When the device is at rest, set the lines in a static state that consumes no, or little power, but will change one of the pins if the bb moves. <S> For instance it might be resting between the two lines, not touching the case. <S> Set one line with a pull up, set the other line output low, and set the case with a pull up. <S> The case or pulled-up line will change state if the bb moves at all. <S> You'll have to select pull-up values that reduce current consumption, balanced with sensitivity (too high and capacitance will prevent the line change from being noticed with some movement). <S> This will detect a variety of motion primarily along two axis. <S> You'll need a more complex design, or another board vertical with a similar device, in order to get motion detection regardless of resting position and movement from that rest. <S> But, of course, this will consume some power. <S> If you need a truly power-less sensing solution, we need more information about the exact type of motion you must see, and information about the types of motion that shouldn't set the sensor off. <A> Today, browsing for something else, I found a sensor that seems to be what the asker needs: SW-18020P <S> - fully mechanical, less than 5mm in diameter and very cheap. <S> I am not sure the link I gave is to the manufacturer site, but it should be easy to find a place where to buy it. <S> Here is a picture: <S> And there are several types actually: <A> There are varieties of mercury switches which actually measure tilt. <S> You could place an array of these at various (slight) angles to cover the range of possible "tip angles" <S> and it would require the person who is picking up the device to lift it w/o tipping in order for the device not to trigger (which would be difficult). <S> There are also tilt <S> sensors (mechanical). <A> You don't have to read the acceleration from them. <S> They already have algorithms that detect movement or shock without forcing you to do any kind of analysis. <A> Upon Ignacio's suggestion of a piezo I found this small sensor . <S> It's really a shock sensor, and probably not sensitive enough to detect picking up (sensitivity is 1mV/g), but I want to mention it here for other users who may have a use for it.
Simply enable the interrupt for movement detection that most digital accelerometers have and use that to detect.
Voltage is reduced across chained breadboards My Arduino is connected to the first breadboard. From there, I chained the positive and negative to the other boards. I have 6 breadboards connected right now. In the first board I see (with a meter) that I have 4.5V difference, and in the next board, 3.5V and in the last, I even get 2V. Why am I getting this? I partially solved this (getting 3V to the last board,) by wiring every rail to every rail in the other boards, but it makes my design cluttered. How do I debug this? What's causing it? <Q> You should have one single point of contact for the power supply power and ground. <S> Wire that point to each board individually. <S> Also use the heaviest gauge wire you can fit in the breadboard (probably 22gauge) to reduce wiring losses. <S> The power supply could still be the Arduino - but honestly with that many TTL chips you really should be using a separate power supply if possible. <S> The following edit to your picture should give you the idea. <S> I didn't pay enough attention to know if I mapped red to positive correctly, so ignore that aspect if I've got it wrong. <S> While it'll be a bigger rat's nest of wiring, daisy-chaining just isn't going to work for you, electrically, due to the losses inside the breadboard. <S> If you can't stand this solution, though, you might be able to rough up the wires between the boards, and shove them in and out of the holes in the rails a few times to clean off the contacts in the board. <S> This will buy you some additional overhead, but it won't solve the base problem. <A> You state you're suffering voltage drop between breadboards. <S> "Star" from your power supply to each breadboard ensuring good mechanical and electrical contact. <S> (As posted by Adam Davis and Passerby) <S> According to your picture, you don't have ANY electrolytic capacitors or any ceramic capacitors, that's where I'd start - not seeing ANY makes me cringe and is the point of this post. <S> Filter capacitors (the electrolytics) are polarized and go across the power supply rails to "condition" the power supply, keeping the voltage throughout the circuit relatively constant. <S> The ceramics also connect across the power supply rails and one should be connected across the V+ and 0V pins of each IC. <S> The generic purpose of ceramics is to shunt high(er) frequency "noise" to ground, polarity is not an issue. <S> Since you're using 5V power supply, a 220uF 16V electrolytic (or two) on each breadboard would be an excellent start, they are common place (Radio Shack, etc.) <S> and inexpensive. <S> A <S> .1uF <S> 50V located at each IC and one next to each electrolytic will do wonders for clamping spurious noise. <A> Breadboards have a variety of problems, including high capacitance, inductance, and resistance. <S> From your picture, your breadboard power rails are two per side, are split in the middle, and you have 6 boards, so that's a total of 2 rails * 2 sides * 2 splits * 6 boards = <S> 48 different segments that you bridge with some jumper wire. <S> And from the looks of it, you have a single power input point at the very end of the segments. <S> Easiest Solution, make sure each board is in parallel. <S> Run a pair of wires from your power supply to each board instead of board to board to board. <S> Or two pairs, since you have positive and negative rails on each side of the boards. <A> The star power and ground distribution as posted by Adam Davies and Passerby is only a partial solution <S> you must also: Ensure the current capacity of the power supply is adequate for the peak power consumption of each bread board in use and preferably allow some margin of overhead. <S> Use decoupling capacitors as suggested by Joe from Ozarks <S> Use substantially heavier gauge wire for power and ground distribution as the other posters have suggested. <S> Race hazards between signals introduced by the long leads and again breadboard contacts. <S> Depending on the 74XX logic family running the circuits at well below design voltage may have destroyed some of the gates. <S> The latter tends to be more of a problem with CMOS <S> but you don't give details of which one so refer to the data sheet. <S> Finally you state you're trying to run it at 640x480x60 = <S> approx 18.4Mhz <S> so there's is a pretty good chance of the circuit not working at all using those breadboards. <S> If so run the circuit at lower frequency to debug the logic then solder a more compact version onto strip board.
If your power supply is the arduino, be aware that it can only supply a small amount of current, so you may want an external power supply. Finally if you get a sound 5v supply onto each of the breadboards and the circuit still doesn't work consider that there still may be one or more of the following to consider: Clock distribution is not satisfactory between the boards due to the capacitive and inductive effects of the breadboard contacts. The point is that you need an individual wire from your power source to each rail, rather than chaining them in any way. Ceramic caps are very inexpensive and worth every penny. All the resistance of the segments AND the jumper wire add up, and then there depends on how much current you are pulling. Or simplify your layout so only one set of rails are used (or positive always on the left side, negative on the right side).
What is Copper Thieving and why use it? On many boards I've seen, there are little copper dots used for the purpose of "Copper Thieving". They're small round copper dots connected to nothing and arranged in an array. Supposedly they're for balancing the copper on the boards to improve manufacturability, but no explanation I've heard has convinced me that they're needed or useful. What are they for and do they actually work? Below is an example with squares. <Q> Unfortunately the other 3 answers to the question are incorrect, but helps keeping a common misunderstanding alive :-) <S> Thieving is added to the outer layers in order to help a more balanced chemical process for the plating. <S> Also notice that there is no need to "balance copper" (or stackups for that matter) in modern PCB fabrication to avoid "warped boards". <S> I wrote about this on my blog recently. <S> You can find other references on the net. <A> A secondary purpose for them is to reduce the amount of copper that needs to be etched away from the board, balancing the etching rates across the board and helping to make the etching solution last longer. <S> If the PCB designer did not explicitly "pour" copper fill into the open areas of the board's outer layers, the fabrication house will often add the small disconnected dots, because these will have the least effect on the electrical properties of the board. <A> In general, it is better for the manufacturer when less copper have to be dissolved during the etching process <S> and there is no big continuous areas that need to be etched. <S> It is because of 2 reasons: <S> Etching more copper means that the etching solutions have to be recycled more frequently <S> - it is an energy and money. <S> An ideal case is if the customer wants a PCB entirely covered with copper. <S> :) <S> The big solid areas of copper are etched slower than the areas where fine copper pattern is located. <S> That is because the pattern has bigger surface <S> and we know that the chemical reactions speed is bigger if the reaction surface is bigger. <S> This way, after the tracks are already fully etched, the big empty areas are still not, so the PCB have to stay some more time in the solution. <S> This causes some under-etching of the tracks which is not good for the PCB quality because it makes the tracks thinner than intended. <A> The reaction rate of any etching process is limited by local current densities, access of the reactants into the reaction area and clearance of the reaction products away from the reaction area. <S> Since board etching is essentially a planar or two dimensional process <S> this places further limits on etching performance with reactant delivery and reaction products actively interfering with each other for access to the surface. <S> While always present in processes, where the problem arises is in the differential etch rates across the board. <S> This can cause thin traces to be etched at a different rate than wider traces. <S> For example, etching a relief from around a fine trace within a background of a ground plane is very different in loading than etching a thin trace with no background ground plane. <S> This can be corrected for by ensuring that in the design the pattern density remains fairly constant per unit area across the board. <S> Thieving is one way to do this. <S> Some manufacturers will actually place sacrificial elements within the tanks and along side the board to ensure proper yield of different line thicknesses. <S> Mixing and agitation of the tanks during etch will also help mitigate the differential etch issues. <A> Thieving might be used for the above exposed purpose (plating, wrapping, etching, etc), for internal layers it has the simple purpose of keeping the PCB thickness uniform across the PCB area. <S> Indeed the PCB manufacturing is using heat press action to stick together the different material layers (core, prepeg, copper, etc). <S> In order to have the compression force uniform across the area and independent of the material layers you would need to have each layer filled uniformely with material of the same elasticity. <S> But this is not the case because PCB track will be seperated by the prepeg material of the insulator layer. <S> So if you have a large area of an internal layer without copper, the prepeg layer above this copper will need to fill up this empty space. <S> So if you have areas where layers are empty and other areas filled, the manufacturing process (heat press) will create different pressure across the PCB, creating different thickness across the PCB area. <S> The difference can be significant and it all depends on the thickness of all internal prepeg, hence depending on the copper thickness, PCB thickness and number of layers. <S> This is why in the picture you provided the large space (too large) is filled. <A> Thieving is used to balance the current flow density used while plating. <S> It is helpful in situations where there are small traces adjacent to copper pour. <S> The thieving is the process where Electrical Current is diverted to the thieving pads to prevent the burning of the thin trace due to excessive current heating the trace.
Copper dots (or grid/solid fill) are used mainly to balance the thermal properties of the board, to minimize twist and warp as the board goes through the thermal cycling associated with reflow and improving yield.
How to decrease solenoid speed? My project is Speed Control of a solenoid. In this project, stroke is 30 mm and I want to plunger cross 30mm in a few seconds (like 5 seconds). For this purpose I want to control the current of the solenoid coil with PWM, but it seems that the plunger does not move until the current reaches a certain amount, after which the plunger moves very fast. What is your opinion for low speed solenoid acting? What method should be used? Electrical or mechanical methods? <Q> You need a Linear Servo, e.g. this small one . <S> Solenoids aren't really suitable for gradual movement. <S> You could, if you wanted a project, build your own linear servo using a motor, worm gear, and linear potentiometer for position sensing. <A> I offer this as a proposal of an idea - <S> I haven't had time to try this out <S> so it may or may not work, <S> but hopefully it will spark off a line of thought. <S> The main problems with solenoids are that they are designed to operate quickly - once sufficient current is applied they snap into action. <S> Their action is not proportional - below a certain current they do nothing. <S> Finally, what they do best is PULL on the plunger. <S> So here's the idea. <S> Connect two solenoids in opposition to each other in an electrical tug of war. <S> and this is is my thinking... <S> With both (equally) powered at the same time (rising edge of pulse) there should be no net movement (because the forces are equal and opposite) <S> If solenoid B pulse is slighter longer than solenoid A pulse <S> then the plunger should move towards solenoid B. <S> The amount of movement will be small because the time interval is small (Newton's laws). <S> Repeating the pulse will keep the plunger moving (in small jumps) in the same direction. <S> The pulse frequency will determine the jumps per second and the time delay the amount of movement per pulse <S> so <S> together they control the speed of the plunger. <S> These pulses would be used to control the solenoid current through MOSFETs (with snubber diodes across the coils). <S> To reverse direction simply switch the pulses over <S> so A is <S> B and B is A. Frequency and CR delay will be down to a bit of experimentation <S> but I'd be thinking in terms of a few 10s of Hertz rather than 100s. <A> This is pretty hard project you started. <S> Solenoids are highly hard to be controlled, other than ON/OFF type. <S> You will need some sensor that to measure where is the anchor of the solenoid in every moment <S> and then some regulator that to control the current of the solenoid in order to reach the needed position. <S> As long as the force/position of the solenoid is not constant and even not linear, such regulators have tendency to work not very stable. <S> The regulator itself can be implemented as analog, digital or software device. <S> The sensor in the feedback loop can be either position sensor, speed sensor or both, depending of what you want to regulate and how precise have to be the regulator. <S> On the sensor winding leads you will get a voltage, proportional to the velocity of the plunger. <A> Assuming solenoid has proper feedback, PID control might drive it. <S> An alternative that might work is using much slower pwm, like 1-10hz perhaps, depending on solenoid performance and desired fluid?? <S> flow. <S> Yes, closed loop is necessary. <S> Otherwise, there is no way to deal with acceleration and deceleration of plunger arm properly. <S> If it takes 75% to start the arm, it probably only takes 20% to hold in position. <S> I would start with pwm around 1-10khz with 256 steps.
If only the speed have to be regulated, you can try to use simple DIY type of speed sensor - use a second solenoid with a permanent magnet plunger, mechanically coupled to the pulling solenoid plunger. Friction on the plunger will stop motion during the OFF time. The control circuit (see above) which can be built using a 555 timer and 4071 quad dual input OR gate, is not so much PWM as PLM (pulse length modulation).
How do I go about building a charger circuit? I am working on robot, and I want it completely automated. Everything I can tackle, except for when it comes with power. (Pretty big problem, I know.) I want to know how I can make a charger circuit that can charge (a) battery(s), have a light or something when it's done charging (all I need is a way to check with my microcontroller, Arduino, of coarse!), and then also be able to supply power to my device while charging so it can still perform tasks like organizing data, etc, or waiting to get a signal to "dispatch" itself. I know a fair amount of electronics, but I'm no expert or anything like that. Basic Power Requirements (Voltage, etc.): I need around 8-12 V output from the battery, lets say up to 750 mA to 1 A at a time, and have about 2-3 hours without a charge. How should I get started: (I know this is a broad question but it still can be answered with recommendations and previous experience.) Should I do lots of low-voltage batteries or fewer higher voltage batteries? I would think that lots of low-voltage ones would provide more instantaneous current, but how would you put them in series with charging? How should I handle safely charging? Should I have power bypass the batteries while plugged in to prevent tons of current being drawn through them? Is there an affordable (I'm on a tight budget) breakout board or similar that would satisfy my needs? I cannot find anything on Google. How would I go about efficiently handling step up/down voltages without loosing lots of power but still using the most out of the battery as possible? What's the best approach for my needs and can be very cheap? What types of chips are there for my needs? I have seen a few ICs that manage voltage and current, but how would I match that up with a battery? <Q> Use 3 Li-Ion cells connected in series - like in the notebooks. <S> Create the charger, based on one of the specialized charger ICs - for example this , but there are thousands of them, so search the best for yourself. <S> 2.1 <S> If this design is too complex for you, buy some cheap Li-Ion battery charger and use its electronics - for example this one . <S> Design the charger as a dock station with some very-easy-to-plug-connector and put some fast blinking IR LED on it. <S> Using the IR LED light as a navigation signal, program your robot to go to the charger by itself, when the battery is critically discharged and to touch the connector. <S> Then learn your robot to leave the discharged battery in the charger and to get the charged one from the second docking place. <A> I would recommend using a combination of the MCP7383Safely charges your LiPo or whatever battery at whatever voltage you like 3.3V/5V etc. <S> TPS61200Booster- Boosts up your Lipo to whatever voltage you like. <S> Google those two data sheets, they have sample circuits in them. <A> If it were me I would try to get a circuit already built for the task like an old alarm panel, or any device that uses a battery for backup. <S> Most devices are 12 volts, and you can step that down to whatever voltage, or voltages you need, plus those types of power supplies do double duty as they provide power, as well as charge the battery. <S> Once the batter is charged they trickle charge the battery. <S> Alarm panels or UPS unit usually have a high amp per hour battery. <S> I always see UPS units at Goodwill for a few dollars, usually the problem with those units is the battery goes bad, but the charging circuit is good, and should be easy to remove, and reuse.
Charging time for the Li-Ion batteries can be as small as 1h, but if it is too big for you, you can use another trick - instead of waiting for battery to charge, use two replaceable batteries mounted externally to the robot and design the charger to have two connect places.
How do I wire 6 LEDs to a 9-V battery? simulate this circuit – Schematic created using CircuitLab I want to wire 6 LEDs together 2.75" apart; I'm using 2V red LEDs. I've also already calculated the resistors I need. I'm thinking of making 2 separate circuits of 3 LEDS with each having their own 9v battery, if that makes it easier to do rather than 6 LEDS on 1 9v. What exactly are the steps to get this done using a switch in between as well. As of now my plan is: ( I Tried drawing a diagram here) Wire postive end of 9v battery to a switch, then from there connect the switch to the first LED, using copper wire, i'd solder the wire to each consecutive LED, until I have all 6 connected. The from the last LED I'd connect the negative end to a resistor, and finally add a wire connecting the resistor to the negative side of the battery. Would this work? simulate this circuit <Q> Here is how you can wire your LEDs. <S> The resistors used are 150 ohms and 1/4 watt. <S> This is assuming that you have 20 ma flowing through each LED. <S> Wiring Diagram: LED Polarity: <A> The LEDs have a rating current which can be found in datasheet or asking from provider or etc.when <S> you say 2volt LED, it means that its rating voltage is 2and <S> also it almost locks on 2V. as Vazquez said you can not put 6 LEDs in series against 9v. <S> Now we subtract 6 from 9 volt source voltages. <S> We'll have 3V. now with this 3V <S> we use ohm's law and find the appropriate resistor: R = 3 / (rating current) for example if the rating current is 20mA <S> you'll need 3/20mA = 150 ohm <A> No. <S> You have a total V f of 12V, but a supply of only 9V. You will need to create 2 parallel chains, and use resistors to limit the current through each chain. <A> The schematic you showed won't do what you want. <S> Notice that every other LED is reversed. <S> LEDs need to be forward biased to make light. <S> Another issue you are ignoring is that the voltage of all the LEDs in series is more than your battery. <S> You want to light 6 LEDs, and you say these drop 2 V each. <S> With all of them in series, they would need around 12 V. <S> A simple solution is to arrange the LEDs in two strings of three each. <S> In each string, there are 3 LEDs in series. <S> That means a string will require around 6 V. <S> Let's say you want 20 mA thru each LED, which also means thru each string. <S> With 9 V, there is 3 extra voltage to drop in addition to the 6 V dropped by the LEDs. <S> This can be done by a resistor. <S> You know the voltage across it will be 3 V and the current thru it <S> 20 mA. <S> By Ohm's law, the resistance should be <S> (3 V)/(20 mA) = 150 Ω. <S> Each string should have its own resistor. <S> Run two strings in parallel from the 9 V battery. <S> Each string will draw 20 mA, so both together will draw 40 mA. <S> A 9 V battery can handle that for a while.
One way is tu put two 3LEDs in parallel that each 3LEDs need 6v.
USB Send Simple Output or Allow Current Flow? I need to write a program that will turn on an external power supply by allowing current to flow through. This should be controlled via USB and should let current flow between the PSU pins. I know I could do this with an Arduino, but I'm looking for a simpler and cheaper solution. Is there a cheap USB device for allowing current flow (or outputting power to a transistor that will allow the current flow) that I can program to send an output? <Q> I assume you want to control your output from a PC application? <S> Use a handshake output pin, for instance RTS. <S> In most serial port libraries you can set this pin directly. <A> This site seems to have a few USB relay controllers. <S> Here's one that maybe you can use: <S> - If it is too expensive there are probably cheaper options elsewhere. <S> The relay contacts are rated to switch up to 250Vac at 16A which should be enough for most people's needs. <S> Ebay has one that looks similar for $13 <S> and there's a single relay option at about $11 further down the page. <A> Indeed, an USB relay is probably more direct approach. <S> You will find a lot of them on the internet, for instance: <S> http://www.yoctopuce.com/EN/products/usb-actuators/yocto-powerrelay <S> http://www.phidgets.com/products.php?category=9 <S> However, before choosing the cheapest one, make sure it comes with a decent API. <S> Btw, your power supply is probably a big inductive load. <S> Make sure you protect your brand new relay with the proper TVS diode, <S> more explanation here: http://www.yoctopuce.com/EN/article/relay-and-inductive-loads
If you need only a single pin, and your application can access a serial port I suggest using an USB-to-serial converter, either an RS232 version (very common), or one with a TTL-level output.
What should be the sampling frequency for a square pulse train in a DAQ system? Since a square pulse has very high harmonics how to obtain a good resolution of pulses? For example if we have pulse train around 500 Hz could we treat it as a typical analog signal and sample it with 1500 Hz? But if we do it I suspect that we will not have clear rising edges since it square pulse has very high component. Of course we cannot sample with infinity but I!m wondering if there is a standard sampling rate for sampling square pulses to obtain a clear pulse shape for each pulse? <Q> Assumption : The pulse timing and frequency are desired as input, not the actual waveform. <S> If the pulse train is known to be essentially just pulses, i.e. with nearly vertical rising and falling edges, then an analog waveform acquisition mechanism is sub-optimal. <S> Greater precision would be obtained by using a comparator or a Schmitt trigger , sending its output to a GPIO, and using interrupts on the GPIO to capture the rising and falling transitions against a high precision timer. <S> To avoid false triggering in case the pulse stream edges are noisy, use a comparator with a fair bit of hysteresis. <S> That way, brief noise pulses on the rising and falling edges will not falsely trigger the GPIO interrupts. <A> It all depends on what you are going to use the sampled square wave for. <S> The pictures below should give you an idea what you would get should you sample and then convert back to an analogue signal via a DAC <S> : - The above picture is rather idealistic in that it has an exact number of samples per period of the square wave - should you sample on the edge of the input squarewave <S> it'll look worse, probably more like this: <S> - The faster you sample the better it will look but we can't decide for you. <A> At the very least, the sample period needs to be strictly less than both the minimum high time and the minimum low time of the signal; otherwise you might miss a high pulse or a low pulse altogether. <S> But it's usually the timing of the edges that's the key feature of any pulse train. <S> You need to decide for your application which timing measurements are crucial and what resolution you need on those measurements. <S> That's what will ultimately determine the sample rate required.
The sample rate for a binary signal depends very much on what you know up front about the signal (from its definition), and what features of the signal you need to measure and preserve.
A good MCU which supports Arduino library but is not as expensive I have a prototype working on the Arduino and the application is targeting low cost. So I need to make my own PCB which I am willing to do. But I want to use the Arduino libraries which seem very useful. When I looked at the ATMEGA328p which the Arduino uses it seems to expensive for its price compared to other MCU's out there. SO I was wondering whats the step I should take. Is there any low cost MCU which AVR themselves make which supports Arduino libraries? The primary requirement is program memory needs to be 32-64kb. So how do I go about targeting low cost and at the same time use existing Arduino libraries so that I don't have to rewrite my code completely? <Q> Have a look at the ATtiny family of Atmel microcontrollers, and the several tutorials out there for using these MCUs with Arduino code, or a subset of the Arduino libraries. <S> Begin with the well-known MIT post on the subject: " Programming an ATtiny with Arduino " Download and study the Arduino-tiny library for ATtiny. <S> Follow <S> this blog , at ToasterBotics, for another set of inputs on using an ATtiny with Arduino. <S> See this Instructable, " Moving from Arduino to ATtiny and writing your code in pure AVR-C ", for moving to the next level, beyond Arduino library limitations. <S> Alternatively, consider the very low cost Arduino clones available, for instance this Arduino Pro Mini clone for $3.56 including free shipping. <S> You will need an additional USB-to-TTL adapter for programming the boards, though. <S> These two options above will save the effort of designing and debugging a new PCB, if they already serve your purpose: They sell fully assembled and operational at prices you cannot hope to match without huge volumes. <S> Finally, you can also consider moving away from the Atmel family entirely, as others suggest, if you are comfortable with reinvesting sunk effort in learning and coding for a new, cheaper platform. <A> you can use attiny microcontroller and use it on a breadboard, get the hex file generated by arduino and use isp programmer to burn it to the AVR. <S> Check this post <A> Take a look at Adafruit Trinket; it uses a ATTiny85, and is arduino-compatible.
If you want something inexpensive with an USB connector built in, look at the Arduino Nano clones, $6.88 with shipping :
OK to connect boards perpendicularly like this? Are there any disadvantages in using the following method to accomplish a perpendicular board-to-board connection? (i.e., any disadvantages in terms of board manufacturing capability/cost assembly convenience mechanical stability contact reliability and any other potential issues in long-term use of the boards that I am not seeing) DETAILS: Since there are only a few contacts needed and within a limited space, I am trying to do this: Design 1st board with a "pseudo-connector" by shaping copper-pad protrusions directly within the board's dimension Then make complementary-sized vias on the 2nd board Finally, insert the conductive protrusions of the 1st board into the 2nd board, and solder NOTE 1: Each of the two boards will be mechanically bound using screws to the enclosure's top and side walls, respectively. NOTE 2: Another related solution for the board-to-board connection might be to have castellated vias at the edges of baords, which can be soldered with the boards at right angles, although this approach might make alignment less convenient during assembly. Perhaps this method has some advantages though? NOTE 3: I didn't wish to use headers/receptacles/plastic-connectors, because they would bring up additional part costs and assembly steps. <Q> You don't mention board type etc. <S> here is some feedback: <S> You have to be aware of the shear stresses which can cause de-lamination of the copper traces from the board underneath. <S> You do have a huge lever arm to develop high forces. <S> This could be reinforced with vias in those fingers, if you have vias available that is .... <S> However, this sort of approach is best done in a pierce and blank assembly line (probably with single sided copper) and phenolic boards. <S> The reason for that is that it is possible to have the stamping operation get you nicely square corners on the cutting die. <S> In a past project, this is what we did. <S> Do keep in mind that cost was critical, we were counting 1/10th of a cent for resistors as being too much whereas labor cost was not an issue. <S> The device itself was potted for protection/longevity and safety. <S> Rather than have individual "pins" <S> as you drew we had slots. <S> We used the precision of the stamping tool along with a precise jig for soldering (by hand). <S> Also, there were three boards that interlocked and self supported. <S> So that once assembled (without solder ) they were very robust. <S> It took some work to get right, but putting a connector in there was a non-starter because of the extreme cost pressures. <S> here is a quick sketch of 3 intersecting boards and slots. <S> Here is a picture from a development board that I still had kicking around. <S> These boards where done in FR-4 to allow us to study thermal and mechanical effects before moving to the expensive pierce and blank dies and phenolic boards <S> (I didn't keep any of those unfortunately), other wise you'd see square corners and tighter tolerances. <S> This was also used to study solder wetting and the assembly process tolerances and ease of manufacturing. <S> This board is quite beat-up from being at the bottom of a drawer for many years. <S> So yes it is doable, to the tune of 100Kunits per month. <A> I have seen boards connected at edges with pads and a lot of solder, but this is a last resort and not a good idea in most cases. <S> These joints will need to be done by hand, which means human error and inconsistancy of workmanship will be issues. <S> A bad solder joint can make a connection some of the time, so passing a simple functional test in production doesn't mean much. <S> Second, this kind of structure will be exceptionally vulnerable to mechanical stress. <S> Solder joints crack easily with just a little stress. <S> You would have to externally hold the boards rigidly while they are being soldered and then forever afterwards. <S> One slipup, and <S> you can't count on them anymore. <S> Even then, thermal cycling and vibrations of normal use could cause trouble. <S> Third, getting the board made with the fingers may not be so cheap. <S> Each finger adds 4 route points, which the board house will likely charge for when there are large numbers of them. <S> Since the fingers will be routed, the inside corners will be rounded. <S> This means the fingers have to be longer so that there is enough straight part past the rounded corners. <S> I would also worry about possibly cracking the board itself due to stress when the two boards aren't held perfectly at right angles. <S> There are right angle header connectors available for just such purposes. <S> These are basically stiff header pins bent at a right angle and held together with plastic. <S> They are soldered into holes in each board. <S> When the resulting joint is flexed a bit, the stress is mostly taken by the bending of the header pins. <A> You should add in a right angle header that is soldered to holes in both of the boards. <S> This will result in a much better, stronger, and flexible connection. <S> Take a look at header prices at on-line sites and you can see that they can be really low cost if acquired from the correct places. <S> If you try to create the fingers via edge routing there will be a radiused inside corner in each finger. <S> Common edge routing bits are 50 or 100 mils so this puts a 25 or 50 mil radius in each finger corner. <S> This will prevent the boards from mating edge to edge like you show in your pictures.
First, it is difficult to ensure all the solder joints are good.
What happens to RLC circuits at resonance frequency, conceptually What occurs when $$\omega = \omega_r$$The circuit frequency equals its natural frequency? So what. And why is it important? <Q> A series RLC circuit has an impedance of: - \$R <S> + j\omega L + <S> \dfrac{1}{j\omega C}\$ <S> Knowing that "j" in the denominator is the same as "-j" in the numerator means there is a frequency when the inductive and capacitive reactances totally cancel and this means that the only component left is resistance, R. <S> This occurs when \$j\omega L = <S> -\dfrac{1}{j\omega <S> C}\$ Or <S> \$\omega^2 = <S> \dfrac{1}{LC}\$ <S> or \$\omega = <S> \dfrac{1}{\sqrt{LC}}\$ <S> So what? <S> It's a really big deal when wanting to filter just one small band of frequencies whilst disregarding the rest; in simple terms, at resonance, a series RLC circuit lets through a small band of frequencies and progressively attenuates frequencies that are not in the "pass-band". <S> And why is it important? <S> It's a big deal for radio receivers and transmitters <S> so it's really very, very important. <S> If you analyse a parallel RLC circuit it has the same formulas and, depending on the circuit configuration, it can do pretty much the same as a series RLC circuit. <S> The "R" in a parallel circuit is a different way of expressing losses and it functions inversely to the "R" in a series RLC circuit. <S> Resonance can do bad things too - if not controlled it can produce voltages that cause semiconductor devices to breakdown - voltage regulators is a device that springs to mind. <S> Have you seen the video of that suspension bridge rocking backwards and forwards and then collapsing - that was uncontrolled resonance and mechanically it has virtually the same formula <S> - it is a second order filter. <A> First, a preface. <S> When a sinusoidal source drives a pure resistive load, the source delivers power to the resistance, the resistance never delivers power to the source. <S> However, for a pure reactive load, the source alternately delivers and then receives power back from the load, the reactive load stores energy from the source half of the time <S> and then "gives it back" during the other half. <S> When the load is an RLC circuit, at most frequencies, the load is part resistive and part reactive (either inductive or capacitive depending on whether one is driving with a frequency that is above or below the resonance frequency respectively). <S> , all the power is delivered to the load. <S> This is important, especially in RF circuits, and in other areas too. <A> Conceptualy, you get minimum impedanance and therefore maximum current
So, to answer your question: " What happens to RLC circuits at resonance frequency, conceptually " When the RLC circuit is driven at the resonance frequency, it appears as a pure resistance so that the load never returns power back to the source
Generating sound with VCO I have an extremely basic electronics experience (op amps, filters...not much past that) and need to generate sound from a varying voltage voltage signal. I simply want it to increase in frequency/pitch as voltage amplitude increases. Can this be accomplished with simply running the output into VCO and a speaker? What additional components would I need? <Q> This should work provided you can find a VCO that would operate in the audible range (20Hz-20kHz), as they typically operate at much higher frequencies. <A> you could use IC555 configured as vco refer this link <A> Most audio VCOs that you might be looking at will not effectively drive a speaker. <S> You could try using an LM380 on the output. <S> It's a 2W audio amp and fairly commonly available. <S> If you could specify the VCO circuit and power supplies more guidance could be given. <A> The basic idea will work, though as other answers have said, you will need additional amplification to drive a speaker. <S> But one point worth mentioning is the relationship between voltage and frequency or pitch. <S> Frequency is measured in Hz, and a VCO usually has a (roughly) linear relationship between voltage and frequency. <S> However pitch is usually described in semitones or octaves, where an octave is a doubling in frequency, i.e. there is an exponential relationship between pitch and frequency. <S> This matters if your application is a musical instrument, because it is convenient to arrange a linear relationship between voltage and pitch (e.g. 1V/octave = 1/12V per semitone), which means an exponential relationship between voltage and frequency. <S> So if this is a musical instrument like an analog synth, you probably need to process your input voltage, via an antilog amplifier , before feeding it to the VCO.
Depending on the driving strength and the output voltage of the VCO you may have to add a buffer/amplifier to drive a speaker.
Automatic high torque swinger from a motor or a spare CD drive An idea that comes to my mind to swing a baby swing automatically is using a CD drive eject - close function , I have several such drives I dont use and I dont want to use a computer to do the periodic control eject \ close. Can I attach an auxiliary circuit which just helps in periodic open-close motion of the CD drive. Also, are there any other ways to make the swing automatic , what I need is just a backforth motion to couple it with the swing? The major requirement is high torque high amplitude swinging which the modern fisherprice swings lack and babies love. weight : should withstand 1 to 12 Kg babies Could be used with any normal swing to convert it to auto swinging with all safety aspects fulfilled. Here is the typical swing: Note: Some babies wont just sleep unless they are swinged continuously hence the question. Note : CD room requirement is no longer valid. <Q> Well, you probably can. <S> But isn't usual CD drives too noisy for such application? <S> And how long the drive mechanic will live with such big mechanical loads? <S> Instead of using CD Drive, some small motor with gearbox seems to be a better solution for me. <S> The motor need to have 20..30.. <S> 50rpm output speed. <S> Some of these may fit, but there are thousands of them in the on-line shops. <S> The needed speed depends on what the baby prefer. <S> Just put a disk on the output shaft and tiе a rubber band at the disk periphery. <S> The other end of the band tie to the baby swing. <S> In this construction only ON/OFF and optionally motor speed control is needed. <S> The swinging will be generated by the mechanic. <S> Here is very raw drawing of what I mean: <S> Very small motor is needed, because the swing will be accelerated smooth in the time. <S> Some adjustment of the motor speed might be needed in order to work in the resonance frequency of the swing. <S> Count the swings per minute of the swing and search for the same rpm motor. <S> Some variable voltage power source will make such adjustments easy. <S> Safety: <S> The maximal amplitude of the swing must be limited in some way. <S> If because of some reason, the elastic band is winded on the shaft, something must stop the swing and cause the band to be broken or the motor stalled, but not the swing torn down. <S> Make the extended tests without your baby in the swing, but some heavy enough object instead. <A> The baby swing is a pendulum which will have a natural frequency of oscillation only dependent on the distance from the centre of rotation to the centre of gravity of the baby and carrier. <S> This may vary with baby's position. <S> If the swing is nudged at the correct frequency the oscillations will increase in amplitude until friction counters the applied force. <S> I suggest a variable speed motor and gearbox with an eccentric pusher to nudge the rope every cycle. <S> Once the swing reaches a certain oscillation amplitude the pusher will lose contact so it's self-limiting. <S> To set up, push the swing and measure it's natural frequency of oscillation. <S> Set the motor speed to match. <A> You can use Arduino, and use the code from this site: http://singlevalve.web.fc2.com/Atapiduino/atapiduino.htm <S> Make a loop that will keep sending the eject/close command. <A> In order to respond to your update, an option with a simple circuit that opens and closes the drive periodically can easily be made by a switch reversing the polarity of the current fed to the motor. <S> You can see a good explanation for this in the following youtube video for example, where someone presents how to make a crawlworm bot from a CD drive: https://www.youtube.com/watch?v=pKIG4uJBIsQ <S> Depending on your swing, you can easily attach it to one of the legs at a height corresponding to the amplitude <S> you want the baby to swing at. <S> There are two drawbacks for this approach: 1. <S> as stated by other users before, the motor will most likely not be strong enough (you can block a CD drive opening with your hand easily) 2. <S> this setup only allows to open at close at a single frequency, given by the motors speed. <S> You could adjust voltages to tune this, but I am not sure to which extend this works out. <S> Good luck /edit <S> :A combination of this approach and the elastic band option might be powerful enough in time to get a swinging motion going. <S> Don't forget to limit the motion, though.
Simply create some very slow generator (based on 555) and connect some relay in parallel with the eject button of the CD drive.
What actually is a shadow register? I noticed the term Shadow Register while going through a datasheet of a TMS320F28335 DSP. What does it actually mean? Does it have a physical location in the CPU as the general purpose registers have? <Q> I'm guessing you've encountered this in terms of PIC programming. <S> PICs originally had I/ <S> O ports handled in a very direct manner - you could read what values they had externally, or write what values you output, both on the same address. <S> The downside of this was that the value you were trying to output might not match the state on the pin - something else could be driving it more strongly, or it might just not have finished the change yet. <S> This meant that a separate variable was needed to track what state you intended, rather than got, if you wanted to update only parts of a port. <S> As I recall that separate variable is what is usually referred to as a shadow register, since you always used it to store a copy of the (invisible) output register. <S> More recent PICs avoid this by adding the "latch" addresses, where the output register can be read. <S> This is common in other microcontrollers as well, such as the port vs pin addresses on AVR. <S> There's a similar term in PC architecture for shadow memory; in that case, it usually means a section of RAM used to store a copy of a slower ROM, and mapped to the same address. <S> Again it stores a copy of some other storage, which is hidden because the copy replaces it in the address space. <S> Edit: Seeing it's a TMS320, the shadow register provides a double buffer; this technique is used to ensure updates happen at a proper time. <S> Compare the use of frame buffer swaps in graphics. <S> The Data Manual shows shadow and active versions of several registers. <S> Consider for instance a register indicating the end of a pulse; if you were to alter it to a shorter pulse, doing so when the pulse has not yet finished might cause one pulse never to finish at all (since it never was equal to the end value in that cycle). <S> But if you write to the shadow register, the hardware can copy it into the active register at a point known to be safe - for instance, exactly when the timer wraps around. <S> This isn't described in the Data Manual, which covers particular parameters for a given chip; knowing TI, there is likely a separate manual describing the function of each block; this one has a mention of Shadow Mode in section 2.2. <A> shadow and mirror registers all refer to registers that can be accessed from multiple addresses. <S> For example, in the hardware, a given register has one instance located at F00h. <S> However, if it has an alias at 1F00h, reading or writing to F00h is the same as reading or writing to 1F00h and vice versa. <A> The name "Shadow" implies to duplicate some value and use it again - so it wont get lost.
Simply put, shadow register is a register devised within the microcontroller for purpose of holding certain data to be used later.
How can I lower the chance of burning out capacitors? I have an AC/DC power supply circuit fitted to many machines, which are all running well within the rated power capability of the supplies.However these keep failing, every one burning out a (large) electrolytic capacitor (after say 1 years' service). Oddly these boards vary slightly, some have one cap, some 2, but invariably this is the part(s) that fails. The boards with 1 cap are rated at 22µF 450v, and with 2 rated at 47µF 450v. So, what can i do to take the stress off this component? run several in parallel? UPDATE: Having had a good look over the PSU's they are indeed weird! the motors in the machines (which are cardboard shredders) are rated at 220v DC! so the main "chunky" part of the PSU board is just a rectifier/filter cap (which is the bit burning out) with no transformer, and the rest is a smaller, separate step-down DC supply for things like lights, switching, protection etc. <Q> The typical universal input range switching power supply uses a circuit topology much like shown here: <S> The larger valued high voltage capacitor (highlighted in yellow) has the job of smoothing the rectified DC voltage from the AC power line. <S> There are two main failure modes for this capacitor. <S> One is high voltage spikes at the input of the supply that make it in through the common mode choke. <S> Spikes in excess of the capacitor voltage rating can cause damage to the insulating dielectric layer of the capacitor leading to internal shorts. <S> High voltage problems should best be solved by finding the source of such spikes in the power system and taking steps to clamp spikes where they are generated. <S> It can also help to improve the input filter of the power supply, add transient absorbtion devices such as transzorbs or MOVs to the input section and increase the voltage rating of the large capacitor. <S> Another failure mode is the internal heating that can occur when current changes in the capacitor reacting with the series resistance (ESR) of the capacitor. <S> This generates heat that can dry out the internal electrolytic materials in the capacitor which causes a decrease in the capacitance. <S> It can also increase the series resistance thus causing additional heating to occur. <S> In the off-line type power supply this capacitor is working at twice the line frequency and the current pulses in the capacitor (known as ripple current) occur as the capacitor is charged on each half cycle and discharged as the rectified AC voltage goes to zero whilst the capacitor is asked to continue to supply current to the output sections of the supply. <S> Several factors can be considered to increase the reliability of this capacitor. <S> First and foremost is to calculate or measure the ripple current during supply operation and make sure it is well within the ripple current range for the selected capacitor. <S> Finally it can be useful to to find capacitors that have a lower ESR value which will lower internal heating for a given amplitude of ripple current. <A> Using two capacitors in parallel will be equivalent to using two resistors in series, the capacitance will add up, and it may adversely effect the operation of the circuit (it may not, but thinking worst case here.) <S> A better way to relieve stress from these components, without any knowledge of the circuit itself would be to use a capacitor with a higher voltage rating. <S> This will translate to a larger, more expensive component but it will stress less. <S> Another way would be to get a "quality" capacitor, from a brand name supplier. <S> There are audiophile capacitors which are known for their quality, but I am not familiar with the exact brand names. <A> If it'd be possible (given the size constrains that you have), <S> I'd de-rate <S> your capacitor (use a higher voltage rating than required) and also put a smaller ceramic capacitor in parallel. <S> These are more tolerant to short high-voltage spikes and will help reduce the stress on the electrolytic. <S> Sparkfun recently ran a video related to this, I'd recommend you to check it out . <A> IF they are burning up quickly, there is surely something wrong with the circuit. <S> caps do die eventually, but they should last years if everything is designed right. <S> That said, a higher voltage High quality cap will be less likely to blow. <S> depending on the purpose, you could even put one with higher capacitance to avoid it discharging and recharging fully quite so much. <S> That is only a good idea with caps meant to smooth out the power supply, or something else where the actual capacitance is not very important.
Another parameter to consider is the temperature rating of the capacitor to ensure that it higher than the operating temperature of the power supply.
How to find Gate Delay I need to find the delay of a full adder. I searched for it but I couldnt find absolute information. Sample delays : XOR - 8ns / AND - 2ns / OR - 2ns What is the delay of this circuit? My Solution I think the delay is the maximum time.For Full Adder : XOR + XOR = 16ns (max) Is it correct?Another question is how can I find the delay of 4-bit adder? Thanks in advance. <Q> For a single-bit adder, the worst-case propagation delay is the longest time it will take to get a stable output, which for this case is 16ns. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> However, for an N-bit adder, you should consider the path from the input's least significant bit (LSB) to a stable output's most significant bit (MSB)-- $$A_0 <S> \rightarrow <S> C_{out,0} \rightarrow C_{out,1} \rightarrow C_{out,2} \rightarrow S_3 (1)$$ (C in <S> , i is implied, but not shown). <S> In the case of your circuit, we're given the following paths$$A_i \rightarrow S_i <S> = 16ns (2)$$$$A_i \rightarrow C_{out,i} <S> = 12ns ( <S> 3)$$$$C_{in,i} \rightarrow <S> S_i = 8ns (4)$$$$C_{in,i} \rightarrow C_{out,i} = <S> 4ns (5)$$ From this, we calculate the longest path previously shown in (1). <S> This calculates to be $$12ns <S> + <S> 8ns + 8ns + 8ns = <S> 36ns$$ <S> For more information, please refer to this lecture on adder circuits <A> Maximum delay is determined by the longest path from input to output. <S> You are correct, 16ns is the maximum delay for this full adder. <S> Inputs A or B to S is longer than any path to C out and is longer than input C in to either output. <S> For each stage (column of gates) starting left to right, find the maximum delay. <S> I recommend you write the delay below the gate. <S> To make sure you got the correct number, repeat the process this time going right to left and write this delay above the gate. <S> If you got the same number there is a good change you did not make a mistake, otherwise try again. <S> With practice you'll start noticing patterns to speed up the process. <S> Hint: <S> max delay for each output of a full adder <A> I do not have enough reputation to add a comment here hence going for an answer. <S> Referring to @Shabab's answer, shouldn't the total delay be 28ns instead of 36? <S> Here is my understanding. <S> At 12 ns the Cin1(Cout0) is available, subsequently Cin2(Cout1) is available at 12+2+2=16 ns. <S> At the same time the Sum S0 will be ready. <S> By (12 + 8) <S> = 20 <S> ns sum S1 will be available. <S> Going further, Cin3(Cout2) will be ready at 16+2+2 = 20 ns, and Sum S2 at 16+8 = 24ns. <S> Finally Cin4(cout3) will be ready by 20+2+2 = 24 ns and Sum S3 by 20+8 = 28 ns. <S> Hence the total time elapsed to receive the complete output would be 28ns only. <S> S0 → 16ns Cin1(Cout0) <S> → 12 ns. <S> S1 → 12 + 8 = 20 ns Cin2(Cout1) <S> → previous carry + AND <S> + OR i.e. 12+2+2 <S> = 16ns (As first XOR would have been already completed by 8th second) <S> S2 <S> → First XOR is already complete, so previous carry + XOR ie. <S> 16+8 = 24 ns. Cin3(Cout2) <S> → previous carry + AND <S> + OR i.e. 16+2+2 = 20 ns. <S> S3 → similarly 20+8 = 28 ns Cin4(cout3) <S> → similarly 20+2+2 = 24 ns Am I missing something? <S> Please help me understand.
The simplest way to find the maximum delay for a 4-bit adder is to first draw out the full schematic.
Limit Number Of Pulses From 555 Or Similar I need as small a circuit as possible that can produce 2 pulses (say maybe 200 milliseconds long and apart) when I press a button. My thought was to use a 555 timer and set it up for my desired pulse (exact timing not important), but I don't know how to limit the number of times it happens. basically I will have a momentary switch as a trigger, and when I press it I need to produce 2/3 pulses in order to control something. I'm totally open to a better way to do this as well, but the circuit must be small, and it is only controlling an low power signal to play/skip songs with an android phone, so anything passive would be even better so I don't need some kind of power. <Q> One in mono-stable mode and the other oscillating at whatever frequency your pulses need to be at. <S> Then just make the first 555's single pulse long enough to contain how ever many pulses of the second you want. <S> simulate this circuit – <S> Schematic created using CircuitLab Note the pin numbers are not in the same spots for the two packages. <S> This was drawn pretty quickly, so also check for errors :) <A> The ancient 666 timer is klunky and large for this. <S> The PIC 10F200, which comes in a SOT-23 package, can easily do this job. <S> All it needs externally is a bypass cap. <S> That will be a lot fewer parts and will be a lot smaller than any 666 timer solution, especially since you will need two of them. <S> The micro can also then properly deal with switch bounce, which the timer circuit could have a problem with. <A> Add an electrolytic capacitor across the 100k resistor in figure 1b. <S> The capacitor is charged by a momentary closure of the switch and thus holds the reset pin 4 high for a while for the 555 to run for a while generating a number of pulses before turning low. <S> The 100k resistor discharges the capacitor slowly, the time it takes determines the number of pulses that comes out of the 555. <S> You'll need to experiment. <S> Roughly RC = <S> xT <S> Where R is your 100k, C is the capacitance value. <S> X is the number of pulses desired & T is period of a pulse. <A> This question, and most of the answers, reminds me of when I had to put together a small regulated temperature chamber for testing a research ASIC. <S> I quickly put together a couple of transistors (one was the temperature sensor) and a few resistors to make a proportional controller and heater (an integral term would require a very large capacitor). <S> I designed the thermal equivalent circuit to couple some of the ambient temperature to the sensor, so as to add a derivative term. <S> So this was an electro-thermal PD. <S> It worked well and did its job. <S> But in the end and after all of the time spent in mechanical tweaking and the lack of an integral term, I reached the conclusion: I wished I had just used a micro controller. <S> So. <S> Put a few 555 together with some gates and tweak ahead. <S> But if you simply want to get the job done, use a micro controller. <S> It will be one tiny IC and a couple of passives at most. <S> It will consume less current and would be able to operate from a coin battery for years.
A much simpler solution is a tiny microcontroller. You can have one 555 timer be the enable for a second 555 timer. The value of capacitor will depend on the period & number of pulses you want to generate. If you want to experiment and learn, go ahead.
Using the Maxim MAX1873 Here is a schematic of the "Typical Application" for the Maxim MAX1873 - Can anyone tell me what "To system load" means? Does it mean I can connect this to let's say a 12V door lock (my input is 15V)? And would this device automatically switch to the battery backup when Vin goes down (essentially a power failure)? <Q> This charger has what's commonly called as power path. <S> Basically, the current coming into the charger is split between powering the system and charging the battery. <S> The actual split depends typically on system current requirements and some settings in resistors. <S> The System load is the physical system you want to power (microcontroller, etc). <S> DO NOT connect the battery to this terminal. <S> Doing so could damage the battery. <S> The battery has its own dedicated terminal called BATT. <S> Power Path allows the system also to switch from being DC powered to battery powered if the charger supports it. <A> It's not very clear I have to say <S> so here's my take on it. <S> I say this because the input voltage for the charger circuit is 9V to 28V and it does not make sense that this is used for your load. <S> It makes sense that your load is connected to the battery as in pretty much any other battery powered application. <S> I'm not 100% <S> but that's my take on it after a few minutes trying to make sense of the topology. <S> I will add this too. <S> The connection called "system load" will also receive battery voltage minus the volt drops of the external P channel FET and the current limit resistor <S> so it looks like this connection will always receive power. <S> In fact the FET volt-drop could be quite small because I see no reason why the FET should not remain active when there is no external input supply. <S> This answer is speculation in the main part because the data sheet doesn't seem to really say what is going on. <A> MAX1873 divides the input current between load and battery. <S> It won't automatically switch power source in case of input failure, it will only power down charging to avoid reverse current on the battery. <S> From my understanding of your question MAX6326 used along with MAX1873 will reach what you desired. <S> MAX6326 <S> it's a smooth source switch.
The connection called "system load" is an unregulated output that I believe is intended to feed some other supervisory chips that might control the MAX1873 in other ways such as disabling the chip (see ICHG/EN pin) or monitoring the current fed into the battery.
Reasons not to fill unused board area with power planes instead of ground planes? On the (two-layer) board I'm designing, I have a relatively large unused area. Instead of just pouring it with ground on both sides, I'm considering filling it with Vcc on one side and ground on the other, to create a small capacitance between the ground and Vcc. (I will still add adequate decoupling capacitance from regular capacitors, of course.) The board is not exactly high speed (16 MHz microcontroller, doing only digital IO). And I'd be hard pressed to produced even 1 nF of capacitance from the available board area, I think. So you could argue that this extra capacitance is not doing much of a difference. But is there any reason why it might actually be a bad idea and should be avoided? <Q> As a rule, the ground of the circuit serve as a reference point for all signals. <S> That is why it must have very low voltage difference across the circuit. <S> It is generally not true for the Vcc - as long as no signals are measured relative to the Vcc, some bigger voltage differences are acceptable. <S> The total current in the Vcc line is equal to the current of the ground line. <S> But because of the above paragraph reasons, the ground line must have much lower resistance (actually impedance) than the Vcc line, where high inductance together with decoupling capacitors is even good. <S> That is why, the ground is often routed as an area, but Vcc simply as thick enough tracks. <S> This all was in theory. <S> So, don't be paranoid. <S> Footnote: <S> If you have so big empty areas, isn't it better to change the design in order to make the PCB smaller? <A> The tiny extra capacitance you will get on the power net will be pretty much irrelevant. <S> It will be low ESR, but it won't be right where you need that, so it won't help much. <S> In your situation, I would not do the power plane. <S> There is little drawback electrically, but it adds just a little more chance you will mess up something. <S> It will also make the board harder to edit in case you need to make a few changes after testing. <S> If you do use the power plane, make sure that any pads for that signal embedded in the plane have thermal releafs, else they will be hard to solder. <S> In short, it doesn't matter much either way, so I'd leave it out for simplicity and less chance of error. <A> Well there are both positives and negatives. <S> While you may not get a lot of capacitance it will be very high quality capacitance. <S> Meaning that it's self resonance will be at a lot higher frequency that say a ceramic cap, because of the low inductance. <S> So it would work as decoupling as a lot higher frequencies. <S> The negative is that you are now potentially moving an aggressor signal (your power rail) closer to other signals which then may pick this up because the coupling is increased because it is occupying more board area. <S> Do keep in mind that power is also a "ground" in terms of small signal analysis. <S> While it could be dangerous to decouple to it, that might in some cases be advantageous. <A> I second Olin's answer. <S> It will make little difference because the capacitance is so far away and its so small. <S> Its better to put actual capacitors near the pins. <S> However, as noted previously , you should add "Copper thieving" To those sections of the board to ensure faster and better handling of the PCB so that etching is better.
If your PCB is not dealing with high currents and/or very high frequencies, you probably can route it in whatever manner you want and everything will be OK.
ATMega8: why do VCC and AVCC have to be connected? I often read that it is good practice to connect VCC with AVCC. Even in the ATMega8 datasheet it says so: AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..6). It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that Port C (5..4) use digital supply voltage, VCC. But nowhere I can find an explanation as to why they have to be connected.A simple circuit for blinking a LED works without connecting VCC and AVCC. Do I just have to accept it, or is there a good reason? <Q> Mainly, it has to be connected because the manufacturer says it should. <S> Aside from that, they should for full operation of the chip (all ports/pins), to prevent floating pin issues on the AVCC side, to prevent noise on the digital side. <S> There are issues where leaving the AVCC side unpowered causes parasitic power draw and can destablize the internal clock, or can prevent stable startup. <S> Atmel designers have decided that having a separate Analog VCC and Ground is the best way of allowing relatively noise free analog section, by allowing users to add filtering and separation of the Digital and Analog Planes, even inside the ATmega. <S> It's not just the ATMega8, afaik all ATMegas and <S> even some ATTinys have this design. <A> Good on you for asking for the reason! <S> Simple "blinkenlights" projects don't have noise and accuracy requirements. <S> Now if you mean if they should be connected to the same VOLTAGE, the answer is yes within <S> +/- <S> 0.3V of VCC From the ATMega8 complete datasheet : <S> "The ADC has a separate analog supply voltage pin, AVCC. <S> AVCC must not differ more than ±0.3V from VCC." <S> and "AVCC is the supply voltage pin for the A/D Converter" <S> To recap: <S> AVCC and VCC should be at the same voltage (within +/- <S> 0.3 Volts), and it is identified as a separate pin to allow the designer to place extra filters on that input to keep noise out of the sensitive A/D converter portion of the IC. <S> Hope that helps! <A> Often times, digital supply and ground pins will end up with small amounts of noise on them. <S> It's hard to eliminate all such noise when digital circuitry is switching significant amounts of current, and 150mV or so of power-supply noise is unlikely to affect the circuitry powered by the digital supply pins. <S> Having 150mV of noise on the analog supply pins, however, would make it very difficult or impossible for the analog circuitry to achieve fraction-of-a-percent accuracy. <S> The fact that the analog pins are separated means that one can take accurate readings even if there is 150mV of noise on the digital power supply, <S> provided that the digital supply doesn't swing by more than 300mV and one has an analog supply which is somewhere within 300mV of both extremes of the digital supply's range. <S> Eliminating 99% of the noise from a power source that's only feeding the analog-supply pin, and ensuring that source voltage is close to the digital supply voltage, is often much easier than trying to eliminate all noise from the digital supply. <A> Just to add another reason why AVCC should be connected even in simple projects. <S> It can manifest as weird voltage thresholds triggering BOD reset or even device not starting with correct voltage ocassionaly. <S> I just run into this issue in one of my "quick&dirty" hack projects using ATmega88P. After connecting AVCC directly to VCC the problem with BOD not releasing reset was solved. <S> Since I do not use any other analog peripherals in my project I did not bother with proper decoupling. <S> This solution found in one of avrfreaks forum threads after much googling. <S> See: http://www.avrfreaks.net/comment/349747#comment-349747 <A> Because they specify that AVCC and VCC should be within 0.3V, this is similar to the protection voltage of internal diodes used in Chips. <S> If the diodes are biased above 0.3V (for example if AVCC is not connected) <S> those diodes might conduct, causing problems and perhaps damaging the device. <A> I believe certain pins, including PORTC:0-3, are actually powered from Avcc and if you do not connect Avcc these pins will not function.
AVCC is specified as an independent pin because it connects to key analog components internally, and as such should have separate filtering capacitors. The reason has to do with the internal process of the device and how it is built. When you use Brown-out detection circuit, which relies on internal voltage reference, you may get unexpected behavior and unreliable device startup.
BJT vs MOSFET for very low power flyback converter I am currently working on a flyback design charging a capacitor in the nF range to 200V from an input voltage of around 1.5V. As the final circuit should be as small as possible, my component choices are very limited. Furthermore, the flyback switch should be driven by a max. voltage of 2V DC. My current problem is now, that there are currently no MOSFET devices available with a Vdss high enough. My question now: Are BJTs feasible as a switch (higher breakdown voltage) and if so do they consume any power when turned off? (I am guessing not). Is it possible to drive them from only 2V? <Q> I have recently finished a similar design. <S> We are now at the pre-production phase, having already validated the first prototypes, which operate perfectly under similar constraints as the ones you describe in your question. <S> Because of IPR limitations, I can only give you some general guidelines. <S> Based on the following assumptions: You are trying to avoid the use of a transformer by all means (which may not be the case), <S> The power requirements of the load is in the miliwatt range, <S> You don't want to step-up the voltage supply first, but will use the 2VDC directly for powering your flyback design block. <S> You need to keep the cost and PCB space to the absolute minimum. <S> I suggest the following approach: Rule out the MOSFET and use a fast switching high voltage BJT (rated at least to 200V, better yet to 300V). <S> Select the most appropriate inductor for your constraints and depending on your requirements for maximum power delivered to the load. <S> Calculate the maximum flyback voltage, and make sure you can get at more than 200V voltage flyback "peaks". <S> The involved parameters here are: ILpk (inductor peak current), Cts (total sum of parasitic capacitances at the flyback node) and SWITCHING SPEED of the BJT. <S> The last one is hugely important, and rarely mentioned in the technical literature. <S> You may have a big ILpk and very little Cts, but if your switching (off) speed is not fast enough, the flyback voltage will suffer. <S> Reminder: <S> Vflyback = <S> -L <S> * dI/dt. <S> The above can be implemented with: A simple (single) inductor or A 1:1 coupled inductor. <S> Apparently, from the design equations point of view, there seems to be no need for the 1:1 coupled inductor, as the single inductor will work exactly as well, most probably with less resonance apparatus. <S> However, using a 1:1 coupled inductor will help avoiding EMI generation. <S> I suggest the use the 1:1 coupled inductor in case you have to EMI certify your final product. <S> ** <S> However the previous assumptions, should you want to explore the flyback transformer approach, there now exist very nice miniature (micro-power) <S> SMD flyback transformers. <S> ** <S> For instance, this Coilcraft model allows up to 1:100 turns ratio with 300Vrms isolation among primary and secondary coils: http://www.coilcraft.com/lpr6235.cfm <A> Using a transformer is my preferred option. <S> The primary would be centre tapped and connected to the 2v rail. <S> Transistors would pull-down on each leg of the primary in turn at a reasonable frequency of about 100kHz. <S> This turns your primary voltage into 8v p-p\$^1\$. <S> If your turns ratio were 200:8 that doesn't sound too bad to me. <S> Output would be a little short of 200volts but a little bit of resonance tuning on the secondary would soon sort that out. <S> You could even make a case for a smaller turns ratio with a Cockcroft Walton diode multiplier on the back end to double or triple the voltage. <S> Plenty of transistors would do this and several mosfets providing gate voltage threshold was below 1v. <S> You could of course look at an energy harvesting chip to give you 5v and then use a fly-back switcher from people like linear technology. <S> Here's quite a useful device from linear tech: - Application 1 works from a supply as low as 1.2V and produces 5V at over 200mA. <S> This could then feed the 2nd circuit which can produce up to 350V. <S> It should be noted perhaps that the internal switching transistor is bipolar in this chip. <S> Also note the use of a 2-stage Cockcroft Walton diode-capacitor multiplier on the output of the 2nd circuit. <S> \$^1\$ Before anyone starts down-voting for saying 8Vp-p you need to analyse what happens on the primary. <S> After one side of the transformer has been grounded it will rise up to twice the supply voltage (i.e. 4V) due to the action of the other side of the transformer being grounded by the other transistor. <S> Hence one side has 4Vp-p and the other side has antiphase 4Vp-p. <S> Net effect 8Vp-p. <A> You don't need high voltage MOSFETs. <S> For such big ratios, the transformer is a natural choice. <S> This way, on the primary side, the voltages will be low enough to be handled with low power MOSFET, that will provide higher efficiency and easier design. <S> Driving BJT from 2V is easy. <S> As a rule BJT will consume a little bit more energy than MOSFET, because it consume some constant base power, when turned ON. <S> But the problem with BJTs is the same - I highly doubt, that raising the voltage from 1.5V to 200V without transformer is possible. <S> In theory yes, but in practice...
Using BJTs is possible of course and they does not consume energy when turned off.
Looking for a level translator for single duplex serial bus I have a 3.3V UART (two pins) plus a direction selector pin (also 3.3V.) I need to talk to and listen on a single duplex serial bus at 5V with 20 mA drive strength. The signaling rate is 3 Mbit/s, although switching directions is allowed to take 4 microseconds.An automatic bidirectional translator like TXB0102 is not right because it ignores the direction signal.A 74hct125 (one element going each way) doesn't do level translation.A simple MOSFET for translation isn't good enough because it's not push/pull and thus doesn't get the drive strength both ways (plus strong pull-ups are bad for this bus.)Finally, I prefer something in DIP-8 but can go up to DIP-14 if no external components are needed, and I'll break down and use SMDs if there is no other choice. So, what existing component is there that fulfills these requirements? I've browsed parametric search at Digi-Key but not found anything that his all the requirements above... <Q> The 74HCT125 is fine. <S> Power it with 5V <S> and it will read your 3V3 <S> Tx and enable signal just fine because \$V_{IH}\$ is only 1.6V <S> (2V worst case). <S> For the 3V3 Rx use a resistive voltage divider for 'level translation' from the 74HCT125. <A> You need one driver ('125) for each direction of the bus: <S> One with the input connected to the 5V bus, and the output connected to the 3.3V IC. <S> For this, you could use a 74AHC125, or a 74LVC125, powered from 3.3V, as these tolerate the 5V input. <S> 74HC125 is not okay, as it does not tolerate input above its V CC . <S> One with the input connected to the 3.3V IC, and the output connected to the 5V bus. <S> You'll also have to drive the output enable of these drivers so you'll need an inverter as well. <A> What about the Si865x ? <S> This device does not only translate the levels, it can does also isolate the to sides. <S> I have used it several times and made positive experience.
For this, you could use a 74HCT125, or a 74AHCT125, powered from 5V, as these have an input high threshold level of 2V, so they will correctly recognize the output of the 3.3V IC.
When does it matter whether I use a carbon composition or metal film resistor? I'm struggling to understand the practical difference between carbon composition resistors and metal film resistors. From what I've read, metal film resistors tend to be available in more precise tolerances than carbon composition ones. Other than that, are there any differences between the two? <Q> Metal film can be made to tighter tolerance, is more stable, and is less noisy. <S> Nowadays there is very little reason to use a carbon composition resistor. <A> Carbon composition resistors have higher noise and are prone to aging (change it's resistance with the time). <S> Additionally they can change its resistance because of high voltage or high temperatures applied. <S> That is why the precision resistors with tolerance less than 1% are always made with metal film technology. <S> The other types of carbon resistors (carbon film resistors for example) has better properties than carbon composition resistors, but are still worse than the metal film resistors. <A> You do have to be careful with some metal film resistors. <S> And just because inductance is not mentioned on the data-sheet doesn't mean it is not present.
Metal film resistors are made in such large numbers that there is no longer a cost advantage to using carbon composition. Construction does matter as there are low inductance and high inductance types/techniques.
Resolution a problem with voltage divider I'm facing a problem I don't exactly know how to resolve. I have this circuit The 2k resistance is a potentiometer. Basically we have a wheatstone bridge.Here's the picture The question is : how do you adjust the potentiometer so that the amp meter shows a 0 current. Well, the answer should be that - and only with reasoning on how the resistances on the two vertical branches (the lower/upper part of the potentiometer) act as a tension divider, or at least that's how they did it in my solution book - the upper part (say X) and lower part (say Y) of the potentiometer should make it so that X/Y = 8,2/3. Seriously I don't get it. I have tried methods using superposition principle (considering for example X in serial with Req(Y+3k), and 8,2 in serial with Req(Y+3k)), but I end up with X = 8,2k which is non sense since the potentiometer is 2k. Can someone explain? I know since its an amp meter it's just like if it was not there. I don't get how you can use the tension divider law if the the middle of the two vertical branches are connected with a wire (since I consider the amp meter as a wire, "ideal amp meter"). <Q> I built this in CircuitLab. <S> Consider the sliding contact of the potentiometer to divide the 2kΩ resistance into two parts, the part "above" the sliding contact and the part "below" the sliding contact. <S> This gives resistances of \$ 2kΩ \times \frac{8.3}{3.0+8.3} = 1,464Ω\$ and \$ 2kΩ <S> \times \frac{3.0}{3.0+8.3} = <S> 536Ω\$. <S> When simulated, the current through R2 is 13 mA and the current through R6 <S> is 23 uA. <S> That is, the current through R6 is a thousand times less than the current through R2, i.e. effectively zero. <S> Note that \$ R2/R3 = R4/R5 \$ so that the voltages at "NODE 2" and "NODE 3" are identical, so that there is no potential difference between "NODE 2" and "NODE 3" and the current must necessarily be zero. <A> If you need an analytical solution, just replace the ampermeter with a voltmeter. <S> Then solve the schematic, for 0 voltage across the ends of the voltmeter. <S> In these conditions, if you replace the voltmeter with ampermeter, the current will remains 0. <A> There are only two possible conditions for current not flowing in the ammeter: - The 45V battery is removed (stupid of course) <S> The voltage on the wiper being the same as the 8k2 and 3k resistors <S> If, the 8k2 and 3k resistors produce X volts due to the ratio \$\dfrac{3k}{8.2k+3k}\$, then the pot has to be set so that the ratio of its lower part (the resistance below the wiper) to 2k ohms is the same.
Set the position of the sliding contact so that the ratio of the resistance above the contact to the resistance below the contact is 8.3:3.
What kind of cable can be used to power a mobile electric machine running of 6 kV AC? I'm looking into the specifications of Hitachi hydraulic excavator model EX8000E-6 with electric motor. The spec says the motors are of type HITACHI TFOA-KK and run off AC 6 000 - 6 600 V / 50 Hz , each of the two motors is rated at 124 amperes. In the picture (left bottom corner) there's a cable: The cable looks as if it was a domestic vacuum cleaner cable - simply laying around. Crafting such a cable looks like a major challenge - it has to be flexible and have enough insulation to withstand the 6 kilovolts in the wires. All the high voltage cable I've seen so far were designed for being buried underground and so were not really flexible. Even they have untrivial design . How are such flexible cables for voltages around 6 kilovolts designed that they feature flexibility and capability to insulate the high voltage? <Q> EDITED - don't bother trying to say it has a diesel engine like I did because it comes in two versions. <S> This version has an engine: - <S> And presumably it cannot be powered from a trailing cable. <S> If it helps save my reputation, I've worked down coal mines with really powerful electric machinery operating at 3,300V 50Hz and these were +1MW machines that ran up and down a "longwall" coal face shearing coal off onto a conveyor belt. <S> The cables, from memory were about 4 inches diameter and as tough as old boots. <S> The trouble with the Hitachi is that if it over-extends itself it's going to unplug itself from the static generator and it's going to be a real b**ch to plug it back in! <A> 6kV is not actually so big deal. <S> Note, that such cables has multi layered insulation and probably the upper layer is made from abrasion resistant rubber. <S> There are internal layers that provides the actual insulation. <S> A middle grounded braid layer provides the safety. <S> Here is an example with data sheets, found by simple search on my local cable distributor's site. <A> You would want a "trailing cable" such as those used by the mining industry. <S> In Australia, Olex is a manufacturer of such cables. <S> See the Olex mining catalogue . <S> Special features of such cables include: <S> The conductor is more finely stranded, to allow better flexibility. <S> The insulation is a synthetic rubber like EPR, which is flexible, instead of the usual XLPE or PVC, which aren't as flexible. <S> Construction features to resist crushing and abrasion IMPORTANT - a pilot wire used to monitor the circuit. <S> You attach a pilot wire monitoring relay to the pilot wire, which sends a small loop current out to the end of the cable and back. <S> If the cable is cut, the loop current is interrupted, and the pilot wire monitor disconnects the power. <S> This is an important safety feature to prevent live HV conductors being exposed in case the cable is cut. <S> Here is a chart from the Olex catalogue, showing the features of their range of trailing cables for the mining industry. <S> The range covers voltages from 1kV to 33kV.
Every cable production company (at least the bigger one) has such cables in their catalog.
Increasing voltage to motors I'm got a RC car, which can go forward and backward and it's supplied by ~5V battery . At this moment the circuit looks like this: and the board can swap + and GRN so the motor can rotate in both ways. My goal: How will look the circuit if I wanna accomplish something like this: And replace the 5V battery with 9V battery ( and add a resistor before the electronics? ) <Q> I see what you are trying to do... <S> The schematics turn out not to be quite as simple as you have drawn though. <S> Resistor between the battery and the PCB wont work since the current draw will likely vary a lot. <S> Use a Linear Voltage Regulator, like the jelly-beans 7805 . <S> Simply adding two transistors in front of the motor will not do the job either. <S> Please read through it. <S> The PCB most likely already implements such structures. <S> Perhaps you are better-off plugging the stronger battery directly in and seeing if the thing explodes. <S> I'd say you have a 50% chance of success. <S> Note that regular 9V batteries have quite significant internal resistance, so <S> it may not run better at all. <S> Try a two-cell Li-Po battery. <S> These are much better, but require some attention when charging. <A> There is a couple of option you could use. <S> You could power everything from a 9V battery. <S> Connect your board via à voltage regulator like à LM7805. <S> Connect your motor using <S> pn2222a transistors, <S> but if you want forward and reverse you will need an H-Bridge. <S> Sorry I can't draw right now, but here is a nice tutorial for connecting a set-up similar to yours. <A> If you want something simple to try, use a couple of relays powered from where the motor connects to at the moment: - EDIT - <S> My knowledge of RC cars is a bit limited to toys that are either full speed ahead or full speed reverse and it has been pointed out that if the car is a little more sophisticated it will control the voltage to the motor so that a range of speeds can be produced. <S> This means that the relay idea will only work on simpler cars of the type that I'm more used to. <S> A and B are the connections to where your motor is at the moment. <S> Depending on the polarity of A and B, either the left relay closes or the right relay closes. <S> This is set by the diodes in series with the relay coils. <S> The diodes across the relay coils are there to protect the circuitry that feeds A and B. <S> Without any relays being activated i.e. A and B <S> both inactive, the motor doesn't get fed the 9V. <S> If either relay operates the motor gets fed 9V left to right or 9V right to left. <S> The action of swapping active relay reverses the motor as per a semiconductor H bridge. <S> Your relay coils need to be rated accordingly to what voltage your current system uses so try measuring this with a meter with a 100 ohm load to simulate the relay in place. <S> Then choose a relay who's coil will work at this voltage. <S> BTW the relay contacts need to be rated to switch the motor current and they also need to be rated at at least 24V dc switching. <S> To prolong relay contact like fit a 100nF capacitor across the motor. <S> This will give you an insight into how the H bridge works and if you want to go straight for the semiconductor version <S> then good luck but take advise on ones you think may be suitable. <S> As for powering the receiver from 9V you ought to use a regulator like a Low Drop Out (LDO) version of the LM7805. <S> This regulator circuit needs to go between the car on-off switch and the circuitry - don't put it before the switch (on the battery side) because after a day your battery will be discharged. <A> What you need is an h-bridge, you can buy a full solution from ebay for about $5 http://www.ebay.com/itm/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-L298N-for-arduino-/251080674810
I am sorry to tell you, but you need a circuit called H-Bridge .
Relation and difference between Fourier, Laplace and Z transforms I have become a bit confused about these topics. They've all started looking the same to me. They seem to have the same properties such as linearity, shifting and scaling associated with them. I can't seem to put them separately and identify the purpose of each transform. Also, which one of these is used for frequency analysis? I couldn't find (with Google) a complete answer that addresses this specific issue. I wish to see them compared on the same page so that I can have some clarity. <Q> The Laplace and Fourier transforms are continuous (integral) transforms of continuous functions. <S> The Laplace transform maps a function \$f(t)\$ to a function \$F(s)\$ of the complex variable s , where \$s = \sigma <S> + j\omega\$. <S> Since the derivative \$\dot f(t) = <S> \frac{df(t)}{dt} \$ maps to \$sF(s)\$, <S> the Laplace transform of a linear differential equation is an algebraic equation. <S> Thus, the Laplace transform is useful for, among other things, solving linear differential equations. <S> If we set the real part of the complex variable s to zero, \$ \sigma <S> = 0\$, the result is the Fourier transform \$F(j\omega)\$ which is essentially the frequency domain representation of \$f(t)\$ (note that this is true only if for that value of \$ \sigma\$ the formula to obtain the Laplace transform of \$f(t)\$ exists, i.e., it does not go to infinity). <S> The Z transform is essentially a discrete version of the Laplace transform and, thus, can be useful in solving difference equations, the discrete version of differential equations. <S> The Z transform maps a sequence \$f[n]\$ to a continuous function \$F(z)\$ of the complex variable <S> \$z = <S> re^{j\Omega}\$. <S> If we set the magnitude of z to unity, \$r = 1\$, the result is the Discrete Time Fourier Transform (DTFT) <S> \$ <S> F(j\Omega)\$ <S> which is essentially the frequency domain representation of \$f[n]\$. <A> Laplace transforms may be considered to be a super-set for CTFT. <S> You see, on a ROC if the roots of the transfer function lie on the imaginary axis, i.e. for s=σ+jω, σ = 0, as mentioned in previous comments, the problem of Laplace transforms gets reduced to Continuous Time Fourier Transform. <S> To rewind back a little, it would be good to know why Laplace transforms evolved in the first place when we had Fourier Transforms. <S> You see, convergence of the function (signal) is a compulsory condition for a Fourier Transform to exist (absolutely summable), but there are also signals in the physical world where it is not possible to have such convergent signals. <S> But, since analysing them is necessary, we make them converge, by multiplying a monotonously decreasing exponential <S> e^σ to it, which makes them converge by its very nature. <S> This new σ+jω is given a new name 's', which we often substitute as 'jω' for sinusoidal signals response of causal LTI systems. <S> In the s-plane, if the ROC of a Laplace transform covers the imaginary axis, then it's Fourier Transform will always exist, since the signal will converge. <S> It is these signals on the imaginary axis which comprise of periodic signals e^jω = <S> cos ωt + j sin ωt ( <S> By Euler's). <S> Much in the same way, z-transform is an extension to DTFT to, first, make them converge, second, to make our lives a lot easier. <S> It's easy to deal with a z than with a e^jω (setting r, radius of circle ROC as untiy). <S> Also, you are more likely to use a Fourier Transform than Laplace for signals which are non-causal, because Laplace transforms make lives much easier when used as Unilateral (One sided) <S> transforms. <S> You could use them on both sides too, the result will work out to be the same with some mathematical variation. <A> Fourier transforms are for converting/representing a time-varying function in the frequency domain. <S> They all appear the same because the methods used to convert are very similar. <A> I will try to explain the difference between Laplace and Fourier transformation with an example based on electric circuits. <S> So, assume we have a system that is described with a known differential equation, let say for example that we have a common RLC circuit. <S> Also assume that a common switch is used to switch ON or OFF the circuit. <S> Now if we want to study the circuit in the sinusoid steady state we have to use Fourier transform. <S> Otherwise, if our analysis include the switch ON or switch OFF the circuit we have to implement the Laplace transformation for the differential equations. <S> In other words the Laplace transformation is used to study the transient evolution of the system´s response from the initial state to the final sinusoid steady state. <S> It Includes not only the transient phenomenon from the initial state of the system but also the final sinusoid steady state. <A> Different tools for different jobs. <S> Back at the end of the sixteenth century astronomers were starting to do nasty calculations. <S> Logarithms were first calculated to transform multiplication and division into easier addition and subtraction. <S> Likewise, Laplace and Z transforms turn nasty differential equations into algebraic equations that you have a chance of solving. <S> Fourier series were originally invented to solve for heat flow in bricks and other partial differential equations. <S> Application to vibrating strings, organ pipes, and time series analysis came later.
A laplace transform are for converting/representing a time-varying function in the "integral domain" Z-transforms are very similar to laplace but are discrete time-interval conversions, closer for digital implementations.
Simple measurment of resistance with microcontroller What is a simple way to measure resistance (in this case 0-100 kOhm) using micro-controller (I'm using STM32, it has 12-bit ADC, timer, but no comparator). I want it simple (not too many components) and cheap. The first idea I had was to use ADC with voltage divider. However it brings down the problem to measuring voltage across known resistor what is hyperbolically dependent on the measured resistance, so actual precision varies greatly over the range of values of unknown resistor. It also requires the known resistor to be much smaller value than known one, but this should be fine if big precision is not required. Requirements: Range: 0-100 kOhm Precision: at least 1 kOhm, preferred <100 Ohm, but actually I am curious (thinking about - other possible applications which might require better precision) how high (with precision) we can get without making too complicated circuits. <Q> Use a voltage controlled precision current source to feed a known current into the resistor. <S> If the measured reading is either too low or too high, adjust the current source to be more appropriate. <S> Take several readings and average.... <S> Maybe 50 readings to counter the lack of bits in your ADC . <S> For high valus of resistance you will need to buffer the signal to the ADC with a unity gain opamp circuit because the ADC's input is quite low impedance. <S> The current source can be built using a DAC to set the demand. <S> It'll need two transistors and two opamps for maximum flexibility. <S> You may think this is too complex <S> but if you change your mind let me know. <S> It is a decent method I might add. <A> The problem you encounter with a voltage divider is that that not only the voltage changes with different resistors but also the current through the overall resistance. <S> So these three change with different measurements. <S> To measure resistance, you need to keep a constant current through your probe. <S> If the current is constant the voltage-drop of the resistor is directly associated with the resistance due to U= <S> I*R. <S> (V=I*R) <S> If you want to measure 0-100kOhm with a Vadc, max=5V you have to apply 5V/100kOhm = <S> 50µAusing <S> a 12bit ADC <S> you can measure a minimum voltage of 5/2^12 <S> = 1.22mV which is a minimum resistance of 1.22mV/50µA = 24.41Ohm which is simultaneously your precision. <A> A common measurement approach is to charge the cap to some level and <S> then time how long it takes to discharge by some percentage. <S> If one arranges things so the cap may be charged either through a known resistance or the unknown one, one may reasonably accurately determine the unknown one.
If you use the resistance to be measured in series with a capacitor, and can sense the voltage on the capacitor, the RC time constant of the resulting circuit will be proportional to the resistance.
Can AC current be switched using SPST EM-relay controlling "live" wire alone? Perhaps the most fundamental question of the day, but here goes. Assuming that I wish to switch (ON/OFF) 3 AC loads, using EM-relay, can a SPST EM-relay (or appropriate rating) be used where only the "live" AC-wire undergoes make/break under microcontroller control, but "neutral" isn't switched ? Or, is it that for AC, we must use a DPST EM-replay only and both "live" and "neutral" must be switched ? Here is a highly simplified schematic of what I am trying to achieve using the SPST EM-relays. There is a single AC source (230VAC, 50Hz - India), and the 3 AC loads are actually a bunch of 'Christmas Rice-lights', i.e. each AC-load is actually 4-5 rice-light set. Idea is to switch them under microcontroller logic. Nothing novel, perhaps done a zillion times, but first time that I am trying! <Q> What does a light switch do? <S> Answer, it just switches the live. <A> This is how lighting is normally switched on and off where I live. <S> Having said that, you should follow all local electrical codes and regulations where you live, and make sure that the low voltage circuitry in the microcontroller is well isolated from the high voltage power circuitry. <A> This is exactly the right way to switch AC with relays , but do keep in mind the current rating of you <S> io pins . <S> The relay coil can use a fair amount of current. <S> Also, it is what we call an "inductive load", which means that when you turn the relay off, the current wants to "keep going" for few milliseconds and that can create a "kickback" which can result in several dozen volts being applied to your MCU, which it will not appreciate. <S> To solve the kickback issue, usually one connects a good <S> diode(schottky is the preferred type) backwards across the relay. <S> It will shunt out any bad kickback before it can hurt your circuit. <S> To solve the current issue, usually one uses a transistor. <S> There are lots of examples for driving relays from MCU pins. <S> Note that the "kickback" effect has absolutely nothing to do with the AC on the other side of the relay and arises solely from the propereties of coils of wire with hundreds of turns and electromagnets which relays use to switch the contacts. <S> Make sure you use good quality parts, and build or get some kind of enclosure so that nobody can touch the live electricity, and never work on the device unless you can plainly see with your own eyes that it is 100% unplugged(really unplugged, not just switched off) <A> You can drive relays the way you want, though in many cases the microcontroller can't put out enough current to drive the relays that you want. <S> In that case, you'd need a transistor to drive the relay. <S> In either case, you need a diode across the relay coil to absorb the back-emf when the current is switched off. <S> Another option is to use a solid-state relay (SSR). <S> They can be driven directly from the output of a microcontroller (warning: some require a resistor to limit current), and they're very easy to use. <S> They can be a bit pricey.
What you are suggesting will work electrically.
Transformer with a single turn plate as secondary What kind of applications are transformers with a single turn secondary used for?I believe a high current is generated, but couldn't really figure out a good practical example where this might be used. <Q> A Weller gun-style soldering iron is one good example. <S> soldering gun http://static.emedco.com/media/catalog/product/Cooper-Hand-Tools-Wellerreg--Professional-Soldering-Guns-DD678-ba.jpg <S> (source: harborfreight.com ) <A> I've used a single turn secondary with the wires passing through a current transformer for testing it at hundreds of amps. <S> The primary was fed from a variac <S> so I could control current fed through the CT. <S> Checking linearity was the objective. <S> Rf transformers are quite commonly made with one or a few turns to make them work effectively at VHF and UHF. <S> Single turns had to be used because the data rate was so high ie tens of Mbps. <S> Same sort of idea for transmitting power across a small gap on rotating apparatus. <S> Single turns were used and resonated with tuning capacitors. <A> I saw one in a 12V 800W server power supply <S> (Ablecom PWS-801-1R). <S> In case you were wondering - the PSU provides 12V and 5VSB, the other voltages are generated by the backplane.
I've also made data coupling transformers where one winding was on a rotating spindle. Also, pretty much any spot-welder for sheet metal.
What happens on the STM32 when two pins are configured to have the same alternate function? Reading through the STM32F051 manual, it looks like it's possible to configure the same alternate function on two pins; for example, you could have multiple USART1_TX pins at the same time. Or for example the more problematic case of two USART_RX pins. The manual is silent on this case. Is this legal/safe? Is this useful? <Q> On processors which use per-pin registers to select I/ <S> O functions, it is generally possible to route an output function to multiple pins without conflict; all pins will echo the same output. <S> The effect of having multiple pins connected to an input is often unspecified; if e.g. a UART had I/ <S> O pins 3 and 4 connected to a UART, it might behave as though the UART was connected to an "AND" gate which took pins 3 and 4 as inputs, or it might behave as though it was connected to one pin and ignore the other, or it might connect both pins to the UART's input buffer through transistors that had a moderate amount of resistance, or it might draw extra current when pin 3 is high and 4 is low or vice versa, or it might do just about anything else imaginable. <S> I don't recall having seen any particular guarantees that any of the STM32 family chips I looked at would favor any particular approach over any other. <S> A somewhat nicer design approach, used in some Microchip parts (perhaps some STM parts as well) is to have each I/ <S> O function include a multiplexer to select which pin it should accept input from, and have pin include a multiplexer to indicate the I/O function from which it should output data. <S> Such a design makes it possible to have one pin feed multiple I/O functions, while simultaneously eliminating any ambiguities posed by conflicting configurations. <A> Yes, it is usefull. <S> Result from experiment on STM32F407VGT6: <S> The experiment was to trigger TIM1 on rising edge of external trigger - signal "TIM1_ETR". <S> "TIM1_ETR" signal can be mapped to pins PE7 and/or PA12 of MCU package. <S> The experiment:Initialize both pins PE7 and PA12 as AF "TIM1_ETR" for TIM1: { GPIO_InitTypeDef GPIO_InitStruct = { 0 }; GPIO_InitStruct. <S> Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct. <S> Pull = GPIO_NOPULL; GPIO_InitStruct. <S> Alternate = GPIO_AF1_TIM1; GPIO_InitStruct. <S> Mode = GPIO_MODE_AF_PP; GPIO_InitStruct. <S> Pin = GPIO_PIN_7; HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); // configure PE7 as AF GPIO_InitStruct. <S> Pin = GPIO_PIN_12; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); // configure PA12 as AF} <S> The result - TIM1 is started by rising edge on any of the pins PE7 or PA12. <S> This reveals the way to MUX (change) <S> AF pins in run-time: main{ GPIO_InitTypeDef GPIO_InitStruct = { 0 };// <S> Deactivate PA12 input (set as regular input): GPIO_InitStruct. <S> Mode = GPIO_MODE_INPUT; GPIO_InitStruct. <S> Pin = GPIO_PIN_12; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);// select PE7 as a trigger source, GPIO_InitStruct. <S> Mode = GPIO_MODE_AF_PP; GPIO_InitStruct. <S> Pin = GPIO_PIN_7; HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);// Arm <S> the timer <S> arm_tim1();/ <S> * Now timer will be started by rising edge only on PE7 <S> */// <S> ... later one can select PA12 as trigger source. <S> Deactivate PE7 (set as regular input): GPIO_InitStruct. <S> Mode = GPIO_MODE_INPUT; GPIO_InitStruct. <S> Pin = GPIO_PIN_7; HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);// Activate <S> PA12 <S> GPIO_InitStruct. <S> Mode = GPIO_MODE_AF_PP; GPIO_InitStruct. <S> Pin = GPIO_PIN_12; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);// Arm <S> the timer <S> arm_tim1();/ <S> * timer will be started by rising edge only on PA12 */} <S> This can be helpfull <S> then two different sources are needed for timer triggering, this can save us offboard MUX IC :).Both <S> inputs can be used simultaneously, if initialized as shown in the beginning of the post. <S> Inputs are not connected together <S> , I mean signal on PA12 is not transfered to PE7 and vice versa (because GPIOs are set as inputs). <S> Code is generated by "STM32CubeF4 v5.3" + "Firmware Package V1.24.0 / 08-February-2019." <A> Basically, the pins are GPIOs which can be assigned to alternate functions, e.g. UART_RX. <S> Every alternate function has it's default pin and alternative pins to which the function can be remapped. <S> If you check out the reference manual of the STM32F103 in section 9.1.5, they say: To optimize the number of peripheral <S> I/O functions for different device packages, it is possible to remap some alternate functions to some other pins. <S> This is achieved by software, by programming the corresponding registers (refer to AFIO registers on page 177. <S> In that case, the alternate functions are no longer mapped to their original assignations .
Both AF pins can be used as AF simultaneously, at least if using these pins as AF inputs.
Predicting the nature of filters I heard that one can predict the nature (low pass, high pass...) of an active/passive filter just by looking at the filter response in high and low frequencies. How exactly can that be done? <Q> If you know your filter is simple and you just want to classify it as low pass or high pass, you only need to find two frequencies at which the response differs. <S> As the name says, "low pass" passes low frequencies and by implication attenuates high frequencies. <S> A "high pass" does the opposite. <S> If the filter shows a higher response from the low frequency than the high, then it is low pass. <S> A high pass filter will show a higher response for the higher frequency. <S> Generally the "filter response" <S> is <S> it's gain as a function of frequency. <S> Therefore looking at its response at high and low frequencies is measuring it directly, not somehow inferring it. <S> Those do require some cleverness and use of Fourier's math, but that is not what you asked about. <A> When you are first learning about filters it can be helpful to determine the response of a filter at d.c. <S> (0Hz) <S> and at infinite frequency. <S> This is usually easy to do by inspection and can improve your intuition about filters. <S> At d.c. replace capacitors with an open circuit and inductors with a short circuit. <S> At infinite frequency replace capacitors with a short circuit and inductors with an open circuit. <S> You will often find that at 0Hz the output is identical to the input but at infinite frequency the output must be zero, or vice versa. <S> In these two cases (again for simple filters) you might assume that the filter is a low-pass or a high-pass filter, respectively. <S> If the response (ratio of output voltage to input) looks like zero in both cases then you might suspect a band-pass filter, where if the output was essentially the same as the input in both cases you might suspect a band-reject filter. <S> This is an enormously simplified analysis and is intended only to help you develop an understanding of very simple filter structures. <S> I suggest it because it generally doesn't require much math and is conceptually simple. <A> Well the frequency response tells you what will happen to each frequency when you put it through your system. <S> If it will have gain or attenuation. <S> If you see that for the higher frequencies the magnitude or the length of the lines are a lot smaller than the low frequencies <S> then you can see that it is a low pass filter. <S> As low frequencies are relatively unaffected whereas the higher frequencies are all attenuated indicating that only low frequencies can pass through your system. <S> If it was the other way around then it would be a high pass filter. <S> If you saw a hump , where frequencies either side had low magnitude <S> then its a band pass. <S> Hope that helps <S> , I would draw some pictures to help explain by I'm not at the computer right now. <S> I'll do them later if you still need them :)
There are clever ways to infer the frequency response of a filter from its response to various single events in the time domain, like a step or a blip.
Copper strips in chopper transformer Do somebody know why there are large copper strips inside a chopper transformer that I've hacked and dissembled ? Does anybody know what is their purpose? What's the mathematical theory behind them? What will happen if I reassemble thatchopper transformer without those big strips ? Picture: <Q> The purpose of this screen is to reduce the capacitive link between the primary and secondary windings of the transformer. <S> The strip forms an open turn and is grounded. <S> In the low frequency transformers, such a screen is formed by one layer winding with one end grounded. <S> You can see the difference between a transformer without and with screen on the following schematic: <S> simulate this circuit – <S> Schematic created using CircuitLab <A> A third purpose for an interwinding screen - on appliances that have a mains earth connection - is safety. <S> This obviously does not apply to "double insulated" devices with 2-pin mains connectors and plastic enclosures, which are protected in different ways. <S> But a desktop PC power supply (with metal case and earth connection) <S> this is an important part of the safety system. <A> Providing the copper doesn't completely totally surround the wires (forming a shorted turn) <S> it's likely that it is an EM screen intended to reduce emissions. <S> There will be eddy current losses but these are probably acceptable. <S> The pictures isn't great but it looks like there is a wire soldered to one end of the copper strip and this will further enhance the shielding quality of the copper by Earthing it on the PCB <S> it's mounted on.
In the event of the high voltage primary insulation breaking down - perhaps through over-temperature if the supply is heavily loaded - the interwinding screen will short the primary side to earth, thus protecting the secondary side (and you!) from dangerous voltages, and causing fuses or breakers to disconnect the supply.
The sign in the formula for the voltage across the inductor This question is about voltage induced in a inductance. I know the rate of change of current induces EMF in the inductor. The direction of the induced EMF will be opposite to the change that is causing it. The EMF induced is given by the following formula. $$V_l = -L \frac{dI}{dt}$$ The negative sign indicates direction of induced emf across the coil is opposite the current change. In the picture I have drawn current direction and \$V_l\$ direction. If \$\dfrac{dI}{dt}\$ is postive, \$V_l\$ will be negative according to formula right? Or does the direction of \$V_l\$ has to be reversed? In many Internet references I found \$V_l = L \dfrac{dI}{dt}\$. Which one is correct? I hope they reversed \$V_l\$ reference points and removed the negative sign in the formula. Please clarify. <Q> The way you drew it, I and \$\frac{dI}{dt}\$ are both positive in the direction of the arrow and the correct expression is <S> \$V_L = <S> L\frac{dI}{dt}\$ <S> The negative sign depends on the direction you define your voltage and current. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> TLDR <S> The formula is not derived from Maxwell–Faraday equation , because the induced electric filed is circular and electric potential is not defined for such a field. <S> Instead, the formula comes from change in energy of magnetic field inside the inductor . <S> What causes confusion? <S> Consider a solenoid. <S> Assume there is current flowing through it. <S> Apply Maxwell–Faraday equation in an integral form:$$\oint {\vec Ed\vec <S> l <S> = - {\partial <S> \over {\partial t}}\int\!\!\!\int {\vec Bd\vec s} } $$$$\int\!\!\!\int { <S> \vec <S> Bd\vec s} <S> = <S> \Phi = L{{dI} \over {dt}}$$$$\oint <S> {\vec Ed\vec <S> l = <S> - L{{dI} \over {dt}}} $$ <S> Now, since $$\oint {\vec Ed\vec <S> l} = {V_{beginning}} - {V_{end}} <S> \equiv <S> \Delta <S> V\:\:(1),$$ <S> the potential (voltage) difference between the beginning (where the current flows in) and the end of inductor (where the current flows out) <S> is$$\Delta <S> V = <S> - L{{dI} \over {dt}}.$$ Not true. <S> Why? <S> Look at the electric and magnetic fields inside solenoid. <S> Image source <S> What about electric field lines? <S> They are circular. <S> Electric field produced by changing magnetic field inside solenoid is an example of a so-called non-conservative field ( link , equation 372), because line integral around a closed loop is non-zero (\$\oint {\vec Ed\vec <S> l = <S> - L{{dI} \over {dt}}}\ne 0 \$). <S> Electric potential cannot be defined for a non-conservative electric field as it is done in the formula (1).It means the formula <S> \$\Delta V = - L{{dI} \over {dt}}\$ is wrong. <S> Correct derivation and correct formula Energy of magnetic field stored in the inductor$$W = {1 \over 2}L{I^2}$$Change in the magnetic field energy per unit of time$${{dW} \over {dt}} = <S> LI{{dI} \over {dt}} \:\:(2)$$Assume <S> the current started increasing. <S> It means the energy of the inductor goes up (\${{dW} \over {dt}} = <S> LI{{dI} <S> \over <S> {dt}}>0\$), that is, the inductor consumes energy from the electric system (increasing its magnetic field energy). <S> Assume, for lumped element model , one wants to replace an inductor with a power source . <S> Amount of energy consumed by such a power surce per unit of time is given <S> by$${{dW} \over {dt}} <S> = I{V_L}\:\:(3)$$$${V_L} <S> \equiv {V_ + } - {V_ - } = {V_A} - <S> {V_B}\:\:(4)$$ Note the direction of current at the picture above and polarity of the source. <S> The current is flowing into positive terminal , what means that the power source consumes energy (not supplies). <S> Now combining formulas (2), (3) and (4) you get the right formula <S> $${V_L} <S> = <S> L{{dI} \over {dt}}$$ <A> If this were not the case, a runaway voltage condition would be created. <S> We know from simple observation that this is not the case. <S> If it were the case, we could simply place an inductor in series with a voltage source and get an increase in supply voltage. <S> This is clearly not what happens. <S> You can think of it in terms of voltage "drop". <S> In simple circuits using only passive components all of the components in a single circuit loop will always drop voltage while being fed from a power source (i.e. current or voltage). <S> The voltage drops around the loop will equal the supply voltage at every instant in time. <S> So that, all of the components in the loop will have a voltage drop ( usually expressed as a negative voltage) across them. <S> When the supply voltage is removed, that's a different situation. <S> The inductor voltage will reverse because the dI/dt factor is moving in the opposite direction, or polarity.
The simple answer is that the voltage induced across the inductor as a result of the dI/dt change of current MUST BE opposite to the voltage applied by the current source.
How much of a GPU's electrical usage is probably turned into a increase in air temperature? I am trying to find a good rough guesstimate of how much of the maximum wattage usage of a graphics card is turned into hot air. Say a graphics card is rated at using X watts at maximum usage. How much of that is released as heat into the air via the cooling setup, and how much is not (If not where does it go? To ground?) Yes I know there are a lot of variables here, I am just looking for a guesstimate from someone who would understand better than me. I'm specifically using this GPU as the example (Radeon 6990 375 watts max) <Q> My numbers might not be exactly accurate, but I would say that about 99.99% of the energy that enters the GPU, and even CPU is converted into heat. <S> The other .01% , is the actual signal out of the GPU to your display. <S> The job of the GPU is to take in a lot of data, and process it, requiring a lot of calculations. <S> These calculations consume energy, producing heat, and eventually a result. <S> Now it is important to note that while this says that it is a 375W card, it will not be drawing 375W the entire time it is in operation. <S> Just like your CPU, your GPU will only do as much as you need it to, and may step down <100W. Simply browsing around your windows desktop, the card it doing next to nothing, and will draw next to nothing; but launch Crysis, and your frequency mill max out and the card will start drawing its maximum rating. <A> Basically it all goes to heat. <S> Inside the chip there are billions of tiny transistors, each one acts like a really tiny switch. <S> These transistors are connected to form various logic functions. <S> Due to the geometry of the transistors, they all have small parisitic capacitances. <S> Whenever the logic changes state, which is on average the same rate as the clock, these capacitances need to be charged and discharged. <S> The current to do this has to pass through the transistors, which have some resistance. <S> Resistance and current flow mean voltage drop, and volts times amps is power. <S> Every time the clock cycles, power is consumed charging and discharging these capacitors. <S> This happens in every integrated circuit - your GPU, your CPU, your RAM, your hard drive controller, your cell phone, etc. <S> This is why when you overclock your CPU or GPU, it uses more power and generates more heat. <S> This is also why your laptop will vary its clock speed on the fly to save power instead of just letting the CPU run idle. <S> In terms of how much doesn't go to heat, it isn't very much. <S> A watt or two for the fan. <S> Maybe. <S> Perhaps hundred milliwatts for the LEDs, if the card has a bunch. <S> A couple of milliwats get moved over the PCI express bus, to get absorbed in terminations on the other end of the bus. <S> A couple more milliwats get sent out over the DVI or HDMI port to get absorbed in terminations on the other end. <A> It all gets turned into hot air, except for the tiny amount of light generated by any LEDs. <S> There's no place else for the energy to go.
All in all, with a TDP off 375 watts, less than 0.1 percent of the power coming from the PSU doesn't get directly dissipated as heat.
Why are wifi antennas covered in plastic? Couldn't it be like a radio antenna (wifi is radio after all), telescopic and without any encasing? <Q> I believe the main reason is ESD protection. <S> Many of these antennas are connected directly to RF chips which are quite ESD sensitive. <S> This is especially true of the GPS antennas. <S> For radio antennas (FM/AM) <S> it is much less of an issue, so there are plenty of bare antennas. <S> The other two reasons are structural support and protection against detuning. <S> While encasing the antenna in plastic does change the resonant frequency a bit, the antenna is designed together with the cover. <S> The resultant antenna is less vulnerable to detuning (ie someone touching it, etc) than the bare wire. <A> For both cost and performance reasons. <S> A plain copper wire covered in plastic is the most efficient implementation for an antenna. <S> Copper has good conductivity and the plastic keeps it from oxidizing. <S> Also, since the plastic provides the physical support, the wire can be relatively thin, minimizing the amount of copper required. <S> A bare-metal antenna needs to be made from other materials so that it doesn't corrode. <S> These metals have higher resistivity than copper, and the extra steps required to do the forming and plating add to the production cost. <S> And since it needs to be <S> self-supporting, more metal overall is required. <S> A WiFi antenna doesn't need to be collapsible because its full length is just a few inches anyway. <A> Antenna technology is quite different for higher frequency radios. <S> FM radio is approximately 100 MHz while wifi is 2.4 GHz. <S> 24 times the frequency means the antennas need to be 1/24 the size. <S> Also, wifi antennas are designed to be as compact as possible while remaining omnidirectional with decent performance. <S> Generally they use PIFAs for wifi in laptops and cell phones. <S> PIFA stands for Planar Inverted F Antenna. <S> This page has a description of how they work: http://www.antenna-theory.com/antennas/patches/pifa.php . <S> As PIFA antennas are fabricated on fiberglass circuit boards, they are a bit delicate and they need to be put in a box to prevent damage. <S> Also, antenna characteristics can be changed if a foreign object comes into close proximity with the antenna. <S> Anything in the near field can affect an antenna's performance. <S> Remember all the problems Apple had with reception on one of their new iphones a while back? <S> Touching the antenna with your finger will degrade its performance, affecting the ability to send or recieve a signal. <S> As for why you never see telescoping antennas on wifi devices; wifi antennas are so short that making them telescoping is pointless. <S> Wifi operates on 2.4 and 5 GHz. <S> 1 GHz has a wavelength of 30 cm. <S> A quarter wave antenna at 2.4 GHz has a length of 30 / (4 * 2.4) = <S> 3.125 cm. <S> A half wave antenna would be double that. <S> And a 5 GHz antenna would be half of that. <S> Quarter wave antennas are advantageous for several reasons. <S> First, they can be driven from one end instead of from the middle and they have a relatively low impedance. <S> Second, they're small. <S> Third, they have low gain and therefore are not directional <S> (e.g. you don't need to point it at the wifi router to get online). <A> Never underestimate the voltage at the end of an antenna - this where it's impedance is highest and some antennas are known to generate 1000's of volts. <S> I'm sure that on a walkie talkie or WiFi antenna <S> the voltage will only be tens of volts peak <S> so don't worry too much.
Basically, it's a technique for making the antenna very small and still have it work at the proper frequency. Plastic = insulator for protection (maybe)
Using an Opto-Isolator to change an Op-Amp's Amplification Consider this circuit, which is a standard non-inverting amplifier with an amplification of A = 1+R1/R2 . I now want to be able to change this amplification value dynamically, using a microcontroller pin. I came up with this solution, which basically modifies the value of the feedback resistor by inserting another resistor in parallel: I think that the new amplification (with the opto-isolator turned on) is A = 1 + (R1||R3)/R2 = 1 + (R1 R3)/(R2(R1+R3)) Would this solution actually work the way I intended? I'm especially worried that the phototransistor's saturation voltage may influence the op-amp in some way. If so, is there an alternative solution to this problem? <Q> Assumption : There is some need for optical isolation between gain control (uC output) and amplification module. <S> Here is a simplification of the approach in the question, <S> that removes any transistors / FETs from the feedback path, and provides an analog (continuous) range of gains, while retaining the opto-isolation - Use an LDR optocoupler as used in some classic and DIY audio amplifiers : For a one-off or DIY alternative, use a cheap and ubiquitous CdS light dependent resistor instead, coupled with a regular LED: <S> The schematic is thus: simulate this circuit – <S> Schematic created using CircuitLab <S> The gain controlling resistance is the parallel combination of R1 and (R2 + R_LDR). <S> By varying either the duty cycle of a PWM signal, or the voltage of a DAC output pin of the microcontroller, the LED's light intensity is varied. <S> As this increases, the LED resistance drops, from a very high value (i.e. little effect on gain calculation) when the LED is off, to a low value when the LED is at nearly 100% duty cycle. <S> Note : If using PWM, the PWM frequency needs to be significantly higher than the frequency band of interest of the signal. <S> Otherwise the PWM will couple into the signal path, as pointed out by @pjc50. <A> All provided answers are more or less workable, but have some disadvantages: All, but <S> Anindo Ghosh answers will work with pretty low voltages only or have small regulation range (well or very high nonlinear distortions). <S> The solution with the photo resistor will work, but resistor optocouplers are some kind of exotic elements. <S> It is almost impossible to provide some exact gain and this gain will vary with the temperature. <S> So, such schematics are suitable only for AGC schematics where the second back feed will regulate the gain to the needed values. <S> If the exact and reliable gain have to be set, the only working method is to use MOSFETs controlled in switching mode (ON/OFF) and normal resistors: <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Why don't you use a gain control from an SPI bus from the MCU: - There are other gain control chips that can be activated by hardware lines if you don't like SPI. <S> I've used this device extensively and can vouch for its usefulness and accuracy. <S> The SPI stuff doesn't need to be high speed and can be isolated too if you really need it. <S> I've run 2MHz SPI 10 metres with decent drivers but going at pretty slow speed won't be an issue. <A> simulate this circuit – Schematic created using CircuitLab <S> Assuming your op-amp signal ground and your MCU's ground are identical, this approach would work. <S> If not, use an optocoupler to drive the MOSFET. <S> You could also add multiple parallel MOSFET's (with seperate control lines) to get multiple gain options. <A> Putting a phototransistor in the loop like that may have strange results. <A> I'm answering my own question here, because I've taken up jippie's advice. <S> I've built the circuit on a breadboard and performed the measurements. <S> Power supply: 5 V (7805) <S> Op-Amp: LM324 <S> Opto-Isolator: SFH610A-3 R1: 21.7 k R2: 9.83 k R3: 21.8 k Turned on the opto-isolator with a current of 7.7 mA With these resistor values <S> , the expected amplification is 2.11. <S> Here are the measurement results: Vin Vout measured Vout <S> Expected Difference in %0 0 0 <S> 0.077 <S> 0.164 <S> 0.162 <S> 1.20.1 0.213 0.211 <S> 0.90.147 <S> 0.314 <S> 0.31 <S> 1.30.154 <S> 0.329 <S> 0.324 <S> 1.50.314 0.668 <S> 0.661 <S> 1.10.49 <S> 1.04 <S> 1.032 <S> 0.80.669 <S> 1.422 <S> 1.409 0.90.812 1.726 <S> 1.71 <S> 0.91 2.12 2.106 0.71.23 <S> 2.61 <S> 2.591 <S> 0.71.52 <S> 3.24 3.202 1.21.84 <S> 3.75 3.876 <S> -3.3 |2.1 3.75 <S> 4.423 -15.2 | (reached max output voltage)2.54 <S> 3.75 <S> 5.35 -29.9 v <S> Additionally, I measured the voltage across R3 and the opto-transistor, allowing me to calculate a resistor value for the transistor. <S> This fluctuated from 400 to 800 Ohm, most likely due to my multimeter having trouble measuring the small voltages. <S> Compensating the expected amplification by adding 600 Ohm to R3, brings down the difference to 0.6 % max. <S> So my answer is: Yes, it'll work the way I expected, probably mostly due to the currents being so low that the transistor is used in a linear area. <S> I wouldn't expect the same results if the resistors used had much less resistance. <S> Still, I changed my circuit to use the method suggested by markt and johnfound. <S> Seems more correct.
I would say a better idea would be to use the optoisolator to control a CMOS switch, and use that to switch in the resistor.
Control a switch with headphone output jack So I recently finished my boombox project, but ran into a minor problem. The boombox is powered by a blue wrapped lithium ion battery and using a ta 2021 chip amp from parts express. If I plug the aux cable into my phone BEFORE turning on the power, everything works perfect. If I turn on the power then plug in the aux cable to my phone, the speakers make a pop as it is being pressed into the phone and then the battery goes into protect mode. My thought is that the pop is essentially a transient signal which exceeds the current limit of the battery and throws it into protect. My thought to fix this is to create a circuit that leaves the mute and ground on the amp connected until a signal is seen at the aux input and THEN unmute the amp. My problem is I'm not sure where to start to come up a circuit to do just that. Any help is appreciated. See the picture to hopefully make things as clear as possible. Basically I need a way to trigger a switch to disconnect mute to ground using the iphone headphone jack output signal. <Q> This sort of pop is a common problem with audio connections, particularly guitar leads as they can get swapped live. <S> It's caused by capacitance in the systems being connected holding different dc levels, and results in a step pulse in the power output stage, which isn't good for your speakers and probably is what overloads your battery. <S> One means to neutralise is a reed switch in the jack , though I don't know of a mini stereo version. <S> The other means are to reduce capacitance in the cables and input stage of the amp. <S> It may also be possible to use a transformer to isolate the input, or possibly a band pass filter to remove both the suddenness of the step change and the dc offset. <S> But a filter may well have to be in the audio range to be effective, and that is the range you want to maintain. <S> If there was an automatic circuit which did this <S> well then every electric guitarist would buy one, and there doesn't seem to be any out there (normally you have manual mute switches or the fore-mentioned silent jacks), so if you do get it to work there's quite a market. <S> An answer in another question pointed to this circuit as a possibility. <A> It's not clear what you want to achieve but perhaps this will help... <A> Have you consider a voltage regulator with a current limit, if your main concern is the battery. <S> I haven't used it, but <S> the LT3055 looks like such a device. <S> I'm not sure what the recovery procedure is for overcurrents, but at least you'll protect your battery. <S> The LM317 can also be used as a current limiter .
If you use a TRS jack to connect your cable from your phone to your "boombox", you should be able to get a TRS socket with a switch that is closed when the jack is inserted, use that switch to mute the amp.
How is current controlled in high power applications? When working with electronics, it is quite easy to regulate current with a resistor, potentiometer, switcher, etc. But take a simple high power application such as an electric stove. What method is used to control the current through the burners. They couldn't possibly use a variable resistor because the heat generated would be on par with the burner. It is clear however that the controls are disipating very little heat and they certainly aren't using any electronic devices. So how do they do it? <Q> simple electric ovens use simple temperature control usually using something like a bimetallic strip (you can here them click in and out) where the dial is used to set the point of electrical contact that will then provide electrical power to the heating elements. <S> the result is more of a hysteric control with a very long duty cycle (where the duty is governed by the thermal characteristics of the oven - ie how long to cool) and the lower band to-do with specific characteristics of the thermistor/bimetalic strip. <S> More modern electronic controllers do a similar thing but use thermalcouples/RTD to measure the temp and then semiconductors to switch the power (SCR's) <A> For my practical testing, I use a high power resistor. <S> Something like these. <S> However this is only for output loads. <S> But, when it comes to applications to minimize losses. <S> You can use a High Power MOSFET or transistor for switching(with Heat sinks). <S> The control circuitry is usually away from the high current & voltage, but is used only for controlling the devices which are in a high current path(like FET's). <S> This way, they are away and safe from High power. <A> Electric ovens and Stove top burners regulate the heat by turning the heating element on or off using a Relay. <S> In my house if you listen closely you can hear the relay on the circuit board click on and off. <S> Again the typical household electric stove heating elements are either on or off. <S> The SCR can only turn On and Off but can do this very quickly resulting in a short pulse averaging out to be a small current and a longer pulse being a larger current. <S> To really see what is happening in a SCR circuit you need an oscilloscope to see the pulses. <S> Any current meter on a circuit such as this will probably give you a RMS current value over time. <A> Pulse-width modulation (PWM) <S> switching allows to reduce losses in the control circuitry. <S> The switch element (transistor, thyristor, and such) is either Fully on. <S> Large current is flowing. <S> The voltage drop across across the switch is low. <S> Power loss on the switching element P loss = <S> I sw <S> V sw is low, because V sw is low. <S> Fully off. <S> No current is flowing. <S> The voltage drop across across the switch is equal to the supply voltage. <S> P loss = <S> I sw <S> V sw is zero, <S> because I sw =0 <S> Importantly, the switch can be in transition from on to off. <S> But, this transition is fast, and only small amount of energy is burnt by the switch element during transition.
In larger applications a Thyrister or SCR is used and to pulse the heating element on and off. PWM (or variants thereof) is a very common technique.
Why is PWM used to control DC motor speed instead of using a variable resistance? My question is at the end (to change the speed) we are controlling the input voltage of a DC motor in both PWM (pulse width modulation) and variable resistance cases. Is the only reason for choosing PWM to obtain a better precision or not consuming extra power? If it is the only reason it seems odd to use PWM equipment for simple demonstrations. <Q> Power efficiency <S> The induction of the motor will cause the current to average. <S> At the same time the transistors in PWM mode have very low impedance and therefore a low voltage drop and low power dissipation. <S> In case of a series resistor a lot of power is dissipated in the series resistor. <S> Speed control behavior With PWM <S> the motor will 'see' a very low power supply impedance, even though the power supply is constantly switching between high and low voltages. <S> The result is that the motor has a much higher torque. <S> With a series resistance the motor will experience a very weak power supply and it will be easy to stall the rotor. <S> Control circuit For a control electronics (eg. <S> a microcontroller) <S> it is very easy to switch on/off transistors. <S> Outputting an analog voltage or controlling a series resistor requires much more expensive circuitry and in turn will cause more power dissipation. <A> Having a PWM, means you do not have a resistor in series,meaning no waste in the form of heat. <S> We just shuttle the Motor between ON & OFF, and the average gives us the voltage. <S> So , no waste of power is there. <S> Having a 0.5 Duty Cycle for a 12V supply, gives a 6V on avaerage, and using the switching we control the speed. <A> Better precision is arguable; the motor acts as a filter and uses the mean value (or something related to it) of the input current to move; so it really doesn't matter to feed it with a constant current (resistance case) or a PWM. <S> Maybe is better versatility rather than precision. <S> Not consuming extra power is one reason, maybe related to which I think is the main reason to use PWM: it's easy to control the motor with PWM from, say, a microcontroller unit; just code a counter for generate the PWM and connect the output to a motor drive (which gives the real power to the motor, and also gives the advantage of having control and power separated). <S> The PWM makes posible the use of microcontroller to drive the motor, which gives enormous versatility. <S> Otherwise the demonstrations would be too simple (start, stop, speed up, speed down, with a potentiometer acting like a throttle).
We can definitely control Speed of a motor with a Potentiometer, but this wastes power and energy in the form of heat across the resistor,as having a resistor in series does have a voltage drop, hence heat loss.
Using ATtiny ADC with a system clock of 32.768 kHz I am running my ATtiny85 with an external 32.768 kHz crystal because I need to keep accurate time. I also need to use the ADC in my application. However, the datasheet specifies that the minimum ADC frequency is 50 kHz. Furthermore, the minimum divisor for the ADC prescaler is 2, so the effective clock to the ADC would end up being 16.384 kHz. Now, I have tested this with the mentioned 32.768 kHz crystal, and the ADC seems to work. I am getting good enough results. However, is what I am doing "allowed" or am I setting myself up for failing big-time? The plan is that if this device is something people want, I would make maybe 100 of them, and it would suck if I assume this would work when in fact there might be a problem later. Does anyone have any wise words? <Q> When conversion is too slow, the stored voltage can leak more than 1LSB and this way to compromise the conversion. <S> This way you will get lower accuracy than specified. <S> Notice that the minimal frequency is defined for the worst case - higher temperature, extremal (lowest or highest) power voltage, maybe external radiation. <S> This way, the described problems can happen later during the device work. <S> So, the conclusion is that if less accuracy is not a problem - go with it. <S> But if you want to use the full accuracy of the ADC, the minimal frequency should be respected. <A> If it's working "well enough" now, it will continue to do so. <S> The main issue with violating the minimum clock frequency is a loss of accuracy. <S> This is related to the sample-and-hold circuit used inside the ADC. <S> It will "droop" by more than 1 LSB, which means that the ADC won't meet its accuracy specs, but if this is still sufficient for your application, go with it. <A> I had similar problems. <S> I had to keep accurate data/time calculation at 32.768K and also, do power-hungry procedures which demanded at least 1Mhz. <S> What I did, was that I chose a low-end micro (Tiny13) for keeping time at 32.768, and I clocked the main processor at 16Mhz, a significantly higher speed. <S> I connected them with SDA & SCL. <S> With this, I have both accurate time and high speed.
The minimal frequency is because of the sample and hold capacitor leakage.
What sensors do I require to detect multiple objects on a board What sensors do I require to detect multiple objects on a board?I need to know exact numbers of objects and their co-ordinates on the board. The board can be anything from metal to plastic. And the object I suppose needs to be with a magnet inside. What ideas or maybe solutions do you have? I'm thinking to build a scrum board that can transfer data to digital format. Currently, no writing recognition is needed. Just object detection. <Q> Well, there are few requirements listed, so here is one of many completely arbitrary possible answers. <S> Use peg board with infrared sensors looking through the holes. <S> You'll be trying detect the presence of something blocking the hole, for instance, a post-it note. <S> That meets you requirements you've listed, but I can't see how you're going to get from here to possibly detecting anything written on the notes. <S> Perhaps you should start with that in mind and work backward from there. <S> If only you had some sort of method for tracking your progress... <A> Use a video camera. <S> The program needed to recognize these bright colored notes should be not so complex. <S> Even something like Raspberry Pi might be enough. <S> Or any PC. <A> The easiest way is image recognition using a webcam. <S> All you would need is a simple board with two styles of dividing lines. <S> One, like in your picture, is a thick unique color, to separate categories. <S> Alternatively, this can be skipped if you decide to handle categories in software (virtual lines that can be changed with software options). <S> The other lines would be a different color, and thinner. <S> These would make a simple grid running the entire area of the board. <S> Objects could be of arbitrary size as long as they fit inside the boxes in the grid without overlapping the grid lines, and are of a different color from the board background. <S> This would provide both multiple object detection, and coordinates. <S> If you want arbitrary box sizing, it would be a lot more difficult, unless each object has a separate color.
You'll need to have a microcontroller (likely with a few slaves) scan the sensors in a grid-like fashion. Even cheap cmos web camera will do the job.
First production run - design PCB for through-hole or surface-mount? I am nearing the stage after testing everything on a breadboard where I'm ready to fire up Eagle CAD and start developing my circuit board. This will be my first ever circuit board design. My question now is: Should I design for through-hole or just go straight to surface-mount? I have a pretty good soldering station (Weller WSM-1), so I think if I use reasonably large SMD components I should be able to hand-solder things with no problem. On the other hand, with through-hole components it would be impossible to not be able to solder them. The board is very basic, with just one ATtiny85, three resistors, a bunch of LEDs, two ceramic capacitors and a 32.768 kHz crystal. The crystal is another point I'm unsure of: Every electronic device I've opened up has these as hand-soldered through-hole, even if the rest of the board is all surface-mount. Why is that? Are 32.768 kHz crystals not available in surface-mount packages? I would really appreciate any input on helping select the best way to go on the board design (through-hole vs surface-mount). I'm thinking that in the unlikely even that my board becomes popular, having it as an SMD board would facilitate production at a plant that can do automated assembly. On the other hand, I have no idea if through-hole manufacturing would be a cheaper option for certain quantities. <Q> There's no reason to go with through hole. <S> There, I said it. <S> With a decent microscope, a pair of soldering irons (to lift double sided components), hot air, solder paste and <S> some flux you can easily solder components and modify things. <S> I do 0201 on a daily basis with this setup. <S> 0402, 0603 are no big deal. <S> Also TSSOP, QFNs can be soldered ( <S> QFN with flux and hot air is pretty easy). <S> Through hole forces a completely different architecture for the board layout and the results of using a through hole design could differ, especially as it concerns EMI (think FCC certification). <S> You want your board to resemble as close as possible the final product. <S> Smaller PCB usually means lower emissions too (as well as lower costs etc). <S> BTW, this doesn't mean the whole design has to be surface mount. <S> 32kHz crystals do come in SMD. <S> There are plenty of them at digikey. <S> I realize this is an opinion but the reality is <S> SMD isn't the terrible thing that its been made out to be, even for hobbyists. <A> This lets you use a socket, and if changes need to be made, you can often just lift the pins of the IC and solder wires to them instead of cutting traces. <S> Same goes for passive components -- you can just lift one side of a resistor or capacitor. <S> And of course it's easier to hand-assemble through-hole boards than those using SMDs. <S> Again, if you are not constrained by space requirements, you can always go into initial production with a through-hole board. <S> SMT is really only necessary once you get into high-volume production where you want to use a contract manufacturer with automated equipment. <A> If you believe you are likely to make tens rather than thousands, use whichever you are happier assembling, testing and soldering. <S> There is no point tooling up and spending more on new equipment and taking time to perfect new soldering techniques if you could hand solder the entire production run in an hour or two. <S> That leaves time to spend on the actual product - or the beach, if you have better weather than we do here! <S> (You will notice that I haven't specified either technology : I agree that SMD is not so difficult; use it if you're already familiar and tooled for it. <S> I just don't think that a first board and a first batch is the time to add another first) <S> If the market takes off, there are likely to be lessons learned and changes made before mass production, whichever technology you use for the prototypes. <S> That is the time to decide which technology is best for building thousands. <S> An automated assembly process is likely to have PCB requirements (SMD land sizes for reliable soldering, component orientation for placement, ATE test point location) that aren't usually worth considering for a small batch hand assemble/test process, so you can virtually count on a new layout at that stage, whatever you do now. <A> there are 32.768 kHz crystals for through hole mount and for surface mount too. <S> But the through hole mount version might be easier to get and cheaper for small orders.
If you've got the room (not constrained by a particular case size), I like to use through-hole components to start with, particularly for IC's in DIP packages (like the ATtiny85). Through hole requires space on both sides of the board for the holes and so wastes precious PCB area.
Stiff, straight wire similar to LED legs I'm planning on building another LED cube. I've built ones before using tinned 0.6mm copper wire which looked OK, however the wire bent easily and was never quite straight in the first place. I spent a long time searching for some sort of stiff, straight wire to use for the structure of the cube, however couldn't find anything suitable (somewhere around 1mm in diameter and at least 250mm long). I realise this may be off topic, but is there a specific type of wire I can find that is pre-straightened and (shiny) silver in colour, that's solderable using conventional methods? The type of wire I'm looking for is similar to LED leads like this (but stiffer): The makers of the Hypnocube suggest using 22 AWG straightened galvanized soft steel wire in their build instructions , however long searches on the internet and eBay revealed nothing. <Q> The other ones are answering about selecting wire, allow me to explain how to straighten a wire. <S> It is very simple once you know how it is done. <S> Start of with a long piece of stiff wire <S> , it is probably supplied from a roll; Attach the wire to something solid near the ground, for example a central heating pipe. <S> Make sure you can pull and turn it without the wire actually moving at that end. <S> As near to the ground because you don't want to bend the wire once you're done by having to lay it down on the floor. <S> Take as much wire of the roll as you can possible straighten in the room, leave couple meters room to move yourself around; <S> Put the loose end of the wire in an electric drill, make sure it is tight enough so you can pull the drill backwards; Run the electric drill low'ish rpm, while slightly pulling the wire, twisting the wire along its length; <S> You'll notice the wire will get somewhat longer and nice and straight; Stop the electric drill once you are happy with the straightened wire; <S> Cut pieces at the required length from the straightened wire ... <S> I have no experience with steel wire, but it works wonders with 2.5mm² coppper (as in a home electric installation) and at work we used to do it up to 1 cm² for lightning rod installations, but we used a somewhat more powerful drill for that. <A> Try picking up some galvanized steel wire at a hardware or craft store. <S> You can get it in different gauges (this is 19 gauge, somewhat thicker than LED leads). <S> It's pliable enough to work without tools, but stiff enough to hold its shape. <S> I use it for various projects, usually making tiny skeletons for small props, but it's conductive and works well for electrical uses, too. <S> It is somewhat more difficult to solder to, primarily because of the extra mass. <S> To match LED leads <S> I'd probably get something between 22 and 26 gauge. <A> Have you considered silver wire? <S> http://www.artbeads.com/wire-and-chain-sterling-wire.html <S> 18 gauge is about 1mm. <S> Straighten as @jippie says and cut to length. <S> Silver solders better than steel and is stiffer than copper. <A> Are tinned music wire shafts as used in lure making solderable? <S> They should be if it's really tin. <S> They sell them on eBay pre straightened in 0.045 inch by 13 inch. <S> I think they are spring steel and will bounce back if they are ever bent.
A little flux helps, but rosin core solder is all you really need.
Ceramic chip antenna design with shorted pads I'm very new to RF and I'm considering using a Pulse W3013 antenna on my next project but I just can't understand the layout recommendations on the datasheet. The antenna has only 2 pads but the layout recommendations shows 3 pads, 2 of the pads are connected to the ground and the other is the feed from the transceiver, soldering the antenna on the pads will short the feed trace with the ground on one pad, is this normal or is there something i'm missing? Antenna Layout recommendations I've seen other designs where one of the pads of the antenna is connected to a trace that from what I understand is used for fine tuning the antenna but this design is completely different so I'm kind of lost. I already have seen this question but this looks like it is the opposite situation because here is the antenna that shorts the feed with the ground. <Q> That is a rather interesting feed design. <S> It seems to be exactly the same situation as the question you linked - the short is being used to change the antenna's resonant frequency. <S> This is very necessary for 870 MHz as it is very low for an antenna that small. <S> The wavelength of 870 MHz is 34.5 cm (30 cm at 1 GHz / 0.87 GHz), making a standard quarter wave antenna 8.6 cm long. <S> This antenna is 1cm long, necessitating some clever design. <S> As for exactly why it does that; I am not an antennas expert <S> so I probably can't give you a very good answer. <S> Also, their datasheet does not shed much light on how the antenna is constructed. <S> The picture seems to show a meandering trace on the side of the antenna, but without more detailed information on how the antenna is constructed and oriented it is a little difficult to speculate on exactly what is going on. <S> When it comes down to small antennas like this, you can't think in terms of currents and voltages, you have to think in terms of electromagnetic waves. <S> An EM wave from the transmitter will be guided down the waveguide and coupled into the antenna, more or less ignoring the short. <S> It does make a good deal of difference what direction the wave is coming from and exactly where it gets coupled into the antenna as this will affect both the mode excited as well as the impedance seen at the input. <S> Well, the short will affect it but it won't stop it. <S> It still gets coupled into the antenna. <S> The shorting pin affects how the EM fields inside the antenna oscillate, helping the antenna achieve resonance at 870 MHz. <S> Speaking of impedance, I presume you're going to build a matching network to properly match the antenna's complex impedance (72-j23 to 86-j5 ohms, according to the datasheet) to your 50 ohm trace? <A> I was asking myself the same questions for the W3010 . <S> The portion of the antenna between the feedpoint and the ground plane is essentially behaving as a short-circuit stub . <S> Basically the "short" and the first half of the antenna act like the radiator and the second half acts like a tuner of the resonance frequency. <S> So the antenna performance are strongly affected by PCB layout and electrical lenght. <S> Images are provided by Pulse Electronics in the pdf here <A> A DC short-circuit wouldn't be one at RF. <S> The Pulse W3013 ceramic chip antenna would look like this, when 'opened out'. <S> It's a loop antenna, grounded at both ends. <S> Being symmetrical, it may be soldered either way.
It seems that the antenna design is based on a ceramic loaded planar inverted-F antenna (PIFA) .
Can arduino be used as a switch? Hello I have had zero luck with finding anything related to this problem. Lets take the most basic circuitry: switch that turns on the light The values on the sketch are not accurate, couldn't change the values How can I "replace" the Switch with Arduino? Do I need Zener Diode to achieve that? I want to use it to light up a 225V, 330Watts Lamp (I'm in Europe) that is used in my room. <Q> You can use the Arduino to drive a relay that switches the high voltage circuit. <S> There are relay boards and daughterboards ("shields") for this purpose. <S> Look for one with proper protection - isolation of high voltage side of circuit from low-voltage side. <S> As you are in a 230V AC country (or region) make sure the relay is not 110 V rated. <A> If you use Arduino directly as a switch for AC supply then this is not going to work although it would cause a catastrophe because 225V across Arduino's pins are going to damage a lot. <S> So the solution is to use Isolation of two Arduino and the Lamp. <S> Relay is kind of current operated switch i.e. if sufficient amount of current flows through Relay coil then a switch will be CLOSED otherwise remains OPENED. <S> The current driven by a typical relay at its rated voltage is between 25mA to 70mA. <S> As the I <S> /O pins of Arduino can provide maximum 40mA current ( <S> This is why you need a relay driver. <S> A very simple Relay driver can be made using a transistor. <S> This article can help you understand very basic Relay driver www.jaycar.com/images_uploaded/relaydrv.pdf <S> Here is a typical circuit, <S> simulate this circuit – <S> Schematic created using CircuitLab <A> There are two possible solutions1)Using TRIAC(with/without isolation) <S> 2)using Relay(with/ <S> without isolation) <S> Look at this circuit diagram .It <S> uses 5V relay(if <S> you use +12v relay <S> it would save you few cents <S> but you have to have +12v supply <S> too;if <S> you have 12v <S> you can use 12v relay).If you want to isolate the HV and LV side you could use a simple optocoupler like PC817 with this existing circuit.
According to ATMEGA 328 Current Specifications) it is not a good idea that you directly connect it to a Relay and if you do so it may burn the Arduino. Isolation can be done as @yogece said using a Relay and Relay driver.
Can the external power be supplied in one of the ports of the usb hub? I did a continuity check between all of the ports Vcc and gnd of a usb powered hub including the male end, all are shorted. If I want to make it an external powered hub, instead of connecting the usb female connector of the Vcc to an external supply, can I just connect an external supply on one of the usb female ports? By doing that, I would not have to do a surgery on my usb powered hub. <Q> Some cheap usb hubs, are really really cheap, and do not follow appropriate standards. <S> Some are so cheap, that they have all of four components. <S> An all in one usb hub IC, a crystal clock, a decoupling capacitor, and an led. <S> Input VCC is tied together to all the output VCC. <S> These are not the best devices in the world. <S> You will have two competing supplies, and will put your computer at risk. <S> There are two solutions. <S> The first, cut the VCC trace between the input usb port, and the output usb ports, but leave the usb hub ic connected to the input. <S> By USB Standards, self-powered usb hubs and devices should still have the hub controller connected to the host usb, at the very least for signaling purposes. <S> This option makes it so you always have to have the external power connected for anything to work. <S> The second option is to still cut the trace, but add a diode to protect the input usb host. <S> This will allow the hub to still be used without the external supply, and to be used with it as well. <S> Be sure to pick a diode that can handle at least 1 Amp with a low forward voltage drop, like a schottky diode (0.2v typical), to minimize any issues with low voltage. <S> Picture of said extremely cheap usb hub. <S> No components on the other side: <S> I am not responsible if you break your usb hub, your computer, your external power supply, or any of your usb devices. <S> Good Luck. <A> To be absolutely sure, you'll need to check the circuit diagram of the hub, but in general: No, you cannot supply power to the USB output. <S> USB specification allows to power on/off ports, implying that these ports are not directly connected to the hub power rails and in turn implying that you may stress internal components well beyond their limits. <A> Yes I have done It just by removing +5V wire which came from (usb)PC to hub then connected external 5V supply to the Hub's common +5v rail. <S> Please note that ground(-ve) must remain connected and both, computer and external supply to hub shares common ground. <A> The expectation with a cheap hub is that VCC and GND are going to be directly connected together on all output ports plus connected directly to the VCC and GND of the Input Port ... this can be easily verified with an ohm meter without disassembling the hub <S> the issue is that you would also be applying power to the input port. <S> In a perfect world you could hook two batteries of the same voltage in parallel ... <S> this is NOT a perfect world <S> so I would NOT recommend having 2 VCC sources hooked in parallel ... <S> that is why the 2 solutions provided are: Just cut the red wire from the input port or <S> Cut the red wire from the input port and insert a low voltage drop schottky diode ... <S> anode to red wire and cathode to the input port VCC contact. <S> The second option will allow you to still use the HUB without having to power it.
If you were to plug in a powered USB plug in to one of the output ports then yes in the above scenario the power would be available at all of the other ports ... Diodes are a cheap way to bring 5v down to ~3.3v for the hub ic. That said, because VCC is tied together, you can have problems if you connect an external supply.
What does derating mean? Derating as the Wiki and other Google articles says operating the part at lower values than rated specifications to prolong its life. Can some please explain "What exactly is Derating?" How it is related to positive and negative temperature coefficient. Derating is limited to only resistors and capacitors or it applies to ASICs also. I know the question which I am putting here is like dots and expecting someone to connect them for meaningful information. But this is the only information I have now. <Q> Can some please explain "What exactly is Derating?" <S> Operating the part at lower values than rated specifications How it is related to positive and negative temperature coefficient. <S> Running a part at a lower voltage or current means less heat is generated. <S> Powering a 16v max capacitor, at 16v, is stressing it. <S> Running a 20mA led at 20mA will only provide x number of hours of life, while running it at 10mA will provide y hours, where y is greatly larger than <S> x. Derating is limited to only resistors and capacitors or it applies to ASICs also. <S> Derating can apply to almost anything. <S> Resistors, LEDs, Other Diodes, Capacitors, ICs, CPUs. <S> As opposed to overclocking, where you run a cpu at a higher than rated speed, underclocking (aka derating) runs it at a lower speed, allowing for less heat and longer life. <S> Mainly used when modders want to remove noisy fans. <S> As a note, some devices demand derating in certain situations. <S> Resistors listed as x wattage, expect the resistor to be in free air at ambient temperatures with air movement over it. <S> If you put it in a sealed case, or in heat shrink, or in a hot environment, you NEED to derate it down. <S> Same with Solar Panels. <S> The given rating is for IDEAL sunlight. <S> Average sunlight will derate the output current and voltage. <A> Can some please explain "What exactly is Derating?" <S> To derate is to take some operating rating and lower it to produce a safe/acceptable operating rating based upon other factors. <S> http://www.farnell.com/datasheets/1720486.pdf Take a typical SM0805 resistor. <S> 0.125W power dissipation. <S> The datasheet states: <S> 100% power rating upto 70C and then linearly de-rates to 0% at 155C ie <S> if you were to operate this resistor at 155C <S> then it would only be able to dissipate 0W (ie it won't work). <S> Now some places then provide additional derating guidelines on top of manufacturer derating to improve product reliability. <S> For a resistor is would include power and voltage rating <S> How it is related to positive and negative temperature coefficient. <S> In a similar way. <S> Where the temp coef comes into play is when you do any form of stress calculations. <S> 1) you determine the maximum operating temperature (with some margin I would hope) 2) <S> you work out the spread of resistance due to tolerance ( 10k 1% tol == <S> > 9k9 & 10k1) <S> 3) you determine the additional variation due to temperature. <S> THIS may increase or decrease the resistance due to it being a PTC or a NTC. <S> Determine the power dissipated. <S> Compare this to the maximum for the package including manufacture derating and any additional derating. <S> Derating is limited to only resistors and capacitors or it applies to ASICs also. <S> It covers pretty much everything (and not just electrical).Some of the things I concider <S> Discrete Semi: Junction temp re-ratingResistors: Power stress, Voltage stress (DC and transient)Capacitor: Voltage stress, Power stressDiodes: <S> Power stress, blocking voltage stress, forward currentZener: <S> Power stressMOSFET: <S> Vds stress, Vgs stress, Power stress, drain current stress <A> Can some please explain "What exactly is Derating?" <S> You gave the answer yourself: "operating the part at lower values than rated specifications to prolong its life". <S> Is there anything that is unclear to you in that sentence? <S> How it is related to positive and negative temperature coefficient. <S> Without a specific component and application in mind, this is impossible to answer. <S> Derating is limited to only resistors and capacitors or it applies to ASICs also. <S> It applies to everything, including for instance mechanical and chemical components.
Another common word for derating, in the context of computers and CPUs, is underclocking.
Why consider Linear Time-Invariant systems? Okay this could be a very silly question but I am asking it anyway. Why do we consider in most cases of signal processing that the system is Time-invariant? Is it because most signals are linear and time-invariant or is there a more compelling reason to consider a system as LTI while looking at problems in this field? <Q> is there a more compelling reason to consider a system as LTI while looking at problems in this field? <S> What makes the analysis of LTI systems attractive are the following: <S> Linearity: <S> If \$y_1(t)\$ is the output due to the input \$x_1(t)\$ and \$y_2(t)\$ is the output due to the input \$x_2(t)\$ then <S> \$y <S> = ay_1(t) <S> + by_2(t)\$ is the output due to the input \$x = ax_1(t) <S> + bx_2(t) <S> \$. Time (or shift) <S> invariance: <S> If \$h(t)\$ is the output due to the input \$\delta(t)\$ <S> then \$h(t - \tau)\$ is the output due to the input \$\delta(t - \tau)\$. <S> We then call \$h(t)\$ the impulse response of the system. <S> If and only if the above are true of a system do we have: \$y(t) <S> = h(t) <S> * x(t <S> ) = \int_{-\infty}^{+\infty}h(t-\tau)x(\tau)d\tau\$ and <S> \$Y(s) = H(s) X(s) <S> \$ <S> Now, no real LTI system is truly LTI but are effectively so and thus we may use the above "tricks" to analyze them. <A> You mix two independent parameters of the system: linearity and time-invariance. <S> Linear systems are the ones which have linear relationship between outputs and inputs. <S> In mathematical terms, the system is linear if for every input vector \$\bar{x}\$ the output vector \$\bar{y}\$ is given by: $$\bar{y}=A\bar{x}$$ where A is some matrix representing a linear transformation. <S> Linear systems are the most interesting ones because the majority of systems are either linear, or they can be approximated by linear systems. <S> Furthermore, any non-linear system can be approximated by linear equation at any point. <S> By numerically integrating these linear equations over consecutive points you may solve the initial non-linear equation (with some error though). <S> Time invariance just states that the parameters of the system itself do not change over time. <S> The inputs and the outputs may change, but the system is the same over the time period of interest. <S> If the system is not time-invariant <S> it may be either: Partitioned into non-overlapping time periods during which the system is time-invariant <S> Approximated by time invariant systems over short periods of time. <S> Integration of these approximations will provide an approximate solution of the initially time-variant system. <S> In summary: LTI systems theory is the most fundamental in signal analysis and applies for much wider spectrum of problems you might've been initially guessing (even non-linear and time-varying). <A> Mainly because most systems are time invariant, and assuming time invariance generally makes solving problems much simpler. <S> As soon as you throw out linearity and/or time invariance, things can get very complicated. <A> Signals are not linear time invariant. <S> (A time invariant "linear" signal could be a constant , a particular case of useless signal which doesn't transmit any information). <S> We consider linear time invariant systems in signal processing, but also non-linear systems are present in a lot points of the signal path: <S> mixers, samplers, limiters, compressors ... <S> By the way, it's true that it feels like linear is important. <S> In my degree there are courses with "linear systems" in the title, but there are none called "non-linear systems". <S> Maybe this is because each non-linear system must be studied apart, but you can study every linear system using the same set of tools. <S> They even tell you that non-linear systems are bad, because real systems are modelled as ideal linear systems with some non-linear (bad) effects. <S> But they are essential (the systems, not the undesirable effects).
So, the importance of linear systems arise from the fact that we know how to treat them mathematically and computationally, and that any system may be analyzed in a framework of linear systems.
How can I measure the frequency of a watch crystal using my oscilloscope? I am trying to measure the frequency of a 32.768 kHz watch crystal which is connected to my AVR MCU. This is so that I can fine-tune the crystal's capacitor values to get a correct frequency. However, I don't seem to be getting any output on my oscilloscope (a Rigol DS1052E with the factory probes). I have tried measuring between both crystal legs and also between one leg and ground and don't get any output. I have set the fuses correctly for the external crystal, and the MCU is working. Also, even if I could measure the frequency, could I be sure that the measured frequency is what it would run at, or would the oscilloscope probes end up giving me a distorted reading somehow? If so, how can I tune the caps to get a stable 32.768 kHz frequency? <Q> If the AVR or any MCU has a way to output the clock to an external pin, even if it divides it down, I would measure that pin. <S> Measuring at a clock pin will interfere with the clock frequency due to capacitance of the scope probe. <S> This way it’s buffered. <A> Actually I somehow doubt that the accuracy of the oscilloscope will be enough in order to adjust the frequency of the quartz crystal that to be used as a clock. <S> For example 1s difference in 24h is equal to 0.001% accuracy. <S> 1s in a week is 0.00016%. <S> The calibration can be done with frequency meter. <S> If you have one with 1Hz resolution, you will get 3s per 24h accuracy. <S> Frequency meter with 0.1Hz resolution (and properly calibrated of course) can provide 300ms per 24h accuracy. <S> There is an easy way (but takes longer) leave the clock to count the time for a 24h or even more and to synchronize to radio clock signals. <S> An alternative is to use Internet accessible time servers with the same method. <A> The probe will disturb the measurement, and might be why the circuit isn't oscillating. <S> Microchip actually has an application note which explains a recommended method of confirming the frequency of the crystal oscillator. <S> I comes with a special firmware which outputs the clock frequency (or a divided version of it depending on the chip.) <S> https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en592059 <S> As for your oscilloscope's precision, I would refer to any calibration documents that came with it. <S> They should mention something about the timing precision. <A> You're correct that the capacitive loading from the probes can affect the crystal frequency and in your case it sounds like it may be stopping the oscillator altogether. <S> Another advantage is that as long as you're careful to make sure that the timer is setup correctly you could toggle the I/ <S> O line after a longer period of time and compare to an external reference that will give better accuracy than a scope. <S> But whether that's worthwhile depends on your accuracy requirements and how long you're prepared to spend trimming the oscillator.
Depending on the chip and what I/O lines you have available a better method is likely to be using a timer interrupt to toggle a GPIO line that you can measure that without affecting the oscillator.
Is using the wrong mA on a power supply dangerous? I recently moved and didn't properly mark a couple of power supplies before I packed them up. I have a turntable and a pre-amplifier that both use 15v power supplies. One of the two power supplies outputs 15v 250mA and the other outputs 15v 550mA. The documentation for both devices just says "15v". I have done an exhaustive search online to see if I can find which adaptor belongs to which device, and have come up with nothing. I'm at the point where I'm going to have to just guess. But both of these components are fairly expensive, so I'm concerned about using the wrong power supply and damaging the device. I'm not understanding exactly what the difference in mA means, and what is the risk of plugging the wrong one in. <Q> You can measure the current consumption of both devices, powering from the bigger PSU. <S> And then assign the bigger PSU to the device with higher consumption. <S> Also, you can describe the devices and post some model numbers, and/or pictures. <S> Often it is obvious what device has higher consumption. <A> The short answer is yes, it could be dangerous - but probably only to the power supply, not your equipment. <S> Lets say you have a 500mA load and you attempt to use the 250mA adapter, then you will either overheat the 250mA adapter, or in the worst case, the transformer core in the adapter will saturate, cause large pulses of current to be drawn during the peaks of the mains cycle. <S> In this case the mains fuse should trip. <S> A tip: <S> if one power supply is heavier than the other, it is probably the 550mA supply. <A> mA is how much current the device is drawing from the PSU. <S> The first power supply is capable of supplying enough current for a 250*15=3750milliwatt load and the second one for a 550*15=8250milliwatt load (for devices rated at 15v). <S> The smaller one must belong to the preamp and the bigger one to the turntable. <S> (considering this link )
Connecting the wrong power supply means it will not be able to supply enough current and most probably overheat and fail with no damage to the device it is connected to.
Pulse counting affected by oscilloscope probe As shown in the block diagram below. I generate a 128KHz clock and a stream of known number of pulses in 10msec (the 10msec timer is implemented in the pulse counter by dividing the 128KHz by 1280) and send them to the pulse counter in the system under test. The problem is that when I send say 1000 pulses in the 10msec, the counter doesn't count exactly 1000. I keep getting lower counts (982 ~ 998). When I just probe the 128KHz at the shown test point (or touch it with my finger!), the counted number decreases a lot reaching ~400 counts despite the probed 128KHz is clean and had no issues! Any ideas what's happening here?! Problem Solved! The pull up resistor at the optocoupler output is 4K, so the max current from the optocoupler is ~1.2mA which is so small to drive the FPGA input. Replacing the resistor by 400 Ohms solved this issue and counting is now stable when i probe or touch with my finger! Thank you all for your contribution. <Q> Here, probably the optocouplers does not transmit 128Khz signal with good quality (what is very easy with wrong designed schematic). <S> So, the pulse counter (what is the input?) <S> simply misses some of the pulses. <S> In addition, when you connect the probe capacitance in the circuit, the quality of the signal becomes even worse and the counter misses more pulses. <S> Try to put Schmitt trigger on the other counter input and see what happens. <S> Also revise the optocoupler part. <S> Try to model it in order to check the frequency characteristics. <S> Adendum1 <S> : If you state that the signals are perfect (and if they really are), then your counter probably does not count properly. <S> I can't see any other reason for such weird behavior. <S> BTW, some time diagrams might greatly help the analysis. <A> It could be something to do with the input on the FPGA requiring a certain dv/dt. <S> I note that the input that seems to be affected does not have Schmitt trigger inputs on it. <S> One way to look at this is to use a passive probe that is made from a piece of coax and a series resistor (you have to crank up your gain on the channel to compensate) <S> but it gives you a very fast probe that loads the signal only by 1 pF <S> or so. <S> Howard Johnson calls it a "shop built 21:1 probe" using a 1K resitor. <A> It sounds as though the drive from the optocoupler is marginal for the FPGA. <S> The fact that the scope probe loads it enough to make things much worse seems to confirm it. <S> For example, a Tek P2200 1x/10x passive probe in the 1x position can put 80 pF on the circuit being probed. <S> At 100 kHz, that's -j 20K ohms, which MAY be OK. <S> At 1 MHz (100 kHz x 10), that's -j 2K ohms, which probably isn't. <S> You really don't want to know why I can quote those numbers for that probe right now. <S> I didn't take a hatchet to the dam' thing, but I was sorely tempted. <S> Take a look at the current drive specs for the optocouplers. <S> Consider using buffers. <S> If the optocouplers are open drain (open collector) devices, you NEED pull-up resistors, and the smaller the resistance you can get away with, the crisper your rising edges will be. <A> Another idea is clock-pulse synchronization. <S> If the pulses are "source-synchronous" and the pulses occur with the rising edge of the clock, and your fpga circuit also uses the rising edge of the clock to count, you may have a problem. <S> The probe will delay the rising edges but not the falling edges (as much), because of the pullup's RC constant. <S> Do the pulses have exactly one clock period duration, or are they shorter? <S> Try coding your counter to use the falling edges of the clock (you could simply invert the clock), in the attempt of making sure that the pulse has been there for a while (setup) and will stay there for another while (hold) and see if there is any difference in your results. <A> You may also want to check your electrical ground.
This can happen when some parts are not grounded properly. This is probably capacitance rather than resistance.
Best way to hook up Many analogue sensors I started a home project which has become almost impossible i think and its all my own fault! I planned on using a raspberry pi to monitor around 80 analogue sensors - specifically force resistors. I have since learnt that to use these sensors i need; 1) an analogue input on the raspberry pi - which i dont have 2) i could use an analogue to digitial converter which would then lose any information from the sensor Step 2 is not desirable because i want to know when a sensor is above a particular value so based on this what are my options Have I been far to optimistic and should i maybe swap the pi for an arduino or something? Is it ever possible to hook roughly 80 of these up to something so small? Hopefully someone can provide some assitance Thanks edit: The sensor type can be seen below - ideally all i want is to be able to read all 80 sensors and tell when a sensor is over a certain force. I dont need to know the force, just that it has been surpassed. This is a force sensitive resistor with a square, 1.75x1.5", sensing area. This FSR will vary its resistance depending on how much pressure is being applied to the sensing area. The harder the force, the lower the resistance. When no pressure is being applied to the FSR its resistance will be larger than 1MΩ. This FSR can sense applied force anywhere in the range of 100g-10kg. Two pins extend from the bottom of the sensor with 0.1" pitch making it bread board friendly. There is a peel-and-stick rubber backing on the other side of the sensing area to mount the FSR. These sensors are simple to set up and great for sensing pressure, but they aren't incredibly accurate. Use them to sense if it's being squeezed, but you may not want to use it as a scale. I want to detect when a seat has been sat on, but want to only show something that would be heavier than a bag. Thats why my condition of over a certain limit comes in to it. Ideally the cables connecting the sensors wont be too long, a couple of feet max i guess. <Q> It seems that the sensor is highly non-linear and this is good in our case. <S> The schematic if the following: simulate this circuit – Schematic created using CircuitLab <S> The value of R1 is the same as the resistance of the sensor on the threshold point. <S> Determine it experimentally. <S> The capacitor C1 is to reduce the induced EMI. <S> One approximate value is 100nF but it may vary. <S> Mount the resistors and capacitors as close to the CPU board as possible. <S> Use shielded cable (low frequency) to connect the sensors. <S> The shield must be the ground wire. <S> If the EMI are too big, some software processing of the false positives can be made. <S> If RaPi has no enough inputs (80) you should make some multiplexing. <S> Note, that in this case, some buffers with hysteresis have to be used - 74HC7540 is good choice. <S> You can use 10 of them and connect all outputs together and control the 3-rd state inputs by GPIO outputs. <S> This way with 10 outputs and 8 inputs you can control 80 pressure sensors. <A> 80 Inputs is a lot of wiring <S> so I think multiplexing is a good idea. <S> What about a 32:1 multiplexer under serial data control and maybe you distribute the multiplexers around the house. <S> Here's one idea: - The current source (say 5mA) will be diverted to the sensor that is currently selected via the serial control (SPI) and will allow you to measure the voltage with an ADC. <S> The ADC could be local (same SPI interface) or you could take 4x (32:1 muliplexed) outputs to a more central 4 channel ADC. <A> One possible sollution is to use the smallest micro you can use (PIC12F?) <S> to read a couple of sensors and send a signal to the RaPi alerting it to the ID of the sensor that's tripped over a simple network (SPI / CAN / custom clocked?). <S> If micro's are all on one network (or a few networks) connected to the GPIO pins you could capture every trip.
You can try to connect these sensors to the digital inputs of the RaPi, if they have some hysteresis (AFAIK, the GPIO inputs have a hysteresis).
Digital Logic and Assertion levels I'm struggling to get my head around assertion levels and how it relates to logic levels / functions. For example. Let's say we have 2 input signals, A and B So A assertive high and A assertive low. If we had B bar/not , then in this case B assertive high and B assertive low. The context its being used in is when designing MOSFET logic circuits. But what is even worse is in truth table and the headings are things such as "A assertive low" and "F assertive low" for example. I know its vague but if I knew more I probably wouldn't be asking this. Just would like to clear up assertion levels and how it relates to boolean logic if it does at all! <Q> Assertion level is the voltage level in a logic circuit that represents a logical "1". <S> Common level for high = +5v and low <S> = 0v. <S> A logical AND circuit that operates with assertion high (also called positive AND) requires high level on all inputs to yield a high output. <S> If you change your terms of reference to assertion low, then the exact same circuit becomes an OR - any low input yields a low output (also called negative OR). <S> Positive AND == <S> Negative <S> OR <A> Assertion in this case simply means in which value is the pin active. <S> For example you might have an IC with an Output Enable input. <S> These are, alongside Chip Selects , usually active low , or in your terms, assertive low . <S> That means: High value means inactivity, Low is active. <S> It's relation to Boolean logic <S> would be simply a negation (or complement). <S> In the datasheet, course book, or a tutorial, such I/ <S> O pins would be prefixed with an ! <S> / <S> or, as you already said, a horizontal bar. <A> Pulse Train has a ZERO (0-0.8 V) logic level as a LOW and ONE ( <S> approx 2-5 V) Logic level as HIGH 2nd Low Assertion Logic Level <S> that is From the View Point of Gates (Circuit) the Digital Signal <S> Pulse Train has a ZERO (0-0.8 V) logic level as a HIGH and ONE ( <S> approx 2-5 V) Logic level as <S> LOW Low Assertion Logic level is indicated by a bubble at either input and/or output of a gate
Digital Circuits have 1st High Assertion Logic Level that is From the View Point of Gates (Circuit) the Digital Signal
Read Arduino pin from another Arduino I'm looking to read digital and analog pins on one arduino from another arduino. I believe that as long as they share a common ground connection this should work fine. I'm aware of I2C and I have used it for other projects, but for this I am more interested in just making the connections. I was wondering Has anyone had experience with this? Will I damage anything if I do this? <Q> not this specifically, but it's just two chips talking to each other so it shouldn't be terribly complicated. <S> I have managed to get a couple of micros talking to each other over I2C, SPI, and RS232 on different occasions, but never just to read IO pins. <S> not if you're careful <S> One question, though: why do you want to do this? <S> There are devices available called port expanders. <S> The basic idea is that you talk to them over I2C or SPI and they provide access to several IO pins (usually 8 or 16) and possibly some additional interrupt-on-change functionality. <A> This should be relatively simple IMO. <S> If you want to use analog, then the code for Arduino 1 (Writer) would be as follows: byte myByte=0;void setup(){pinMode(3,OUTPUT);}void loop(){if(somethingHappens){myByte++;}analogWrite(3,myByte); } And Aruino 2 (reader) would read it as follows: <S> byte <S> readByte;void setup(){Serial.begin(9600);}void loop(){readByte=analogRead(0);Serial.println(readByte);} <A> Normally, this should work exactly like you would think, and nothing will be damaged. <S> However, some people choose to put a resistor between the pins, just in case a programming error should accidentally set both pins to be outputs. <S> It's not neccesary, but if you do anything where one wire is used bidirectionally and devices change input/output roles it is a good idea. <S> Otherwise, you should be fine. <S> Also, Stuyvenstein's answer might give slightly odd results, <S> because AFAIK the analogWrite() function on almost all arduino board variations is implemented with hardware PWM, not true DAC. <S> You can use an RC filter to get real analog from the PWM though. <S> IIRC the frequency is something like 490Hz.
You're definitely right about the ground.
What is the name of the equation P=IV? Ohm's law is \$V=IR\$, but what is the equation \$P=IV\$ called? I've never heard anyone refer to it with a name, and my text books and wikipedia don't refer to it by any name. <Q> Informally, this is referred to as the "power law" or "power formula". <S> However, note that the first term potentially conflicts with a widely used meaning of "power law" which describes any situation in which two quantities are related via any any power higher than 1: quadratically, or cubically, and so on. <S> For example, if a doubling in some independent variable X causes some dependent variable Y to quadruple, then X and Y are linked by a power law. <S> It closely corresponds to what Wikipedia calls Joule's first law : $$Q = <S> I^2 \cdot <S> R <S> \cdot <S> t$$ <S> Watts is <S> just \$P = \displaystyle\frac{Q}{t}\$, which reduces it to \$P = I^2R\$, and by Ohms we get all the variants. <S> It looks like there is justification in just calling all variations of the electric power law "Joule's First Law". <S> However, people (who otherwise know a thing or two about electronics, as well as Ohm's Law) might not understand "Joule's First Law". <S> In casual conversation, in which I don't want to get uppity and educate people about terminology, I would call it the "voltage-current product law". <A> It's embodied in Joule's First Law . <A> This equation is exactly the Joule-Lenz law. <S> Actually both equations: \$dQ = I.U.dt\$ and <S> \$P = I.U\$ are two forms of the same law, because it is known that the power is the first derivative of the energy: <S> \$ \frac{dQ}{dt} = <S> P = <S> I.U\$ <S> Such multi-forms of the laws is not something uncommon. <S> Notice that the Ohm's law has three forms actually. <A> I'm sure this varies regionally, but depending on the physical effect you're talking about or the type of power supply that is involved, you may refer to "electrical power" "dissipated power" "\$IV\$ power" "\$I^2R\$ power" "\$V^2/R\$ power" <S> It doesn't have a name-name that I've encountered in my career.
It seems that there is a widespread practice to refer to it, incorrectly, as "Watt's law".
Can an optical mouse be used to measure distance down to 1-10μm? I am working on a home-built CNC machine that uses stepper motors and MXL timing belt for the machine movement. Because I'm using steppers, there is no feedback to the controller about the actual position of the machine (ie, open-loop). Sometimes when I am making cuts, shards of material fly into the path of the gantry and gum up the track, causing the motor to skip steps. To solve this, I am installing a dust shoe and vacuum to keep the area clean, but this still doesn't address the problem of skipping steps due to any number of various reasons. Of course, there are solutions that already exist that "close the loop" for the industrial market, but I think they would be out of budget for the homebrew hobbyist. If something as ubiquitous as an optical mouse sensor could be used, it would be a great boon for improving DIY machine robustness, if even marginally. It could also be used for self-calibration if the measurements are accurate enough. The footprint of my machine is 750x1000mm, so I need something that can measure accurately over that distance. Obviously, the optical mouse can be used to measure distance (that's what it is designed to do!), but what parameters should I be looking for to meet my goal (DPI, CPI, camera resolution, etc) of measuring to a precision of 1-10μm and would these measurements be repeatably accurate? (Each step of the motor moves the machine about .01143mm, so I guess 1μm precision would be preferred but that might be asking too much.) Unfortunately, it seems that my best lead and the most discussed family of sensors from Avago (ADNS) are discontinued. For example, the ADNS-9800 . Have they sold the technology to another company? Does an alternative exist that is easy to source and has proper datasheets? I'm guessing they have been discontinued because other companies have integrated the USB aspect into the die of the sensor module, making the entire thing cheaper to produce (rather than needing another micro to do the SPI/I2C->USB conversion). Is there a better way to do this while keeping costs in check? Up to $30 per sensor would be a target for this kind of market, I think. <Q> I have tried this before, using an Avago sensor harvested from an optical mouse. <S> It doesn't work. <S> The resolution is excellent but the accuracy is terrible. <S> I arranged a test with a 3" diameter wheel and the sensor reading the outside "tread" of the wheel. <S> I also put a flag on the wheel, passing through an optical interrupter sensor. <S> The number of counts read per revolution varied by a few tenths of a percent, nowhere near good enough repeatability for machining. <S> But really, I think other sensor technologies are more appropriate for this. <A> Neat idea. <S> I considered using a hacked Livescribe pen with special dot rails for the same purpose, then an absolute location would be provided, rather than the relative location a basic optical mouse would provide. <S> I know the pen claims to have precision to 1µm, but it's hard to say the accuracy. <S> I still think this is a good idea; I just haven't got around to trying it. <S> If you do try it, please update us. <S> As for optical mouse parameters, you'll want to look for high DPI. <S> In your case for 1µm resolution you want more than 25,400 DPI. <S> Needless to say that is rather high. <S> A basic optical gaming mouse might have a DPI of 2,500. <S> Again, that's precision, not accuracy. <S> Optical mice are probably not the way to go. <A> If you're using a leadscrew-based system, you can put optical encoders on the ends of the screws. <S> Harvesting the guts from a ball mouse would give you some high resolution encoders and most of the control circuitry as well. <S> I can't find the resolution of a common encoder wheel, but the ball acts as a significant gear-train internally, so perhaps a similar mechanism can be applied.
I guess you could use the optical mouse sensor in combination with an accurate but low-resolution sensor to fill in the in-between points. And the calibration varies with distance from material to the sensor.
How many things can Arduino Uno control? This is a newbie question, but how many things an Arduino Uno R3 can control? My idea is to have Wireless + Ethernet modules and Relays module, be it 8, 16 or 32 relays each. I saw the Ethernet module goes on top of the Arduino, maybe I'm wrong, but how many pins are left for controlling other things? Sorry for my newbieness, but I need to buy the items on eBay and I'd like to be sure. <Q> As many as you can stack, without conflicting dedicated control pins. <S> Devices that use I2C with unique addresses, or SPI with remappable Chip Select pins, are the most ideal. <S> Even more if you avoid existing shields, and design your own. <A> Best is to take it step by step, make hardware work board by board. <S> Arduino can control many devices, but the default shields may come with intercompatibility issues. <S> If they occur, most of these issues can be solved, but it require a bit knowledge how to change the hard- and software in such a way that it will work again. <S> Almost every shield has its circuit diagram published and the real answer to your question is in these circuit diagrams. <S> Basically what you need to do is check these circuit diagrams for IO-pins that are used on with every shield and then you need to gain an understanding which pins actually are a problem and which are not. <S> For example, there can be several devices on the same I²C bus no problem. <S> The SPI bus can support multiple devices too, but the trick here is the related select signal that requires a dedicated pin. <S> And if you have to slightly change the hardware, you'll definitely need to change the related software too. <S> There is lots of support on Internet, but don't make your learning curve too steep that it demotivates you. <S> Actually this is precisely the reason <S> why I don't really like the Arduino form factor shields, if you need to use alternative pins you have to hack the hardware. <S> There are many break out boards that have similar functionality as Arduino shields, if you don't absolutely need to stack them, I'd go for those. <S> Then again ... those certainly requires some understanding of hard and software. <A> Ethernet uses SPI. <S> Wireless uses a UART.
You have plenty of pins left to control things, and even if you didn't, you can always use a I 2 C expander such as the MCP23017.
Calculating current through resistor What I know is with a current source, the current through the resistor should be the same as the source. But here I have two current sources so would this affect the value? I need to work out current through each of the resistors. simulate this circuit – Schematic created using CircuitLab <Q> Since someone else has provided an answer, I shall provide a more intuitive approach. <S> Since the two current sources are in parallel, combine the 2A and 1A sources into one 3A source and then you have the canonical current divider circuit. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> $$I_{R1} = <S> 3A \dfrac{R_2}{R_1 + R_2} = <S> 3A \dfrac{6}{3 + 6} = 2A <S> $$ etc. <A> R1 and R2 are in parallel. <S> Via Ohm's law: 3ohm || 6ohm = <S> 2ohm I1 and I2 are in parallel with regards to the load. <S> KCL: <S> 2A + 1A = <S> 3A <S> The current sources are in series with the resistors. <S> Ohm's law: 2ohm <S> * 3A = 6V <S> The same voltage is across each resistor. <S> Ohm's law: 6V / <S> 3ohm = <S> 2A 6V / <S> 6ohm = 1A <A> Your current sources are in parallel, so they can be added (I = I1 + I2) <S> Then, since your resistors are in parallel, they have the same voltage, and the current is divided proportionally between them: Current Through R1 = R2/(R1+R2) <S> x ICurrent Through R2 = R1/(R1+R2) <S> x I To double-check: <S> In this case, R1 = 1/2 R1, so the current through R1 will be twice the current through R2. <S> So you have a special case, where the current sources and resistor values are both in the ratio of 2:1, so the answer can be seen immediately. <S> But for different current source and resistor values, the equations above first calculate the total current, then divide that proportionally between the two resistors. <A> V = <S> I <S> x R <S> Thereby, if the current that flows through R2 is to be I1, then current of R1 would be 2xI1. <S> Current sources must flow their electrons on resistors eventually. <S> Thus current total of resistors must be equal to total current. <S> I1 + <S> 2xI1 = 3xI1 = 3A I1 = <S> 1A <S> From this, 2A flows through R1, and 1A flows through R2.
Parallel resistors have same voltage on them, and therefore their current becomes related their resistance according to ohm law.
How efficient are lab bench power supplies? (affected by output voltage?) As how I understand it, there are two ways of converting DC. One is by using a voltage regulator (zener diode, feedback combination etc), and the other is by using a buck boost converter . Firstly, if there are other methods, please tell me! How do lab bench power supplies work? I've heard that buck-boost supplies are noisy (for precise lab requirements) and I know that voltage regulators basically drop the remaining voltage as wasted energy . Now to my question: I have only seen a single transformer in any lab supply, so obviously the output voltage of it is fixed . If say the bench supply's max voltage output is 24V, then I'm assuming the output of the transformer would be ~24+V. If this is going (after AC-DC conversion) to a voltage regulator, and say I pick 1V fixed o/p voltage and connect the bench supply to a load that draws 1A current. If I understand it correctly) the lab supply will waste at least (P=VI=[24-1]*1) 23W and have an efficiency of just 4% . Is this true? If so, the heat output would increase dramatically as selected output voltage is lowered (and current increased). So much energy would be wasted? Not to mention heat sinking etc. What am I missing? Is there a better way? Or is this a necessary sacrifice for getting a precise power supply? <Q> Many supplies nowadays use both a switching regulator and a linear regulator together. <S> The two are set up to track each other, so the voltage dropped by the linear regulator is never excessive. <S> So for example, say you set the supply to 5V, you might have a 24V input which the switching regulator drops down to 6-7V, then the linear regulator drops that down to the desired 5V. This way you get the benefit of the switchers efficiency with the quiet output of the linear regulator. <S> However, as mentioned by Passerby, efficiency and weight is not always so much of a concern compared to reliability and quietness, so many simply use a purely linear supply and deal with the losses involved. <S> To keep from being ridiculously inefficient however, generally many linear supplies will have more than one tap on the transformer which are switched between at appropriate points in the range (e.g. instead of dropping from 24V to 1V, it would switch to, say, a 5V tap <S> so a lot less power is dissipated) You can usually hear the clicks of the relays at certain points in the voltage range. <A> And efficiency isn't too much of a concern in a multi-purpose device like a lab supply, because it is not a consumer or battery operated product where such efficiency is important to cut costs or produce something marketable. <S> In a lab supply, even extended use, necessary cooling can be determined ahead of time because the variables are known. <S> X amps, Y voltage range, means they know the maximum heat dissipation to expect. <S> This is too open ended otherwise. <A> It really depends on the power supply. <S> Lab supplies are generally designed to have very good regulation on current and voltage as well as low output noise. <S> Generally efficiency is not much of a concern unless it's a high output power supply. <S> In that case, low output voltages at high currents have the potential to dissipate a huge amount of power in the regulators, which is something that should be avoided as much as possible. <S> Some power supplies will have selectable ranges, so you can decide whether you need a higher current with a lower voltage or a higher voltage with a lower current. <S> I have a couple of Agilent power supplies that have a low range of 8v and 20a and a high range of 20v and 10a. <S> They have a gigantic transformer with a pair of secondaries. <S> It might be one tapped secondary; it's been a while since I had the cover off. <S> The supply can put the two secondaries in parallel for the low voltage range and in series for the high voltage range. <S> Then the regulator has two stages - a PWM'd preregulator and a linear postregulator. <S> So it's sort of a hybrid switching and linear power supply. <S> This likely won't be the case for all power supplies, though. <S> Agilent supplies will be highly engineered for the best performance (and you pay for that) while el cheapo made in china supplies will likely be very simple and purely linear. <S> And then there will be a whole range in between.
Efficiency of a lab power supply is found by reading the spec sheet for said lab power supply.
Driving high and low inputs of a MOSFET driver with a single PWM signal (A typical circuit from FAN7390 datasheet .) I have high-side and low-side MOSFETs to drive. I read dozens of MOSFET driver datasheets, all of them have two separate inputs for controlling high and low side MOSFETS independently. However, my control signal is a single PWM signal. I want the high side MOSFET to turn on when the PWM signal is logic-1, and the low side MOSFET to turn on when the PWM signal is logic-0. As you see in the circuit above, the HIN pin can be directly connected to the PWM, and LIN signal can be obtained by inverting the PWM by a BJT. But I can make sure that this won't cause a shoot through or any other problems. What is the proper/best way of obtaining LIN and HIN signals from the PWM signal? <Q> Usually, the switching OFF is slower than switching ON. <S> This way if you switch the input signals in the same time, there will be short period when both transistors will be open and the power source will be shorted. <S> In result, the power switches will dissipate big amount of power/heat and the efficiency of the circuit will be very low (well, or both switches will be burnt). <S> For low power schematics, where the switching goes faster and the resistance of the switches is higher, such "shortcuts" are not dangerous, but for high power (above several watts) <S> such behavior is not acceptable. <S> So, you need to form two pulses, where the positive edge of every pulse will be little delayer in order to provide a gap, where both signals are 0. <A> Consider using a FAN73932 instead. <S> It is comparable to the FAN7390 except that it takes a single-ended PWM signal and adds dead time between the high-end and low-end output signals. <A> You could try using one of these: - The trouble is with this type of driver for the FETs <S> is that you cannot turn both FETs off; one or the other is always on. <S> The saving grace of the 4449 is that when the PWM signal is inactive it will turn both FETs off. <S> The other way is this: - The RC network (220R and 1nF for example at 100kHz switching frequency) will delay the rising edge from the AND gate and extend the falling edge from the OR gate. <S> To keep polarity correct when feeding a conventional high-side N channel FET, one of the lines has to be inverted - use an exor on both lines (to preserve delays) and have one set as an inverter.
The reason why the drivers have two signals for the high-side and low-side MOSFETS (or other power switches) is because usually you want to first switch both sides OFF for a short period of time and then to switch the needed MOSFET ON.
Do I have a bad relay module? I'm aware that there have been many questions about this series of relays, but I've read them and still can't get this working. I have this version, with 4 relays. I'm currently wiring: 5v Arduino -> VCC GND Arduino -> GND I/O 13 Arduino -> IN1 I have bridged VCC and JD-VCC. I'm running the Arduino blink example sketch, but nothing happens. I've checked it's using the right pin, I've checked that the code is running correctly, but I still can't get it working. No noise is heard when the IN1 switches from high to low or visa versa, and the status LED doesn't come on either. I've also tried switching out Arduinos, in case it was an issue there, but no luck. Can anyone help? <Q> There are a few failure points. <S> The first is the Opto side of the Optocoupler. <S> R1, The Opto Led, and the IN1. <S> The second is the transistor side of the optocoupler. <S> The Opto Transistor, R2, and Q1. <S> The third one is the Relay and Flyback Diode With Q1 as well. <S> The final one is the headers and the traces, especially since you have desoldered and resoldered new headers to the board. <S> The easiest thing to do is test each part. <S> Using two wires, from a 3x AA (4.5v) battery pack, or a 5v supply, connect power and ground directly to the relay's coil pins, bypassing everything else. <S> If it clicks, it works. <S> If it doesn't, the relay is bad OR there is a short. <S> Then try power to the JD-VCC point & R2 away from Q1. <S> If it works, the Q1 transistor is good. <S> Finally, apply power to the far side of R1, and ground at the cathode of the IN1 led on the board. <S> If the led lights, then the opto side of the coupler and the IN1 work. <S> If they all work, then it is an issue with your soldering job. <S> If they don't work, then it could still be an issue from your soldering job, and a multimeter with continuity test would be needed. <A> I bought a couple of dual relay modules recently and was having the same issue. <S> The problem might be you bought an "Active low" relay module. <S> What that means is that the "in" is not wanting a high signal from the GPIO. <S> Instead it is looking for a ground. <S> If you wire you vcc to 3.3 or 5 volts, you ground to a ground, then try taking a small piece of wire and jumping the ground to the in pin. <S> Your relay will probably trigger. <S> So what is the fix? <S> In1 and ground get wired to ground. <S> VCC goes to your GPIO pin. <S> JD-VCC goes to your plus 3 or 5 volts. <S> (I found 3.3 works, but not a satisfying hard like 5v!) <S> I know I am answering a very old question, but excited to share a solution. <A> 1) Run the relay board direct off 5v and not off the Arduino. <S> 2) Try IN2, IN3 and or IN4. <S> 3) Try a hard wired 5v and ground into the relay board, with the IN signal actuated by a physical momentary switch, taking the Arduino out of the equation <A> Read the top of the relay module <S> SRD-12VDC-SL-C indicates that it require 12v to operateSRD-5VDC-SL-C indicates that it require 5v to operateSRD-3VDC-SL-C indicates that it require 3v to operate <S> You can use appropriate voltage to trigger the relay coil <S> don't worry about the circuit. <S> Just use two wires connected to 3v/5v/12v and touch the wires on the coil terminals of the relay if the relay is not bad then you will listen tiktok sound :)
If the board still doesn't work you may have torn it up with your soldering job.
MSP430 Bluetooth interfering with USB module I have a simple project that basically sends and receives data through USB connection and Bluetooth. Both the USB module and the BT module share the same UART RX (P1.2) and TX (P1.1) ports. The problem I am having is that when the bluetooth is powered, I can't send commands to the MSP430 with the USB module. If I unplug the BT module, I can send just fine over USB. Am I connecting them incorrectly, or do I need to disable the BT when using USB? The USB module is based on FT232R: https://www.sparkfun.com/products/9716 The BT module is based on RN-42: https://www.sparkfun.com/products/10269 USB connections: GND --> GND CTS --> GND 3V3 --> N/C TXD --> P1.1 RXD --> P1.2 DTR --> N/C BT connections: CTS-I --> N/C VCC --> 3.3V GND --> GND TX-D --> P1.1 RX-I --> P1.2 RTS-D --> N/C <Q> The Arduino has the same issue, and they have implemented a fix a long time ago. <S> As you can see in the image, Resistors RN4B and RN4A are 1k series resistors between the USB-Serial ic and the Arduino's ATMega328p. <S> This allows a device connected directly to the Arduino headers, like a shield/boosterpack to communicate with the Arduino without interference from the USB-Serial IC. <S> You want to implement the same thing. <S> Place 1k resistors between your MSP430 and your Bluetooth module. <S> This will mean that the USB-Serial connection has precedence over the Bluetooth module. <S> Any communication between the USB-Serial and the MSP430 will not be interfered by the Bluetooth module. <S> That said, you cannot send/receive from the bluetooth module when the USB-Serial connection is plugged in. <S> Update: This may not always work though. <S> Some devices, when there is no usb signal on one side, will turn the tx/rx into floating/open inputs, instead of driving the line, which is good, but others, when off can still siphon power via clamping diodes in gpio pins. <S> It can be a pain because this means they attempt to drive the line, preventing others from doing so.. <S> In your case, you might need a bi-directional multiplexer, or simpler, if the usb serial is only occasionally used, you could add a jumper to the line. <S> Plug in the jumper when you need to use the usb connection, remove it when you don't. <A> I assume you have only one UART, so it will require some additional logic or software. <A> You are connecting them incorrectly. <S> Bluetooth module and USB-to-serial converter <S> (I'll be calling it FTDI for short) share the same UART pins. <S> They are connected in parallel to the same UART. <S> When you send data on UART TX, how would the BT know that it and not the FTDI should transmit? <S> It's even worse with UART RX. <S> When BT is not sending data to MSP430, it still drives the UART RX line low, it doesn't disappear out of the picture. <S> FTDI can not drive the UART RX line high in this condition. <S> When you plug in the BT module and lose the ability to send commands via FTDI, that's what's happening. <S> Typically, there would be separate UARTs for Bluetooth and FTDI. <S> Alternatively, you could add a multiplexor to your schematic so that the microcontroller's UART "sees" only one device at a time.
Both the USB and the BT share the same GPIO pins, use different ones for each module.
What defines a frequency in electronics? As Hertz is defined as one cycle per second, what are the requirements of an electric wave to have a certain frequency? What I mean is more lucid in a picture. The black wave has a frequency of about 3 Htz and the orange 0.6 Htz, but can the blue wave be defined as 1.5 Htz? How far does the line need to fall each cycle to define a period point? <Q> Any signal (of any shape) can be the lowest frequency single sinewave imaginable or, a massive concoction of billions of individual sinewaves. <S> What you have drawn (a, b or c) is reproducable (and analysable) as just this - a bunch of sinewaves. <S> If you can draw limits around it where it might repeat then <S> it's realizable mathematically as a series of individual sinewaves (but possible an infinite number in the case of a square wave). <S> The blue wave will certainly have a 1.5Hz and possibly 3Hz component that is bigger than say a 2Hz or 4Hz component <S> but, because there is a gradual slope upwards it is impossible to say what its lower frequency content will be. <S> It's always easiest to see the lowest component perform one full cycle before being definite about it. <S> For instance the 1.5Hz components may actually dissapear if the full picture was known. <S> This happens when two sinewaves are multiplied with each other - one component may possibly disappear completely. <A> The amplitude (how far the line "falls" each cycle) or waveshape is irrelevant to the frequency. <S> The important criterion is that it be a repeating signal. <S> The frequency in Hz is then how often this repeating pattern occurs in one second. <S> In some cases the pattern or event might not be regularly repeating. <S> We can still sometimes use Hz to specify the average occurrance rate of the event, even if individual events aren't predictable. <S> Depending on the nature of the event or the meaning of the signal, this may or may not be stretching the use of Hz. <S> For example, the signal from a Giger counter tube is really a series of blips. <S> The exact time of any one blip is random, but in the aggregate a certain number of blips are expected over some specified time. <S> It could be acceptable to say that the blip frequency is 35 Hz on average. <S> You could also be measuring the number of people entering a building. <S> Each person is a non-repeating blip, but in the aggregate a certain number of people are expected to enter the building over a 1 hour period. <S> I think that applying Hz to this would be a bit of a stretch. <A> The frequency is 1/period (in Hz if the period is in seconds). <S> In another sense, we speak of the "frequency content" of a waveform. <S> If you imagine that every signal can be represented as a sum of sine waves, where every frequency of sin wave has its own amplitude and time delay, then you'll see that many different kinds of signals can have many different frequencies at the same time. <S> Your bottom signal, because it has a constant drift is not periodic, and the first definition does not make sense. <S> Using the "frequency content" definition, though, we would say that the bottom signal has substantial frequency content at 1.5Hz, but it also has some lower and higher frequency components as well.
One way to define frequency is to determine the period of a periodic signal.
Terminology question: does the term "bit-banging" implies not using external signal edge interrupts for timing? Assuming I realize some communication protocol (e.g. SPI or I2C) just with GPIOs (no dedicated HW). In order to handle timing, I can either: set interrupt on the CLK edge set timer interrupt and test the DATA line periodically Option 1 uses external interrupt (the CLK signal comes from the outer world), while option 2 does not rely on external signals (if CLK line disconnects from whatever reason, it still works - it doesn't depend on it) Finally, the question : can both options 1 and 2 be referred to as "bit-banging", or just the second? (as the term "banging" can be interpreted as "knock with constant pace". I hope my question is clear...) <Q> Both. <S> Bit-Banging describes for me emulating a protocol just using non-specialized hardware modules (e.g. GPIOs). <A> I think the Wikipedia article on bit banging pretty much answers your question in the first sentence: <S> The timer and interrupt hardware are not dedicated hardware. <S> They are general use hardware that can be adapted for many purposes. <S> And it's really the software that you write in the interrupt service routine that is doing the work. <S> So both can be considered bit banging. <S> The article further goes on to mention issues with using only a simple polling routine to bit bang. <S> Polling takes time away from other tasks and in a resource constrained embedded system, this can be an issue. <S> Depending on how high priority you make your polling interrupt, it itself can be interrupted and then either miss incoming data or cause the output signal to be of low quality. <A> Bit-banging is when a UART or USART hardware component or module is not available or not used. <S> It basically means that software needs to service each bit possibly through loop, counter compare or interrupt. <S> Using a shift register macro-cell or external component is not true bit-banging unless software is providing at least the clock or start/end conditions, if a hardware timer is driving a shift register you have created a crude ART (asynchronous receiver, transmitter) add some more VHDL code <S> and it is a UART <S> (but if you consider the VHDL to be code then it is bit-banging). <S> EDIT: <S> On deeper reflection I need to make further clarification. <S> Bit-banging is different from what may be the other type by virtue of the fact that it is done a bit at a time rather than a byte (or word) at a time. <S> This means that the software has to perform multiple communications operations corresponding to work done for each bit with possible additional overheads for start and stop bits or state changes depending on the format/protocol. <S> It make the shift register the antithesis of bit-banging because it is the circuit component that will be able to clock out multiple bits unattended. <S> An uncertain situation would be using a shift register to move the data but generating the clock edges in software. <S> This would probably fall into Bit-banging still due to the fact that the software has to service the (clock of the) data movement on a bit-by-bit basis (even with the data shift register). <S> If you set up a ART, UART, USART, SPI, I2C etc peripheral and then send a byte (or word) and the data moves out (or in) without further software assistance that would NOT be Bit-banging.
Bit banging is a technique for serial communications using software instead of dedicated hardware.
What is the best tool to hold small printed circuit board? To solder a small PCB I need something that can hold it very tightly, so I can touch it and it won't move. I tried a lot of tools. First I used this third hand with magnifying glass below. But it can damage the board and is not so good for my things. Then I tried this PCB cell phone circuit board repair holder kit ". Didn't work either. But the best tool I tried was this PCB holder (sorry, but I can't find an equivalent product in a website writen in English). This last one is ok, but it's tricky for a very small PCB. Besides, it is a little weak. It moves if I make a little more pressure on it. Another tool I tried to use was this small bench vise , but it is not so good to hold a PCB. Any more ideas? Is there any specific tool to hold a small PCB? <Q> I've used this one: <S> It works well for small pcbs. <S> You can get it from http://www.adafruit.com/products/151 edit: <S> This is P anavise model 201 PV Jr . <S> Many of catalog distributors carry it ( Jameco among others). <A> The hemostat holds the board, and the vise holds the hemostat. <A> Those are called Vise(s) in english. <S> They are general purpose holders, and come in a variety of sizes, and quality. <S> If the third one is moving around on you, you might want to add some rubber, like from a large rubber band or a bicycle tire tube to the parts that screw close, to provide some friction. <S> The holes may be a little too big to tighten properly. <S> And if you find you have to press to hard while soldering <S> , your soldering iron is not hot enough. <S> You shouldn't have to dig into the board to solder or desolder stuff. <A> Blu-tack is perfect, particularly if you have limited height available e.g. under a microscope.
A hemostat and a vise.
Running a 220v dust collector with 24v switches I have a 5hp 220V 30A dust collector that I want to turn on and off with 24v switches attached to my blast gates. Can I simply use a 220v to 24v transformer? <Q> I suggest you go to Lumberjocks ( http://www.lumberjocks.com ) where you will find many woodworkers with experience controlling dust collectors. <S> Search their forums for discussion on the topic, and the projects and blogs - I recall seeing descriptions of dust collection systems there... <S> For a 5 hp motor, you will certainly need a proper motor starter (contactor) which can be controlled by 24 V. A 240/24 or 120/24 volt transformer would be used to power the control circuit. <A> I dont see how stepping the voltage down to 24V allow you to control it. <S> Once you step it down, you are basically switching to output of the device used to switch down the voltage. <S> It will not allow you to control input device. <S> Here is a good circuit. <S> The Low current trigger could be your switch. <S> You might need an extra 12V/9V battery to use in series with the switch and the relay(also connect a resistor). <S> The high current circuit would be your dust collector, and relay will behave as a switch for that circuit. <A> You'll want to get some properly sized and UL approved components to perform this function. <S> Go to an HVAC supply store in your area and purchase a properly rated "contactor", a 24 VAC transformer and a UL-approved metal enclosure to house the contactor. <S> A "contactor" is a large relay which is specifically designed to control motors and other heavy loads. <S> They come in a variety of sizes and contact ratings, as well as coil voltages. <S> 24-28 VAC coils are very common. <S> This is the coil you will need to use your "24 Volt Switches". <S> The contactor you need is either a SPST or a SPDT, although you might have to choose a DPST or DPDT as these are more commonly available. <S> You need one with a contact rating of 5 amps or more. <S> Often contactors are rated according to the motor horsepower they can reliably switch. <S> Make sure to get the metal enclosure and use it in your installation. <S> You'll want to read up on properly locating your contactor so that it's sparks (yes, the contacts will spark some when they are opened and closed) <S> so you don't create a hazard. <S> One of the other posters suggested some sites where you can find such information. <S> Good Luck! <A> Definitely a relay solution. <S> The circuit is just as Sherby posted above. <S> One small sizing detail is not included though. <S> The contacts of a relay have two ratings important for this application. <S> The amp rating generally advertised is typically the full working load rating which is the number of amps drawn while the motor is running. <S> However on startup the motor will draw significantly more amps in the order of 5 to 10 times the number of amps it draws while running. <S> It generally does this for a short period of time. <S> The amps that represent this inrush of current are what I believe the resistive amps rating of the relay represents. <S> You can find that specification in the specification detail for the relay. <S> So in my case while my motor is rated at 14 amps, during a run it only draws 8 amps. <S> On startup however it draws 56 to 57 amps for a short time. <S> These numbers were indicated with all blast gates closed.... <S> the worst case situation. <S> This inrush will burn out the contacts on a relay not rated for that amount either immediately or over time. <S> My long way of saying that you should measure your units amps during run and startup and use those numbers to size the values of the contactor relay (Running amps and resistive amps). <S> For my 1.5HP 120VAC dust collector I bought a one pole 40AMP relay with a resistive load rating of 50AMPS. <S> Not sure how it will do <S> but I suspect it is close enough because I believe my startup amps will decrease if the motor starts with at least one blast gate open.
Contactors by their nature have a lot of exposed metal which is at the line voltage, so you'll want to make sure this is all properly enclosed to prevent accidental contact with human body parts. Starts from a complete stop take more energy/current until the motor is up to speed. Dust collectors have a number of explosive hazards. Relays are preferred in this situations. You'll also need an assortment of cable clamp accessories which you can get at a Home Depot or Lowes.
Input power & Torque to a DC Motor I have an DC motor connected across a 12V supply, I got the rpm around 200 rpm. Armature Terminal Voltage of 9V. Winding resistance = 1ohmHow can I find the torque of the motor and the Input power without using an external device.EDIT:The External Device is stalling the motor in this case. <Q> You would have an easier time if you knew the motor constants as I describe in detail to my answer to this question: How to improve torque and RPM of a DC motor? <S> You should be able to get those from the motor manufacturer <S> and they would take into account the losses mentioned by the others. <S> But you can get a ballpark estimate given what you have. <S> Given the voltage, armature resistance and Ohm's law, you are able to find the current and therefore get the input power. <S> You can then determine torque at a known speed with the following equation: \$P_{in} = <S> P_{out}\$ <S> \$V <S> \cdot <S> I = \tau <S> \cdot <S> \omega\$ <S> Where: \$\omega = <S> \text{angular velocity in radians per second}\$ <S> So you would just need to convert RPM to rad/sec using: <S> \$ \dfrac{RPM \cdot 2 \cdot \pi}{60} <S> = <S> rad/ <S> sec\$ <S> Then divide your input power by your angular velocity to obtain your torque at that speed. <A> The input power is volts multiplied by amps. <S> Without an external device such as a mechanical load on your motor you can't determine torque. <S> With the motor unloaded there is torque but this is due to bearing friction and windbag. <S> It's impossible to determine this by measuring power because there are also copper losses in the stator and armature. <A> The torque equation of DC Motor <S> \$T = K\phi I_a\$ ..... <S> (1) where \$K\$ is a constant, \$Ia\$ is armature current. <S> Back-emf \$ <S> E = KØω\$ .... <S> (2) Dividing (1) and (2), \$\frac{T}{E} = <S> \frac{I_a}{ω}\$ \$T = <S> E(\frac{I_a}{ω})\$..... <S> (3) <S> Now, \$ω = 2π(200/60)~~rad/sec = <S> 20π/3~~~rad <S> /sec\$ <S> \$I_a = <S> (V -E)/R_a\$ where \$V\$ = <S> Terminal voltage, <S> \$R_a\$ = Armature Resistance <S> \$I_a= (12 - 9) / 1 = 3 A\$ <S> Thus from (3),Torque of DC Motor \$= 9(3\times3 /20π ) = <S> 81/20π = <S> 1.3~N\$ <S> ( Ans. )
Knowing the armature dc resistance helps to get a better estimate but realistically if you want to determine torque you need to explain "external device"
Why is chassis connected to earth ground but not neutral? My question arose from my previous questions. Here depicts how electricity is distributed to houses: http://www.epanorama.net/documents/groundloop/feed_1phase.gif It seems like the earth ground and neutral are connected at the end. If so why we not just ground the chassis to neutral instead of earth? <Q> Firstly, note that in some parts of the world, neutral and ground are NOT connected at the house, but back at the substation (transformer) <S> so there may be a few volts on neutral in those systems. <S> But to the question : Consider if you did just connect chassis to neutral. <S> Then what happens if part of the house wiring fails open circuit? <S> 1) Live (Hot) fails ... <S> appliance stops working safely. <S> 2) <S> Neutral fails ... <S> appliance stops working - with the chassis live! <S> This is not good. <S> Connect the chassis to earth <S> and what happens when a wire fails? <S> 1) Live (Hot) ... <S> appliance stops working safely. <S> 2) <S> Neutral ... appliance stops working safely. <S> If a current path develops between live and earth (perhaps you are trying to fix it) <S> 10 or 20ma will trip a modern breaker disconnecting the supply. <S> 3) Earth ... <S> Nothing happens unless something else goes wrong. <S> The earth failure will be caught at your next scheduled safety test. <S> Right? <A> The PE (protective earth) wire does not carry any current so that the chassis of any electrical device is always zero <S> and it is always safe to touch it. <S> It is also easy to detect any faults as you only need to detect a small current present. <S> Typical protective devices will trigger if the current in PE wire is higher than 20mA. <A> There are two issues with combining neutral and earth. <S> The first as others have answered is that if the neutral connection fails open-circuit the combined neutral and earth becomes live. <S> The second is that you lose control of where you neutral currents flow. <S> Consider a computer and a printer plugged into differnet circuits. <S> Supose that the computer and printer both have their signal grounds connected to mains earth. <S> The computer and perhiperal are connected via a data cable that links their signal grounds together. <S> In a seperate neutral and earth setup the neutral current from computer and printer is forced to flow down the neutral conductors in the corresponding circuits. <S> In a combined neutral and earth setup if the computer and printer draw different ammounts of power or the circuits they are plugged into have different resistances then a substantial current can flow down the ground of the signal cable. <S> This can cause overheating of the signal cable. <S> Combined neutral and earth setups are used in some situations. <S> In some parts of the world they are used for electricity distribution wiring and pretty much every electrified railway uses them but when they are used extra precautions need to be taken to mitigate the hazards.
If you connect the chassis to neutral wire (N) there may be voltage present due to voltage drops in the wires and touching the case may be lethal.
Why can't you use the ground of a second DC power supply as a return? This is probably a really silly question, but I can't seem to find the answer anywhere. Say I have two totally separate DC power supplies running from AC power, and another piece of equipment that requires 12v DC. Why is it not possible to take 12v from one supply, to the device that needs powering, and then take the return to the ground on the second supply? What is it that stops the current flowing? <Q> You mean ... simulate this circuit – <S> Schematic created using CircuitLab <S> There is no potential difference established between the +ve of V2 and the -ve of V1. <S> voltages are not absolute values, they are differences between two points. <S> If you measure the voltage with respect to the unconnected end <S> you would see that there is no voltage across R2 - hence <S> no current will flow through it. <S> If there is a "hidden" connection between the negative sides of the DC supplies, then a potential difference exists across R2. <S> simulate this circuit <A> What is it that stops the current flowing? <S> Air, probably. <S> Most DC power supplies are galvanically isolated . <S> That means they pump charge between their two terminals and aren't attached to anything else. <S> Consider these two circuits: <S> simulate this circuit – <S> Schematic created using CircuitLab V3 is able to develop a current, because it can pump charge around the circuit and through the load. <S> V1 and V2 are not able to develop any current, because they are pumping charge into the end of a wire. <S> There's no place for current to go. <S> The current doesn't flow for the same reason that it doesn't come shooting out of the power supply terminals with nothing connected: air is a poor conductor. <A> Sometimes you can, if they're both grounded power supplies which have a low-impedance connection to a common earth point. <S> If they aren't, then "ground" on one is not at all connected to "ground" on the other, and there is no loop for current to flow. <S> Sometimes they're both supposed to be ground , but are actually at slightly different potentials, which causes all sorts of problems. <S> Especially to audio systems ("ground loop"), resulting in everything from annoying hums to arcing and damage. <A> If your DC adapter has only two plugs, then it's going to be isolated if it meets safety standards. <S> Many don't, and they're quite dangerous. <S> Enough home outlets have the neutral and hot wires incorrectly reversed that it's a massive safety problem to assume neutral is ground. <S> DC adapters with three prong plugs, however, usually tie the DC side ground to the ground pin on the outlet. <S> Usually. <A> If you do not close, you cannot make the power supply to work. <S> A simple way to understand is to think in a simple battery <S> (chemical reaction as we see in school). <S> If just one side supplies current, you cannot maintain the chemical reaction so your voltage still working.
In circuits theory we know that the current only flows in a CLOSED circuit.