text
stringlengths
83
79.5k
H: Building a pseudo-solenoid electromagnet - Heat disipation I am planning to build an electromagnet as shown in the picture below. The copper windings are coiled around a thin plastic cylinder. The goal of the setup is to attract small metal chips floating in water inside the cylindrical space to the inner wall of the plastic tube, and hold them there for a while (>20 minutes). I am aware that the electromagnet is much weaker without a solid core, but having one is not feasible since I want to attract what is inside the cylinder to the walls, and the chips are very small so they should be able to be attracted by the coils without a core. I have found information on how to dimension the wire diameter and length based on solenoids or electromagnet tutorials. However for most applications I have seen the devices are turned on just for a couple of seconds with a low cycle rate (e.g. 2 seconds on, 8 off). I would like to be able to turn the magnet for extended amounts of times, so I am thinking about ways to limit the generated heat Can I limit the current into the coil by placing a resistor before it? If a given coil setup draws 1 A, and I limit that to 0.5 Amp, what would be the ballpark impact on the magnetic force (1/2, 1/10, 1/1000)? Would it be a bad practice to place a fan or two on the coil to keep it cool? Edit: The discussion in the comments has given me another question, what if instead of coiling on the cylinder, I coil it inside and out like in the picture below AND use an iron cylinder instead of plastic? The field will be stronger, so I could limit the current even more. Also the iron would act as a heatsink Are both assumptions correct? AI: Can I limit the current into the coil by placing a resistor before it? Yes you can. A resistor in series with the coil will limit the maximum current taken by the coil. If a given coil setup draws 1 A, and I limit that to 0.5 Amp, what would be the ballpark impact on the magnetic force (1/2, 1/10, 1/1000)? The attractive pull of an electromagnet are governed by several factors: - Force = \$(N\cdot I)^2\cdot 4\pi 10^{-7}\cdot \dfrac{A}{2g^2}\$ F = Force I = Current N = Number of turns g = Length of the gap between the solenoid and the magnetizable metal A = Internal area of coils If current, area and turns are constant, Force is inversely proportional to the gap squared (\$\ell^2\$). Formulas taken from this question. So, if current is halved, the force on the magnetizable material quarters. If I change the material of the tube from plastic to soft iron, will it still generate a magnetic field inside it? No it won't well, not to any great extent because the field lines will converge into the iron and that means virtually no field in the centre. Would it be a bad practice to place a fan or two on the coil to keep it cool? It's up to you. I don't see it as bad practice. Edit: The discussion in the comments has given me another question, what if instead of coiling on the cylinder, I coil it inside and out like in the picture below AND use an iron cylinder instead of plastic? No it won't work because the magnetism will remain inside the iron core and not attract anything external to that core. In other words, electromagnets need an air gap.
H: LM2596 voltage regulator not providing steady voltage I was trying to simulate a 3 phase AC full wave rectifier, and wanted a 5V output. I connected an LM2596 module to turn the rectified voltage into the desired 5V output and ran the simulation in LTSpice. To my disappointment, I found that the voltage was not only higher than the expected output (it was about 6.7V at first), but was also constantly decaying (in 210 ms it went from 6.7 to 6 V.) The rectified voltage was almost totally constant but the output voltage (that is, the voltage produced after being passed through the regulator module) was not, this suggests that there maybe some problem with the module. Is there anything wrong that I'm doing that you can point out to fix this problem? At the same time, suggestions are also welcome for building a 3 phase AC full wave rectifier, with 12 V input and 5V regulated output, without this module in a better way as well. P.S. - Also can someone clear up why my rectified voltage (11.4V) is slightly lower than the input voltage? AI: Just think about how you have shorted out the diodes in the rectifier stage: - Consider V1 (red box) for one minute. On one half cycle it will produce a voltage polarity as shown. This will drive current into the ground connection and that current will re-emerge into the main part of the circuit just below U1. Just follow the purple arrows round and you will see that basically V1 voltage is shorted on each half cycle. Ditto V2 and V3. The problem is that your star point is earthed. Remove it and re-check. Or remove D1, D3 and D5 and live with it being a half wave 3 phase rectifier. I'm not saying this is the only problem but it's the big glaring problem.
H: Turn on voltage when input is grounded I have a new intercom that requires 12V when the ring switch is pressed, but my ring wire does not supply voltage, it just loses its resistance (it is grounded.) What circuit do I need to turn on voltage when the input is grounded? P MOSFET? I am not an electronics engineer, so I would need a complete circuit diagram. I have another wire (for the microphone) which delivers 12V. Maybe I can switch this voltage to the ring when the switch is pressed. AI: To switch a supply voltage to a device by means of a grounded switch, you can use a P channel MOSFET. If the switch is not pressed, then the P-MOSFET is not conducting. Something like this: simulate this circuit – Schematic created using CircuitLab
H: How to prove a system is stable if the characteristic equation have non zero positive coefficients? I read that a control system would be stable if its characteristic equation has got all the terms present and are positive. But I could not find any proof to it. How does one prove it? AI: This is very likely a reference to Descartes' rule of signs. Seems like the statement in the original question should only apply when a polynomial has exclusively real roots. The original statement was already disproven by @jDAQ with a counter-example, where \$s^3+s^2+s+10\$ has two roots with positive real parts, even though all coefficients are positive. Applying Descartes' rule to \$s^3+s^2+s+10\$, we should first see the number of coefficient sign changes (0) and draw the conclusion the polynomial "has 0 positive real roots", which is true (it has 2 right-hand-side complex roots instead). By inverting the sign of odd-powered terms, we then see 3 sign transitions, leading to the conclusion the polynomial "has 3 or 1 negative real roots". Therefore, Descartes' rule gives us two possible predictions on the roots: \$s^3+s^2+s+10\$ has 3 negative real roots (incorrect prediction) \$s^3+s^2+s+10\$ has 1 negative real root and two complex roots (correct prediction) The first prediction would be confirmed for a polynomial such as \$s^3+10s^2+10s+1\$. It has the same coefficient signs as the counter-example and has 3 negative real roots (\$-1\$, \$-8.89\$ and \$-0.11\$). In summary, the original statement from the question I read that a control system would be stable if its characteristic equation has got all the terms present and are positive. only applies in full to polynomials with real roots, since counter-examples with complex roots can be found, as already predicted in Descartes' rule of signs.
H: PWM generation with master/slave timer configuration I am going to generate a PWM with master/slave timer configuration. I prefer that my master timer generates PWM with an interrupt. I need to connect this interrupt to another timer as its input clock to count the number of the pulses. Based on this diagram, what should I do? I enable my timer to generate PWM. Enable timer interrupt for each pulse. How to connect this interrupt to another timer? How to configure it as master and the second timer as a salve? Is it necessary to define these timers as master and slave timer, or is connecting the interrupt as the second timer enough? AI: There is no concept of connecting interrupts each other. You need to connect timers in master & slave configuration. See MMS (Master Mode Selection) bits of TIMx_CR2 register. These must be set to 0b010 (Update), so that the master timer creates a pulse on TRGO (Trigger output) whenever it overflows, in other words, after each PWM pulse it generates. I assume you have made the other settings correctly for the master timer to produce a PWM. Do not enable interrupts for master timer. In the slave timer, see SMS (Slave Mode Selection) and TS (Trigger Selection) bits in TIMx_SMCR register. SMS must be 0b111 (External clock mode 1). And you must also set TS bits according to the master timer you use, which must be one of the ITRx options. Slave timer needs a prescaler of 1 (TIMx_PSC = 0). Set the TIMx_ARR register according to the desired pulse count and enable update interrupt of the slave timer. Slave timer interrupt should be triggered when the desired pulse count is reached. And in the slave timer interrupt service routine, you can stop the master timer. I haven't recently tested these steps and I'm not sure if I missed something or not, but I believe they can put you in the right direction.
H: How hot is too hot for a transformer? I recently ordered a custom transformer and under load with half of its rated current it heats up to 55 °C, and now it's started to radiate a "weez" noise. Is this normal? How hot is too hot for a transformer? How can I get rid of the noise? Pushing it down doesn't help! Update: the iron core was loose (or wasn't tight enough), I returned the transformer to be fixed with a new core. AI: The maximum allowed winding temperature VS. insulation class:
H: SPI communication over different voltage I was working on a PCB design and I am stuck on a question over SPI communication over different voltages. I am using some 74HC595 and 74HC165 shift registers to expand number of GPOIs, running on 5v DC. This will be controlled by an STM32 (STM32F103R8T6), running on 3.3v DC, connected over SPI bus. I read in STM32 datasheet that the GPIOs are 5v tolerant. I was wondering, if I can have different voltages across these GPIO expansion chips and the μCU. Or is there anything I need to take care of? I saw similar questions, but in my case, the STM32 seems to be 5v tolerant: controlling SPI devices using the Arduino - different voltages AI: You need to be a bit careful with the 5V-tolerant inputs as they can only withstand Vdd + 4.0, which will be violated if the 3.3V supply is off when the 5V supply is present. My preference is to use commercial voltage translators (the kind with two supplies and a direction pin) if you can't operate everything from 3.3V (the preferable solution) because SPI generally calls for high speed level shifting. For that reason, the kind of level shifting that uses passive pullups (such as the MOSFET method) is generally undesirable.
H: Is HP 6623A Linear or Switching power supply? I have an HP 6623A DC power supply and i wonder if its Linear or Switching power supply. I see in the manual it says linear, but i still wonder. Why i am asking: I am asking this, becouse after probing my circuit, i noticed noise of 5MHz (680mV peak to peak) when current is drawn from this power supply, and also the amplitide of the noise increased as i increased the output voltage of the supply. Using another power supply which is linear on the same configuration did not produce that noise (i only get 20mV peak-to-peak). Here a picture of my oscilloscope with that noise: And yes, i probed my circuit the right way: EDIT: Added schematic. Also, the supply says Calibration done: 8-Jan-2010, and the next is due to 2011. So it is at least 10 years old, and not calibrated. simulate this circuit – Schematic created using CircuitLab AI: It is definitely a linear power supply. As described in the manual, it uses transistors as linear pass elements to regulate the output voltage. No switching elements are used. As far as noise is concerned, the manual specifies a value of 3 mv P-P for PARD (periodic and random deviation) over a 20 MHz bandwidth. If this is being exceeded, then there is a good chance that the filter capacitors are probably in need of replacement.
H: Could power cycling a modem 24 times a day for over 3 years (>30,000 times) cause the modem to lose its settings? Could power cycling a modem 24 times a day with it being on for 10mins at a time for over 3 years (>30,000 times) cause the modem to lose its setting and revert to factory? This modem. AI: Sure, depending on how the firmware was written it may have worn out the EEPROM (typically good for >100,000 writes). That's not normal operation and they may not have tested for it. On the other hand, a cheaply designed reset circuit and memory protection could result in corruption and therefore revert to defaults from a single upset.
H: Writing function using sigma? Suppose I was given: $$g(w,x,y,z)=(x+ y ̅+ z ̅ )( w+ y ̅+ z ̅ )( w+ x ̅+ y ̅ )$$ Then I can write it like this: \begin{align} g(w,x,y,z)&=(ww ̅+x+ y ̅+ z ̅ )( w+ xx ̅+y ̅+ z ̅ )( w+ x ̅+ y ̅ + zz ̅ )\\ &=(ww ̅+x+ y ̅+ z ̅ )( w+ xx ̅+y ̅+ z ̅ )( w+ x ̅+ y ̅ + zz ̅ )\\ &=(w+x+ y ̅+ z ̅ )\\ &\phantom{=\ }(w ̅+x+ y ̅+ z ̅ )\\ &\phantom{=\ }( w+ x+y ̅+ z ̅ )\\ &\phantom{=\ }( w+ x ̅+y ̅+ z ̅ )\\ &\phantom{=\ }( w+ x ̅+ y ̅ + z )\\ &\phantom{=\ }( w+ x ̅+ y ̅ + z ̅ ) \end{align} From here how can I write the result using sigma? It should be: $$g(w,x,y,z)= ∏ (3,6,7,11)= ∑(0,1,2,4,5,8,9,10,12,13,14,15)$$ But I don't see how we concluded that. AI: Formally this can be easily done using a truth table. But if you feel lazy to fill 16 rows, you can do it in your head in a bit shorter way. Let's take a look at the original expression: $$g(w,x,y,z)=(x+ y ̅+ z ̅ )( w+ y ̅+ z ̅ )( w+ x ̅+ y ̅ )$$ Since it is POS, it will be more natural to work in the \$\Pi\$ notation and "inverted" logic. So g will have the value of 0 whenever either of the three maxterms is zero. So let's start with first term: $$(x+ y ̅+ z ̅ )$$ When is it taking the value zero? It is when \$(xyz)=(011)\$ and the value of \$w\$ is "don't care". That is it is corresponding to the rows \$0011\$ and \$1011\$. That is the rows number \$3\$ and \$11\$. So these are going into the \$\Pi\$ representation. Then you repeat the same for the rest of the terms and complete the \$\Pi\$ representation. The \$\Sigma\$ representation is simply the complementary one (that is you fill the numbers out of the 0-15 range which do not appear under \$\Pi\$ P.S. If you wish you can add more formality to this method and first write down the explicit expansion of each maxterm into a canonical form as you did in the question (plus reducing the identical terms). Then you will have the exact same analysis as above, but for more terms without "don't cares". But I would say it is just extra work without extra benefit.
H: define operation of a specific 555 circuit I'm considering purchasing a pre-made circuit assembly with the following associated schematic: Having looked at a typical 555 device datasheet, I'm unable to confirm the operating mode as the datasheet modes show the Discharge pin connected in some fashion. What I would like the circuit to do is upon application of 5VDC as Vcc, the relay pulses once for the set time controlled by R1, and that nothing further happens. Can someone confirm that this is the operation of the relay or otherwise define what the operation would be? AI: It delays the relay energization after power is applied, because the capacitor is connected to Vcc. Adjustable via the "chronopotentiometry". After the delay the relay pulls in and never drops out. If you connect the normally closed contact in series with Vcc you might have what you want. If you interrupt the power for a short period of time the next delay may not be as long as if the interruption was very long. If you have a very heavy load (or accidentally short) Vcc to ground you might destroy the 555. If your power supply has a lot of current capability and the pot is turned close to minimum time the pot might be damaged. Both issues could have been avoided by a couple of almost-free resistors. It's an "okay, not great" hobby circuit. Edit: As suggested by @James, if you switch the positions of the pot and C1 it should do exactly as you say you want, with similar caveats as mentioned above.
H: Can you use lower GBWP op amps for a filter requiring a higher GBWP by cascading op amps to get a higher bandwidth? I was watching this youtube video EEVblog video on cascading op amps for increased bandwidth , and I was wondering if this can be used for 2-pole filters, including filters that are made up of multiple 2 pole filters? Most 2-pole active filters are made using a single op amp , so for example if I want to use the standard 1 Mhz GBWP op amp , and I am making a 2-pole filter , that requires a GBWP of more than 1 Mhz, can I just cascade multiple op amps together until I get the required GBWP needed? AI: With difficulty. The additional phase shift of the extra opamps can easily compromise stability. Cascading opamps will not help characteristics such as slew-rate which will limit the large-signal capability.
H: What is the minimum current for my load to see TTL? I have an inverter that can output +/- 25 mA. I would like to split that output 3 or more ways, and deliver it to as many loads. So my question is: how many times can I split it before the current is too low to reach a TTL level (5, 3.3 or 2 V)? My loads' input impedance is 8.2 MΩ. So, naïvely, I would say that the minimum current for TTL to be "seen" is I = V/R = 5 V / 8.2 MΩ = 0.6 µA. Is this reasoning too simple? Is it wrong? AI: The datasheet says, (2nd bullet point) that this device can drive up to 10 LS TTL inputs. The number of inputs you can drive will depend upon family, i.e. straight TTL, LS TTL, HCT, etc. My loads' input impedance is 8.2 MΩ. So, naïvely, I would say that the minimum current for TTL to be "seen" is I = V/R = 5 V / 8.2 MΩ = 0.6 µA. Is this reasoning too simple? Yes, your reasoning is too simple. A (standard) TTL input does not act like a simple resistance. It actually supplies current, when the input is low. The circuit driving it is expected to be able to sink that current when it is low.
H: Question about an Intel USB Host Controller power supplied per USB port I had a general question regarding the Intel(R) 82801FB/FBM USB Universal Host Controller (ICH6). The ICH6 has five USB Host controllers in it, with (I'm assuming) two physical USB ports per controller. My Question is, does the ICH6 or any Intel SouthBridge supply up to 500mA per physical USB port, or does it share the 500mA per Host controller between the two USB ports on each controller? AI: If you read the document that you linked in, you'll find that the ICH6 itself does not supply the current for the USB port at all, as there's no pin for that on the chip. Instead, an external circuit is used for that. This is a pretty standard way to implement power to USB host ports. There are several ways to implement the USB power supply, the simplest way is to connect it directly or through a PTC to +5V, like in Raspberry Pi: This way you may draw from the USB port as much as the power supply (or the PTC) allows, and a short circuit will likely disrupt the operation of the host. Or a special USB load switch IC may be used, which can limit the current to some fixed or configurable value and/or may be used to completely switch off the power to that port, like the SY6280 in Marsboard: There are also USB load switch ICs that are able to indicate overcurrent situation back to the host, like the LM3526 in an LPC17xx board: So, how much current you may draw from your USB ports without getting into trouble, and what happens if you draw too much, totally depends on the circuit used to power your ports (and sometimes the software configuration as well), outside your SouthBridge. You may examine your board and try to trace the USB power lines to see what ICs are there (they are usually very close to connectors), and then reading the data sheets might give you some clue.
H: How can I tell which alternative is used in PoE? I need to disable the power over ethernet being output by a device to prevent any damage to routers and switches. After looking more into how PoE works, there appears to be two alternatives to how the power is sent over the wire. Alternative A - Uses phantom power. This method involves sending power alongside the data signals since they are at such different frequencies. Alternative B - Uses the unused wires of a 10/100 cable to send power. I'm not certain as to whether the device is 10/100 or if it supports gigabit connections. If there is a way to discover the gigabit capabilities that would tell me that it cannot be alternative B. I don't have many details on the hardware, as it's part of a larger system. AI: I think this document helps Introduction Basic principles of PoE Power over Ethernet (Page 4) Spare-pair power feed Spare pair power feeds utilize wire pairs that are not otherwise used, the voltage being placed directly on the spare pairs 4/5 (+) and 7/8 (-). This method can be used only on networks with eight-wire cabling. This does not apply to Gigabit Ethernet, because here all eight wires are used for signal transmission and there are therefore no spares. Phantom power feed A phantom power feed has the voltage coupled to wire pairs 1/2 ( ) and 3/6 (+). This method can be used for networks with four-wire or eight-wire cabling. So you can check with a voltmeter, if there is a voltage in pins 4/5 - 7/8 then the method used is Spare-pair power feed.
H: How to determine I2C Master timing parameters I am relatively new to I2C, but I have done much reading on the topic and I am confused as to the timing parameters necessary when designing an I2C Master. I know of this chart from the manual on page 48. However it gives a large range of possible values. For example, I need to set the following parameters for my I2C Master (using a National Instruments program) in Standard-Mode: tSU;STA - MIN = 4700 ns tHD;STA - MIN = 4000 ns tSU;DAT - MIN = 250 ns tHD;DAT - MIN = 0 ns tSU;STO - MIN = 4000 ns tBUF - MIN = 4700 ns tHIGH - MIN = 4000 ns fSCL - MIN = 0 - MAX = 100 kHz How can I calculate the appropriate values for my I2C bus for all of the above? Do you always use the minimum, does it matter how many slave devices there are, etc? AI: Typically, an I2C slave device will work with any master which is no faster than what it is expecting. In some cases there may be problems if the master is too slow, but those are generally only an issue if the master is really slow (e.g. taking multiple seconds to do something which would normally take under a millisecond). Generally, the I2C spec says that for something to be a proper I2C slave it must be able to accommodate a certain speed, and that masters are entitled to assume that I2C devices will be able to either accommodate that speeds or add handshaking to tell the master to slow down. Any typical off-the-shelf I2C slave should conform to the minimum standards for its specified speed, and any typical off-the-shelf device acting as an I2C master should work with any device that conforms to the standards associated with its specified speed. Microcontrollers programmed to act as I2C slaves may not always conform to expected timings (their ability to do so depends in large measure on the firmware installed), but most other slave devices shouldn't pose any problem.
H: Why are capacitor sizes rarely expressed in nanofarads? Many capacitance values occurring in electronic circuits can be conveniently expressed in nanofarads, e.g. "a 10nF decoupling capacitor" . However, the use of the term "nanofarads" or its abbreviation "nF" is often avoided and instead the numerically equivalent terms "10000pF" or "0.01μF" are used. The first term is three characters respectively two syllables longer while the latter is two characters respectively five syllables longer. This seems inconvenient, so there should be a reason for that. Nanofarads are avoided by distributors, e.g. Digikey, Mouser, Farnell, but not by RS; manufacturers, e.g. AVX, Kemet, Wima, but not by Vishay; and engineers, e.g. Robert Kollman from Texas instruments. As an example reference, here is a screenshot from Digikey: Interestingly, resistances and inductances are generally stated without avoiding a particular prefix. AI: They don't. I'm American and I use nano for Farads like any other prefix, which is when doing so would put 1-3 digits to the left of the point. A long time ago, nF wasn't used much for whatever reason. This wasn't a American thing as much as a long time ago thing. I've even seen pF referred to as µµF. Even worse, that was sometimes abbreviated to "mF". Over time these ancient designations have been depricated, and now we routinely use mF, µF, nF, and pF. Other places where high technology meant a metal plow behind your horse while we were using vacuum tubes didn't pass thru this phase. When they got around to learning to spell "EE", the common metric prefixes for powers of 1000 were already in common use. One disadvantage of being early leaders is that you can end up with some baggage when common conventions eventually emerge. I have mentioned this exact issue to some distributors when seeing a dropdown list like you show. They say that there are still a few obstinate old farts out there that get upset or confused when you show them nF and mF, so they avoid those. Time will fix this, and largely already has.
H: Returning Current on power planes? (High frequencies) For a 4-Layered design (Signal-Ground-Power-Signal): I wonder that, I need both bottom signal layer and top signal layer for high frequency signals. I will use both of them for my high frequency signals. So do i have to carry about for my Signal-Ground-Power-Signal design. Do i need to change it as Signal-Ground-(Power+Signal)-Ground because of RF s. if i use bottom layer for high frequency(100 mhz) signals too, is there any benefits of power plane for returning current or it must be exactly the ground plane for returning currents. AI: If you maintain low impedance between PWR plane and GND plane across frequencies of interest, either plane will work fine as a reference plane. That is how high speed boards are to be designed if you don't have a lot of time (man months) to simulate and verify the solution. Remember: Fields can't read. So whatever label you put on some Cu next to a trace, that will be the reference and carry the majority of the return current. With the type of circuit you describe, I will recommend the following. Use a 6L board and do: Sig ~100um prepreg Gnd ~100 um laminate Pwr thick prepreg Gnd ~100 um laminate Pwr ~100 um laminate Sig This is provided you are okay with only 2 routing layers (avoid routing on L2/L5). And yes that may cost an additional 20-30% for the board - but you may easily save that in time spent (provided you value your time). The two Prw/Gnd pairs builds some of the required high frequency bypass that you can't create with discrete bypass caps, which are good up to only 100 MHz or less (remember modern parts will have rise/fall times in the 2-300ps range meaning frequency content up in the GHz range - not sure where you get the 100 MHz from?). If you make a ton of boards and have plenty of time, you can save a bit by going to a 4L board. But with a typical western world cost per hour it's not worth it unless you do at least 10K boards/year in my experience. If you feel you absolutely have to save the money, the trick is to do a Gnd fill on the layer next to the Pwr plane and vice-verse. That builds up a high quality, high frequency Pwr/Gnd capacitor that you then supplement with discrete bypass caps. Use something like my pdntool.com tool to design that mix either way. There are multiple reasons you want to maintain a low Pwr/Gnd impedance over frequency. EMC being just one of them. To sum it up: You need low impedance between Pwr and Gnd for multiple reasons From that follows that both Pwr and Gnd are equally good as return current reference planes If any of this is not clear, please ask. I know I talk about 4 hours about this when I do courses, so it's a big subject. Very important however. As to the other answers you have seen that suggest something else, the challenge is open: Show me a board that fails from following the reasoning I provided. Anytime.
H: What makes a "balanced" audio signal? What is "balanced" audio exactly, and why is it useful? I've read that it means there are two voltages, with one being the inverse of the other. A balanced audio receiver looks at the difference between these, and calls that the "signal". Noise should affect both halves of the balanced signal equally, so the receiver should not see noise as signal, because it does not change the difference between the two halves. But this doesn't make any sense. Isn't an unbalanced audio signal also a difference: the difference between ground and the signal voltage? Why can't we just feed an unbalanced audio signal into a balanced audio receiver and call it balanced? And how does making a second, inverted voltage change anything at all? If we didn't do this, wouldn't noise still affect both halves equally, and still be rejected by the receiver? AI: Balanced audio has the signal on one conductor, and the inverted signal on another conductor. WRONG. Balanced audio has two signal conductors, and a third for ground. WRONG. Either of these things may be true, but neither is what makes balanced audio. Telephone networks until fairly recently were entirely analog, and had only two wires per circuit. There was no ground. Yet, they managed to maintain a relatively noise-free connection over very long distances. Only two conductors are required for balanced audio. An ideal balanced audio receiver is a differential amplifier. It works by measuring the difference between its two inputs, and calling that difference the signal. "Ground" is totally irrelevant. One input need not be an inverted copy of the other input. How could it matter, if a differential amplifier is only looking at the difference between its two inputs? How could it know that one input is "the inverted signal"? Why then, not simply connect one of the inputs to ground? Wouldn't this mean we can make any unbalanced audio into balanced audio just by using a differential amplifier on the receiving end? simulate this circuit – Schematic created using CircuitLab As it happens, no, we can't do that, and to understand why is to understand what balanced audio really means. It's not about having two single-ended audio connections, but with one inverted. It's about having the signal be carried on two conductors with equal impedance. Here's why: the primary objective in using balanced audio is to reduce noise. This noise is picked up by mutual inductance and capacitance with other stuff (frequently: mains wiring) near the audio signal. If the mutual inductance or capacitance to this noise source is equal for our two conductors, then equal voltages and currents will be induced on each conductor. That is, their difference will not change. Thus the noise source, from the perspective of our differential amplifier which only looks at this difference, doesn't exist. Consider: simulate this circuit What's the output here? To the extent that U1 is an ideal differential amplifier, the output is exactly 0V DC. Some of the noise (from V1) couples into the inputs through C1 and C2, but because C1=C2, and R1=R2, it couples into each equally, and thus can't change the difference between the two, so can't affect the output of the differential amplifier. But what happens if R1 is not equal to R2? R1 and C1 now form a different voltage divider than do R2 and C2, resulting in unequal voltages coupling into the amplifier's inputs. Now there is a difference, and V1, to some extent, is found in the output. The same problem exists if the resistors are equal but the capacitors are not. Driving just one of the inputs doesn't change anything. Consider: simulate this circuit Hey that's not balanced! But it totally is balanced. The noise still sees equal impedances to each of the inputs. The noise still couples equally into each input, thus not changing the difference. Thus, it's still rejected. There are two reasons your typical audio connection such as found on an iPod or a VCR isn't balanced. The first is the cable geometry. Usually these use coaxial cables, with the ground as the shield, and a ground-referenced signal inside of it. Because the shape of the conductors isn't even remotely similar, they can't possibly have equal impedance to their surroundings. In terms of the prior examples, C1 and C2 are not equal. The second is how these lines are typically driven. They usually look something like this: simulate this circuit If U1 were an ideal buffer, this would be balanced. But it's not: U1 is usually some sort of op-amp with a small output impedance. Though it is small, it's not nearly as small as the direct connection to ground seen by the other half of the cable. The op-amp's output impedance probably also varies significantly with frequency. A very cheap, and very effective solution to this problem is to set the output impedance with something more controllable, like a resistor. We can put a resistor on the order of 100 ohms in series without significantly attenuating the signal. A practical implementation looks like this: This is from a great article by Rod Elliott (ESP) / Uwe Beis. R2 and R3 do most of the balancing: these resistors can be purchased or trimmed to have very equal resistances. Since they are significantly bigger than the output impedance of the op-amp, the op-amp's output impedance is relatively insignificant. R4 and C1 serve to further render the op-amp insignificant at higher frequencies. Real op-amps have increasing output impedance with frequency, which would serve to unbalance the circuit at high frequency. However, the op-amp's output impedance becomes less significant at higher frequencies as R4 and C1 shunt the two halves together. This topology is not without a few disadvantages. Firstly, since it can't drive both lines, it has half the dynamic range compared to a design that can drive both lines. Secondly, it drives the two signal lines with a common-mode voltage half that of the input signal. The driver must thus drive the capacitance of the two signal lines to their surroundings, like the shield in typical audio cables. However, for moderate cable lengths this is unlikely a problem. The advantage is reduced parts count. Also, if this is on a TRS connector which gets shoved into an unbalanced input, nothing bad can happen, since the ring, which is normally "inverted signal", isn't connected to any active electronics. More importantly, it dispels a common misunderstanding about how balanced audio works.
H: Connecting nine LEDs in series.. why the results? I asked this before but I'm having problems still. I need to connect nine LEDs in parallel with a 9 volt battery. The wire leading away from the 9V separates into three and on each three are three LEDs in series. A calculator told me that if I have 2.25 volt, 28 mA LEDs on each branch I need an 82 ohm resistor. If I have an 82 ohm resistor and 9/82 is .10976... wouldn't my current be too low? I just don't know how to do it. How do I decide which resistor I need to use with an LED? AI: In order to decide the current of the led you need to know the max current specs and select a value below that. In order to calculate a current limiting resistor for a led you need to know the forward voltage drop of the led and the intended current. When you know all these you use the following equation $$ R= \frac {V_{in}-V_f}{I_{led}} $$ Where Vin is the supply voltage, Vf is the led forward voltage drop and Iled is the intended led current. When you connect multiple leds in series then Vf will be the sum of the forward voltage drop of all connected leds. For your specific example Vf=2.25V (for three leds in series 2.25v*3) Iled=28 mA $$ R= \frac {V_{in}-V_f}{I_{led}} = \frac {9V-(2.25V*3)}{0.028A} = 80.36 Ohm $$ If you round the resistor to 82 Ohm $$ I_{led}= \frac {V_{in}-V_f}{R} = \frac {9V-(2.25V*3)}{82} = 0.027A $$ simulate this circuit – Schematic created using CircuitLab
H: How do I increase the output voltage of a simple electro magnet generator I think I know the answer to this already but I can't seem to find this on Google. The keywords are all far too ambiguous apparently. I want to create a electrical flow with a magnet passing through a cylinder wrapped with copper wire. Pretty basic. I want to increase the voltage output. My theory is that if I wound the copper tighter, decreased the width between them and increase the copper on the cylinder that I will get a higher voltage. I haven't tried it yet because I haven't bought the equipment. I am trying to plan it all out before I purchase anything. Is my assumption correct? AI: By Faraday's Law the voltage is proportional to the number of windings and the rate of the change in the magnetic field. So you can add windings, as you mentioned, move the magnet faster or use a stronger magnet at the same rate to increase the voltage. I would look at http://hyperphysics.phy-astr.gsu.edu/hbase/electric/farlaw.html and http://www.electronics-tutorials.ws/electromagnetism/electromagnetic-induction.html for an explanation of Faraday's Law. From wikipedia:
H: Can you overcharge a capacitor with a lower voltage power source? If I have a 5v capacitor and a 3v power source, and I connect the power source to the capacitor will it charge up to 3v then stop, or will the voltage rise above 3v? AI: With a static voltage source, a capacitor in series will charge up until its voltage is the same as that of the source. With a few components you can build a boost converter, which is capable of charging a capacitor beyond the voltage of the supply due to the inductor forcing more charge into the capacitor when the switch is open. Operating a capacitor near its voltage limit can result in reduced capacitance though, and charging it past its limit may destroy it violently.
H: How can I determine if a servo motor is in the commanded position? Once I have set PWM to move a servo to a particular angle, is there a way to detect that the servo has finished moving? I am concerned about situations where the servo is encountering extra resistance and is struggling to reach the desired angle. Why I need this: I want to prevent certain events from happening until the servo reaches the right angle. I also want to be able to time the servo out and report a failure if it doesn't finish. AI: You should take a look at the Analog Feedback Servos. Here is a resource : About Servos and Feedback And if you want to modify a classical servo and get the feedback from it, here's an article about how to hack a classical one. The hack is really easy to realize and your understanding of servos will be better (as all good hacks). Basically, an analog feedback servos (buy as-is or hacked) will allow you to read from the servo the current position.
H: How to avoid a ground loop between pcbs There is an enclosure with 2 separate pcbs. Pcb A amplifies a mV level signal (10Hz to 100kHz) coming from an external sensor. The amplified analog signal is sent to pcb B, which digitizes it and processes it, and contains lots of digital circuitry (fpga, microcontroller, ethernet PHYs, radio transceiver, etc). Both Pcbs get power from a common DC input (star configuration). There was the preliminary fear that the ground loop created by the analog output reference would allow return AC currents to flow from Pcb B back to the power input via Pcb A and that those currents would inject noise at the amplifier's input stage (the sensor is referenced to ground), even though this would be considered when laying out the ground plane in Pcb A, and pcb B has plenty of bulk & bypass capacitance. For this reason the analog output was made (pseudo) differential and goes into a differential ADC in Pcb B. Common mode voltage is kept constant at mid-voltage. Because the system ground is the same, and the ground return current is theoretically minimal, the ground wire was not included, breaking the ground loop. Now it is all built and it turns out that it works fine (very high SNR) with or without the ground wire, it makes no practical difference. My question is what the consensus is of whether this technique of breaking the ground loop is sound or not, even though it made no difference in this particular case. AI: It seems the important point was making the analog signal between the boards differfential. If the boards are close enough to each other, which it seems they are, then a star ground as you have should be good. The danger with a ground loop is that you don't know what path the power return currents of a noisy board will take. You want them going directly back to the power supply via the same connection that the power comes in, but they could flow back thru the other board. That could cause offsets in the other board, which could get onto the signal. I think your non-looped ground and differential analog signal were both correct choices. Just because it may work with a ground loop doesn't make what you did a bad idea.
H: When people talk about a device "drawing" current, what do they mean? Why do devices under load "draw" more current? In my (extremely rudimentary) understanding, the amount of current flowing in a circuit is determined by a) its resistance, and b) the voltage of the power source (voltage from beginning to end), which forces the charge to flow through. Why then, do people talk about a device "drawing" extra current when e.g. a motor encounters a heavy force? If anything, I would expect this to increase the resistance in the circuit, and thus decrease the current that flows through. What say does a load in the circuit have in how much charge is forced through? How can it draw more out? Alternately: where is my understanding of these interactions flawed? :) AI: Think of it as "drawing" extra breath whilst jogging as opposed to walking. A circuit under normal conditions will appear as a certain impedance. For instance, a DC motor operating without a mechanical load will spin at a rate determined by the number of its windings, contacts, permanent magnets etc. As a load is applied to the shaft, the rotor decelerates, reducing the impedance of the windings being contacted. Simplistically, the impedance is determined by the speed (frequency) at which it spins. As the windings are inductive, the reduction in angular frequency reduces the impedance. As a result, the current increases, so it "draws more breath", so to speak.
H: Step down 20V DC to 9V DC What would be the best way to convert 20V DC to 9V DC? Can I use a simple potential divider network and regulate the output? If not, then what's the harm in it? I intend to use the output to power my AVR development board. I've seen people using complex DC-DC converters. What are the advantages of such devices over normal potential divider network? Please help. AI: A voltage divider made up of resistors isn't the best way to drop your voltage because if the current drawn by the load changes, the voltage across it will also change. (Do a basic search on resistor voltage dividers for more.) There are two primary ways to regulate or drop voltage: linear and switching. An LM317 for example, is an adjustable linear regulator which can easily regulate 20V down to 9V provided you aren't exceeding its current rating of 1.5A. From the datasheet, here is a schematic of typical usage: However, linear regulators such as this produce heat, and are not the most efficient way to step voltage down. Switching regulators (or a buck converter) essentially switch on and off at a high frequency and provide regulated voltage with greater efficiency. There are all-in-one packages such as ST's MC34063ECN. I picked this example because it has similar current handling as the LM317, is inexpensive, and is also a through-hole component in case that's what you're looking for. Again, from the datasheet, here's a schematic of typical step-down usage: As you can see, it is a little more complicated, but worthwhile if you need greater efficiency. Finally, don't forget that switching power supplies might be an option. Unless you need to derive 9V from a DC source, you might simply consider a 9V regulated switching power supply that gets power from the mains. Edit: I should also mention that an LM7809 is a fixed 9V linear regulator which would require fewer external components. However its current limit is 1A. An AVR development board likely won't require that amount of current unless you're also powering some external components.
H: Can I drive a low voltage stepper motor with an A4988 driver? I have this stepper motor with the following specs: Model: 17HS4417 Rated voltage: 2.55V Rated current: 1.7A Phase resistance: 1.5 ohms Phase inductance: 2.8Mh Holding torque (min): 40N-cm. Detent torque (max): 2.2N-cm. I want to know if an A4988 stepper motor driver would be appropriate for this motor. I suspect not because the driver specifies an 8-35V rating, while the load is rated for 2.55V. If not, should I look for a driver with a lower voltage rating? AI: That driver will work fine, provided you use a proper power supply. The allegro stepper-drivers are current-limited chopper stepper drivers. As such, you only have to ensure the power-supply voltage for the driver is > then the rated voltage on the stepper, and you have set the current limit properly. Basically, chopper-stepper-drivers actually modulate ("chop") the drive voltage to the stepper in real-time to maintain a fixed coil current. The ratings for your motor are steady state. Basically, it says that if you apply 2.55V DC, 1.7A of current will flow though the motor coil. However, the Allegro drivers don't apply DC, they apply a duty-cycle modulated square wave, which limits the overall power delivered to the motor. Functionally, the driver will vary the applied voltage to the stepper to maintain a fixed current (it's not quite that simple, motor inductance is involved, but it's a reasonable simplification). As such, as long as you're not applying more then 1.7A of current to the motor, it will work fine. Basically, the simple version is the motor ratings are basically constrained by the thermal behaviour of the motor. If you apply too much power, it'll get hot enough to damage the motor. With the A4988 driver board you link, you can vary the motor current by adjusting the tiny pot, which allows you to adjust the motor power to whatever you'd like. If you run the driver off input DC within it's operating range, you will be fine.
H: Gizduino atmega644 + Universal keyboard and display terminal (e-term) I have a clone of Arduino which is GizDuino ATMEGA644 and a Universal Keyboard and Display Terminal (e-term). With this images I connected the terminal to the microcontroller, after connecting that I tried to upload a sample program under the "LiquidCrystal" category "Hello world". After successfully uploading the program there was no display on the LCD and I also tried checking it to the serial monitor but it don't have the output too. I'm confused in searching what is the problem, I checked the com port and the selected board but there was no problem. can someone help me? AI: Parallel vs Serial When you use LiquidCrystal library you have to tell it the GPIO pins that are used to connect to the display. There are two control connections and a 4-wire parallel data connection. However, the LCD display on your E-term communicates using a TTL-level serial link, not a parallel GPIO link. Easy to use LCD display and Keyboard decoder combo that integrates with any controller circuit. The LCD can display up to 80 alphanumeric characters at a time in 4 lines x 20 characters arrangement. The keypad consists of a 0-9 numeric keypad and 6 user defined function keys. Communication with the host is via serial port operating at TTL level. You can't drive your E-term using LiquidCrystal library. Your diagram is small but it shows TX and RX connected to the Eterm, not a set of 6 GPIO pins. Note that, in most Arduinos the same TX and RX are used for USB communication with the Arduino IDE software on your PC. To transfer compiled sketches to the GizDuino+. So you may need to switch the RX connection between USB and E-term somehow. AT least disconnect RX from your E-Term when using the IDE to program the GizDuino+. Power The E-term description says Power Input: 8-12V Display : 4x40 LCD Input device: 0-9 numeric keypad and 6 user defined function keys Note that it requires a minimum of 8V. Your diagram shows the E-term Vin connected to the GizDuino+ Vin pin. This wont't supply 8V if you are powering your Gizduino from the USB 5V supply. You need to power the combination from an off-board supply of between 8 and 12 volts (e.g. 9V 1A wall-wart or battery) Conclusions I'd Ensure the E-term has it's 8-12 V supply connected to a supply of that voltage. Set the serial comms speed to the data rate in the E-term manual. use Serial.print() not LiquidCrystal.print() etc. e.g. void setup() { // initialize the serial communication: Serial.begin(9600); // send text to E-Term Serial.println("Hello E-term..."); } void loop() // run over and over again { Serial.print("*"); delay(1000); }
H: What if we want to clamp/clip current to a certain value or range as we do with diodes for voltage? I have seen diode clamping/clipping circuits and can see that they can work well with such simple construction. However, what if we want to clamp/clip the current to some value rather than voltage? AI: Here are a bunch of constant current circuits that I found while googling "contant current circuit: - This is the classic use of a transistor - the load is in the collector and you set the bias on the base so that there is a certain voltage across R1 - if that voltage is 3.3V then, due to R1 being 3k3, no more than 1mA can be passed to the load. If the LED (or load) tries to take more current than a certain value the lower NPN transistor starts to switch on the reduces the base voltage on the darlington thus current limiting is achieved. This is the classic use of the LM317 regulator chip This is a fairly simple and accurate current limit circuit. The voltage across R2 is held at (V+ -Vref) by action of the op-amp and transistor - this means the load (connected to the emitter) cannot draw more current than (V+ -Vref)/R2. This is the same as (4) (sorry, my mistake) This is very similar to (2) but works with a +V referenced load. This is similar to (4) and (5) but uses a MOSFET as the current limiting element. With voltage limiting the word clamping is often used. With current, the term used is often "limiting".
H: Controller Area Network (CAN), high speed and low speed Is the difference between high- and low-speed CAN only with respect to baud rate values? Is the CAN transceiver programmable for a range of speeds or is it fixed for a specific value? For example, can a high-speed transceiver can be programmed for 500 kbit/s or 1 Mbit/s? What happens when a high-speed node is connected to a low speed node in the same network? Is it possible to get the data? Does it cause error frames? AI: High Speed CAN and Low Speed CAN has difference in Physical Layer implementation. Bosch's CAN standard talks about Data link layer and Network layer but it left out "Physical Layer". (IMO)Reason being, it could be optimizied in Future. Coming to question, High Speed CAN is defined in standard ISO11898-2 while ISO11898-3 talks about Low Speed CAN. High Speed and Low Speed does have differences in Baud Rate. High Speed works from 10kbit to 1Mbits/sec and Low Speed restricts to 125kbps. Another major difference is Termination Resistance. High Speed CAN requires 120 Ohm termination on the bus while Low Speed CAN devices are self terminated (Every Device has Termination). Termination Resistors are to avoid Standing waves which would be significant in case of High Speed and Longer Bus lengths which is not significant in case of Low Speed CAN. Another Difference is High Speed CAN won't work if there is problem in Wiring but Low Speed CAN can work on Asynchronous network as it is terminated/grounded at every node. That's why Low Speed CAN is called as "Fault Tolerant CAN". CAN transcievers can be programmed to ANY value provided ALL devices on the bus are on same baud rate. (See this Question for details) If you connect High Speed Device on Low Speed Device network and if All nodes on bus have same baud rate, This High speed device will generate error frames until you connect a 120ohm terminator. Otherwise there would not be any issue as both have same voltage levels.
H: LM35 negative temperature sensing circuit I'm planning on using the LM35 temperature sensor to measure both positive and negative temperatures. The recommended schematic to measure negative temperatures without a negative voltage supply is this: I understand that the role of the diodes is to lift/offset the negative pin from GND. What I don't understand is: What's the role of the 18 kOhm resistor? AI: A negative temperature is indicated by the LM35 with an output (marked in your circuit as +) level that is more negative than its ground pin (marked in your circuit as -). But the LM35 has no supply of a voltage that is more negative than its ground pin, hence it needs something to create that negative voltage from. That is the current supplied by the 18k resistor.
H: How does a HCF4051BE multiplexer work, at a very simple level? I'm a totally noob, so please, take this in consideration when replying :) I want to understand how this multiplexer works. I tried to Google it, but all the answers was too advanced for me. I mean, whats each pin is for? What happens when I send a sign to pin 'X'? What should I do to use it as a mux (or demux)? AI: If you want to know what it does for you (rather than how it works internally) you can visualize the chip as an eight-position rotary switch, COM OUT/In is the common contact, CHANNEL I/O the 8 individual contacts. The position of the switch is determined by the digital value on the pins A-B-C. The INH input (when active) sets the switch to a 9th position that is not externally connected. In practice the switch is not ideal: it has a non-connectible (and somehwat non-linear) series resistance, it can not handle voltages outside the Vee - Vdd range, etc.
H: Consistency of the mains frequency throughout the UK I'm working with a number of frequency meters which are reading the mains frequency in the UK from different locations. The problem is that I haven't been able to find information on whether there are local fluctuations in the grid frequency due to the geographical location, the local grid or the environment in which the meter is placed. While I expect that there is some level of local fluctuation I have no idea of how significant it is (i.e. is it in the mHz, uHz or nHz range). I'm aware of the discrepancies I would expect to see due to the varying accuracy and precision of the individual meters. The tolerance of the meters I'm using is +/- 1mHz so if the local fluctuation was in the uHz or nHz range I’d consider it to be negligible. My overall goal is to determine if I have a reading on one meter how close will the other meters be reading. Edit: Just to be explicit my question boils down to: When measuring the mains frequency in the UK from multiple locations what, if any, variance exists between measurements if we were to disregard measruement error? And what is the cause of said variance? AI: National Grid (NGET) "Guidance Notes - Synchronous Generating Units" Issue 12 says Target Frequency If a generating unit is required to have a Frequency control device as specified in CC6.3.7 it must also have the facility to accept and act upon Target Frequency instruction from National Grid. In order to adjust electric clock time the Grid Operator may instruct settings of 49.95Hz or 50.05Hz. However, under exceptional circumstances, the instructed settings could be outside this range. A minimum setting range from 49.90Hz to 50.10Hz is required. I suspect Andy's answer is correct concerning local fluctuations within parts of the UK connected to the national grid. See Wikipedia on Synchronisation An AC generator cannot deliver power to an electrical grid unless it is running at the same frequency as the network. If two segments of a grid are disconnected, they cannot exchange AC power again until they are brought back into exact synchronization. NGET Frequency Management includes several interesting graphs that may be relevant. So, if a calamity occurs, you may briefly find that one end of the country is 0.05 Hz adrift from the other end for a fraction of a second. End users might need expensive and well calibrated meters to accurately detect that.
H: ON/OFF safe implementation I would like to know what you think about this. Here's a diagram presenting the main modules of the project. Red is 9V unregulated, green is 5V regulated, black is 5V logic exchanges. I want to turn on/off the circuit. For the moment I'm considering : Switch between the 9V DC source and the 9V rail. Put the µC on a separated 5V rail and isolate the 9V input of the DC Motor driver, keep the microcontroller on standby and implement a soft switch, when pressed he will turn on a transistor and power on the 9V rail of the motor driver and the 5V rail for the other modules. I prefer the first one as the circuit is already pretty much finished (yeah, I forgot the basic "on/off" functionality...) and the first solution don't require too much changes. One of my question is do I need to do something special to make it safe or can I just put the switch in series between 9VDC and 9V Rail ? The second question is, do you have any other ideas, not to hard to implement ? NOTE : I'm more looking for design patterns (not sure if you have something similar in EE) than specific implementation, that's why I've posted the simplified module diagram of the circuit. AI: If this is a battery-powered device then you're probably best putting a hard power switch between the 9V source and the rail to prevent leakage. This isn't an absolute fix - the battery will still have self-discharge and it prevents any standby operation for your uC. Ultimately it does depend on your application. If you need standby operation then you either have to let the 9V source remain connected and active while the uC is in low power mode, or if your power usage is low enough you can put a huge capacitor on the power lines for the uC as a pseudo-battery backup. You'll probably want a diode to prevent the capacitor from discharging into the rest of the 5V rail in that situation. It also depends on what components the uC will need to have access to while in standby - can the IR sensor wake it up? It would need to be powered. Also, it seems somewhat dangerous to include lightning in your circuit :)
H: Arduino sketch not running startup method I am trying to use the WiFly shield ( http://www.sparkfun.com/commerce/product_info.php?products_id=9367) with Aduino Mega board. I am making modifications to the built in examples that ship with the WiFly. I have modified the sketch to make an http request to my personal server. When I run the sketch through the USB port attached to my laptop, everything works fine. I can see the requests arriving at my remote machine. When I try to run the board independently using batteries, I run into issues. Basically, the code in the "setup()" doesn't seem to be running. If I do a reset on the board by pressing and holding the push button on the Arduino Mega board, it also works fine. This proves that there is no error in the Sketch or back end server and that the hardware is also not broken. So basically, when I start up the board via the first start up from a battery power source, it doesn't work. But subsequently resetting of the board using the power button on the mega seems to work. Does anyone know why this is caused and how I can start running my sketch as soon as the battery pack is turned on (rather than having to do a subsequent reset?) I had a look at the Arduino trouble shooting guide here http://arduino.cc/en/Guide/Troubleshooting2 and tried connecting the RX pin to the TX pin as well as connecting the Rx pin to GND via a 10k resistor. This doesn't help either. Edit I am running the sample WiFly sketch provided by Sparkfun from here. I changed the URL in the sketch from google.com to myserver.com and it works fine when running via USB connection to the laptop or after a reset. I have since added a 2000ms delay as suggested in the answer by kmort and that seems to work fine now. So it would seem there are "settling down issues" with the shield. AI: When power is first applied, any values you read could be crazy, and are certainly suspect. Are you making any decisions based on reading values in setup()? If so, it could it be that the rest of your circuit has not settled down yet, and you get interesting bugs because of it. Try a delay() in your startup() and see if the problem goes away.
H: Identification of Power Cable Type I've searched and can't seem to figure out what power cord I need to get for this device. On the back it says: Power: Input --> 100-240V, 50/60Hz Output --> 12V-2A 5V-3.5A Thanks in advance. AI: That's a Mini-DIN6 connector. As for the proper voltage being supplied through it, you'll need to look around online. Should be easy once you know the connector type.
H: 2 logical inputs on the same circuit Is the below a valid circuit implementation and are there any things to watch out for? It's a simplification of the larger circuit but the crux of it is that I need to sink current into two GPIO input pins. The pins are signified by the 1 and 0. Also, would a diode on the pins be advisable? Edit: Here's the non-simplified circuit. The question relates to the 3.3v part of it. In essence, the timer and decade counter sequentially pulse current, 'activating' the transistors one at a time. The keypad is a simple matrix keypad. What I'm wondering if I can do is to put a GPIO pin on the line between the keypad and ground. The intended effect is that, when a button on the keypad is pressed, 2 pins will change state - this signifies the row and column. Note that some of the resistance and capacitance values are notional at the moment. AI: If you connect a uC GPIO pin directly to ground, like you show at point "1" in your first diagram, it will not be much use for anything. As an input, it will always read 0 because it is tied directly to ground. As an output, you accomplish nothing if you drive the output low, and the uC could be damaged if you try to drive the output high.
H: RX/TX led colors I'll place leds on RX/TX to monitor activity. Do you know if there's a kind of convention for the colors of theses ? I've take a look on google but have found nothing. (For now RX Red, TX Green, just to remember myself R ed-> R x) AI: There is a CE guideline for indicator colors: Red - fault, alarm. Yellow - warning, attention. (The are a some specific exceptions: "cut" indicator on RF generators is always yellow.) Blue - working, energized, treatment in progress. (In my experience, blue LEDs catch the eye and look cool, but can be distracting sometimes.) Green - everything else. Serial TX and RX should be both green, or both blue, or one of each.
H: SD card access slows down with many files I'm working on a data logger application using a MSP430F5529 running at 2 MHz and a SD card using FatFs. The SPI interface is already running at maximum frequency. However I am seeing very erratic performance: even with an empty SD card, file creation times start getting slower, to the point that having 100 files in the card sometimes takes almost 10 seconds. In this plot it becomes visible that: I tried with a few different SD cards to the same results. What to do besides increasing frequency? My FatFs configuration (ffconf.h) is #define _FS_TINY 1 /* 0:Normal or 1:Tiny */ #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */ #define _FS_MINIMIZE 0 /* 0 to 3 */ /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ #define _USE_STRFUNC 2 /* 0:Disable or 1/2:Enable */ /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ #define _USE_MKFS 1 /* 0:Disable or 1:Enable */ #define _USE_FORWARD 1 /* 0:Disable or 1:Enable */ /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ /* To enable fast seek feature, set _USE_FASTSEEK to 1. */ #define _USE_FASTSEEK 1 /* 0:Disable or 1:Enable */ /* The _CODE_PAGE specifies the OEM code page to be used on the target system. / Incorrect setting of the code page can cause a file open failure. */ #define _CODE_PAGE 850 // CP850 used for Portuguese #define _USE_LFN 1 /* 0 to 3 */ #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ /* The _USE_LFN option switches the LFN support. / / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect. / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant. / 2: Enable LFN with dynamic working buffer on the STACK. / 3: Enable LFN with dynamic working buffer on the HEAP. / / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN, / Unicode handling functions ff_convert() and ff_wtoupper() must be added / to the project. When enable to use heap, memory control functions / ff_memalloc() and ff_memfree() must be added to the project. */ #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */ /* The _FS_RPATH option configures relative path feature. / / 0: Disable relative path feature and remove related functions. / 1: Enable relative path. f_chdrive() and f_chdir() are available. / 2: f_getcwd() is available in addition to 1. / / Note that output of the f_readdir fnction is affected by this option. */ #define _FS_RPATH 2 /* 0 to 2 */ /*---------------------------------------------------------------------------/ / Physical Drive Configurations /----------------------------------------------------------------------------*/ #define _VOLUMES 1 /* No de volumes a ser usado */ /* 512, 1024, 2048 or 4096 */ /* Maximum sector size to be handled. / Always set 512 for memory card and hard disk but a larger value may be / required for on-board flash memory, floppy disk and optical disk. / When _MAX_SS is larger than 512, it configures FatFs to variable sector size / and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */ #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */ #define _MULTI_PARTITION 0 /* 0:Single partition, 1/2:Enable multiple partition */ /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command / should be added to the disk_ioctl functio. */ #define _USE_ERASE 0 /* 0:Disable or 1:Enable */ /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS / option defines which access method is used to the word data on the FAT volume. / / 0: Byte-by-byte access. / 1: Word access. Do not choose this unless following condition is met. / / When the byte order on the memory is big-endian or address miss-aligned word / access results incorrect behavior, the _WORD_ACCESS must be set to 0. / If it is not the case, the value can also be set to 1 to improve the / performance and code size. */ #define _WORD_ACCESS 0 /* 0 or 1 */ #define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */ #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */ #define _FS_SHARE 0 /* 0:Disable or >=1:Enable */ #endif /* _FFCONFIG */ AI: You are using _FS_TINY. From the documentation: The disadvantage of the tiny buffer configuration is: the FAT data cached in the sector buffer will be lost by file data transfer and it must be reloaded at every cluster boundary. So your micro is spending a lot of time reloading FAT information instead of cacheing it. If you can spare the memory, try the _FS_TINY=0 configuration.
H: How to exit from the if statemet which is inside for loop and go back to the void loop in Arduino My code: #define MAX 10 const int LED1 = 2; const int LED2 = 8; const int LED3 = 4; const int LED4 = 5; int val; int array[MAX]; int counter = 0; int i; int old_b = 0; int error; void setup() { Serial.begin(9600); pinMode(A5, INPUT_PULLUP); } int readButtons(int pin) { int b,c; c=analogRead(pin); Serial.print("analogRead = "); Serial.println(c); delay(100); if (c>1015) b = 0; else if (c>70 && c<76) b = 1; else if (c<128 && c>122) b = 2; else if (c>169 && c<175) b = 3; else if (c>209 && c<217) b = 4; else if (c>247 && c<256) b = 5; else if (c>280 && c<291) b = 6; else b = 0; if (b == old_b) { return 0; old_b = b; } else { return b; stari_b = b; } } void loop() { while ((val = readButtons(5)) != 5) { if (val == 1) { array[counter] = 1; counter++; Serial.print("In "); Serial.print(counter); Serial.print(" saving "); Serial.println("1"); delay(500); } else if (val == 2) { array[counter] = 2; counter++; Serial.print("In "); Serial.print(counter); Serial.print(" saving "); Serial.println("2"); delay(500); } else if (val == 3) { array[counter] = 3; counter++; Serial.print("In "); Serial.print(counter); Serial.print(" saving "); Serial.println("3"); delay(500); } else if (val == 4) { array[counter] = 4; counter++; Serial.print("In "); Serial.print(counter); Serial.print(" saving "); Serial.println("4"); delay(500); } if (counter == MAX) { counter = 0; } } for (i = 0; i < MAX; i++) { if (array[i] == 1) { digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); delay(1000); digitalWrite(LED3, LOW); digitalWrite(LED4, LOW); delay(1000); Serial.print("Executing "); Serial.print(i); Serial.print(" "); Serial.println(array[i]); delay(500); } if (array[i] == 2) { digitalWrite(LED1, HIGH); digitalWrite (LED2, HIGH); delay(1000); digitalWrite(LED1, LOW); digitalWrite(LED2,LOW); delay(1000); Serial.print("Executing "); Serial.print(i); Serial.print(" "); Serial.println(array[i]); delay(500); } if (array[i] == 3) { digitalWrite(LED2, HIGH); digitalWrite(LED4, HIGH); delay(1000); digitalWrite(LED2, LOW); digitalWrite(LED4, LOW); delay(1000); Serial.print("Executing "); Serial.print(i); Serial.print(" "); Serial.println(array[i]); delay(500); } if (array[i] == 4) { digitalWrite(LED1, HIGH); digitalWrite(LED3, HIGH); delay(1000); digitalWrite(LED1, LOW); digitalWrite(LED3, LOW); Serial.print("Executing "); Serial.print(i); Serial.print(" "); Serial.println(array[i]); delay(500); } } } So I have buttons connected like this, except I have them 5. When one of the first four is pressed sketch stores 1,2,3 or 4 to denote which buttons was pressed and stores it in integer array. When the fifth (the "GO" button) button is pressed while loop ends and starts the for loop which according to the buttons pressed blinks LEDs. I want to make that while Arduino is blinking LEDs , that is while for loop is being executed, if at any time the fifth "GO" buttons is pressed it should stop blinking LEDs and start program from the beginning ( void loop { ... } ) that is again wait for the presses of first four buttons. I managed to make this: #define MAX 50 const int LED1 = 2; const int LED2 = 3; const int LED3 = 4; const int LED4 = 5; int array[MAX]; int old_b = 0; int val; int counter = 0; int i; int temp; int L1; int L2; void setup () { pinMode (A5, INPUT_PULLUP); Serial.begin(9600); } int readButtons (int pin) { int b, c; c = analogRead(pin); Serial.print("analogRead = "); Serial.println(c); delay(100); if (c > 1015) b = 0; else if (c > 70 && c < 76) b = 1; else if (c > 122 && c < 128) b = 2; else if (c > 169 && c < 175) b = 3; else if (c > 209 && c < 217) b = 4; else if (c > 247 && c < 256) b = 5; else if (c > 280 && c < 291) b = 6; else b = 0; if (b == old_b) { return 0; old_b = b; } else { return b; old_b = b; } } void loop () { while ((val = readButtons(5)) != 5) { if ((val == 1) || (val == 2) || (val == 3) || (val == 4)) { array[counter] = val; Serial.print("In "); Serial.print(counter); Serial.print(" saving "); Serial.println(val); delay(200); counter++; if (counter == MAX) { counter = 0; } } } temp = counter; counter = 0; for (i = 0; i < temp; i++) { if (array[i] % 2 == 0) { L1 = 2; L2 = array[i] / 3 + 3; } else { L2 = 5; L1 = array[i] % 3 + 3; } if (readButtons(5) != 5) { digitalWrite (L1, HIGH); if (readButtons(5) != 5) { digitalWrite (L2, HIGH); delay(1000); digitalWrite (L1, LOW); digitalWrite (L2, LOW); if (readButtons(5) == 5) { i = temp; } } else { digitalWrite (L1, LOW); i = temp; } } } } So I still have a function which detects if a button was pressed. Prior to that, I have determined in which range are values for certain button. In the while () {...} loop, while the 5th button isn't pressed, Arduino is "looking" if any of first four buttons was pressed. If it was store it in an array and if not keep "looking". When 5th button is pressed, we brake out and store last known place in array in which value was stored and set the place counter to zero so when starting again, Arduino stores values in the first place of array. Then based on that what is stored I determine which pin/LED will light up. If at any time during blinking LEDs 5th button is pressed again, Arduino stops the blinking and again waits for the presses from first four buttons. That is how it is supposed to work in theory. In practice I still can't get it to stop blinking every time 5th button is pressed again. I have to press it multiple times, sometimes two or sometimes even more times. I don't think using interrupts will help, since I don't know how I could use them in my problem. AI: Are you sure you need to exit at ANY time wherever the execution pointer is? Normally, you could just check the button press at the end of the while and for loops and call return when it is pressed. Sometimes we think our program has to do something and break out of execution, but upon careful examination, we conclude that it can finish one loop interation and then quit. Could you tell us what's done inside the loops, so we can make sure what's needed? Edit: As I suspected, the problem with your program is that your delay intervals are too long, e.g. delay(1000) and delay(500), and you can't check for button presses while the program is waiting. To fix that, create the following function, that will replace your calls to delay: // waits for the specified miliseconds // or return (almost) immediately if button is pressed // return value indicates whether button was pressed or not boolean waitOrButtonPressed(int miliseconds) { for (int i = 0; i < miliseconds / 10; i++) { if (readButtons(5)) == 5) return true; delay(10); } return false; } Then, inside your for loop, replace your calls to delay(1000) by the following code: if (waitOrButtonPressed(1000)) return; The function I created will make your program wait almost like delay(), but will return true if a button was pressed during that time. If that happens, the if statement above will exit loop() which will be called again by the Arduino generated code. Remember to keep the miliseconds to wait when you replace your calls to delay() to keep your program waiting behavior unchanged. Edit 2: Ramblings Cases like this remind me of the movie Tron, in which the main character is dragged into a computer, where time passes much slowlier than in real life. So, like in the movie, 1000 miliseconds (1s) is a LOT OF TIME for the MCU. You can do a whole lot more than waiting in that time. Try and break up the long Waits and do useful stuff with your MCU cycles. Also, learn how to use interrupts, like others mentioned in their comments and answers. It's just another (a bit more complicated) way of doing stuff while you wait. In your case, interrupts could be use to detect the button press without the need to check it everytime everywhere. Here's a place to start learning about interrupts with Arduino.
H: 12v LED Strip Lights controlled by PIR *Want to add LDR to project* I want to add an LDR (Light Dependent Resistor) to my Motion activated stair lights, then On/Off switch can be removed as well as the single Led (On Indicator Only) from my project (I want the LDR to control the On/Off). This is basically the first project I've done, so if someone could explain/show me what I need and how to set it up that would be great. Also, does anyone know of a great place for a beginner to learn about electronics? I would love to be able to build my own projects with out asking for help, thanks. This is what my PIR LED stair lights look like This is the link to video of the system working My Video AI: Update based on the use of the CDC (photocell) input already on the board (as discovered by the OP) The schematic of the PIR board you refer to is similar to the following It shows that the CDS pads (Cds2 in the schematic) connects to pin 9 of BISS0001 According to the datsheet that pin is: Trigger disable input (VC) VC >0.2Vdd=enable VC<0.2Vdd =disabled) Vdd supplied to the chip is 3.3v (from the 3.3v onboard regulator) so if you apply voltage >0.66v to that pin the controller turns on, if you apply <0.66v then it turns off. One of the CDS pins is already connected to ground,the other one is connected in series with an onboard resistor of 1M Ohm to the 3.3v supply. The CDC and the resistor form a voltage divider, if the CDS sensor has a resistance of 250K or higher the controller will turn on, if it has <250K then the controller will turn off. You just need to find an appropriate CDS or add an external resistor to adjust the switching point. The LDR (Light Dependent Resistor) has a resistance which increases in darkens and decreases with light. Using that property you can connect it in a voltage divider to drive the base of a NPN transistor and turn on/off a load based on the room brightness. Such a circuit that turns on at darkness looks like If you are looking for the opposite effect you can use Note that Vin is the positive supply line You can replace the 500 Ohm resistor and led of the above circuits with a relay that replaces your switch. Images from http://www.reuk.co.uk/Light-Dependent-Resistor.htm
H: Use AC-DC adapter instead of AC-AC adapter I'm building an O2 amp, which according to the designer requires an AC-AC adapter (Triad WAU 12-200) to convert regular wall power to 12VAC. By looking at the schematic for the amp however, it seems that I might be able to use a regular AC-DC converter (also 12V) instead. According to this site, an AC-DC adapter uses a transformer to stop down the voltage, rectifier diodes to make the current DC, and caps/regulators to smoothen it. Now, the datasheet for the WAU 12-200 shows the following as the adapter's schematic: (Credit: Triad) It would seem that the WAU 12-200 merely acts as a simple transformer. Meanwhile, the following equipment is present inside the O2 amp: (Credit: NwAvGuy) After entering the O2, the AC power goes through a set of diodes and caps/regulators just like what would happen in a AC-DC adapter. Not that I don't plan to use batteries in the amp at all (strictly wall powered) so the "battery power" section of the amp in the schematic should be omitted. I've got a 12V AC-DC adapter that delivers 200mA (same as the WAU 12-200). Is it possible for me to omit the diodes and caps on the O2 board and feed it 12VDC power instead? AI: First of all the 7812 (positive voltage) and 7912 (negative voltage) regulators need about 2v higher input than the output in order to operate properly (that is at least 14v for the 12v regulator and -14v for the -12v regulator) . The AC voltage in the input is rectified by two diodes to generate a symmetric unregulated supply (that is a positive and a negative voltage with reference to the ground) which feeds the regulators inputs and you get +12v and -12v regulated rails at the output. If you feed the input with 12v DC there is no way for the circuit to generate the negative rail voltage so this can't work. Here is a link that explains the operation of the diodes in the circuit you show http://metroamp.com/wiki/index.php/Half_Wave_Voltage_Doubler I've got a 12V AC-DC adapter that delivers 200mA Depending on the internal implementation of the AC-DC adapter it may be possible to use it. If it is the classic transformer type rather than a switching type (you can easily judge it by size and weight) then you can omit the output circuitry (you'll need to open the adapter case to do that) and connect the AC output of the transformer to the AC input of the O2 power supply circuit.
H: How does the pull down resistor work in this circuit? Here's an image from another question: I get what the pull down resistor is there to do, but I don't really understand exactly how it works. When there is no voltage applied through the base wire, why does any induced current then go through R2, but when a voltage is applied, it goes to the transistor? My understanding is that voltage always follows the path of least resistance, so if applying say, 5v turns the transistor on, that means that the transistor has a lower resistance than R2, so I would also assume any induced current would also flow through the resistor - so why does it then go through R2? AI: I've seen some comments here stating that the pulldown is needed to keep the transistor turned off, instead of floating, or for noise reasons. The base pulldown does in fact help keep the transistor off, but no one has answered why. This is why I chose to answer, rather than extend the comments. User alexan_e is thinking correctly about it, so I'll elaborate here. There is a Miller capacitance between the collector and the base of all BJTs. Most designers know all too well about the MOSFET's Miller Capacitance and forget that the BJT has some as well. The BJTs Miller capacitance provides a leakage path from collector to base, injecting charge carriers into the base region, which can be amplified by the BJT's Hfe (gain). This allows noise current to flow from collector to emitter. The inclusion of the base pulldown will provide a path to ground to discharge the Miller capacitance and keep the BJT hard off and noise free.
H: Smallest Voltage that a comparator can detect What is the smallest voltage a comparator can detect? Is it possible to set the reference voltage to a few millivolts, just above the noise margin for using a comparator circuit? AI: The smallest voltage difference that a comparator can detect is a moving target: New comparators with increasingly low offset and hysteresis voltages are released by manufacturers from time to time. For instance: Texas Instruments LMP7300 has a worst-case offset voltage of 0.75 mV, and an adjustable hysteresis down to 1 mV/mV. Analog Devices AD790 has a 0.25 mV worst-case offset and hysteresis of 0.5 mV The question appears to have an ambiguity on desired specifications: Setting of reference voltage is essentially independent of the noise margin budget, and dependent on the maximum guaranteed input offset voltage. The reference can go down to the ground rail, or single-digit millivolts above it, in many comparators. The acceptable noise margin on the other hand is addressed by the comparator's hysteresis, and as indicated above, this can be fractional milliVolts. Thus, if one were to surmise from the wording of the question that the application requires comparator functions with a reference at the ground rail (0 Volts) and a noise margin of single-digit millivolts, comparators from many major manufacturers easily meet these criteria, such as the ones listed above. For more stringent requirement specifications, a low noise preconditioning stage is often used, which may raise the signal bias point and / or provide buffering or amplification of the source signal. The problem then becomes one of minimizing noise in the preconditioning stage. Nanovolt signals such as in medical equipment are commonly handled using such preconditioning, largely freeing the design from comparator constraints.
H: Conditions for page write in EEPROM I have learned about page write operations from App notes and data sheets of EEPROM chips.But i want to clear certain doubts. I have an EEPROM chip which got 32KB and 64B Page Size. 1.Can i Write less than 64 Bytes? Say n Bytes If yes then What happens to the remaining locations(64-n) in case of Page write?(Will it Stay OxFF or turns 0). This is the EEPROM chip 24LC256. AI: I'm not sure you realize what are the implications of an eeprom page. Here is the 24LC256 datasheet One option to fill it is to write individual bytes. Using that mode you send the eeprom byte address for each byte you want to write so the page location poses no limit. An alternative option is to write a block. The size of the block for the particular device is 64 bytes so the pages boundaries are 0-63 64-127 128-191 .... When you write a block you only send the memory address once and then send the bytes to be stored. The address increments internally for each new byte. The page writes can only be used inside the boundaries of a page, what you reach the page boundaries you have to stop and start a new write sending the address again. If you start a block write from an address that is near the end of the block then you can only write a few bytes until the end of the page rather than 64 bytes. For example If you start a block write from eeprom address 126 then you can only write two bytes, in locations 126 and 127. If you keep writing bytes then the address rolls over and overwrites the start of the block (in this case 64, 65..) In any case values of any eeprom location where a write or erase action hasn't been performed maintain the existing value. So for your question Can I Write less than 64 Bytes? Sure you can either with individual byte writes or with page write but withing the page boundaries which will be (0-63, 64-127...) If yes then What happens to that locations?(Will it Stay OxFF or turns 0). Is I explained earlier values in location where a write or erase cycle hasn't been performs maintain their existing value. Usually unwritten eeprom have 0xff written to all byte locations so this will be maintained.
H: Power demand calculation The title says it all. I'm currently working on an Arduino project. The project involves connecting 3 - 6 different shields non which is a "Motor Shield". They are VR, brain wave reader, GSM, GPS, TFT screen, and a camera. What is the right way to calculate the power needed to be supplied to the total project by batteries? What I know is that I have to calculate the amound of current withdrawn from each module in their highest peaks. Accordingly, I will choose the capacity of the battery that can operate the the amount of time I want. Is this the way it is done? Or am I missing something? Is there any other concerns I have to keep an eye on? Regarding the voltage, It shouldn't matter right? The shields are made specifically for Arduino, so if I powered it in the recommended range of voltages (7-12) I should be fine right? AI: Current Yes the right way to calculate current required is to work it out for each module and add them up. However, if you are combining Arduino modules, a practical way is to assemble them, power from a relatively high power source and measure the current. The only danger here is that you'll overload the Arduino's 5V or 3.3V regulators. I'd check that the specific Arduino has overcurrent or short-circuit protection. Rather than measuring for all 5 daughterboards at once, you may be able to devise test programs for using them one at a time. Make measurements, then check the power supply path is adequate before combining all of them. Voltage The voltage regulators on a typical Arduino are not expected to supply much current. See Arduino and/or regulator data sheets. As Ignacio commented, it may be advisable to provide for an off-board regulated 5V supply.
H: fgpa timing constraint on enable signal I have a question regarding setting timing constraints on enable signals. In my vhdl design I use an enable signal, to gate when the process needs to sample my input data. The enable signal is derived from the input data, using another vhdl component. My clk is 27MHz, but the enable signal is maximum present at every 2nd cycle, so its period is minimum: 1/13.5MHz. When I compile my design, I get warnings on the clk timing constraints, due to my algorithm. But can I make some timing constraint on the enable pin, this could probably make the vhdl code compile without warnings, by effectively only requiring half of the clk period. test : process(reset, clk) begin if reset = '0' then ... elsif rising_edge(clk) then if en = '1' then ... vhdl algorithm is here ... end if; end if; end process; AI: If you can guarantee that your enable will never be present faster than a particular rate, you can use a multi-cycle path constraint to tell the tools this. You don't say which FPGA family you are using, but searching the vendors helpfiles for multi-cycle should get you the information you need. Having said that, in my experience these constraints are hard to verify. Checking that only the right logic is covered by them is hard, and if some additional logic gets included by accident, the design has a latent timing violation that is unknown to the designer. So unless I have no other choice, I tend to aim for clock-speed improvement (for example using a better synthesiser, or pipelining, or..). Then I can run that logic at full speed, even though I don't have to, and I don't have to worry about validating complex multi-cycle path constraints.
H: What does this symbol indicate (line with brackets)? I'm modelling a power system, and encountered a few symbols I have never seen before in a single line diagram. I believe the first one is a switch with three possible position. Closed, open and grounded. Is this correct, or am I wrong? I haven't got a clue what the second symbol indicates? It must be some sort of feeder, but what is the purpose of the brackets? It doesn't appear in the tables for either IEC or ANSI. Has anyone seen this symbol before? AI: The first symbol is a switch-disconnector with integrated earth switch. They are quite common in medium voltage switchgear. You are correct in saying that it can be either 'on', 'off', or 'earthed'. The second symbol doesn't appear in any of the thirteen parts of Australian Standard AS1102, Graphical Symbols for Electrotechnical Documentation, a.k.a. IEC 60617, Graphical Symbols for Diagrams. Which is to say it's not a standard symbol used around my part of the world, or in Europe. EDIT 2014-04-14: It's bus duct. For those wondering why you would want a special, dedicated switch to earth something - it's a safe electrical work thing. Tying the busbars to earth is a way to ensure that the equipment is de-energised before you go poking around inside it. This is important for the continued well-being of the electrican doing the poking, as electricians are not rated to withstand 690 V. If the earth switch is applied, then all the busbars are guaranteed to be tied to earth, therefore at zero volts, therefore safe to touch. The earth switch is a further level of protection above opening the circuit breaker and padlocking it open (which is also standard practice.) If the circuit has multiple feeders, then earth switches are applied on all of them, so that you are "working between earths". If there are no earth switches, then you have to apply portable earths, which are big jumper cables with clamps on the end - one end goes on the busbar, the other end goes on your closest earth bar. These aren't as good, because it's entirely possible you can forget to take off the portable earths when work is completed. This results in a "bang" when the equipment is re-energised. EDIT - 2014-01-23: Some further notes on "working between earths" - Overhead line work should always be done "between earths", even if you are on a radial-feed system and the other end of the overhead line and couldn't possibly be energised. This is because the overhead line could be struck by lightning, or could have a voltage induced on it from an adjacent line. In all other situations, if possible, you should be able to see, within your visual range, the point where you have earthed the thing you are working on. This is important because it's quite easy to earth the wrong thing (especially when you have a tray full of 10 identical-looking cables.) You want to be able to see that the correct thing has been earthed, and also that some knave hasn't taken your earths off while you weren't looking.
H: AT89c51RE2 replaced with AT89LP51RD2, ISP programming have a question I can't seem to figure out the answer to. We have existing boards running off the AT89c51RE2 processor. Works great because it supports In-System-Programming. This means we can use BatchISP to program them very easily while they're already socketed on the board. The issue is, we are now trying to switch to the AT89LP51RD2 and it would seem it supports the same ISP programming, but I can't seem to find anything as far as devices to add to Flip or BatchISP in any way. If I try to just change the device parameter it obviously says that it's not a recognized device because it doesn't know what it is. If I just run the existing batch programmer it connects, opens ports, erases, reads buffer, but then when it tries to program the HEX file to the chip it fails. Any information in this area would be a huge help. I thank you for any advice! AI: The AT89C series ISP takes place over UART and uses Flip or BatchISP to program. The AT89LP series ISP takes place over SPI. See this app note for programming the AT89LP series. There is a whole different line of tools for those chips available. Have a look at AT89LP ISP Studio instead. Or possibly AT89LP Developer Studio. I found the following note on terminology used for this series of chips in the datasheet (page189): Note: In this document the term Bootloader, or BOOT, is used to when referring to the UART-based ROM bootloader and In-System Programming, or ISP, is used with reference to the SPI-based interface. This is different from AT89C51RD2/ED2/ID2 where ISP also referred to the bootloader (as no SPI programming interface was present). However, it should be noted that both interfaces are perfectly capable of performing in-system programming, i.e programming the device when it is already mounted in the final end-user system. Flip (and presumably BatchISP) can be used when accessing the Bootloader through the UART. But AT89LP ISP Studio must be used when programming through the SPI.
H: Symmetric power sockets – design considerations in electrical devices There are various single-phase power socket standards in use. Some countries use plugs that can be plugged in the socket only in a specific orientation (for example, the United Kingdom) while other sockets accept the plug in either orientation (for example, Germany). British plug: German plug: Do engineers have to account for this fact when designing electrical devices? Could certain designs be simplified if line and neutral always were clearly defined? AI: No, there really isn't any significant simplification possible. When you interface to the power line, you have to make your design as robust and fail-safe as possible, in order to avoid product liability issues. Even if the design of the wall socket permits only one physical orientation, there are enough mis-wired wall sockets out there that you really need to treat both Line and Neutral as "hot" inside your product.
H: control H Bridge using PWM I wonder, if I can control the speed a motor by applying PWM on VCC pin at H bridge, not at control pins. I try to do this with an Arduino microcontroller but the output will always be 5 volts! AI: H-bridge usually has 3 pins for every motor. 2 pins are used for control, the third is normally labeled "E" which stands for Enable. If you want to control the direction of rotation all you have to do is change the logical inputs to the 2 control pins. While on the other hand to control the speed of rotation you have to connect the Enable pin to one of the (PWM) pis on the arduino. The Top left and bottom right switches are connected together for 1 control pin. While the top right and bottom left switches are connected together for the second control pin. As to control the speed, look at the following table: Now If you want to control the speed, all you have to do is connect your Enable pin to one of the (PWM) pins on the arduino. In the arduino IDE write the following: analogWrite(PINNUM,***) Subs "PINNUM" by the pin number by which you've connected your Enable pin. As for "***" write a number between 0-255 Note 255 is equivalent to applying 5v directly which will result in the max speed. Note: 0 is equivalent to applying 0v directly which will result as stated earlier in switching the motor off. Any value in between will change the speed.
H: What exactly gets "worn out" and damaged by heat? It's quite common knowledge that heat is bad for electronics. That constantly high temperature decreases the expected lifetime of computer parts even if they are not overheating per se. If, for example, there's dust insulating a component in a PC, "cutting it off" from the usual airflow. What is it that experiences higher "wear" on higher temperatures? I've seen liquid capacitors mentioned as parts failing faster the higher their operating temperture is, because of pressure building and resulting leaking. Is that correct? But surely, there are many things else? Could you name some? AI: There are really two different types of temperature stress, cyclying and sustained heat. Just about any part is susceptible to failure from large number of temperature cycles. Each different type of material in a part expands and contracts at different rates. Of course packages are designed to accomodate this, and materials are chosen or specifically formulated for common thermal expansion responses, but stresses occur nonetheless. Eventually those stresses being applied back and forth enough times will break something. Sustained heat is different. Silicon stops being a semiconductor, and silicon transistors therefore stop working, at around 150°C. Heating a IC to that temperature won't directly hurt it, other than it won't work as intended. However, that "not working as intended" could include excessive currents, which then cause more heat. Eventually something melts and the part is irreversibly damaged. Some chips, like modern processors, have such high density that failing to get rid of the heat for even a few seconds from the die can cause something to melt. Consider the size of a high end processor die compared to the end of a soldering iron, and then consider that there can be 10s of Watts dumped into the die, and that the soldering iron gets to solder-melting temperatures at that same power level. Getting rid of heat is a major issue with such chips. That is why they come with integrated heat sinks and fans nowadays. Take off the heat sink and fan, and your processor is toast in short order. Or, it shuts itself down to protect itself. Either way, your PC isn't going to run. Electrolytic capacitors are different from most other electronic components in that they inherently go bad over time. Heat accelerates this. Running a electrolytic cap at 100°C, even without cycling, will degrade it much more rapidly than at 50°C.
H: How is the gain/phase vs frequency measured for opamps? Opamp manufacturers post graphs like these in datasheets: How is the data for this graph measured? Is it calculated using the mathematical model of an opamp? AI: The trick to measuring open loop gain and phase for an op-amp is getting the dc conditions just right. If this isn't done correctly the output amplitude can drift off to any dc value and clip the signal thus making the measurement invalid. So, in order to do this one method is to apply dc-only negative feedback of a small amount so that the output voltage stays roughly mid-rail (with the "real" signal superimposed on top). The effect of applying dc-only feedback invalidates (to a certain extent) the low frequency response but this isn't a problem because most of the "interesting stuff" occurs above 10Hz or 100Hz (dependent on the op-amp you are using). The output signal will contain a fair amount of distortion but this can be filtered, usually with a spectrum analyser or a computer using fourrier transforms. This allows the fundamental frequency to be measured in amplitude. The same sort of filtering is applied to the input in order to determine phase relationships between input and output. Thus input and output are "delayed" the same amount allowing accurate phase measurements to be undertaken. The methods described above are just a simplified form of the techniques used and doesn't imply that all manufacturers use the same technique.
H: Electric toothbrush charging time I replaced my old Ni-Cd 1.2 volt sub-c battery (1500 mah) from my electric toothbrush to a new Ni-MH battery 1.2 volt sub-c (3800 mah). I looked inside the toothbrush and it look like there is no circuit that control the charging time of the battery, meaning I could overcharge my battery if I do not unplug the battery charger. My battery charger specification is: Manufacturer: ROTA-DENT Model Number: GS-270 Input Voltage: 120V AC 60Hz 5W Output: 1.45V DC 120mA My question is: How much time should I let my battery charger work when my battery is empty and or is there a way to know when the battery if fully charge? Thanks P.s.: There is no visual aid on the appliance that give information (no l.e.d. light indicator, nothing) AI: A NiMH battery charged at 1/10 of its capacity takes about 14 hours, that is a 1000mAh battery charged at 100mA needs about 14 hours. If your charger current is indeed 120mA then it will take \$ \frac{3800mAh}{120mA} \times 1.4 \approx 44 hours \$ Charging a NiMH battery this way is not the best (plus the specified current is very low for the capacity you have selected) but I see no alternative. For more info regarding the NiCD and NiMH batteries you can read: http://batteryuniversity.com/learn/article/charging_nickel_based_batteries http://batteryuniversity.com/learn/article/charging_nickel_metal_hydride
H: switch between battery and usb power no microcontroller circuit Following an earlier question about how to switch between battery and USB power, I would love to implement the TC2014 LDO as suggested by Russell McMahon. That way I could switch between 4AA batteries (1.2V*4 or 1.5V*4) and USB power. The battery voltage would nicely be regulated to 5V too. And the idea was to use the shutdown pin of the chip IF USB power is detected. The device also has to work when no batteries are present. I am not too experienced with this, but I thought to connect the 5V from the USB to the SHUTDOWN pin from the LDO chip. Pitywise, the pin function is inverted, if SHUTDOWN is low, Vout from the LDO chip is low. I am now considering using an XOR gate to make the thing work: simulate this circuit – Schematic created using CircuitLab I would love to limit the amount of components, but the number of diodes is already high, and the whole thing feels a bit crafted My questions: Is there a better suitable chip (with an inverted shutdown pin) is there a better circuit (without voltage drop) to get this (I would prefer to get rid of D1, but then, the XOR has no desired operation) AI: How about using an alternative circuit like this: Q4 is a P-mosfet, kept off when there is a voltage in the main supply (USB in this case). When the main supply is disconnected the gate is pulled down and the mosfet conducts and provides output from the battery source. The diodes are Schottky type for low Vf and the mosfet should apparently be selected to have a low Vgs-th to turn fully on with the battery voltage level.
H: Where can I find the datasheet for an DGL-0401YG-4EH LCD display I recently bought a "goodie bag" or whatever it is called with a lot of different displays in the bag. I figured it could be useful someday or just to play around with. However it seems that the datasheet that was supplied didn't cover all the displays. All I got was this: http://www.kemo-electronic.de/datasheets/s043.pdf The component I have though seems to be a DGL-0401YG-4EH Now I don't know how to actually get anything on that thing... so my questions is. Is there a generic way to handle LCD displays or do you need a specific datasheet for each one? If it is generic then where do I find a good place to start learning how to use it? If not then where can I find the specific datasheet? AI: From the picture you supplied it looks like a basic LCD (no drivers etc.) and one thing you can find is what the content of its capabilities are - try lightly pressing on the screen and get, in your minds eye, a picture of what the LCD can display. Hey, if you press too hard it'll bust but you can't make an omelette without breaking an egg or three. Without knowing what it can display = no use to anyone so, try the pressure test and establish what it's capabilities are then, using a 1.5 volt battery on flying leads, go round each pin in turn and see if you can get any of the segments to flicker. More than likely there will be one (or possibly two) common pins that one battery terminal can connect to that "illuminates" several or all segments. Establish this and you are nearly there - find a driver chip (plenty about) that interfaces with a "raw" LCD and that's just about job done. You don't really need a spec sheet - you just need a pin-out and a visual map of what the device can display. If you are interested in stuff like how it performs at 70 degC then this is more difficult to establish but only you can tell us that.
H: What design testing can I do before fabbing a PCB? I'm an EE graduate who enjoyed the first taste of designing and fabricating hardware. My first board was a really low speed microcontroller board using mostly DIP and through-hole components, like something straight out of the 80s. It's very easy to translate to a PCB from a breadboard using these packages, but they are large and cost per square inch is very high for single-digit run project boards. To cut down on costs I designed a board using solely SMT components which was far more compact (as well as complex) than any other previous board I've made. I'd like to verify as much as possible that my designs work before spinning a board so I don't waste my limited budget (and have to delay for the new boards). What verification practices should I use, besides making a breadboard facsimile, when making a (low speed) PCB? Up until now I've just made sure everything was routed, passed DRC and ERC and hoped the board works. I feel like there's more I should do. AI: My answer is more for obsessively checking your first (or second) personal "low speed" PCB rather than verifying your design. Make sure your DRC is checking for off page connectors Print out the datasheet pages for each IC/transistor etc and go through with a highlighter and verify every pin against the pin on your schematic. Do the same obsessive check with your layout Check all three pin devices like transistors against their diagram in the datasheet make sure that the pin numbers on your PCB are correct. It's easy to do these SOT-23 style devices wrong ( I usually draw a diagram for my layout guys). Do a similar check for polarized components, did you get diodes correct and are they marked which way they go in? What about polarized caps? Is this a four layer board? No? It probably should be :) signal-gnd-power-signal Even at low speeds this will help you. Sometimes you just gotta go 2, but do it because you know the consequences or that it won't hurt you. Open your gerbers/drill in a gerber viewer like the free GC-Prevue, now print them to a laser printer 1:1. Order your more complex parts and see if they fit on paper. Is it perfect? No. Will you catch using the wrong footprint or wrong spacing? There's a good chance of that. What did you do for power did you verify your regulators can supply enough current? How about how much heat they will burn off trying to do it? How about power dissipation for a linear regulator or switchers fets. You want to make sure you don't burn them up. We could go deep into the power section but I'll leave it at that. Sounds like your design is cost conscious, consider only mounting parts on the top of the PCB. It will save a whole step during automated assembly if that's where you hope to get to, and that will lower the price. Make sure your gerbers files are clearly labeled for the fab house, a drawing usually helps showing what layer goes where, some people go as far as labeling the layers in copper to make sure it's done right. If possible have someone else review your schematic and pcb, peer review, peer review. Have your 30 Gauge rework wire handy for when the boards come back, I like to use blue for rework :) The list goes on but I'm tired and I hear the baby crying :) Hope some of that helps.
H: MQ5 Gas Senor module - How to Callibrate I have just bought MQ5 Gas Sensor module for Arduino, (http://www.dhgate.com/product/100-pcs-lot-gas-sensor-module-mq-5-lpg-natural/133345721.html) According to the Data sheet, "Resistance value of MQ-5 is difference to various kinds and various concentration gases. So, When using this components, sensitivity adjustment is very necessary. we recommend that you calibrate the detector for 1000ppm H2 or LPG concentration in air and use value of Load resistance ( RL) about 20 KΩ(10KΩ to 47KΩ)." It says to calibrate the detector to 1000ppm. What is meant by ppm here ? is it the resistance ? Also, There is a knob through which i can very the resistance, but how am i supposed to know what is the current value of the resistance when i am changing it ? Datasheet link: http://www.dfrobot.com/image/data/SEN0130/MQ-5.pdf AI: The ppm is parts per million so it is recommending calibrating using a gas that contains 1000 parts per million of the gas the sensor is detecting. There are products called "calibration gas" made for this specific purpose. For example a Google search for "hydrogen 1000 ppm calibration gas" yielded the following result: Calibration Gas Cylinder, 1000ppm Hydrogen (H2) / Air, (6D) 103 ltr, CZF7E290152 You might be able to find some cheaper / smaller altenatives but most I've seen tend to be sold in reasonably large cylinders and aren't all that cheap for hobbyist purposes. While the datasheet isn't that clear figure 3 shows that it seems to have a fairly linear response depending on the ppm concentration. According to the Atmosphere of Earth aricle on Wikipedia the concentration of hydrogen in the atmosphere is 0.55 ppm by volume. So for practical purposes you should be able to treat exposure to air as close to 0 ppm and calculate and extrapolate the slope between that and 1000ppm to calculate other values.
H: Why can i connect my headphone to my computer whitout additionnal amplification? I heard somewhere that computer soundcard can't output high current. That is why computer speaker has amplifier inside them and require some external power to power up the amplifier. But what about headphone? I have a headphone that is around 8 ohm impedance (tested it with my multimeter). When i plug it in my computer, it work, why? (I mean plug it directly into my soundcard) I mean, these are normal headphone, with no external power and amplification. Can i break my computer by doing so? Onboard soundcard from my Asrock Fatal1ty professionnal Z77. Im trying to understand how speaker/amplificator work in order to make some sound using an microcontroller. AI: Typical full level line out voltage from a sound card is about 1V RMS and this can drive an 8-ohm load, delivering a power of: - \$\dfrac{V^2}{R} = \dfrac{1}{8} = 0.125 watts\$. Headphones are generally accepted to need between 10 mW and 2 W (wiki source) and the logarithmic average of that is 0.141 W so that seems to stack up. make some sound using an microcontroller To make a sound that is a reproduction of music (suitable for headphones) requires the ability to deliver about the same power undistorted. 1V RMS has a peak-to-peak level of 2.828 volts and this is not an unreasonable level to expect from a digital pin that was pulse width modulated but, the current into 8 ohms would peak at: - \$\dfrac{1 volt}{8 ohms} = 176mA\$ This means you need an amplifier that bridges between your microprocessor and your headphone. A typical MCU pin isn't going to want to supply more than a few mA without the voltage drooping and this will start to clip the music (causing distortion). I guess, anyone interested in doing this would possibly look at using something like an LM386: - There are plenty of other options including quite a few that can run directly from a 3.3V supply.
H: How does the tester screwdriver work? How does the tester screwdriver work? If I put the tester screwdriver inside the "hot wire" of an electrical socket, it lits up if I press my finger against the metal cap on top of the screwdriver. This happens also if I stand on a surface of isolating material, such as wood. I read elsewhere that this happens due to stray capacitance formed by the "hot wire", the human body, and the ground. One has $$ Z = R + \dfrac{1}{j \omega C} $$ for the impedance, so if C is high enough, the impedance should be close to r , the "effective resistance" of the formed circuit. Here I get lost; why r is small enough to cause a current in the range of mA even if I stand on an isolating surface? So really what I am asking is how one may represent the system hot wire - screwdriver - human body - wooden floor - building - ground as an electrical circuit, and which parts of the physical system contribute to the resistance, capacitance (and inductance?) and in which proportion, even very approximately. AI: how one may represent the system hot wire - screwdriver - human body - wooden floor - building - ground as an electrical circuit, I've long assumed it to be something like this: simulate this circuit – Schematic created using CircuitLab
H: what is microcoded architecture in computer architecture I want to know what is microcoded microarchitecture of an instruction set architecture (ISA) and why is it used? What is the difference between microcoded architecture and single cycle microarchitecture? Please clarify with some examples. Thanks AI: Not all of the CPU instructions have the same complexity. When instructions are particularly complex (like some x86 instructions), it is more convenient to implement them as a series of elementary instructions that are contained in a very fast internal memory. When a microcoded instruction is executed the microprocessor split it into a series of simple hardware coded instructions and execute them in series. So microcode is used in more complex instructions, while simple instructions are directly executed. For example today Intel microprocessors uses microcode in order to execute some old legacy instructions. The x86 microprocessors, that on the paper are CISC, internally uses an architecture that is more like RISC in order to boost the performance and they offer support to the legacy instructions through microcode. You can find many RISC CPUs that don't use microcode. This is essentially due to their reduced instruction set, that makes more convenient implement all the instructions in hardware. An example of microprocessor that doesn't use microcode is the MOS 6502.
H: Design practice crossing clock domains and async signals I have been designing a few projects on different FPGA's in VHDL, and it seems my most common source of "hard to find errors" is when I forget to synchronize an async signal, or forgets to resync a signal crossing clock domains. My best weapon so far, has been to draw block schematic of the components. So my questions is, what is the best design practice to prevent these errors? AI: Today even FPGA designs can have extremely complex clocking architectures and many async inputs, resulting in many potential CDC issues. I'd say that the following points constitute a minimal set of "rules of thumb" for avoiding CDC bugs: Keep track of all signals which cross clock domains (diagrams, lists, spreadsheets - whatever you find more convenient). Async input signals should be included too. All signals from the above list must be synchronized, unless there is a clear reason why not. Never ever synchronize multi-bit signals bit-by-bit! Use special synchronization schemes for buses instead (sync FIFO, two way handshake, etc.). If there is an async reset in the system, and this reset does not apply to all the flip-flops - all the signals originating in this reset domain and passed to non-reset logic should be treated as async (and included in the list from #1) I'm sure that the above list of practices is incomplete, and can be easily extended. I also suggest considering CDC verification tools (like Questa CDC from Mentor) - these tools use formal techniques to automatically detect CDC issues in your design.
H: Differential amplifier offset problem I have breadboarded a simple differential amplifier: http://www.ti.com/lit/ds/symlink/lm158-n.pdf what I expect is that OUT=B-A but that only works when the voltage of B is larger than A+0.6, i:e there seems to be an offset of about 0.6V on the output. Since the output LM358 is supposed to be able to go to ground I can't figure out where this offset is comming from. Any ideas? Edit: VDD is 16V in my tests and if I tie A to ground, then OUT=B without the offset. AI: Here are some: - Scenario 1 - A is at 3 V and B is at 0 V - the output will be trying to make -3V but limits at 0V. Scenario 2 - A is at 3 V and B is at 3 V - +Vin will be 1.5 volts and the output will be trying to make -1.5 volt + 1.5 volt = 0V = GND. Scenario 3 - B is at 6 volt, A is at 3 V - +Vin will be 3V and the output won't be trying to force anything into the feedback loop so the output will be +3 volts. EDIT Following a look at the circuit diagram of the LM358 it is apparent that it will have problems in the circuit getting down to 0V: - Without the 50uA current sink the output would only get down to about 0.6V. The current sink trys to pull it the rest of the way but, with R2 and R3 pulling the output up to some value (maybe half rail at 8V) then there will be a problem that can only be overcome with a slight negative rail or a good load on the output to ground. 8V across 2x 18k is a current of 222uA so it might help if the 18k resistors were made 180k.
H: What does overlaping indicate in i2c timing diagram I am studying how i2c devices works...and I have downloaded a power point presentation from Google, I have understood almost every basic concept, like, how the start and end of the transfer occur, what is SDA and SCL and what is master/slave. but in this timing diagram, SDA supposed to show the transmission of data bits, i do not understand how the two lines of transmission are displaying in the SDA here which are over each other. shouldn't it be a single line for SDA too ? also, what does the dashed line indicating here ? AI: Not sure if I understand your question but... The dashed lines in your diagram means, more of the same for some time.. like the gap in SCL between 2 and 7 is dashed to mean there are bits 3, 4, 5, and 6 which repeat the same pattern as 1, and 2. The reason for double lines.. the upper line is for a 1 and the lower is 0, they both are shown as either is valid. For example when SCL transitions at bit 7 in the diagram SDA could be either a 1 or a 0 depending on what you are sending. But.. it must be either a 1 or a 0. Elsewhere where you see the lines crossing, that indicates the signals can be undefined, the state is not determined. This allows time for I/O lines to change. note that SDA is the data, which is clocked into the part using SCL. SDA must be at 0 or 1 state some time before the clock transition, this is called the setup time. It should also remain in that state for some time after the SCL transition, called the hold time.
H: Difference between a bus and a wire I have been studying buses used in communication systems. From what I read at Wikipedia, "In computer architecture, a bus (from the Latin omnibus, meaning "for all") is a communication system that transfers data between components inside a computer, or between computers. This expression covers all related hardware components (wire, optical fiber, etc.) and software, including communication protocol." Does that mean both a wire and a bus is the same thing? What feature makes the bus totally different from a normal wire in the first place? AI: A wire can be a bus if it is a serial link carrying many individual pieces of information. More usually, a bus is regarded as a collection of wires that transport digital information from A to B. 64 bit processors (PCs etc.) have a 64 bit-wide bus between the CPU and their memory chips and possibly to other devices. It doesn't have to be inside a computer of course - anything that is transmitting information from A to B will use some form of wire or collection of wires for achieving those aims. What differentiates a wire as not being a bus is that it only carries one coherent "entity" such as power or a microphone signal or is connected to an on/off switch or a guitar or a speaker. A bus is usually digital.
H: Proper power design for a USB device I'm designing a USB device that I want to be powered eintirely from a wall wart and have a couple questions concerning the power connections and ground loops. 1) If I connect the USB GND pin to the ground of the wall wart I should be safe from ground loops, right? My understanding so far is that the wart's DC output should be floating with respect to earth ground so I can safely connect it to the USB ground, since the PC's supply is earth grounded from mains. 2) If this is the case, can I just leave the USB's 5V pin unconnected? 3) Also, is the USB GND necessary? Would it be acceptable to only connect D- & D+, or is the USB GND needed for these signals? 4) In what cases would optical isolation be necessary? I see a lot of designs using isolation, is this necessary for all self-powered USB devices? I've looked through other answers and other USB designs, but I'm not entirely confident yet and so some help would be greatly appreciated. AI: You are correct about the floating nature of the wall wart output. There's no harm in leaving USB +5V unconnected. On the other hand, you might have to connect it to your controller, because that's part of its scheme for detecting the USB connection. Connecting USB GND is necessary. D- & D+ carry a differential signal, however the common mode needs to be within the operational range. Self-powered USB by itself doesn't required galvanic isolation. Whether or not your instrument requires galvanic isolation (and where to have it) depends on the application (?) of your instrument. A sketch of a self-powered USB device can be found here see 6.2 on p.24.
H: 4 pin headset pinout / pushbuttons interface You all know smartphone headsets. Most of them have a microphone integrated and additional pushbuttons for increasing/decreasing the volume or to pause the current track. I am wondering how this is working. The plug has 4 pins. I assume one pin is GND, two are for left and right audio and the fourth is for the microphone. So how are the pushbuttons connected then? There are three pins missing. Maybe the microphone pin is used as bidrectional pin? If it is so there must be a protocol which declares which button was pressed (like UART). Also I don't know where the power suppy should come from. All the headset gets is an analog audio signal from the master device. Connector: Pushbuttons: AI: An image is a thousand words so here is an image that visualizes the connection scheme of three buttons
H: Sony Vaio Inverter My sony vaio vpcee3j1e laptop backlight doesn't work.Because the inverter is not working anymore. Since I have some urgent code to write, I need to fix it.I do not have any tools to make measures so i am trying to guess what could be the fault. The capacitors seems ok,but there is a component I haven't seen before and it's the only one who present some trace of burned.The body of this component is made of ferromagnetic and is wired to the circuit using 3 connection. Have a look: On the circuit board the ref is: CK 66 394V-0 Does anyone know what is this component ? AI: I suspect that component is a piezoelectric transformer. Most laptop and LCD screens have CCFL tube backlights. As far as I know, the only efficient ways to generate the several hundred volts required to drive CCFL tubes -- when all you have is battery power -- involves either a piezoelectric transformer or a copper-wire transformer, or both. (FIXME: add images of backlight inverters with piezoelectric transformers from http://www.nec-tokin.com/english/product/piezodevice2/piezo_inverter.html http://www.ceratech.co.jp/english/product_e/01_04_02.html http://www.mmech.com/~mmechc5/index.php?option=com_content&view=article&id=66&Itemid=98 http://www.mmech.com/transformers ) I see that the entire screen (including the entire backlight inverter board with the transformers already installed on it) is available from many sources, a few of which also offer repair services. (a) (b) (c) (d) (e) (f) However, I've seen at least one person have a "backlight won't turn on" problem that was fixed by replacing a fuse on the motherboard.
H: How to sense 24V AC (Thermostat) with a 5V Microcontroller I'd like to detect thermostat events (heat, fan, ac etc) with an Arduino. I've done quite a bit of investigation but haven't found a definitive solution. Most projects I see involve controlling the thermostat however I simply want to detect on/off events. Based on what I've gathered so far, I'd like to use an optocoupler to protect the furnace/thermostat from damage -- protecting the Arduino is important but of lesser concern. I plan to run a separate wire (cat5) from the thermostat to my project so I don't mess with the furnace wiring. This is the optocoupler I've seen recommended http://www.digikey.com/product-detail/en/HCPL3700/HCPL3700-ND/401373 via this howto https://www.adafruit.com/blog/2012/10/04/ask-an-educator-how-can-i-measure-ac-voltage-with-my-arduino/ But where I'm confused is how to wire it altogether and what values to select for resistance. Here's the circuit in HCPL3700 datasheet AI: The schematic for use of HPCL3700 is provided in the HP Application Note AN 1004, Figure 6: The same section of the application note provides the calculations for determining Rx and thus the values of the two resistors on the input side, Rx/2 each, based on the desired trigger threshold (see Example 2). A graph to directly obtain Rx values is provided in Figure 7. For monitoring a 24V AC line and with some margin for low voltage conditions, referring to Figure 7 and considering high and low thresholds of around 25 and 15 Volts yields Rx = 20k: use 10 kOhms 2 Watts resistors to be on the safe side, one on each leg i.e. pin 1 and 4. If you also plan to monitor 110V mains voltages, the values used would be 18k 2 Watts each. Ensure that the resistor used is rated for AC mains operation, not the common or garden variety which is not safe for mains voltage applications.
H: Is it possible to design this circuit with a single potentiometer (L-pad)? I'm designing an L-Pad for my speakers. They attenuate the signal while keeping a consistent effective impedance, which is necessary for the amplifier and crossover circuits. Typically, these values are computed and hard soldered, giving one 'set' attenuation level. I want to use a single potentiometer (though it could be a dual-wiper pot) to make this adjustable, and include 0 dB (completely out of the circuit). Would this be possible to design, without the use of a microcontroller and programmable potentiometers? It needs to maintain a constant impedance, and I'm using them on 8 Ohm speakers. Solving for my application: R2 = Variable from (infinity) Ohms / disconnected R1 = 8 - (R2 * 8) / (R2 + 8) Help! AI: Normally reactive components such as inductors and capacitors are used to provide attenuation within/outside of specific frequency ranges and this by definition is how cross-overs are built. Reactive components are favorable because they do not dissipate power apart from minimal R losses. If you want to attenuate the signal being driven into a power load such as a speaker then I believe you will need a fairly robust potentiometer. If you are delivering 40 watts into a speaker, and you want to attenuate it by -3dB, then your potentiometer will need to be 8ohms and capable of handling 20 watts. Something the size of a high school lab rheostat would be suitable, but impractical and slightly inductive. I would suggest you consider attenuation of the signal entering your amplifier rather than the signal coming out of it. If however you're dealing with 250mW headphone speakers then the potentiometer will work, however you may want to consider a Logarithmic type as the parallel impedance equation is not linear with differences in R.
H: transistor characteristics - Ube0 number meaning i'm trying to guess meaning of value marked as Ube0 in datasheets. (datasheet adress: http://www.datasheetarchive.com/dlmain/Datasheets-36/DSA-700258.pdf, the transistor I want to use is Tesla KF-508). I want to regulate secondary circuit by voltage divider on base. Does this value means that max allowed voltage on base is 7 volts and I must design voltage divider to not allow more than 7 volts and current no more than 2.2 mA ?? (computed from measured parameter h21e = 233, max current that I want trought collector = 0.5 A) AI: UBEO is the base to emitter voltage with unconnected or "open" collector terminal. A bipolar junction transistor has three terminals, base, collector and emitter. Whichever terminal is not connected for the rating is replaced with open when left unconnected. Hence similar identifiers for UCBO, UCEO. UEBO = -UBEO = 7V means that the emitter voltage referenced to the base voltage can be 7V maximum. Often there is a "max" squeezed (UEBO,max) in to indicate it is a maximum rating. If you exceed that voltage the base to emitter diode will break down (avalanche). When carefully used this mode of operation can be used as a white noise generator, when uncareful the transistor will be destroyed.
H: Can i use another H-bridge for this bipolar stepper motor drive? I am driving a bipolar stepper motor with a H- bridge. For this sheet: source Can i use my L293DNE H-bridge driver instead of the pictured SN754410NE? Will there be any consequences for this? I have earlier used the L293D chip for this design: Needing only 2 controlling pins from the microcontroller it seemed much better, but i have never gotten it to be as smooth in controlling as the top driver sheet, there seems to be software issues when using the arduino library to control it) AI: L293D has an output current capacity of 600mA compared to L293 and SN754410 that can provide up to 1A in the outputs but apart from that the drivers have the same functionality and one can replace the other. If you read the headlines of the SN754410 characteristics in the datasheet this is already noted Functional Replacements for SGS L293 and SGS L293D
H: PCB etching from transparency I wonder if someone could help me. A few days ago, my brother gave me all of his electronics, seeing that he doesn't need it anymore. I'm keen to learn electronics in depth and have basic knowledge such as resistor formulations, etc. Scratching around in the stuff, I found something that looks like a very small xray of a PCB. After explaining to me what it was, he encouraged me to build it. I tried googling around about how to make it, but my search came back unsuccessful. Can't ask my brother how to do it, because he's out of the country on work. So here's the question: How do I make the rails on the PCB? Everyone mentions using acid - what do I use and where would I typically find it? AI: Stripboard If you are starting out, I'd suggest using stripboard to start with. Etching PCBs The "X-ray" is (probably) a Printed Circuit Board (PCB) design that shows where copper conductive tracks should be retained on a copper clad board which is to etched using an etchant such as Ferric Chloride. In order to prevent the tracks being etched, a etch resist coating is applied to the copper which is destroyed by the combination of ultra-violet light and an alkali developer. Shining UV on the coated board through the transparency for a few minutes then developing it will leave the coating on the dark areas of the transparency but not on the exposed areas. You can then etch it. There are other etchants and various ways of producing PCBs at home. Ferric Chloride is moderately nasty stuff - it will stain anything it comes into contact with and must not be flushed down drains - so disposing of used etchant can be problematic. Here is a reasonably detailed description that includes a section on an alternative etchant that may be less problematic. Addendum (I'm trying to find some old articles I recall reading) Etchants Ferric Chloride ("traditional" but nasty). Ammonium Persulphate (see comments below) Vinegar + hydrogen peroxide white vinegar, hydrogen peroxide, and salt hydrochloric acid and hydrogen peroxide Theres a nice article on the chemistry republished at Adafruit it seems far better to me to avoid ferric chloride altogether and simply use acidified copper chloride, or better yet, simply start with an alternative oxidant such as hydrogen peroxide, and let copper accumulate in solution and eventually take over. An acidic copper chloride etchant can be reused indefinitely, provided that HCl is added periodically to provide the protons for the reoxidation reaction. Indeed, such an etchant solution actually improves with age! Non-chemical methods CNC machining. Electrolosis) Conductive ink (hardly worth including?)
H: Power dissipation on chip vs. Over power dissipation I was reading this pdf regarding computation from MIT's opencourseware and on p.8 through some obscure mathematical manipulation they basically reach the conclusion that the cooler you make your chips, the less heat is dissipated and the bigger the maximum integration density can get. This seems intuitively logical to me, but their last statement piqued my interest: At lower temperatures, the power dissipation on chip is decreased, but the overall power dissipation actually increases due to the requirement for refrigeration. For their actual calculation they used room temperatures, so I'm assuming they mean that if we try to cool the chip (to any temperature lower than room temperature), it would be obselete because the cooling itself would increase the overall power dissipation. But I don't understand this argument. You could say the same for refrigerators. What does it matter that the overall power dissipation increases? If you cool the chips, you can increase the integration density which would lead to stronger computers. What does it matter that the heat in other parts of the system increases? I might be wrong about this, but this is how refrigerators work too, no? It's just in the laws of thermodynamics.. So an answer to this question would clarify the above statement (or say it's indeed stupid). Why shouldn't we cool chips to low temperatures in order to increase the maximum integration density? AI: Cooling is a vital part of most computer system design. Air at room temperature is the usual coolant, because it's available everywhere* and you can move it easily with a small fan. Some enthusiasts and large systems are liquid cooled. All the plumbing and pumping systems can't be miniaturized, and add cost, so this is usually done only on "tower" size systems: http://www.pcworld.com/article/227964/pc_liquid_cooling_system_do_it_yourself.html The extreme is liquid nitrogen cooling: http://www.corsair.com/blog/setting-up-your-pc-for-liquid-nitrogen-overclocking/ , which is even more expensive and impractical. It's nearly always easier to stick with conventional cooling and buy more computers to achieve the same computational throughput. (There are also issues with hold timing when running extremely cold - signals may arrive too early if the chip has not been designed to run at that temperature. If you move the minimum design temperature down to -200 that may force you to move the maximum temperature down as well, leaving you with a product that requires a liquid air supply and thus a very limited market) Except in space, where ultimately all your cooling must be radiative
H: Common ground: Computer A and USB powered Arduino (MCU) from Computer B I have 1 computer, 1 laptop and usb powered arduino ( MCU ). Arduino is connected to laptop via USB cable. Laptop is connected to 220 V wall or runs from batteries. One pin from Arduino is connected to PWM input (to control fan speed) in computer to control fan speed. I have to share ground between the Arduino and computer to make it work. My question is - is it correct to connect grounds that way? AI: have 1 computer They use a switching supply that is connected to mains ground so the ground of the USB or any of the internal supply connectors is essentially connected to the mains ground 1 laptop Also uses a switching supply that may or may have not a connection to the mains ground, in either case the supply is isolated from the mains so a connection of the laptop ground to the mains ground will not cause a problem. USB powered arduino ( MCU ). This is powered from the the laptop so the ground level it uses may be the same as the mains ground or it may not, it depends on the operation mode of the laptop (battery/mains) and the plug that the mains supply of the laptop uses (2-prong/ 3-prong ). In any case connecting the ground of the PC (which is equivalent to the mains ground) to the laptop ground through the arduino will not pose a problem.
H: How to convert volts to dB SPL I am taking input from an electret microphone amplified using LM358 amplifier from my PIC16F877A's ADC unit. I am getting the readings in volts from the ADC which ranges from 2.5V to 5V. How can I convert these readings into dB? AI: dB SPL is a pressure measuring unit. You can't convert a voltage to a dB SPL reading unless you know: the microphone sensitivity (or simply the analog output voltage to the input pressure ratio) which tells you essentially the voltage level it will output for a given sound pressure level the gain that the preamp has applied Your microphone has a sensitivity of -46dBV/Pa , this gives 0.005012 V RMS/ Pa 1 Pa (pascal) equals 94 dB sound pressure (SPL) The dB equation for voltage is \$ 20 \times \log \frac {V_1}{V_o} \$ where \$ V_1 \$ is the voltage being measured, and \$ V_0 \$ is the reference level. If we do an example calculation for the measurement of 2.5 V (assuming a unity gain for the amplifier) we get \$ 20 \times \log \frac {2.5}{0.005012} = 53.96 \ \text{dB} \$ so the SPL will be (-46) + 53.96 = 7.95 + 94 = 101.95 dB SPL We assumed a unity gain for the preamplifier; if the actual gain was 20dB then the SPL becomes: 101.95 - 20 = 81.95 dB SPL If the actual gain was 10dB then the SPL becomes: 101.95 - 10 = 91.95 dB SPL ...
H: How to make a digital clock using MSP430G2553? I want to make a digital wall-clock as a small electronics project. Since I am very new to this stuff I want to just try to imitate some already completed projects so that I can learn from them. I have a few sample pieces of the IC 553 and some other lower config ICS. I have basic soldering tools and am willing to spend some money on this project. I have ordered a new TIVA C board since my MSP launchpad has stopped working ( powers ON but the Energia IDE doesn't list it in the connected boards ) . So if anyone can help me with it by either providing the sketches and circuit schematics for the MSP ( program using Energia ) or provide links that has the necessary steps, it would be really helpful. I hope this does not violate any community guidelines. AI: Things you'll need: Something to display the time on. This may be a set of 7-segment LED displays, a dot matrix LCD, etc... A feature of the MCU called RTC (Real Time Clock), sometimes also abbreviated as Real Time Timer. This will require a 32.768kHz Crystal, because in a clock, you really can't do without it. You could also use a dedicated RTC chip and hook it onto one of MCU's serial busses. A means of powering it - be it a battery, a mains adapter, ... Please forgive (or edit) me if I forgot something important. Cheers. EDIT: Well, we are living in the age of SMD's, therefore breadboarding any custom chip is difficult. However, breakout boards are easy to come by. These, for example, incorporate pretty high-end RTC chips. Feel free to read through the documentation. http://www.sparkfun.com/products/10160 http://www.adafruit.com/products/255 You simply hook 'em onto SPI, or I2C respectively. Regarding your last question about schematics... Schematics is always very IC-dependant. I'll take the DS3234 chip as an example. Clicking the Datasheet link on the Sparkfun's website will lead you to the IC's very datasheet. You need to get used to this stuff. Luckily for you, Maxim/Dallas Semi has very descriptive and user-friendly documents. Right on the first page, there is a Typical Application Circuit, explaining what you need/can do with individual pins of the IC. However, if you get the PCB from Sparkfun, you will also need pinout of the carrier board itself. Get it via the Schematics link. Anyway, green tick on this answer would be appreciated. Cya!
H: Why is no capacity indication on regular batteries? On every rechargeable battery there is an indication how big the capacity is (for example 2500 mAh). Why is this not the case with normal (nonrechargeable) batteries ? I tried to google the question but found no answer. AI: The answer is: marketing. Some number, like "1800 mAh", doesn't really mean anything, anyway. At what temperature? At what voltage is the battery considered "dead"? At what current? The charge you can get from any type of battery really depends on these factors, and how far dead you are willing to run it. All the major alkaline battery manufacturers supply datasheets that specify the capacity of their batteries more completely. This is the place to get capacity information, not the product label. Energizer Duracell
H: Coolpix L27 trigger mechanism I plan to do a 3d scanner with low-grade digital camera. I opened a coolpix L27 and found this : Does anybody knows how this kind of button is called (may be it is normalised and finding a datasheet is possible) Or would someone here have a service manual for the coolpix L27. Thanks So here is what I did : il you look closely you can see in the 4th pictures that I inadvertedly put some solder below the power button, this caused a short circuit. However this camera is protected against short circuit and shut down immediatly. Removing the solder with som "solder absorber" (tresse a dessouder in my language) solved the problem. AI: So by doing some poking around I found how it work myself red pin are plugged to vcc wich is 3.3V 1 is auto focus 2 is trigger to take a picture you have to put 3.3V on the autofocus pin then 3.3v on the trigger pin. Important, the autofocus still needs to be at 3.3V when you put 3.3V on the trigger pin. Ps : be carefull with those nasty flash capacitor, my hands still hurts.
H: What does 'integration density' mean? What does 'integration density' in the context of integrated circuits and electronics mean? I've seen the term tossed around a lot, but I've never found a satisfactory definition. AI: The "integration" is as in "integrated circuit". A high integration density means a large number of components (usually transistors, in contexts where integration density is being discussed) in a small area.
H: Getting the direction that user is facing I've just started playing with electronics and I'm wondering. As you guys probably know, using the iPhone you can get the direction that the user is facing. My question is, what electronic component I need to buy to make a consumer electric device that gets the user direction? AI: You want a compass. Like the normal analog ones, it senses the orientation of the earth's magnetic field.
H: What is the simplest way to toggle a relay with analog feedback? I've been playing with electronics for a long time, but am fairly new to digital electronics, including using Fritzing, so apologizes in advance for that. I'm attempting a fairly basic 5VDC circuit where I want to use a thermistor to toggle a fan on and off, and to be able to set the point at which the fan toggles. I know I could use Arduino to read the resistance from the thermistor and the potentiometer and, based on logic, supply high or low to the relay switch - but how would I build the circuit without an Arduino? Would I still need to use an IC for the logic? I was thinking I could potentially use something like an AND/OR gate with the feedback from the thermistor circuit to control the relay ( thus giving the relay either high/low and not a variable voltage ) but the of course the AND/OR gate is going to get the variable voltage which seems wrong to me ( analog feedback to a digital component ) and so I know I'm missing something - a small I/C that can read the analog voltage would seem to be the "right" thing but it also seems like there may be an easier way to do it with such a simple circuit. Below are the Schematic and Breadboard views from Fritzing. I know they are incomplete, and that the power supply is 6v instead of 5v, but hopefully it will help convey the basic idea. screen.png http://img199.imageshack.us/img199/5462/ta07.png screen 1.png http://img843.imageshack.us/img843/5582/q7yq.png AI: I think you should consider using an analogue component known as a comparator. It would compare the signal from your thermistor with a set-point set by a potentiometer and tthen output high or low depending on which is higher. Wiki is quite useful on this and worth a read. You can also make a comparator from an op-amp and realistically this will work just as well for your application. Vin is compared against Vth. Vth is set by R1 and R2 with a slight influence from R3. In your application, R1 and R2 would be a potentiometer, maybe 10k and R3 would be typically 1Mohm. R3 provides hysterisis that guarantees a certain level of protection against the comparator output "chattering" when Vin nearly equals Vth. Rload in the circuit can be your relay coil.
H: Is my avalanche noise "random?" I'm working on a hardware random number generator based on the below design. It uses two reverse P-N junctions to create avalanche noise. I was looking at the circuit with my oscilloscope, and I found that the unamplified noise from the two junctions seems HIGHLY correlated. (Enough entropy, however, seems to be added/amplified by the rest of the circuit so the bitstreams appear uncorrelated.) So, is avalanche noise not the self-contained random process I thought it was, but something highly sensitive to external forces such as minor fluctuations on the rail? Or, have I’ve built a system that is amplifying something other than avalanche noise? AI: It's your scope or your power supply. Try connecting both scope channels to 0V and see how the signals correlate and, in fact how much residual noise your scope channels have. Next connect both channels to the 12V and see what happens. Rest assured that there will be no correlation in the noises from two different semiconductor sources other than that caused by power supply noise (common to both).
H: STM8L discovery board, wires for the breadboard I don't know if it is the right place to ask, but still I have a STM8L discovery dev board - http://www.st.com/web/catalog/tools/FM116/SC959/SS1673/PF250636 which has very small square male-type pins. Of what I can measure, it is around 0.025" (or 0.64 mm), if to assume that the size is from default size range. Now my question is - where could I get a proper set of M/F (female-to-male) wires of that size, because I need to connect this dev-board to my breadboard, and the breadboard itself has pretty much the same size (0.025" or 0.64mm) female pins. Can someone help me ? AI: The datasheet doesn't show the pin header but assuming it is like this You can get a female to male dupont cable Your board uses the 100mil pin header style so the dupont wire I show can be used. Just do a search for dupont cable male to female, you can find it almost anywhere.
H: Keyes IR receiver with Arduino I'm trying to learn how to connect an IR Receiver to an Arduino Uno. I got this IR receiver as a gift, and I'm having a hard time finding a spec. sheet anywhere online. The module looks like this: This brick comes with three pins: an S (which I assume it stands for VSS, a - (GND) and another one that I have no idea if it should be connected to anything. I was wondering if anybody has some experience with this module. I'm attempting to connect it to the Arduino Uno. Thanks much. AI: This page seems to have information: "-" is ground middle pin is +3.3V supply "S" is the signal output
H: Is it possible to create an HDMI input adapter for android? Would it be possible to stream a video signal into an android device? I understand that the HDMI port it's self is not designed to take input, so I was thinking that the data could be streamed via the USB port. I know that the Apple hardware prohibits this (apple made this decision for some reason) but would it be feasible on android? AI: You can get USB capture devices that will take HDMI video in and encode it to e.g. H264. You can get Android devices that can USB master. So then it's a matter of drivers. It looks like it's doable if you can choose the device and supply your own kernel: https://stackoverflow.com/questions/12334612/analog-video-capture-to-android-phone
H: What's the interest for these breakout boards? I'm wondering what's the interest for a breakout board or at least these ones : Shift Register Breakout - 74HC595 - 2.95$ Shift-In Breakout - SN74HC165 - 3.95$ I'm wondering this because, take a look at the price, now take a look at the part price... Even in DIP package instead of SMD. For me they look like beginners marketing traps to make a lot of money from the "maker trends". But I think I'm missing something. EDIT : Re-ask my question to avoid opinion based answer. Or buying guide related. Why would you buy and use these breakout boards ? What's the benefit ? AI: Q: Is there a market for the various break-out boards out there? Yes, definitely. Some of the reasons: Consistent little building blocks for rapid prototyping, and for beginners. One basically wires together a bunch of little boards, or better yet, plugs them into breadboards where feasible, rather than using a mix of PCBs, ICs and discrete parts Prototyping with SMD parts where through-hole equivalents are simply not available. Not applicable to the examples in the question, but increasingly an issue as through hole parts get obsolete - for people unwilling or not experienced with PCB etching or SMD soldering Performance differences between through-hole and SMD parts - Not always, but often there will be some performance or rating differences, so it works best to stay with the package that a final product might be produced with. I've seen designs where the DIP IC worked great in a prototype, but the SMD part couldn't handle the heat. Reuse: An IC survives only so many insert / extract cycles before the pins give out, unless using ZIF sockets (expensive!). For an experimenter, a beginner or children, this is a factor to be considered. Convenience: A well-designed break-out board will often have the connections arranged in a more convenient sequence than the IC pin-out. Many break-outs will incorporate a decoupling capacitor right on the break-out board, saving some problems and some messing around. Labeled pin-outs, saving time compared to fudging around with an IC ensuring that the pins are connected right - important time-saver when "playing", or experimenting, when putting together and taking apart several circuit configurations a day. Saves time even for seasoned prototype makers. Even simple things like LED + resistor for GPIO status indication can get old fast when using dozens across experiments, justifying, for example, one of the highest selling breakout boards I have been watching on eBay, a simple 6-LED indicator PCB: This seller is making a killing on those boards, on sheer volume and a huge percentage margin. Shipped cost: Not applicable to the seller mentioned in the question, they are pretty expensive anyway, but often, especially for non-US geographies, ordering a couple of units of an IC costs much more with shipping, than ordering a prebuilt break-out from some Chinese seller on eBay. This is first-hand experience for me in India. Naivete of newcomers to electronics: Newbies actually pay for "rain sensor modules" which are essentially a set of parallel PCB tracks, and "analog temperature sensor modules" that are merely a through-hole thermistor on a PCB. Yes, the "convenience" and "reuse" points above perhaps apply to these too. Q. Why are they priced unduly high? You pay for the brand: SparkFun, AdaFruit and other well-known sellers often price their offerings significantly higher than the equivalent from no-name sellers. The argument that their products are better in manufacture rarely if ever holds true: More often than not the boards are fabbed in the same factories in China as the no-names. In some cases, the boards are identical and clearly from the same design and factory, even the "dust spec on transparency" flaws in the solder mask are identical. Brand and marketing, those are the differences. Seller charges for inventory cost: High-volume breakout boards often sell at much lower premiums than the rarely-bought items. After all, the seller cannot fabricate small lots at a convenient price, so a minimum volume is built anyway, perhaps not fully populated, and then must be maintained in inventory (locally or at the factory in China) until sold. You pay for convenience: Point in example the LED PCB mentioned above, which despite the nearly $2 pricing, sells around a hundred pieces each day in each color, from one seller alone. Seller charges for buyer's constraints: An individual can typically not get the same kind of price, quality guarantees, and turn-around cycles from PCB fab shops, that a high-volume seller can. Since these sellers have the volumes and pipelines and solid contracts in place anyway, it's trivial to add a few not-really-important break-out boards to the order queue, sometimes merely as fillers in a PCB panel order. Q: How are some breakout boards cheaper than the price of the IC on Digikey and similar sites? Key example: The Analog Devices AD9850 DDS boards sell for as low as $2 each on eBay if you watch for it. The IC isn't even available at that price. Volume purchase discounts. On sites like DigiKey, it is educational to examine the discounts for a given IC in 1kU and 10kU quantities, compared to singles. Geography: Many manufacturers of ICs and discretes sell direct container-load shipments far far cheaper than any DigiKey or Farnell price point you will find, if the destination is in the same country as the semiconductor fab facility, or even a nearby country. With the rise in semiconductor fabs in China, Malaysia and other parts of the far East, this means a price edge in that region. Shipping cost per unit, retail versus wholesale: This one is basic economics. "Fallen off the truck": Shipments ICs and even complete assembled modules / breakout boards such as bulk orders from SparkFun get "misplaced" in transit, and then get sold on various sites by nameless sellers where the provenance of the product is non-existent. "Dark shift" manufacture: PCB assembly factories and semiconductor fabs have been known to run an extra shift producing the same item they are contracted with some name-brand customer to produce, in an off-shift, or by misreporting production runs or failure rates. These additional units are then sold at whatever the retail market will pay, evidently cheaper than the brand-owner's pricing. Factory rejects: Manufacturers often have very stringent rejection criteria for assembled boards, or for ICs. The rejected units may well be functional, just not at the maximum performance ratings. These items are officially "destroyed" at the fabricator, but in reality often find their way to the grey market.
H: PWM'ed DC motor not running when loaded I am trying to build a robot with the Arduino Uno and the H-Bridge SN75441. The robot has 2 1.5V rated motors. I set it up with this tuto: http://www.mlbelanger.com/arduino/ard-bot/ So the circuit is like this (I have just not plugged the Arduino Vin pin in the pin 8 of the chip): (source: mlbelanger.com) As you can see, the H-Bridge only supports down to 4.5V for the motors. That is why I had to use a 5V power input (adapter 5v @ 1A) to power the motors, with PWM (80/255, giving a 1.5V normally) for regulating the power to 1.5V. So here goes my problem. I have two cases: one where the motors have no load, which means that the robot is in the air. The motors run at 1.5V @ 0.26A normally. the second one which I have trouble with: it runs at 0.5V @ 0.145A. So the voltage dropped as the load increased. The robot doesnt advance and makes a kinda high-frequency noise. If I use 1.5V AA batteries connected directly to the motor, it runs well so the load is not the problem, but rather the PWM setup somehow. AI: If you look into the design of the H bridge driver you may be surprised at how it behaves under load conditions. Your PWM ratio is 80/255 = 0.313 and you'd have thought the driver, powered from 5V would produce: - Vout = 5V x 0.313 = 1.57 volts. But this won't happen. Under light loads I estimate the driver is capable of swinging up to about 4.3V and down to about 1V - this means your assumed target of 5V is in fact more like 3.3V making your real output dc voltage (due to PWM) more like 1.04 volts. It gets worse under higher load currents. The data sheet specifies that the output can swing up to 3.6 volts and down to 1.2 volts when supplying 1 A. This means, at your specified PWM ratio, the output voltage will be: - \$\dfrac{80}{255}\times (3.6 - 1.2) V = 0.753 V\$ So, without changing the PWM ratio, at light loads your motor is fed with 1.04 volts and as mechanical load increases this will drop to about 0.75 volts at 1A: - It's not a good driver for your application really and it's worse if you use worst case (rather than typical) values.
H: Decoupling issue with DC Motor? I have the following circuit : That's basically everything, excepted a button on DC1 to turn on/off the motor, but shouldn't impact. The problem is, I was prototyping with the DC Motor on the LM7805 and the other parts powered by the +5V of the arduino I was using to program the ATTiny45. I assume the DC Motor resistance at "full speed" is \$50\Omega\$. (Around 0.1A at 5V). Now I've moved everything on the LM7805 and when I turn on the motors the ATTiny shutdown after few seconds. The time he stays up depend on the value of RV1 who manage the speed of the motor, controlled by the attiny with the BC337 transistor controlled with PWM. So, I started to use bigger caps but I can't stabalize the circuit. I've tried with 4700uF on C1/C2/C3 and the improvement is not soo great, a bit better but still shutdown pretty quickly. They are placed as close as possible to "their pins". So, what can I do to leave the motor at that place ? Put it on a separated LM7805 ? Add a capacitor somewhere ? (I really need to put it on a voltage regulator) AI: Here's the solution given by @AnindoGosh Adding capacitors C5 and C4 solve the issue.
H: 4x4 keypad to Microcontroller I have 8pin 4x4 keyapd, and i want to connect it to my microcontroller, I've search over the net but i can't see its pin configuration. I have a problem connecting it because of that can someone help me. I have a picture of the keypad and pin description of my controller here. AI: Here is a relevant guide Keypad Pin Connects to Arduino Pin... 1 D9 2 D8 3 D7 4 D6 5 D5 6 D4 7 D3 8 D2 /*4x4 Matrix Keypad connected to Arduino This code prints the key pressed on the keypad to the serial port*/ #include <Keypad.h> const byte numRows= 4; //number of rows on the keypad const byte numCols= 4; //number of columns on the keypad //keymap defines the key pressed according to the row and columns just as appears on the keypad char keymap[numRows][numCols]= { {'1', '2', '3', 'A'}, {'4', '5', '6', 'B'}, {'7', '8', '9', 'C'}, {'*', '0', '#', 'D'} }; //Code that shows the the keypad connections to the arduino terminals byte rowPins[numRows] = {9,8,7,6}; //Rows 0 to 3 byte colPins[numCols]= {5,4,3,2}; //Columns 0 to 3 //initializes an instance of the Keypad class Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols); void setup() { Serial.begin(9600); } //If key is pressed, this key is stored in 'keypressed' variable //If key is not equal to 'NO_KEY', then this key is printed out //if count=17, then count is reset back to 0 (this means no key is pressed during the whole keypad scan process void loop() { char keypressed = myKeypad.getKey(); if (keypressed != NO_KEY) { Serial.print(keypressed); } }
H: Raspberry pi with direct relay I have a very back to basics question. I've been using a 5v relay with the raspberry pi. The relay trigger is connected directly to an output pin and the other side is connected to the ground of the board. I've been counting on the internal coil resistance to serve as over-current protection, and so far in small application it worked out fine. But I've have been told that this is not a good idea and i might damage the board if the output is held HIGH for too long. Any confirmation on this would be appreciated. AI: It might work at the moment, but you are running a risk not checking the various specs out and making sure you work within them. So I would use a transistor and the correct voltage. I haven't used an R-pi, nor do I know the relay part number you are using, but if you are determined to go ahaead without a transistor, then what I would do is: Read the R-pi datasheet for it's pins maximum working current, and the general advice surrounding safe use of the pins. Measure the relay coil with a multimeter to check it's DC resistance (and read it's datasheet for other specs such as working voltage range, etc), work out the current drawn from your pin using Ohm's law. See what value resistor you would need to lower current to a safe level. Make sure there is a reverse diode across the coil to protect the pin from kickbacks. Having said the above, I would again really advise against trying to power a relay directly from an R-pi's pin, especially the wrong voltage. There are loads of simple tutorials on using a transistor controlled from an IO pin to switch the relay. Even if you don't want to use a 5V supply, at the very least still use the transistor with the 3.3V supply - any general purpose one will do. Basically, if you are running outside the specs with stuff like this, it may work, may work for a while then blow, cause seemingly unrelated issues, etc. That's why it's never a good idea to ignore them.
H: Using a solar car battery charger to power a solar boat? I am participating in a contest in which I need to build a solar boat (it has to fit into a 1.5' wide by 2' long by 1' high box and draw less than 2"). I currently have a 12V solar panel made for charging car batteries that outputs 125 mAmps and 1.8 Watts. I would strip the case and all unnecessary parts. Will this work for a solar boat? What kind of small motor would I need to use? Is there a lighter, more efficient alternative? AI: The power and energy levels mentioned below, if you cover most but not all the boat area with solar cells, are 10 to 20 times as high as from your example panel. Pricing MAY be similar. IF you are willing to work with bare PV (= photovoltaic = solar) cells then you can get much more Watts per $ than you get from a prebuilt panel like the one you showed. ebay solar cell pricing This ebay listing offers free shipping from China and about $US19 for 20 Watts of cells (5 x 4-Watt 6" x 6" cells. ) Price falls to $0.50/Watt in 1 kW quantity). Chose Watts etc from "model" box. They also sell tabbing wire, flux pens etc. To use this you need to be able to solder and use reasonable care - the cells are fragile. Their is a vast amount on-web on how to do this. The above products MAY be related to eco-worthy in San Francisco - or may not. The encapsulant bottle on the ebay page had eco-worthy on the label. They sell many sizes of PV cell pieces and related equipment and prices seem OK. "Best" energy for area are liable to be silicon wafers on ebay. Broken pieces can be as good if carefully joined. Higher efficiency the better. 15% - 18% range is target. You can get special ~= 23% ones but they are rare and costly. IF you can cover whole area with solar panels you get 2' x 1.5' = 3 ft^2. 3 ft^2 = 0.278 metre^2. At 15% efficiency and 1000 Watts/m^2 insolation (full sun) you get Power = area x insolation x efficiency = 0.278 x 1000 x 15% = 42 Watts. Reduce that by at least 10% for inter cell spaces and probably 20% in real life. 43 x 80% = 32 Watts. As you MAY not want a rectangular boat top and as you MAY have surfaces that are used for other purposes the actual area may be lower again - scale accordingly. I'd guess that 20 Watts is attainable in real life. That's with full sun - say cloud free at midday. Less as sunshine level (insolation) varies. Using bare cells you will need an encapsulant or to cover them. For short term use you can use a thin plastic sheet. Semi rigid polycarbonate can allow you to make a cover that offers SOME protection by not touching the cells. You lose about 10% more light from a good clear thin layer of polycarbonate. Added: What's a tabbed solar cell? Tabs are the flat wires that connect between the individual cells. Some cells come with tabs already soldered on, others you need to add them. To connect multiple cells in series each tab goes from the top of one cell to the bottom of the next (or vice versa). Thusly: Larger view Note that you can see the tab wires going from one side of one cell to the other side of the next cell in each case. I'm not sure what the "others steps" are in your recent question. Electrically, once you solder multiple cells in series, as above, you have a solar panel. It will be ultra-fragile and subject to corrosion. At a minimum you'll want to fasten the cells to a stiff flat non conductive surface (FR4 PCB laminate is a common choice) and you'll probably want some form of protective coating and maybe a housing. You have never explained the details of your requirement , so we can't tell how much power you need or whether maximising power matters. As a one-off, if absolute mx power was not an issue, I'd probably buy a PET covered PV panel that met the need. Far cheaper than the housed item you mentioned. A lot easier on getting a finished product than bare cells. Many such on ebay.
H: A question about how RS latches work and the time an input needs to stay high after it has been supplied! I have a RS latch constructed of 2 NOR gates, without enable input. Lets say that the in the beginning the output is set to Q=1, Q'=0. (pic1) In a given moment R is pulsed high, and Q is calculated as (R+Q')'=(1+0)'=0. (pic2) So now Q supplies 0 instead of one to the other NOR gate. Now Q' is calculated as (0+0)'=1.(pci4) Now as i can see from the picture while the propagation of the signal from the first NOR to the second, and then back from the second to the first lasted, the pulse at R stayed high. Therefore in this moment both signals to the first NOR gate are high. Q is again calculated as (1+1)'=0, so it doesn't change. The moment comes when R becomes 0 again and Q is calculated again, Q=(0+1)'=0, but still doesn't change.(pic 5) At this moment both inputs are low and the latch is in a stable reset state. The pictures are from an animation, but all of this wasn't clear to me until i separated the animation. This might not have been that much of a question but a discussion, because i need someones confirmation if i'm right. Does this mean that the input has to stay high for at least the time needed for the first NOR gate to be calculated, the new pulse supplied to the second gate, and that pulse supplied back? AI: Yes, to make a long story short, the input needs to remain stable until the positive feedback has finished propagating from the gate outputs to the gate inputs. If you violate the minimum pulse width the latch may simply ignore the pulse, it may oscillate, or it may become metastable.
H: Best way to detect when I'm home I'm working on a home automation setup and I'm trying to find the best way for the system to know when I'm home. A motion sensor won't work because my wife or my dogs may be home when I'm not. The two things I almost always carry with me are my keys and my cell phone and I liked this solution which pings the phone to see if it has joined the home wifi network. The only problem is that my phone goes to sleep very quickly when not used. This would make it good at detecting when I get home (if I just wake the phone for a few seconds on entering), but not when I leave. My other thought would be a bluetooth tag on my keys with a reader near the door, but how could it tell arriving from leaving? Anyone have any suggestions? AI: Why don't you just hang your keys on a hook connected to a microswitch? There are some problems that do not require a smart phone or RF communications.
H: What's wrong with this circuit to convert 0-5V to +10/-10V I'm trying to come up with a solution to use the analog output of a DAC to drive the X-Y axis control of a commercially available laser 'closed-loop moving magnet' driver. I found an explanation on how to use an op-amp to create a differential amplifier here and a calculator here, but I can't get that to work without a 2.5V reference voltage. I also found a simpler design for such a circuit here, but when I try that in a simulator (I use iCircuit on my iPad) it doesn't swing from -10V to 10V but from -8V to 12V (approximately). This is the circuit: This is my testing in iCircuit: Tried it with the included circuit simulator, don't know how it works exactly: simulate this circuit – Schematic created using CircuitLab My question is, is this simpler design the way to go, but are my resistor values wrong? Or do I need to go with the first circuit design but need to add something to get a 2.5V reference? I have very little information on the exact electrical requirements of the scanner, but I'm assuming it's a product designed to be used in an ILDA laser device and fairly compatible to that standard. UPDATE In iCircuit, I replaced the lower 10K resistor with 20K and the feedback resistor from 15K to 30K, and it looks like I'm getting the desired output now. Still, I don't know if this is trustworthy or not. Bonus question: I have an ST LM324N opamp lying around from an old lab kit. Do you consider this device suitable for this task, if I supply +12V/-12V to it? AI: Your circuit is incorrect. What you are trying to do is a gain+offset (negative offset) so you want to gain it up and offset the virtual ground point. You don't need that 10k/10k voltage divider as you've drawn it to provide a 2.5V reference. Since your full scale output from the DAC is 5V, and you want a full scale output from the opamp of 20V (-10 to +10) then you need to have a gain of 4 in the opamp. That gives you 0-20V. So you want (DAC x Gain) - Offset. In a non-inverting op-amp, the + input has a gain set by the (feedback resistor/input resistor)+1. However, the negative input has a gain of simply the (feedback resistor/input resistor). So a non-inverting input with a gain of 4 will have a a gain of 3 from the negative input. You can use the negative input to offset the fullscale 20V to -10 to +10. So you want 10/3 = 3.33 volts at the negative input. simulate this circuit – Schematic created using CircuitLab At the point I marked 3.333V, for a standard non-inverting op-amp configuration, that point would be GND. But you want to add the negative input's gain to the output too, so you need 3.333V there. The LM324 will work fine,but it's not a precision opamp and has some significant input offsets itself, and you might lose precision of the DAC input, but it can be trimmed out if you need to. If you don't want to trim anything then you can use a precision opamp with good DC characteristics.
H: VHDL--counter for 7 segment display I am writing a code that when the key(0) is pressed, the letter shown on the 7-segment display changes from the one to the next, like a to b, b to c. It starts from A. When the letter reaches H, it goes back to A. However, when I press the key, the letter changes,but it goes back to H when it is not pressed.I don't understand what the problem is.Here's the code: KEY : in std_logic_vector(1 downto 0); HEX : out std_logic_vector(6 downto 0) architecture behavioural of display is signal counter : std_logic_vector(2 downto 0):= "000"; begin process (KEY) begin if (KEY(0)= '1') then counter <= counter + '1'; end if; end process; process(counter) begin case counter is when "000" => HEX <= "0001000"; when "001" => HEX <= "0000011"; when "010" => HEX <= "1000110"; when "011" => HEX <= "0100001"; when "100" => HEX <= "0000110"; when "101" => HEX <= "0001110"; when "110" => HEX <= "0010000"; when "111" => HEX <= "0001001"; end case; end process; end behavioural; AI: The first issue I can see is that you're using a "std_logic_vector" type for your counter. You can't increment a std_logic_vector type, and so the "+" operator you're using will be doing weird things. (I'm not completely sure what "000" + '1' would give you, but it won't be the integer addition you're hoping for.) Use an unsigned type instead. Secondly, by using an if statement with no else statement in your asynchronous (unclocked) process, you're inferring a latch. (The synthesis process has to find somewhere to store the value of the counter for the process iterations where it's not incremented). This is generally considered bad practice - you're not fully defining the behaviour of the process, and the synthesis of latches can be very inefficient, using lots of space on the FPGA. This would be much easier to approach if you used a synchronous (clocked) process. You could then compare the current switch value to the value at the last clock cycle. This would also deal with the inferred latch that you have in your if statement. My counter process would look something like this: ... signal counter : unsigned(2 downto 0); ... process (RST, CLK) begin if RST = '1' then counter <= (others => '0') elsif rising_edge(CLK) then if KEY(0) = '1' and key_prev = '0' then counter <= counter + 1; end if; end if; end process; process (CLK) begin if rising_edge(CLK) then key_prev <= KEY(0); end if; end process; Switch bounce will be an issue which I've not addressed. You'll need to have another process which deals with that and outputs a debounced std_logic which you can use instead of KEY(0).
H: Is there a schematic symbol for a supercapacitor? Is there a schematic symbol for a supercapacitor, as distinct from smaller polarized capacitors? AI: A supercapacitor or Electric double-layer capacitor (EDLC) is functionally no different from a polarized capacitor, at the schematic level-of-abstraction. Hence, there is no standard symbol for it (yet), as distinct from the polarized capacitor symbol. As with other schematic symbols, if there is a pressing need to indicate that a particular part on a design is a supercapacitor, that would be an annotation to the symbol.
H: I2C slave not pulling down SDA data line for the full clock cycle I am communicating with some slave devices via multiple busses, however even though they are all the same device (http://www.invensense.com/mems/gyro/mpu3050.html) and all receive the same message/clock from the master, they don't hold the SDA line down for the same amount of time: If you notice, devices 1 and 3 do not pull down for the same length of time as devices 2 and 4. However they are all the same type of device receiving the same messages from the master. In this instance, devices 1 and 3 are causing problems because their changing from low to high (due to not holding the line low for long enough time) on the same clock cycle which should not happen during slave ACK or slave data sending: The device I am using to send and capture these signals (simultaneously) is a National Instruments PXI device that oversamples at 1 MHz which should be plenty so I don't think its simply a display issue. I thought it could be a timing issue of some sort, but per the MPU-3050 device specifications on page 16, it adhears to I2C FAST-MODE: My current timing parameters are much slower than that so they should be valid inputs: tSU;STA - 4700 ns tHD;STA - 4000 ns tSU;DAT - 1000 ns tHD;DAT - 4000 ns tSU;STO - 4000 ns tBUF - 4700 ns tHIGH - 4000 ns fSCL - 80 kHz My only real requirement is I need the device to ALSO satisfy the STANDARD-MODE specifications for I2C (as my above ones do) because I plan to add more devices to these busses that won't allow FAST-MODE. I really have no idea of what could be happening here, so its possible its not even a timing issue at all. I've tried some "trial-error" stuff with the timing, but similar behavior always occurs. If you have any ideas as to how I could try to fix this, please let me know! AI: The variation in delay you're seeing is immaterial. I2C is a synchronous protocol, so the only thing that matters is whether or not the SDA line is still low on the next rising edge of SCL. As you can see in your first diagram, they all pull SDA low before that happens, so they are behaving correctly. If this is causing problems on your I2C master, then it is implemented incorrectly. In fact, the rising edges you've circled are caused when the master stops driving the SDA low itself, and have nothing to do with the slave devices' activity. They haven't yet driven the line at all. (The timing variation you see is probably due to the asynchronous nature of your logic analyzer's sampling.)
H: how do I connect a BN59-01006A samsung rc to an Arduino Uno IR receiver module I have this remote control (BN59-01006A): and this IR receiver brick(Keyes IR receiver): I managed to connect the IR brick to my Arduino Uno. I downloaded this library and used a basic Arduino code: #include <IRremote.h> int RECV_PIN = 11; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); irrecv.resume(); // Receive the next value } } I'd like to be able to capture some HEX. values and display them through the serial monitor. The IR module works (the internal LED blinks every time I use the remote control towards it), but it's not displaying anything. What Am I missing? Do remote controls have to be calibrated to connect to a standard IR module? Thank you much for your help. AI: From the looks of your device on the break out it is likely a GP1UX311QS that is can run either 3.3V. Go with connecting the - to GND and the + to 5V. That device will likely receive 38kHz modulated signals. It is possible (likey) your remote is 38kHz modulated. It is possible it may be something else. Where the blinking LED on the breakout is a good indicator that it is demodulating something. Ken's Library has an example called "IRrecvDump.ino". Start with this. Where on the keyes breakout the S pin is the demodulated signal and on Ken's library's are defaultly connected to pin 11. Where the + and - are power and ground. The "IRrecvDump.ino" will attempt to decode a variety of typical formats of data. Where Samsung is not in the initial list. But it will dump the timing of the data stream. So that you or others can determine the pattern. And possibly add it to fork of the github. Where you can review all the inidividual forks and ADDs on the GitHub Network Diagram A quick Google of: samsung shirriff github. Shows several forks that indicate they have added Samsung. https://github.com/shirriff/Arduino-IRremote/pull/3 https://github.com/targettio/Arduino-IR-remote/blob/master/IRremote.h etc..
H: Solid State Electronics: Depletion vs Space-Charge region, what's the difference? I'm studying Solid State Electronics (can't make much of it) but I was wandering what is the difference between space-charge region and depletion region in a diode or in a BJT or in a MOSFET. Are they the same thing? If not, can you give an example of how space-charge region is formed? AI: Each depletion region can be called space-charge region, but not all space-charge regions are formed due to depletion. Space charge region = there is some surface area or volume where charge integral is not zero. In other words, there is some net charge present in this area or volume. Space charge regions can be formed due to various effects, including depletion effect. However, in literature on semiconductors physics, space charge region usually refers to depletion region (I can't remember seeing any exceptions). It is a good question by the way - it shows that you're really trying to understand the physical meaning of these terms.