Id
stringlengths
1
6
Tags
stringlengths
3
101
Answer
stringlengths
38
37.2k
Body
stringlengths
26
26.8k
Title
stringlengths
15
150
CreationDate
stringlengths
23
23
11154
|max232|
<p>Definitely required. Your drivers won't output anything without them. In <a href="https://electronics.stackexchange.com/a/29493/2064">this answer</a> I explain how the charge pumps work using these capacitors and also why it's not a good idea to use 10\$\mu\$F instead of 1\$\mu\$F.</p>
<p>I have a TRS232 RS-232 Driver(max232 equivalent). On the <a href="http://focus.ti.com/docs/prod/folders/print/trs232e.html" rel="nofollow">data sheet</a>, it shows a capacitor on Vs+ and Vs- (1uF)and they just have arrows saying they go somewhere. Can I omit these connections and capacitors and if I do what are the side effects or issues that may arise from this omission? </p>
Does Vs+ and Vs- need to be connected on a TRS232E?
2011-03-08T14:47:43.477
11168
|arduino|potentiometer|pwm|
<p>No, they're not. The pot sets a constant voltage somewhere between two other voltages, and the PWM drives 0V and 5V pulses in rapid succession, adjusting the time period for which the signal is 0V and 5V to get an average voltage somewhere between the two. </p> <p>Whether this difference is significant (and it appears to be, since the paddle isn't moving) will depend on two things: The sensing circuitry of the hardware which previously used the pot, and the filtering being applied to the PWM signal. </p> <p>The sensing circuitry needs to use the same voltage levels as the PWM. 0V should be equivalent for both circuits (tied together), and the maximum voltage must be less than 5V. Your Arduino will generate voltages close to 0V and close to 5V, but not precisely those voltages - That should be OK. The Pong game may draw more current than your Arduino is capable of providing, leading to lower voltages (even constant 0V output) - That would be a problem.</p> <p>Filtering is usually ignored for systems with a large amount of their own filtering. Motors have weight, and our eyes provide a high-pass filter for dimming LEDs, but this may not be the case for the input to the PONG game. Try putting a small resistor in line with the signal, and after the resistor, a small capacitor to ground. This will form a <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Low-pass_filter#Passive_electronic_realization" rel="nofollow">passive low-pass filter</a>. The values used will depend on the needs of the PONG game and the frequency of your PWM (Higher frequency is better!). You can start out with a 470 ohm resistor and a 0.1uF cap. Test the output with an oscilloscope - You should see a sine wave with a small variation about the target voltage, rather than a square wave alternating from 0 to 5V. The more variation you can tolerate, the faster you can move the paddle.</p> <p>However, you should also look at <strong>digital potentiometers</strong> and DACs. A digital pot functions electrically very much like a manual pot. You can move the imaginary wiper in digital steps. The <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/22060b.pdf" rel="nofollow">MCP4131</a> is an example. A DAC, or Digital-to-Analog Converter, is the opposite of the ADCs available on the microcontroller. It drives a voltage, rather than averaging two other voltages. DACs are much more common than digital pots; some microcontrollers include them to complement the ADCs. I'd suggest using a digital pot in this case, because you want to replace an existing pot and don't have a lot of control over the rest of the system.</p>
<p>I have one of these ancient Mentor game stations with the game tennis (Pong). Instead of using the controllers with a poti I'd like to use the Arduino PWM port to set a voltage between 0 and 5 Volt. However, this doesn't work, so there's no movement of the paddle. I tried several possibilities, but now wondering if the PWM and the poti are doing the same thing?</p>
Arduino PWM vs. Potentiometer
2011-03-08T19:33:20.547
11176
|robotics|
<p>you may find many cheap and simple robotics projects ideas in internet. I found many such kind of projects. If you are interested, once follow this link:</p> <p><a href="http://www.elprocus.com/robotics-based-project-ideas/" rel="nofollow">http://www.elprocus.com/robotics-based-project-ideas/</a></p> <p>I hope you may get required information from the above link.</p> <p>And also there are few robotics projects which are very interesting and easy to understand.</p> <p>Some of them are as follows:</p> <p>Visible light follower Robot</p> <p>Live Human detection and alerting Robot</p> <p>Wall Follower Robot </p>
<p>I am trying to get a robotics club started in my school. But I am wondering if I started what could I get the kids to make. They would be aged between 14-18, some with electronics knowledge. So I need some cheap project ideas. I am looking for a project cost of about £3 per device, this only applies to specialised parts such as motors, relays/H-Bridges, sensors and materials for chassises. Other parts such as microcontrollers we have lying around. </p>
Simple Robotics to do with teenagers
2011-03-08T23:34:00.913
11183
|batteries|resistance|lithium-ion|
<p>Measure open-circuit voltage \$V_{oc}\$, then load the battery with resistor \$R_{load}\$ and measure voltage \$V_{loaded}\$.</p> <p>$$ R_{in} = R_{load} \cdot \frac{V_{oc}-V_{loaded}}{V_{loaded}} $$</p> <p>This is the internal resistance at DC and at your specified load. Internal resistance varies with load and temperature and battery charge and age, etc. And you'll need more advanced equipment to measure at higher frequencies.</p>
<p>I'm coming from a computer science background, and will be writing some software to automate battery testing. I have background in math, but little to none in physics or electronics. Please consider this in your answers.</p> <p>That said, how would I go about testing the internal resistance of a small lithium polymer cell by hand?</p>
How to test internal resistance on small lithium polymer cell?
2011-03-09T03:37:45.593
11186
|arduino|batteries|voltage-regulator|
<p>There are switching regulators that are drop-in replacements for 78xx regulators. Digi-Key has a <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=4326593" rel="nofollow">whole category</a> for them. For getting 5V, you might want to try something such as <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=811-2196-5-ND" rel="nofollow">this</a>.</p>
<p>My question is probably pretty easy to answer for you smart people. But basically I'm building a Segway clone using an Arduino, two Jaguar speed controllers, and two 24 volt batteries (wired in parallel). I want to power my Arduino from the 24 volt batteries and am just wondering if I need any additional circuits to step down the voltage/current, stabilize/condition the power, or anything else that may need to be done before the Arduino can use the power.</p> <p>I'm fairly new to basic electronic circuits and am more of a programmer. Can someone help me with my question?</p> <p>Thanks!</p>
Arduino powered by 24 volt battery
2011-03-09T04:39:22.487
11187
|piezoelectricity|microphone|amplifier|
<p>Piezos have a high output impedance (capacitive, really), so you need an even higher input impedance on your mic pre or you'll get a "tinny" sound from the low end being rolled off. </p> <p>A piezo with 1000 pF capacitance would have <a href="http://www.wolframalpha.com/input/?i=1%2F%282*pi*1000+pF*50+Hz%29+to+ohm" rel="nofollow noreferrer">a reactance of 3 M&Omega; at 50 Hz</a>, for instance, so if you wanted to pick up 50 Hz, you'd need an amp with several M&Omega; input impedance. </p> <p><a href="http://focus.ti.com/lit/an/sloa033a/sloa033a.pdf" rel="nofollow noreferrer">Signal Conditioning Piezoelectric Sensors</a> from TI shows a circuit with 10 M&Omega; input impedance, for instance. <a href="http://www.eng.hmc.edu/NewE80/PDFs/PiezoElectronics.pdf" rel="nofollow noreferrer">Interfacing Piezo Film to Electronics</a> suggests 22 M&Omega; and shows the most basic circuit you could use: one of these big resistors in parallel with a unity-gain buffer op-amp. If that level is too low, add two resistors and make it into a non-inverting voltage amplifier (figure 9 b):</p> <p><img src="https://i.stack.imgur.com/CCnMI.gif" alt="a charge amplifier and non-inverting voltage amplifier for piezo applications"></p> <blockquote> <p>The major advantage of a charge amplifier, therefore, can be found when a long cable is used between a piezo film sensor and electronics. In addition, it also minimizes charge leakage through the stray capacitance around the sensor. Otherwise, simple voltage amplifiers are sufficient for most applications.</p> </blockquote> <p><a href="http://bmo.tnw.utwente.nl/electronics/Misc/PiezofilmCircuit/interface.stm" rel="nofollow noreferrer">source</a></p>
<p>I have a small piezoelectric ultrasonic microphone (receiving signals of around 40 kHz). But the voltages it generates are too small to be read by my micro-controller's ADC. So I want to amplify the voltage created by the microphone.</p> <p>I'd like a solution with a low part count, if possible. I've been trying to use an op-amp + some resistors, but I can't figure it out.<br> So, how can I amplify the voltage from the microphone?</p>
Amplifying sound from a microphone
2011-03-09T04:40:40.023
11195
|arduino|programming|processing|
<p>In Arduino language, libraries are included like</p> <pre><code>#include &lt;OneWire.h&gt; </code></pre> <p>etc</p> <p>And the code you are asking about is for <strong>Processing</strong> You should paste it there.</p> <p>If you want just to control RGB led, you can use my code:</p> <pre><code> /* Serial RGB controller Reads a serial input string looking for three comma-separated integers with a newline at the end. Values should be between 0 and 255. The sketch uses those values to set the color of an RGB LED attached to pins 9 - 11. The circuit: * Common-anode RGB LED cathodes attached to pins 9 - 11 * LED anode connected to pin 13 To turn on any given channel, set the pin LOW. To turn off, set the pin HIGH. The higher the analogWrite level, the lower the brightness. created 29 Nov 2010 by Tom Igoe MODIFIED by Semyon Tushev, February 2011 This example code is in the public domain. */ String inString = ""; // string to hold input int currentColor = 0; int red, green, blue = 0; void setup() { // Initialize serial communications: Serial.begin(115200); // set LED cathode pins as outputs: pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(11, OUTPUT); // turn on pin 13 to power the LEDs: pinMode(13, OUTPUT); digitalWrite(13, HIGH); } void loop() { int inChar; // Read serial input: if (Serial.available() &gt; 0) { inChar = Serial.read(); } if (isDigit(inChar)) { // convert the incoming byte to a char // and add it to the string: inString += (char)inChar; } // if you get a comma, convert to a number, // set the appropriate color, and increment // the color counter: if (inChar == ',') { // do something different for each value of currentColor: switch (currentColor) { case 0: // 0 = red red = inString.toInt(); // clear the string for new input: inString = ""; break; case 1: // 1 = green: green = inString.toInt(); // clear the string for new input: inString = ""; break; } currentColor++; } // if you get a newline, you know you've got // the last color, i.e. blue: if (inChar == '\n') { blue = inString.toInt(); // set the levels of the LED. // subtract value from 255 because a higher // analogWrite level means a dimmer LED, since // you're raising the level on the anode: analogWrite(11, blue); analogWrite(9, red); analogWrite(10, green); // clear the string for new input: inString = ""; // reset the color counter: currentColor = 0; } } /* Here's a Processing sketch that will draw a color wheel and send a serial string with the color you click on: // Subtractive Color Wheel with Serial // Based on a Processing example by Ira Greenberg. // Serial output added by Tom Igoe // // The primaries are red, yellow, and blue. The secondaries are green, // purple, and orange. The tertiaries are yellow-orange, red-orange, // red-purple, blue-purple, blue-green, and yellow-green. // // Create a shade or tint of the subtractive color wheel using // SHADE or TINT parameters. // Updated 29 November 2010. import processing.serial.*; int segs = 12; int steps = 6; float rotAdjust = TWO_PI / segs / 2; float radius; float segWidth; float interval = TWO_PI / segs; Serial myPort; void setup() { size(200, 200); background(127); smooth(); ellipseMode(RADIUS); noStroke(); // make the diameter 90% of the sketch area radius = min(width, height) * 0.45; segWidth = radius / steps; // swap which line is commented out to draw the other version // drawTintWheel(); drawShadeWheel(); // open the first serial port in your computer's list myPort = new Serial(this, Serial.list()[0], 9600); } void drawShadeWheel() { for (int j = 0; j &lt; steps; j++) { color[] cols = { color(255-(255/steps)*j, 255-(255/steps)*j, 0), color(255-(255/steps)*j, (255/1.5)-((255/1.5)/steps)*j, 0), color(255-(255/steps)*j, (255/2)-((255/2)/steps)*j, 0), color(255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j, 0), color(255-(255/steps)*j, 0, 0), color(255-(255/steps)*j, 0, (255/2)-((255/2)/steps)*j), color(255-(255/steps)*j, 0, 255-(255/steps)*j), color((255/2)-((255/2)/steps)*j, 0, 255-(255/steps)*j), color(0, 0, 255-(255/steps)*j), color(0, 255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j), color(0, 255-(255/steps)*j, 0), color((255/2)-((255/2)/steps)*j, 255-(255/steps)*j, 0) }; for (int i = 0; i &lt; segs; i++) { fill(cols[i]); arc(width/2, height/2, radius, radius, interval*i+rotAdjust, interval*(i+1)+rotAdjust); } radius -= segWidth; } } void drawTintWheel() { for (int j = 0; j &lt; steps; j++) { color[] cols = { color((255/steps)*j, (255/steps)*j, 0), color((255/steps)*j, ((255/1.5)/steps)*j, 0), color((255/steps)*j, ((255/2)/steps)*j, 0), color((255/steps)*j, ((255/2.5)/steps)*j, 0), color((255/steps)*j, 0, 0), color((255/steps)*j, 0, ((255/2)/steps)*j), color((255/steps)*j, 0, (255/steps)*j), color(((255/2)/steps)*j, 0, (255/steps)*j), color(0, 0, (255/steps)*j), color(0, (255/steps)*j, ((255/2.5)/steps)*j), color(0, (255/steps)*j, 0), color(((255/2)/steps)*j, (255/steps)*j, 0) }; for (int i = 0; i &lt; segs; i++) { fill(cols[i]); arc(width/2, height/2, radius, radius, interval*i+rotAdjust, interval*(i+1)+rotAdjust); } radius -= segWidth; } } void draw() { // nothing happens here } void mouseReleased() { // get the color of the mouse position's pixel: color targetColor = get(mouseX, mouseY); // get the component values: int r = int(red(targetColor)); int g = int(green(targetColor)); int b = int(blue(targetColor)); // make a comma-separated string: String colorString = r + "," + g + "," + b + "\n"; // send it out the serial port: myPort.write(colorString ); } */ </code></pre> <p>It receives string like 100,255,80 via serial and sets the outputs. Don't forget to send newline characters as well</p>
<p>I have a Arduino program wich make use of the processing library.</p> <p>The program code starts with</p> <pre><code>import processing.serial.*; </code></pre> <p>When I try to compile it with the Arduino compiler it crashes with</p> <pre><code>'import' does not name a file </code></pre> <p>The code I want to execute is <a href="http://www.instructables.com/id/Controlling-an-RGB-Led-with-Arduino-and-Processing/" rel="nofollow">http://www.instructables.com/id/Controlling-an-RGB-Led-with-Arduino-and-Processing/</a></p> <p>I pasted the serial library folder from processing into the same folder as my code. But it still crashes.</p> <hr> <p><strong>Update:</strong> My assumptions were wrong! The code I tried to use was designed for Java and to be used with the <a href="http://processing.org/" rel="nofollow">Processing IDE</a> not the Arduino IDE. It works fine now with Processing! And the other part of the code works fine with the Arduino IDE :)</p>
How to import a library into a Arduino program?
2011-03-09T08:50:52.670
11199
|avr|c|glcd|
<p>I wouldn't trust just any display library you find on the internet to drive the display. You might be better off writing your own display library for this display controller. If you do decide to use someone else’s library you will still need to familiarize yourself with the display controller datasheet and the code you are using to make sure it is doing what it's supposed to. <p> Do you know what communication mode you are using between the AVR and the display? Your display controller supports seven different communication modes using a combination of the BM pins, DB15, and DB13.</p>
<p>Ok so i've got a BTHQ128128 fstn display that i'm tryinf to drive via an ATMEGA128 AVR chip using gnu-c (avrlibc). Found some code on the interweb, but still not able to get the display to show anything.</p> <p>The screen driver is a UC1698 (colour although the screen in black&amp;white)</p> <p>Has anyone ever attempted this and succeeded?</p> <p>Also is there an other type of driver that is similar to the uc1698 that a library could be ported from.</p>
UC1698 based LCD driven by AVR
2011-03-09T10:40:40.227
11206
|dac|mp3|class-d|
<p>Your limiting factor is probably voltage swing.</p> <p>If your driving higher end headphones your probably looking at a 250->300 ohm load, 300ohm for higher end sennheiser cans for instance. But some phones (mostly professional models) can go as high as 600 ohms.</p> <p>At 300ohms:</p> <p>For 100mW you need 5.47 Vrms = 15.48 V peak-to-peak ( 18mA RMS)</p> <p>For 200mW you need 7.75 Vrms = 22 V peak-to-peak ( 25mA RMS )</p> <p>You probably won't find an integrated part that is specifically designed for portable devices that can achieve those levels of voltage swing. Your best bet is probably an audio op-amp with a high drive current (TI makes several, as does analog devices) or a purpose built headphone driver, for instance the <a href="http://focus.ti.com/docs/prod/folders/print/tpa6120a2.html" rel="nofollow">TPA6120A2</a> would fit your needs. </p> <p>Your challenge is then to build an efficient power supply to generate the +-12-15V rails needed.</p> <p>Not sure what your plan it for batteries but one way to make it easier and more efficient is to use two batteries, maybe two 9V batteries, center tap for ground giving you +-9V rails to start with. You end up with bigger/more batteries but you don't lose any power boost converting up to your + rail and then using a charge pump or similar to get your negative rail.</p> <p>EDIT: I'd target 100mW MAX...200mW would explode your head with most phones. expect 97-102db sensitivity at 1mW for most higher end cans (could be lower for pro models). meaning at 127mW you'd be looking at SPL in roughly the 115dB to 120db range which is more than enough to cause hearing loss if listening for extended periods. Targeting ~63mW would put you at 112db -> 117dB which eases your voltage swing constraints and can still cause plenty of ear damage.</p>
<p>I am doing personal project - portable MP3 player. Goals are sound quality + power efficiency. Price is not limited to a reasonable amount (100-200$ in parts is ok)</p> <p>Will single-chip DAC+D-class amplifiers give me best possible power efficiency while having excellent audio quality? I've seen 24-bit ones but a little overpowered (like 1.5W per channel). This looks very juicy - No need to design analog part, all sensetive parts are inside the chip. Are there any pitfalls with this approach or with D-class amplifiers with headphones in general?</p> <p>I afraid that classic op-amp based or AB-class amplifiers will eat too much power + I will need careful design of analog part after DAC.</p> <p>For example: <a href="http://www.cirrus.com/en/products/cs43l22.html" rel="nofollow">http://www.cirrus.com/en/products/cs43l22.html</a> Separate output for headphones scares me.</p> <p><strong>Design targets:</strong></p> <ol> <li>32-50 Ohm headphones support @100mW</li> <li>LiIon power supply, the more play hours I get the better :-) </li> <li>Maximum quality (as long as I can hear the difference) </li> <li>I have 24-bit decoder output, so going down to 16 is possible to not that fun (extra analog filtering and noise shaping).</li> </ol>
24-bit DAC + D-class amplifier in singlechip - good solution for pocket MP3 player?
2011-03-09T13:00:18.787
11211
|avr|programmer|
<p>I would suggest starting with a parallel port programmer. They are very easy to make and are rock solid. Of course you will need a PC with a parallel port.</p> <p>Or if you can find someone with a working programmer (or a PC with a parallel port) you can build yourself an <a href="http://www.fischl.de/usbasp/" rel="nofollow">USBasp</a>. It is easy to build and works with avrdude.</p> <p>Having a (temporary) programmer you can also make an <a href="http://www.mikrocontroller-projekte.de/Mikrocontroller/AVR-Prog/AVR-Programmer.html" rel="nofollow">AVR910 programmer</a> but as you can see on the page there is a little mess in the documentation. It takes normal RS232 (5V levels; use a MAX232) on one end and outputs AVR serial programming protocol on the other. There is even AVRospII - a nice Windows GUI for the thing. Some years ago we made several such programmers out of cell phone RS232 cables.</p>
<p>I am struggling with making a usb programmer for Atmega. I couldn't get my hands on a proper FT232L or something like that, but I did manage to find a serial to usb converter like <a href="http://shopping.indiatimes.com/Computer-Peripherals/Computer-Add-Ons/Others/BAFO-USB-to-Serial-Converter/ctl/20376650/pc/960047/cat/963600/pid/1454896" rel="nofollow">this</a>. This gets detected like a normal com port and is able to make work modems and printers. Will that do serial programming? There are serial programmers around which I have seen, work with ponyser as the programmer in the makefile. How do I make one?</p> <p><strong>Edit</strong> Through lsusb I have found out that the converter has a pl2303 inside (compatible with ft232r) so how do I do the programming now?</p>
AVR programmer with serial to USB converter
2011-03-09T15:41:28.733
11213
|oscillator|simulation|stability|
<p>Alternatively, instead of the window comparator, simply use a comparator with positive feedback.</p> <p><a href="http://falstad.com/circuit/#$+1+1.0E-6+1.1685319768402522+59+5.0+50%0Aa+688+144+800+144+1+15.0+-15.0+1000000.0%0Ar+800+144+800+208+0+500.0%0Aw+688+208+688+160+0%0Ag+800+384+800+400+0%0A172+160+96+128+96+0+6+-1.0+-1.0+0.0+0.0+0.5+Voltage%0Ar+160+96+224+96+0+10000.0%0Ar+224+64+336+64+0+10000.0%0Aw+336+64+336+112+0%0Aw+224+96+224+64+0%0Aa+224+112+336+112+0+15.0+-15.0+1000000.0%0Ag+224+128+224+144+0%0A160+400+128+336+128+0+20.0+1.0E10%0Aw+336+144+336+176+0%0Aw+336+176+160+176+0%0Aw+160+176+160+96+0%0Ac+800+304+800+384+2+9.999999999999999E-6+0.20567219669752274%0Aw+688+128+576+128+0%0Aa+576+288+480+288+0+15.0+-15.0+1000000.0%0Aw+576+128+416+128+0%0Ag+592+224+592+240+0%0Aw+400+128+416+128+0%0Aw+368+176+368+144+0%0Aw+368+192+368+256+0%0Aw+368+192+368+176+0%0Ar+608+304+672+304+0+100.0%0Ar+464+352+592+352+0+2000.0%0Aw+576+304+592+304+0%0Aw+592+304+592+352+0%0Aw+592+304+608+304+0%0Aw+464+352+464+288+0%0Aw+464+288+480+288+0%0Aw+464+288+368+288+0%0Aw+368+256+368+288+0%0Aw+688+304+672+304+0%0Aw+592+224+576+224+0%0Aw+576+224+576+272+0%0Aw+688+304+800+304+0%0Aw+688+208+800+208+0%0Aw+800+208+800+304+0%0Ao+36+8+0+35+2.5+0.0125+0+-1%0A" rel="nofollow noreferrer">Sim Link</a></p> <p><img src="https://i.stack.imgur.com/kjsrN.png" alt="enter image description here"></p> <p>It has the advantage of being MUCH simpler, in terms of parts. Also, it should be VERY stable, thanks to the positive feedback on the comparator.</p> <p>You can make it even simpler by just getting rid of the analog switch, as well as two of the op-amps.</p> <p><a href="http://falstad.com/circuit/#$+1+1.0E-6+51.8012824668342+39+5.0+50%0Aa+320+160+432+160+1+15.0+-15.0+1000000.0%0Ar+432+160+432+224+0+250.0%0Ag+432+336+432+352+0%0Ac+432+256+432+336+2+9.999999999999999E-6+6.551035378688574%0Ag+208+160+208+176+0%0Ar+336+80+400+80+0+100.0%0Ar+224+144+288+144+0+100.0%0Aw+208+160+208+144+0%0Aw+208+144+224+144+0%0Aw+288+144+304+144+0%0Aw+304+144+304+80+0%0Aw+304+80+336+80+0%0Aw+400+80+432+80+0%0Aw+432+80+432+160+0%0Aw+320+144+304+144+0%0Aw+320+176+304+176+0%0Aw+304+240+432+240+0%0Aw+304+176+304+240+0%0Aw+432+224+432+240+0%0Aw+432+240+432+256+0%0Ao+3+64+0+35+10.0+0.4+0+-1%0A" rel="nofollow noreferrer">Sim Link</a></p> <p><img src="https://i.stack.imgur.com/jWFsq.png" alt="enter image description here"></p> <hr> <p>Ok, I'm having fun now.</p> <p>So, this circuit never makes a perfect triangle wave, because you're charging the capacitor with a voltage through a resistor. </p> <p>To make it operate as a true triangle wave generator, we need to do a significant amount of refactoring.</p> <p>Basically, we need to charge the capacitor with a current source.</p> <p>This is simple enough to do, all you have to do is stick the cap in the op-amp feedback.</p> <p><a href="http://falstad.com/circuit/#$+1+1.0E-6+43.84883893407173+51+5.0+50%0Aa+336+112+448+112+1+50.0+-50.0+1000000.0%0Ar+208+176+320+176+0+1000.0%0Ag+288+96+288+112+0%0Aa+304+288+208+288+0+15.0+-15.0+1000000.0%0Ag+320+224+320+240+0%0Ar+336+304+400+304+0+100000.0%0Ar+192+352+320+352+0+200000.0%0Aw+304+304+320+304+0%0Aw+320+304+320+352+0%0Aw+320+304+336+304+0%0Aw+192+352+192+288+0%0Aw+192+288+208+288+0%0Aw+416+304+400+304+0%0Aw+320+224+304+224+0%0Aw+304+224+304+272+0%0Aw+448+176+448+272+0%0Aw+288+96+336+96+0%0Aw+336+128+336+176+0%0Ac+352+176+416+176+0+1.0E-5+-6.104089742349298%0Aw+336+176+352+176+0%0Aw+416+176+448+176+0%0Aw+192+288+192+176+0%0Aw+208+176+192+176+0%0Aw+320+176+336+176+0%0Aw+448+272+448+304+0%0Aw+448+304+416+304+0%0Aw+448+176+448+112+0%0Ao+18+64+0+35+10.0+0.025+0+-1%0A" rel="nofollow noreferrer">Look at This</a></p> <p><img src="https://i.stack.imgur.com/uPSYB.png" alt="enter image description here"> (Note: this oscillators start-up is a little weird. It basically relies on leakage to charge the capacitor enough that the bottom op-amp output goes to one of the rails. This would <strong>not</strong> be a problem in the real world, since op-amps always have a little bit of offset, which would drive the output to one of the rails immediately on startup. </p> <p>Basically, the simulated op-amps are <em>too</em> perfect.)</p>
<p>I designed a simple triangle wave oscillator based around a switchable curent soure. It works for a few cycles, then it becomes unstable and finally stops working altogether. Why is this?</p> <p><img src="https://i.stack.imgur.com/FmPYN.png" alt="enter image description here"></p> <p>If anyone wants to simulate this - <a href="http://falstad.com/circuit/#$+1+5.0E-6+0.3638846248353525+50+5.0+50%0Aa+608+192+720+192+1+15.0+-15.0+1000000.0%0Ar+720+192+720+256+0+100.0%0Aw+720+256+608+256+0%0Aw+608+256+608+208+0%0Ag+720+432+720+448+0%0A172+80+144+48+144+0+6+0.5+0.5+0.0+0.0+0.5+Voltage%0Ar+80+144+144+144+0+10000.0%0Ar+144+112+256+112+0+10000.0%0Aw+256+112+256+160+0%0Aw+144+144+144+112+0%0Aa+144+160+256+160+0+15.0+-15.0+1000000.0%0Ag+144+176+144+192+0%0A160+320+176+256+176+0+20.0+1.0E10%0Aw+256+192+256+224+0%0Aw+256+224+80+224+0%0Aw+80+224+80+144+0%0Ac+720+352+720+432+2+9.999999999999999E-6+-0.49998494835203755%0Aw+592+320+608+320+0%0Aw+592+384+608+384+0%0Aw+608+384+608+352+0%0Aw+608+352+608+320+0%0Aw+720+352+720+256+0%0Aw+720+352+608+352+0%0AR+592+288+624+288+0+0+40.0+0.2+0.0+0.0+0.5%0AR+592+416+624+416+0+0+40.0+-0.2+0.0+0.0+0.5%0Aw+608+176+496+176+0%0Aa+592+400+496+400+0+15.0+-15.0+1000000.0%0Aa+592+304+496+304+0+15.0+-15.0+1000000.0%0A152+496+352+400+352+0+2+5.0%0A155+304+320+336+320+1024+5.0%0Aw+400+320+400+288+0%0Aw+288+288+288+384+0%0Aw+288+384+304+384+0%0Aw+496+176+336+176+0%0Aw+496+336+496+304+0%0Aw+496+400+496+368+0%0Aw+288+288+304+288+0%0Aw+304+288+400+288+0%0Aw+720+352+784+352+0%0Ar+784+352+784+432+0+10000.0%0Ag+784+432+784+448+0%0Aw+320+176+336+176+0%0Aw+288+224+288+192+0%0Aw+288+288+288+224+0%0Ao+22+1+0+35+0.5846006549323611+9.765625E-55+0+-1%0A" rel="nofollow noreferrer">here is the link</a>.</p> <p>One other thing - occasionally, the osillator will manage 20 cycles, other times it won't complete a single one. Why is the simulation apparently not deterministic?</p>
Why is this oscillator unstable?
2011-03-09T16:09:33.347
11218
|opto-isolator|
<p>Page 1 of the datasheet clearly says 'open collector output'. Without a pull-up, the voltage is undefined.</p> <p>The purpose of 270 \$\Omega\$ on the test circuit is simply to provide a defined amount of current for the output logic to sink during the test. Whatever pull-up value you use is up to you, just don't exceed the sinking capability of the output stage.</p> <p>When it comes to biasing an opto, the best practice is to choose a resistor that will allow the minimum amount of current needed to do the job over the expected current transfer ratio (CTR) distribution of the batch. Generally, the lower the current, the longer the expected life of the part.</p>
<p>I had some problems setting up a Opto Coupler today. The data sheet is <a href="http://www.datasheetcatalog.org/datasheet/fairchild/H11L1-M.pdf" rel="nofollow">here</a>. I set it up putting a 470 ohm resistor to ground from the cathode (pin 2). I am understand the selection of this resistor as it is used to set the current through the LED to about 10mA when he ANODE(pin 1) is given 5 Volts. What I don't understand is why a 270 Ohm resistor(as shown in the test circuit) is needed between pin 4 and 6. From testing I know that with the 270 resistor I get a range of about .2 to 5 volts on the output, and without the outputs range is 0.08 to 1.4 volts. I know its something to do with the biasing the circuit and the gains from the internal transistor... Wondering if someone could point me towards a source that actually explains how to bias a opto coupler... its been a few years since I played with transistors. </p>
How to properly Bias a Opto Coupler
2011-03-09T17:55:33.890
11219
|wiring|
<p>The principle is power to the iron changes the temperature. The dimmer reduces the power by cutting off part of the mains sinewave. By setting different levels on the rotation of the dimmer you should then be able to measure the temperature, at each level, with a cheap oven temp probe to determine what amount of rotation represent what temperature. The thermal mass of the iron will help in reducing the tip temperature variation, but with small joints it should not be noticable. The main advantage would be that when you have finished soldering but have more to do later you can turn down the dimmer to minimum to keep the tip warm and allow it to speed up quickly. This prevents the tip corrosion when leaving the iron at a high temperature.</p>
<p>So I have a really cheap soldering iron and a dimmer switch meant to be wall-mounted. The soldering iron has a standard, ungrounded cord. The dimmer switch has four wires: a green (for ground), a black and a red, and another red that's "only for use in 3-way switches". How can I wire this into the soldering iron to allow for variable soldering iron intensities?</p> <p>I tried cutting the soldering iron cord, binding neutral back to neutral and binding the positive to the dimmer's red, through the dimmer, and back through the dimemr's black to the other side of the positive. This did not work. I also tried it with the red to red, and the black to the other red, and neither worked.</p> <p>Is it possible to insert a wall-mounted dimmer into a standard appliance cord such as a soldering iron?</p>
Can I wire a dimmer switch into a soldering iron?
2011-03-09T18:11:12.307
11220
|serial|
<p>That depends what you have to work with. If you're oversampling at a rate of at least 4.1x the bit rate (2.05x the max transition frequency), a simple approach is to use a state machine in which the duration of each high/low time is compared to either 1.5x the previous duration (if the previous one is thought to be 'short') or 0.75x the previous duration (if thought to be 'long'). Note that if you don't know whether you're starting with long or short pulses, you may misidentify a continuous sequence of long pulses as short, or vice versa, but the first pulse of the "other" width will be correctly recognized.</p> <p>To clarify: suppose the goal is to recognize non-differential manchester-coded data encoded per IEEE 802.3. If one gets a transition after a "long" time, the state of the communications line following the transition will represent a bit of data. If one gets a transition after a "short" time, ignore it but look at the next one (which is expected to be short); the state of the line after that next transition will represent a bit of data.</p> <p>For differential coding, a "long" state time represents a zero; two "short" state times represent a 1 (if a short is followed by a long, there's a communications error).</p>
<p>What's an efficient algorithm for recovering the clock and decoding <a href="http://en.wikipedia.org/wiki/Manchester_code" rel="nofollow">Manchester-encoded</a> data?</p>
Efficient decoding of a Manchester-encoded serial link?
2011-03-09T18:16:42.527
11237
|soldering|
<p>There are butt splice crimps such as this <a href="http://www.molex.com/pdm_docs/sd/191640014_sd.pdf" rel="nofollow noreferrer">Molex one</a> which go down to 22 AWG. Or this <a href="http://uk.farnell.com/tyco-electronics-amp/0-0323994-0/crimp-terminal-butt-pidg-yellow/dp/4217627" rel="nofollow noreferrer">Amp one</a>.</p> <p>But the best way is a <a href="http://uk.farnell.com/tyco-electronics-raychem/b-155-03/terminal-soldersleeve-3mm-pk100/dp/1292903" rel="nofollow noreferrer">solder sleeve</a> like this which is heatshrunk onto the pair of wires. The solder melts at the same time as the sleeving shrinks. <img src="https://i.stack.imgur.com/GM0nV.jpg" alt="Raychem solder sleeve"></p>
<p>Are there any tools or parts that help when soldering a free-floating component to another one, for example a resistor to an LED? Something that will make some kind of mechanical connection instead of just relying on the solder. I imagine someone has to make some kind of little sleeve or collar that you slide both leads into and then crush, but I've never come across anything. </p>
Is there a crimp tool, or something, for when you're soldering leads to leads
2011-03-09T22:30:44.700
11244
|conductive|
<p>I would guess that it is normally used as a seal for metal enclosures, to get a very good shield against electromagnetic interference. Since it is silicone it would also be a good seal against water or other substances.</p> <p>As for using it as instant wires I don't think silicone would stick well enough to other electronics to be useful.</p>
<p>I got my hands on a big tube of conductive silicone. I've never heard of it before, but my first thought was, "Is this just basically wire in a tube?" Has anyone ever used this before? Can you just apply it as a low heat solder? The people I got it from said this stuff is kinda expensive, but I got it since they were just going to get rid of it (at cost, so they were glad to let me have it). Plus it is expired (does silicone expire?).</p> <p>Anyway, anyone have any experience using the stuff?</p>
Can I use conductive silicone for anything I could use solder for?
2011-03-10T00:21:46.277
11256
|rs232|
<p>It's not gonna happen. The chips are /pin/ compatible (the pins do the same things) but the internal behavour is very different. The FTDI chips are built with bit-bang mode as a design goal, the Prolific chip is not.</p>
<p>I want to bitbang a Prolific PL-2303HX. There is the library <code>libftdi</code> which enables bitbanging on the FT232 chip. Can I make it work with PL-2303? When I try using <code>libftdi</code> it gives in the error "Can't open device".</p> <p>Anyone knows how to make this work?</p> <p>When I try to open the device with the example code in <code>libftdi</code> (changing the vendor and device id to </p> <pre><code>f = ftdi_usb_open(&amp;ftdic, 0x067b, 0x2303); </code></pre> <p>I get the following output</p> <pre><code>rick2047@ubuntu:~/work/libftdi$ sudo ./a.out [sudo] password for rick2047: unable to open ftdi device: -6 (ftdi_usb_reset failed) </code></pre>
Making libftdi work with PL-2303HX
2011-03-10T03:51:53.273
11258
|remote|safety|
<p>That was the magic smoke. It will not come back by itself. Remote is generally safer than other components that may use high voltage. Battery could be an issue, also get rid of anything leaking.</p>
<p>I have an old sony universal remote, the rm-v15. I opened it to get to the pcb, and a strange nasty smell came out of it. Is there anything I should be worried about? Any hazards used in old remotes?</p>
Safe to open old sony remote?
2011-03-10T02:35:11.280
11263
|amplifier|log-amplifier|
<p>Devices equivalent to the LM394 are now being made by another company: <a href="http://www.alfarzpp.lv/eng/sc/AS394CH.php" rel="nofollow noreferrer">http://www.alfarzpp.lv/eng/sc/AS394CH.php</a></p>
<p>The traditional logarithmic amplifier circuit is described in <a href="http://www.national.com/an/AN/AN-311.pdf" rel="noreferrer">National Appnote 311</a>:</p> <p><img src="https://i.stack.imgur.com/Tu3mE.png" alt="enter image description here"></p> <p>This circuit uses the difference of two transistor currents to generate the log of the input over a pretty wide range.</p> <p>The well-matched transistor pair Q1a and Q1b are halves of the LM394 "supermatch" transistor pair. But National discontinued this part last year with no clear replacement.</p> <p>I can use LM3406 array, but the specs are far worse. There are plenty of arrays of '2222 or '3904 available, but there is no mention of matching in the datasheet. The transistors might be on separate dies for all I know.</p> <p>TI still sells some Burr Brown log amps but they are expensive. LOG101 is $18.37 in onesies. Analog makes the AD606 for $43.88 each or the AD830x parts for $12 - $20.</p> <p>How can I (cheaply) make a logarithm?</p>
LM394 is obsolete. What is the new standard log amp circuit?
2011-03-10T06:14:19.267
11274
|power-supply|dc|ups|dc-dc-converter|
<p>My approach would select a 24 volt battery or two car batteries or similar in series. Then <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=LM2678T-12-ND" rel="nofollow">regulate that 24 volts to produce your 12 volt output</a>. Then buy or build a AC charger for the battery(ies). <a href="http://www.batterystuff.com/battery-chargers/12-volt/marine-chargers/GEN2.html" rel="nofollow">http://www.batterystuff.com/battery-chargers/12-volt/marine-chargers/GEN2.html</a></p>
<p>My requirement is to keep running supply of low power devices like DSL modems, etc. Most of these devices input 12V/9V DC so i don't see the value in using ordinary UPS which converts DC to AC then back to DC, lots of conversion lots of power loss lots of money involved. I want a DC UPS output which can be directly input into these devices. <img src="https://i.stack.imgur.com/uD1NP.png" alt="DC UPS diagram"> </p> <p>I am not pro, so I need a circuit diagram for a DC UPS, that:</p> <ol> <li>Takes 12V input.</li> <li>Gives 12V output to devices.</li> <li>If input current is available it will also charge the battery.</li> <li>If input current is not available, will provide current from battery to attached devices.</li> </ol>
12V DC UPS for Network Equipment
2011-03-10T12:56:49.843
11275
|lpcxpresso|
<p>I have been experimenting with the LPCXpresso LPC1114 board. It appears the programming interface (LPC3154) is USB High-Speed (480 MHz) and it seems extremely particular about the USB cable you use. If the cable (or the host port) isn't top notch, it may be very unstable, crash a lot, and even lock up other USB devices on the same root port. From having written a number of USB stacks, my guess is this particular USB stack is not very robust in terms of error and exception handling.</p> <p>The fact they used such a high-end ARM for a simple JTAG/SWD interface is laughable, that MCU was over $13 (at Digikey) last time I looked. </p> <p>I would recommend using a different SWD interface and disconnecting the one on the board if you have any difficulty. This should also permit the use other (non Code Red) IDEs with these boards.</p> <p>(If you encounter USB problems with any device (even Full-Speed 12 MHz) and you are using the USB host connectors in the front of a PC system unit, try using the rear connectors on the MB itself. I have seen well-known brands of PCs with non-compliant (and very flaky) cabling to the front of the system unit.)</p> <p>Izzy Weird</p>
<p>I wonder, if that's possible to load lpc3154 at LPCExpresso board with custom firmware?</p> <p>I see that chip supports secure boot, so if AES key was programmed, it is impossible without knowing the key? Or are there any options to boot lpc3154 without knowing the key? (SD, flash, USB, JTAG... Anything?)</p> <p>Does anyone know if key was indeed loaded?</p> <p>Just buying new lpc3154 is not an option - they are not in stock here anywhere, and wait times are 4 weeks+ (and a price tag > than a price of this board)...</p>
Reprogramming LPC3154 at LPCxpresso
2011-03-10T13:10:54.550
11289
|vhdl|synthesizer|
<p>Since there does not seem to be a single list of all the pragma's accepted by all the different tools, I made an attempt to compose such a list myself. </p> <p><a href="http://www.sigasi.com/content/list-know-vhdl-metacomment-pragmas" rel="nofollow">http://www.sigasi.com/content/list-know-vhdl-metacomment-pragmas</a></p> <p>Feel free to post comments if you find any omissions or inaccuracies.</p>
<p>I know you can stop VHDL code from being compiled by the synthesizer:</p> <pre><code>-- pragma translate_off assert thisDoesNotGetSynthesized(); -- pragma translate_on </code></pre> <p>BUT, there are also other ways to write this, including <code>-- synopsys translate_off</code>.</p> <p>Which are all the valid ways to turn off synthesis? Is there a definitive list on which are valid pragmas?</p> <p>Additionally: what are the <em>syntax rules</em> for these pragmas? Is the whitespace in the pragma important? Can the pragma occur anywhere in any comment, or does it need to be the only thing in that comment? </p>
Which are the the valid VHDL compiler pragmas?
2011-03-10T16:40:12.740
11290
|analog|multiplexer|high-frequency|
<p>The ADG1236 and ADG1213 parts from Analog seem to fulfill the requirements. Both have a 1 GHz bandwidth and can use a power supply of +/-15V. They also offer a much higher switching frequency than a relay.</p>
<p>Does anyone know some ref of high voltage high bandwidth analog multiplexer? I am looking for a mux that can tolerate input voltages up to 10V, but has also a high bandwidth of at least 1Ghz. I am not sure that such component actually exists...</p> <p>I need a high bandwidth because I want to pass very short pulses, typically between 1 to 10 ns, in the multiplexer.</p> <p><strong>Follow-up:</strong> I just found parts from Analog that look promising: ADG1236 and ADG1213. Both have a 1 GHz bandwidth and can use a power supply of +/-15V. However the bandwidth is given for a load of 50 ohm. Will the bandwidth heavily depend on the load? In that case, what would be the bandwidth for, say, a load of 1 kohm?</p> <p>Thanks.</p>
High voltage high bandwidth analog mux
2011-03-10T17:34:43.403
11293
|microcontroller|microprocessor|assembly|
<p>Microprocessor: A digital hardware module that executes instructions. The module can be a complete integrated circuit.</p> <p>Microcontroller: A complete module that contains a microprocessor with internal memory in addition to other modules. </p>
<p>So I often see books/tutorials and references when programming in assembly to a microprocessor.....then I see some refer to it as a microcontroller.</p> <p>For instance the Atmel ATtiny2313....i saw some tutorials on, some call it a microprocessor, some call it a microcontroller?</p> <p>Which is it? and is programming them (basically) the same? (in assembly)</p>
Programming Differences between a Microcontroller and a Microprocessor?
2011-03-10T18:25:49.993
11302
|led|fpga|
<p>The addresses for the LEDs are like this:</p> <p>P4,E4,P16,E16,K14,K15,J15,J14</p> <p>Apparently the following code can be used to test them:</p> <pre><code>(* LOC="P4,E4,P16,E16,K14,K15,J15,J14" *) output reg [7:0] LEDs=0; </code></pre>
<p>I can program LEDs 0 to 3 to light up, but I get an error when I try to assign LEDs 4 to 7. Why is that?</p>
How to light up LEDs 4-7 on a Nexys2 board
2011-03-10T22:09:20.273
11307
|arduino|robotics|
<p>Sintered bronze bearings (often oil impregnated) can be a useful technology, they are both thinner and cheaper than ball bearings.</p> <p>Sometimes a piece of metal or plastic pipe can work as a sleeve bearing.</p> <p>Depending on load and life cycle, a variety of plastics or even hardwood can be used for do it yourself bearings.</p> <p>For an old-school approach, if you have a polished shaft, pouring a babbit metal around it may be an option. A newer take on that idea is epoxy-teflon composites, such as Moglice.</p> <p>If you are playing around with mechanics, you should have have catalogs from the likes of small parts, msc industrial, mcmaster (probably online only), northern hydraulics, and some of the radio control model outlets kicking around for light reading - it's useful to learn about the range of items that must be manufactured to enable an industrial society, and what sub-varieties thereof are affordable from various sources. And make a point to browse your discount auto-part store and the dusty corners of anything still resembling a true hardware store in your area.</p>
<p>I'm planning to build a table tennis robot using an Arduino controller for the location/placement logistics and control, but I'm stuck on one physical detail and don't know where else to ask. I want to be able to rotate the end of the pipe independently of the base, but I can't find any fixtures that would allow for this. To clarify what I'm looking for, think of joining two pipes together axially - typically the joint will be fixed and they won't be able to rotate in the coupling. I'm looking for a coupling that will allow one end to rotate independently of the other end with minimal friction so a small servo can perform the rotation (obviously being water tight is not a requirement :-) ). Anybody know what the terminology for such a coupling is, or an exact example of one? I'm looking for an opening that can fit a ping pong ball, so 2" inner diameter should be plenty. Thanks for any insight!</p>
Join two pipes with independent rotation?
2011-03-11T02:26:37.397
11309
|microcontroller|triac|
<p>You could test and debug the device at low voltages (use 12V AC instead of 110V).</p> <p>OTOH if you need it to be connected to the PC (or anything having contact with humans, like a button or keyboard) while operating at 110V you should definitely buy a MOC3041 or something similar.</p>
<p>I have a project that needs to be in use on saturday (afterwards I'll be able to complete it properly) and my optoisolators haven't come in yet.</p> <p>I'm using an arduino to switch mains power (on/off) using a triac, Is there anyway to safely wire the microcontroller to the triac without using an optoisolator?</p>
Microcontroller + Triac without an optoisolator
2011-03-11T04:12:40.473
11316
|adc|temperature|rtd|
<p>I've seen some ADC's from Analog specifically for RTD sensors with I2C interface - check their parametric table. Other manufacturers probably also have these.</p> <p>Also, you can use any I2C ADC with differential input for that.</p> <p>Schematics will be in datasheet :-)</p>
<p>How do I measure one or more PT100/1000 (PTC Resistor) with a Arduino/ATmega328 over I2C? Are there any ready microchips? Do I need to construct my own circuit? If so, are there any ready schematics?</p>
How do I measure a PT100/1000 with a Arduino over I2C?
2011-03-11T09:20:21.080
11318
|batteries|lifetime|
<p>UPSes destroys batteries due to over voltage. In a UPS the manufacturer prefers to have fast battery recharging over battery life, thus reducing the battery life.</p> <p>What you could do to increase battery life in an UPS is to disconnect the charging circuit and instead use a normal battery charger for the type and size of battery/ies that the UPS uses.</p>
<p>Could anyone suggest, why lifetime of Pb batteries is so short in UPSes?</p> <p>3 years till 0 mAh - I've seen that several times, and some UPSes were not low-end (~250$)...</p> <p>Are there any ways to make it last longer when designing new device?</p> <p>Same for LiIon - if we rarely charge/discharge them, how long they could last? (I've heard things like '2 years of shelf-life and they are garbage')....</p>
Pb(Lead acid) & LiIon Battery lifespan
2011-03-11T09:50:21.523
11343
|bandwidth|
<p>In the 1Ghz range the most important is load capacitance. The higher capacitance - the less bandwidth. With 1nF load you are likely go under 10 MHz bandwidth. So avoid long traces. </p> <p>Resistive load - if it's too high (like 5Ohm) you can just get signal with lower amplitude or more distortion, but bandwidth is not that much affected. And 1kOhm will not hurt usually (unless there is some fancy load matching, which is unlikely).</p>
<p>The bandwidth of electronic parts, like analog switches, is usually specified for a specific load, typically 50 ohm and 5 pF for example.</p> <p>Now if I have an analog switch with a bandwidth of 1 GHz for a 50 ohm load, how the bandwidth change depending on the load? What appends for, say, a load of 1 kOhm? Is there a way to calculate or estimate the bandwidth for different load values?</p> <p>Thanks.</p> <p>(this is a follow-up of <a href="https://electronics.stackexchange.com/questions/11290/high-voltage-high-bandwidth-analog-mux">High voltage high bandwidth analog mux</a>)</p>
How the bandwidth is impacted by the load?
2011-03-11T21:50:37.080
11344
|microcontroller|led|
<ol> <li>Yes, you need a current-limiting resistor for each LED in this kind of circuit.</li> <li>If, hypothetically, you use BJT transistors, then yes, you will also need a second resistor (per LED) on the base of each and every transistor to limit the current between the base and emitter of the resistor (that base-emitter junction acts like a diode). There is a wide range of resistor values that will work just fine -- BarsMonster shows how to calculate it.</li> </ol> <p>However, if I didn't already have plenty of BJT transistors, I would consider using something that doesn't need base resistors, perhaps</p> <ul> <li>2N7000 or 2N7002 transistors, since FET transistors don't need a base resistor, or</li> <li>transistor arrays such as the SN75468 or ULN2803, which have base resistors built into the IC, or</li> <li>ICs that integrate both the transistor array and the shift register into the same IC. Several of them have the same interface as the 74HC595 (so you can use the same software), but can drive LEDs directly. W5VO kindly mentioned these chips to me at <a href="https://electronics.stackexchange.com/questions/6676/which-sipo-chip-is-better-74hc4094-or-74hc595-or-something-else">another question about driving LEDs</a>.</li> </ul> <p>Even the cheapest BJT or FET transistor can handle far more current and far higher frequencies than a single display LED is ever likely to require. So use whatever transistors are easily available to you.</p>
<p>I'm planning to put together a simple shift-register driven array of LEDs as a first project, something akin to this: <img src="https://i.stack.imgur.com/o6vR1.jpg" alt="Simple LED array"> But using a 74HC595 shift register (two, eventually) and a transistor to drive each individual LED alone.</p> <p>It's been twenty years since my (limited) formal electronics education, and I have a few questions:</p> <ol> <li>I believe understand why the resistors in line with the LEDs are necessary, because an LED essentially behaves like a short circuit, and will draw a lot of current from the register, right up until either it dies or the register dies. Is this correct?</li> <li>Why the "1K or 2.2K" resistor on the base of the transistor? Will I need one on each of the bases? Is this to limit the current between the base and emitter of the transistors? How do I know what value to use?</li> <li>Should I use 2N2222 transistors or should I use something like a 2N3904? What is the difference, other than the 2N2222 seems to have a much higher collector-emitter capacity? Does that affect the choice of resistor I need?</li> </ol>
Building a simple mcu-driven array of LEDs
2011-03-11T21:56:06.527
11355
|power-supply|
<p>One test worth trying is to remove the battery from your laptop and then see if your laptop will run from the power supply. If it does work your battery may be faulty and causing the problem.</p>
<p>Before I begin, I'd like to note that I am very unexperienced in the electronics field, so some things that may be obvious are completely unknown to me.</p> <p>I recently was dealing with a laptop that would not charge, boot, or show any signs of life. After some discussion over the phone, I learned that the AC adapter's wire was frayed, and so I immediately ordered a new one. When it arrived, there was still no success in getting any power to the laptop. I proceeded to use a multimeter to test both AC adapters, and like I suspected, the old one was reading 0V. The new one, however, was reading only 15.3V on the multimeter. The adapter says it should be outputting at 19V (both on the adapter itself and on the box it came in). Additionally, the battery is labeled at 14.4V, if that matters at all. </p> <p>So my question comes down to this: could the fact that the multimeter read 15.3V instead of 19V on the AC adapter be related to why the laptop refuses to show any signs of life? If not, I will probably have to start taking it apart until I get can at the power connector.</p>
Would a laptop charger at incorrect voltage fail to supply power?
2011-03-12T02:45:23.257
11358
|basic|ideas|
<p>There would be some capacitance between the unconnected terminals of the LED and battery, so a little current would have to flow before the unconnected terminals before their potentials was equal to those of the connected terminals. In practice, however, that level of capacitance would likely be so small as to be impossible to measure much less use.</p> <p>Note that while a one farad capacitor can accept a whole coulomb of electrons (one amp for one second) before building up a volt of potential difference, that doesn't mean a coulomb of electrons flowing in with none flowing out. In order for one side of a capacitor to accept a negative charge, the other side must have a balancing positive charge. Essentially what happens is that as electrons flow into the negative side, their nearby presence makes electrons want to leave the positive side. Likewise as capacitors leave the positive side, their relative absence makes electrons want to enter the negative side.</p> <p>It's possible for substantial AC electric currents to flow without a complete circuit, if there's enough capacitance. Two leads some distance apart, however, aren't going to have enough electrostatic effect to yield any useful capacitance, though.</p>
<p>Why can't we light an LED with a single positive wire on the anode, leaving the cathode unconnected?</p> <p>Let's suppose I connect a wire with a positive voltage to the anode of the LED. Now, I think, current will flow past the light emitting diode. This should, by my understanding, make it glow, even though the cathode isn't connected to anything. However, experimental evidence and common knowledge show that this isn't the case. </p> <p>Is it possible in any situation(IDEAL) that we calculate current and voltage value so that this circuit will work, and automatically flow to ground after passing through the circuit? If so, do we need a connection to ground in the real world?</p> <p><strong>Please point out my mistake if you notice a simple error I've made, and let me know what is right.</strong></p>
Why we need to complete circuit
2011-03-12T05:03:32.857
11362
|digital-logic|alu|
<p>You need multiplexers for the outputs. The decoder is not strictly necessary.</p>
<p>I'm creating a 2-bit alu. It has 8 defined functions (the functions are defined by a 3bit code), AND XOR etc, and these functions act on two, 2-bit binary numbers and produce a 2-bit answer.</p> <p><img src="https://i.stack.imgur.com/dZqR2.png" alt="my circuit diagram"></p> <p>From what I have done so far, I have a decoder that decodes what the function is, and the output of that powers/activates the corresponding purpose of that function.</p> <p>for example the function code '000' activates the XOR terminal on the decoder and the XOR box spits out its answer, likewise '001' activates the AND box.</p> <p>The problem I'm having is, the outputs of the two functions XOR and AND have to go into LSB,MSB and carryOut to indicate the answer, however since the outputs are tied together it causes an error. And I can't have 3 separate LED's defined for each function. I must only use that 3 (LSB,MSB and carryOut).</p> <p>So my question is how do I not tie the outputs of the AND and XOR and produce a result depending on which function is active?.</p> <pre><code>*note on the image* a - LSB of binary number 1 {these are controlled by switches} b - MSB of binary number 1 c - LSB of binary number 2 d - MSB of binary number 2 cin - carry in. </code></pre> <p>Also everything inside the boxes are made using the basic gates and not from simulated blocks.</p>
Help with a simple two bit Arithmatic Logic Unit?
2011-03-12T08:28:05.193
11369
|motor|
<p>you can buy a central locking motor used in cars from a car spare dealer. It costs approx 5$ . Some models have limit switches build into it. Any car with central locking will have atleast 4 motors . 1 each in each door. I am from india. We can buy one with out limit switches for 3$/ea and with limit switches at 5$/ea. The stroke distance is about 7 cm. Sorry I will not reply for mails. or may not vist this page in the future</p>
<p>Can anyone recommend a hobbist <a href="http://en.wikipedia.org/wiki/Linear_motor" rel="nofollow">linear motor</a>? </p> <p>The motors are often described as being a rolled out version of a DC motor (is that true btw). If this is the case then how does one "drive" a linear motor. I'm trying to understand what kind of signals need to be sent to the coils to make it move.</p> <p>Any info welcome.</p> <p>EDIT: For clarity, I'm asking about the "stepper" type linear motor</p>
A "hobby" grade linear motor
2011-03-12T12:06:52.287
11372
|sensor|accelerometer|
<p>All of those details are heavily dependent on the firmware setting up the chip, low level software (Android OS) massaging and delivering the sensor data, and finally the application-level software further massaging and delivering data. At the firmware level, it would be useful to get an SPI/I<sup>2</sup>C sniffer, like the <a href="http://dangerousprototypes.com/bus-pirate-manual/" rel="nofollow">Bus Pirate</a> or <a href="http://dangerousprototypes.com/docs/Open_Bench_Logic_Sniffer" rel="nofollow">Open Bench Logic Sniffer</a>. I wouldn't be surprised if applications were able to access this level, as well. In other words, the initial or default state may change. It will be very difficult to attach probes, however.</p> <p>The Android OS is largely open-source. Check it out and see if you can find the relevant blocks of code and libraries. It would at least set the initial state, and likely define an API to change it.</p> <p>The wrong way to go about this is physical tests while taking measurements with an on-board application. There are at least 3 layers of algorithms fiddling with the sensor data.</p> <p>You cannot determine drift from the datasheet. It is dependent on temperature, age, and batch/wafer.</p>
<p>I'm working on a project on the Samsung Galaxy S smartphone. I need to know some additional information on its accelerometer that I can't find. <a href="http://www.bosch-sensortec.com/content/language1/downloads/SMB380_Flyer_Rev1.3.pdf" rel="nofollow">Accelerometer datasheet</a></p> <p>I need to know following details:</p> <ul> <li>which type of measurement range they use? +-2g , +-4g or +-8g ?</li> <li>noise depend on the bandpass filter used by the smartphone: how much is the band?</li> <li>there is some way to evaluate from this data sheet the standard deviation of drift process of the sensor?</li> </ul>
Samsung Galaxy S accelerometer details
2011-03-12T14:13:40.103
11374
|capacitor|supercapacitor|
<p>Step 1: Specify the constraints on the charging behavior that you want, based on the characteristics of the capacitor and/or your power supply. (e.g. current limit of not more than 0.2A or 0.5A or 0.1A or whatever)</p> <p>Step 2: Build a circuit that will meet those characteristics. If the current is low, you can just do this with a resistor. It turns out if you do the math that charging a capacitor through a resistor from 0V to some fixed voltage, always wastes exactly 50% of the energy involved, so it's not hugely efficient, but it's not horribly inefficient either. If you need higher efficiency, you need a switching power supply of some kind. The ones appropriate for this application would produce nearly constant current into the capacitor with a voltage limit.</p>
<p>I'm thinking of using a supercapacitor to power a device with low power consumption. I have one 1 F capacitor rated at 5.5 V and I plan to charge it using input voltage of 5 V. </p> <p>What precautions should I take when charging it? I'm afraid that it will overload my power supply if I just connect it directly. </p> <p>Any other tips would be appreciated too.</p>
How to work with supercapacitors?
2011-03-12T15:32:54.320
11378
|led|voltage|pwm|
<p>Since this is a constant-current sink IC, no resistors are needed in series with the LEDs.</p> <p>The current is programmed using a reference resistor connected to one of the pins that sets the reference current used to drive the LEDs, and it is the driver chip's responsibility to make sure the correct voltage and current is applied to the LED. In practice, I have found this works well.</p> <p>You could add a resistor in series, but this defeats the purpose of using this chip. It will increase your part count, increase your minimum VDD requirement, and if you need to increase VDD, then you will waste additional power. </p> <p>Below is the figure used to determine your reference current for each resistor from the <a href="http://focus.ti.com/lit/ds/symlink/tlc5940.pdf" rel="nofollow noreferrer">datasheet</a>: <img src="https://i.stack.imgur.com/eTlUM.png" alt="enter image description here"></p>
<p>I'm planning to drive multiple RGB LEDs using a TLC5940 with PWM. These LEDs have the following specs:</p> <p><em>Voltage Red: 1.8V</em><br> <em>Voltage Green: 3.0V</em><br> <em>Voltage Blue: 3.3V</em><br> <em>Current per color: 20mA</em><br> <em>Common anode</em> </p> <p>Since the TLC5940 is a current sink, how would I make sure each led gets the correct voltage. Hook up a resistor between each cathode and the TLC5940?</p> <p>Please forgive me for asking such a simple question, I'm still learning :).</p>
TLC5940 with multiple voltage RGB LEDs
2011-03-12T16:55:45.423
11398
|breadboard|components|
<p>All they are are stiff peices of wire soldered to stranded Wire with a molded rubber case. you can buy them from <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=33&amp;products_id=153&amp;zenid=8967f547ed39a32b68281ada555ae56e" rel="nofollow noreferrer">adafruit</a>, also called bread-boarding cables, jumper cables, (premium) wire jumpers. </p> <p><img src="https://i.stack.imgur.com/P9VmE.jpg" alt="enter image description here"></p>
<p>I've been looking for things like the plugs displayed on these orange wires in this photo:</p> <p><img src="https://i.stack.imgur.com/ebc1o.jpg" alt="mysterious item"></p> <p>What are they called? I imagine that this is a part that I could buy somewhere.</p>
What are these plug-like cable endings called?
2011-03-13T02:28:15.487
11409
|memory|flash|mbed|
<p>If the input pins have clamping diodes input high/low levels may pass via them to \$V_{DD}\$/\$V_{SS}\$. I recently read <a href="http://scanlime.org/2008/09/using-an-avr-as-an-rfid-tag/" rel="nofollow noreferrer">an article</a> where this idea was used to power an RFID tag from the input pins connected to the pickup coil. (As a matter of fact the microcontroller had only the coil connected to two I/O pins.) </p> <p><img src="https://i.stack.imgur.com/6yUl6.jpg" alt="enter image description here"></p>
<p>I am doing a project where I need to store information into flash memory and read it back using an mbed. I can't get it to work right, but I noticed that even if there is no connection to power or ground, I can still read non-zero bytes from it. Most of them are 0 but some are 255. Why is that?</p>
This flash memory works without connection to a power source or gnd?
2011-03-13T10:20:41.113
11411
|c|
<p>Your code is not valid C. It should look like this:</p> <pre><code>#include &lt;reg51.h&gt; #define cmdport P3 #define dataport P2 #define q 100 </code></pre> <p>To create <code>sbit</code> definitions for the individual bits in <code>P3</code> (address 0xB0), you want:</p> <pre><code>__sbit __at (0xB0) rs; // P3.0 __sbit __at (0xB1) rw; // P3.1 __sbit __at (0xB6) e; // P3.6 </code></pre> <p>Though, if you look in <code>sdcc/includes/mcs51/8051.h</code> you'll find that there are already generic definitions for <code>P3_0</code> and so on, allowing you to write:</p> <pre><code>#define rs P3_0 #define rw P3_1 #define e P3_6 </code></pre> <p>I'd also recommend that you pick more descriptive names for your bit definitions than <code>rs</code>, <code>rw</code> and <code>e</code> as these may clash with variable names.</p>
<p>I am facing this error when try to compile a C program using the SDCC compiler:</p> <p>The part of programme that is causing error.</p> <pre><code>include(reg51.h) define cmdport P3 define dataport P2 define q 100 (following 3 line are causing error.) sbit at cmdport^0 rs ; //register select pin sbit at cmdport^1 rw ; // read write pin sbit at cmdport^6 e ; //enable pin </code></pre>
sbit definitions with SDCC - Error: "initializer element is not constant"
2011-03-13T11:47:07.847
11414
|relay|noise|signal-integrity|solid-state-relay|dds|
<p>You can buy relays designed for GHz operation, for example, <img src="https://i.stack.imgur.com/xdUUY.png" alt="50ohm relay">. </p> <p>Contact resistance is usually less than 1 ohm, so if you're using kilohm divider resistors, I wouldn't worry about that too much.</p>
<p>Currently I'm working on a DDS based function generator. The idea is to use an AD9834 chip that will generate a triangle/sine or square wave. With some amplification electronics I want a configurable frequency, offset and amplitude. I have no set frequency I want to achieve, but getting more than 10MHz would be nice. I'm trying to get things to work out for the best result.</p> <p>I've been looking into ways to switch between several ranges of amplitude resolution. For example, I wish to get 10V amplitude as a maximum but with 1mV step size on the lower amplitudes (&lt;2V). To avoid using a 16-bit DAC I was thinking of using relays to switch between two feedback resistors or two amplification circuits (two different ranges on closed and open contact). The relays would be switched by a microcontroller of somesort that would determine which settings all DAC's and relays should be in for the desired waveform.</p> <p>My main concern is that relays may add additional noise. I think mechanical relays might be OK (is this true?). I was also looking at solid state relays because of their size.</p> <p>However, I've read on wikipedia that solid state relays have a higher resistance when they are closed and 'increased electrical noise'. How big are the issues with solid-state relays on low-amplitude (100mVpp for example) or high frequency signals (>5MHz). Is it even worth using SSR or use several MOSFETs instead?</p> <p>Should I avoid solid-state relays and focus on mechanical switching instead (because I expect they pass through a signal much cleaner)?</p>
What kind of effects does a relay have on signals?
2011-03-13T14:42:38.677
11422
|power-supply|equipment|
<p>Consider something like <a href="http://www.apogeekits.com/dual_power_supply_ps23003au.htm" rel="nofollow">this kit from Apogee</a>. It's linear, has adjustable current limit (i.e. important) and meets your budget, as long as you can live with 3A for the time being. If you <a href="http://www.apogeekits.com/dc_power_supply_ps5005u.htm" rel="nofollow">go bigger</a>, you can get 5A but you're looking at closer to $300.</p> <p>You can also keep your eyes open on online auction sites for used industrial equipment like the HP6038A (60V 10A) or the 6Instek GPC-3060D (dual 30V 6A, can be paralleled).</p>
<p>I'm currently using a Mastek 1803D (Adjustable Voltage and Current 0-18VDC, 0-3A). When I need an additional voltage I've been breaking out an LM317+Wall Wart supply I got started with. I'd like to move up to something with at least one output good for 30+VDC/5+A and more outputs, preferably adjustable. All that and I'd like to stay under ~$200.</p> <p>The driver behind this is working with a combination of 3.3V, 5V, and Motors (and I foresee 1.8V eventually being needed to). I deal with it now using linear regulators but I'd like to have the bench supply handle it all.</p> <p>So, background out of the way, what would folks recommend? I'm open to a do it all unit, or maybe buying 2 more single supply units and tying all the grounds together. The current limiting features seem to rule out most DIY/ATX Power supply approaches, maybe use those for the fixed voltages and tying it with a standalone? Should I be going with a fixed output supply for the primaries? (I've found lots of 3 supply 5/12/Variable units but no 3.3/5/Variable).</p> <p>Thoughts? (Thanks in advance.)</p>
Bench Power Supply
2011-03-13T18:09:57.453
11426
|memory|pins|protoboard|
<p>The tracks may be running underneath the chip, they may be obscured by soldermask, or they may be running on an inner layer of a multi-layer PCB.</p> <p>Use a multimeter with a continuity checker to "buzz out" the connections. Test each leg of the chip against each pin on the board and draw out a map of what connects where.</p> <p>Then, reference the datasheet and label the pins on your board.</p> <p>For an Atmel dataflash chip, the legs are almost certainly numbered like this:</p> <pre><code> | | | | |4 3 2 1| | .| | | |5 6 7 8| | | | | </code></pre> <p>Here are the pictures from the AT45DB041D datasheet showing the pin arrangement and marker dot:</p> <p><img src="https://i.stack.imgur.com/XOI8R.png"> <img src="https://i.stack.imgur.com/M3Fx4.png" width="200"></p>
<p>I have a dataflash memory that is too small to fit on a prototype board, so it has been put on a small board. I am having trouble figuring out where pin 1 is on this board. Below is a picture of the setup. The small circle on the chip is where pin 1 is. Underneath the large circles are the pins that connect to the board. Where on the board is pin 1? How do the lines connect to the memory? For the large circles on the right, how can they be connected to the chip if no lines can be seen going to them?</p> <p><img src="https://i.stack.imgur.com/8N5mv.png" alt="" title="Hosted by imgur.com" /></p> <p>The pins on the dataflash memory are like this:</p> <pre><code>1. chip select 2. data output 3. write protect 4. ground 5. data input 6. clock 7. hold input 8. vcc </code></pre> <p>If I do a continuity test on pins 4 and 8, I should get continuity, right? What are pin combinations will work?</p>
How is the board connected to this chip?
2011-03-13T20:49:41.913
11436
|arduino|dac|
<p>opamp is one idea - there are plenty of tutorials in the internets, but it might be easier to connect GND of your galvo to +5V. If you don't have +5V, you can make it from your +10V.</p>
<p>I need to control with my Arduino some galvanometers I bought. The galvanometer driver board says it need to have a +-5V asymmetrical analog input.</p> <p>My Arduino is connected to a MCP4922-E/P DAC from Microchip through SPI. The output of the MCP4922-E/P is between 0 and +10V (it can be between 0 and +5V if I don't enable the x2 gain). </p> <p>How can I "lower" that signal to be between -5V and +5V? I've read the it could be done with some op-amp, but not sure how. </p> <p>Any other advice about the design is welcome. Thanks in advance.</p>
Interface between DAC and galvanometer board
2011-03-14T01:53:04.440
11440
|memory|flash|datasheet|
<p>the data sheet i used to answer your other question is <a href="http://pdf1.alldatasheet.com/datasheet-pdf/view/181475/WINBOND/W25P80VFIG.html" rel="nofollow">http://pdf1.alldatasheet.com/datasheet-pdf/view/181475/WINBOND/W25P80VFIG.html</a></p> <p>The last to letters (VG) are voltages And packaging information</p>
<p>It's hard to read what is written on this dataflash memory but it looks like 25p80vg. I searched for datasheets and found some things similar to it, but couldn't find anything that matched it exactly. Are there datasheets for this?</p>
Are there datasheets for this dataflash memory?
2011-03-14T04:35:13.667
11443
|spi|memory|flash|mbed|device|
<p>The <a href="http://www.winbond-usa.com/products/Nexflash/pdfs/datasheets/W25Q80_16_32a.pdf" rel="nofollow">datasheet</a> for the part you listed states that a 24-bit address should be written after the 0x90 code. Then the 2-byte Manufacturer and Device codes can be read. So insert 3 write instructions and it should work.</p> <pre><code>pc.printf("response from sending 90h: %d\r\n", spi.write(0x90)); pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); //Address 23..16 pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); //Address 15..8 pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); //Address 7..0 pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); //Manufacturer ID pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); //Device ID </code></pre> <p>If you get inconsistent results, you may want to do your writes in a loop, then print when finished. I'm not sure how the printf IO affects the mbed SPI implementation timing, but if you get gaps between byte writes, that may affect how the flash part responds.</p> <pre><code>unsigned char command[6] = {0x90, 0x00, 0x00, 0x00, 0x00, 0x00}; unsigned char response[6]; for(int i=0; i&lt;6; i++) { response[i] = spi.write(command[i]); } pc.printf("Manufacturer ID: %d\r\n", command[4]); pc.printf("Device ID: %d:\r\n", command[5]); </code></pre> <p>You also have instruction 90h in your source, but your diagram is for instruction 9Fh. Just changing the instruction may allow your original code to work.</p>
<p>I am trying to read the device ID of a serial flash memory by using the SPI connections on an mbed. In the datasheet for the serial flash memory W25Q80 there is this figure.</p> <p><img src="https://i.stack.imgur.com/XH42w.png" alt="" title="Hosted by imgur.com" /></p> <p>The following is the code I'm using to try to read the device ID.</p> <pre><code>#include "mbed.h" SPI spi(p5, p6, p7); // mosi, miso, sclk DigitalOut cs(p8); Serial pc(p9, p10); // tx, rx int main() { // Setup the spi for 8 bit data, high steady state clock, // second edge capture, with a 1MHz clock rate spi.format(8,0); spi.frequency(1000000); // Select the device by seting chip select low cs = 0; wait(1.0); pc.printf("response from sending 90h: %d\r\n", spi.write(0x90)); pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); pc.printf("response from sending 00h: %d\r\n", spi.write(0x00)); cs = 1; } </code></pre> <p>All I read are 0s. Sometimes it reads 128 or 255. That's wrong, right?</p>
How to read the device ID of a dataflash memory
2011-03-14T04:52:20.510
11447
|adc|computers|comparator|
<p>If you only need a single board I think the current solution is probably the cheapest given the cost of any form of electronics development.</p> <p>However, if you need more boards I think the FPGA way is probably the best way to go. Your requirements are kinda vague. You will definitely need <em>an</em> ADC to sample your signal, but you don't need that <em>particular</em> ADC. If you want to sample 8 bit at a data rate of 1GHz (8Gbits per second) you will need something like infiniband to give you the required throughput (or at least many ethernet ports). To get those data rates I would probably drop the computer entirely and look for an FPGA board with an Ethernet connector (they're quite common) and either a good enough ADC or buy an external ADC and connect it to the FPGA.</p> <p>For a base architecture I would suggest using a synthesizable microcontroller which basically parses the ethernet packets and move bytes from the ADC buffer to ethernet.</p> <p>Possible boards:</p> <ul> <li><a href="http://www.xilinx.com/products/boards_kits/spartan6.htm" rel="nofollow">Spartan-6 boards from Xilinx</a></li> <li><a href="http://www.orangetreetech.com/fpga_board_zestsc2.html" rel="nofollow">A small board with ethernet and USB connectivity</a></li> </ul> <p>Possible microcontrollers:</p> <ul> <li><a href="http://www.xilinx.com/tools/microblaze.htm" rel="nofollow">Microblaze</a></li> <li><a href="http://www.altera.com/products/ip/processors/nios2/ni2-index.html" rel="nofollow">NIOS II</a></li> </ul> <p>Other links</p> <ul> <li><a href="http://www.xilinx.com/products/design_resources/conn_central/protocols/gigabit_ethernet.htm" rel="nofollow">An overview over Xilinx's ethernet IPs</a> </li> </ul>
<p>I need to store the output of a stand alone comparator (Hittite HMC875LC3C) in computer RAM drive. Currently, I'm using an 8bit 2GHz ADC (an Agilent PCIe - Acquiris U1071A) to bridge between the comparator and the RAM drive. This solution is redundant, slow, and very expensive (the Agilent ADC is almost $10k).</p> <p>I would enjoy a better solution where no ADC is present and the comparator connects directly to the PC. Perhaps through a USB port?</p> <p>Ideally, I would like the comparator to operate at around 1GHz (it supports operations up to 20 Gbps). I would suspect the maximal throughput essentially depends on the computer's processor and interface i/o characteristics.</p> <p>The comparator outputs pulses are about 60ps long and the Output Voltage High Level is -10mV while the Output Voltage Low Level is about -420 mV. The comparator is emmbeded on a PCB with SMA connectors.</p> <p>Question: Is it possible to connect a high speed (1GHz) comparator into a PC without having to use an ADC? If so would some form of synchronization be required?</p> <p>Thanks</p> <p>Louis</p>
Connecting a high-speed comparator into a computer
2011-03-14T09:08:40.597
11452
|power|
<p>I agree w/ Olin about using units that make sense not only to the average consumer but kWh makes sense to everyone. I'd like to add: a kWh does not equal a kJ. A kWh is equal to 3600 kJ. </p>
<p>Why don't we measure electrical consumption in joules, instead of kWh? Aren't they the same measurements, but one is more "proper"?</p>
Why don't we measure electrical consumption in joules, instead of kWh?
2011-03-14T13:27:00.920
11455
|led|rgb|tri-state|
<p>Yes, but they are not full separated LED's, as @Joby Taffey stated they share a common anode or common cathode. In order to use the circuit you said, you'll probably need to get one common anode one and connect the CA pin with the PWM output. The other 3 pins (cathode for R, G and B) will be switched with an transistor for example.</p> <p>You could use an common cathode, but in this case, with an PWM duty cycle of 100% (turned one) the corresponding led would be turned off.</p> <p>One problem I'd see is the refresh rate. You can't turn on the 3 leds at once because you want to control each color individually. The solution is multiplexing. You should use an enough high PWM frequency and enough low multiplexing frequency, so the multiplexing will not interfere with the color intensity while trying to avoid flicker with multiplexing.</p> <p>And keep in mind that the output luminance will be only one third of the tri-led maximum.</p>
<p>I am trying to operate a lot of RGB LEDs for a project. I came up with a crazy scheme which only works if the RGBs work exactly as three separate LEDs.</p> <p>What I want to do is connect the R, G and B lines of all the LEDs with the same source of PWM and connect their grounds to separate pins (which have tri state logic).</p> <p>So when I want to turn on a pin I will give the PWM for the color on the PWM line and drive its ground pin low and ground pins of other RGBs to high impedance (theoretically separating them from the circuit).</p> <p>Will such a circuit work?</p>
Do RGB LEDs actually behave like three separate LEDs?
2011-03-14T14:22:56.060
11457
|pcb-design|
<p>I didn't work on the design myself, but I know that the electronics used for the instrumentation of crash test dummies use flex circuits exclusively. They do not use rigid PCB materials anywhere, provide for limited movement of the PCA within the enclosure, and allow adequate service loops for any connectors that are attached to the enclosure.</p> <p><a href="http://www.tech-etch.com/flex/flex_smt_assembly.html" rel="nofollow">An example</a> of the manufacturing process used.</p>
<p>I'm looking to design a PCB that can reliably survive constant impact. The board will be rigidly mounted to an enclosure that will protect the board from actually hitting anything. The nature of the impact would be similar to a bowling ball, or a hammer head - not what I would consider vibration, but frequent hits from multiple directions.</p> <p>As part of the device functionality, I want to measure the acceleration of the board, so dampening the impact in any way is not preferable. I don't have any measured acceleration values (G's) to provide as a baseline, and I don't really have any experience in this area. As such, I have a few closely related generic questions:</p> <ul> <li>What is the most force that would be OK on a board with no impact hardening measures taken? (Am I worrying too much about a non-issue?)</li> <li>Are there any design practices that should be followed for the PCB?</li> <li>What are the weak points in a design that lead to mechanical failure?</li> <li>Are there parts that should be avoided for a more robust design?</li> <li>At what force levels should I start worrying about the safety of the parts themselves?</li> </ul>
Board Design for High Impact Environments
2011-03-14T14:50:26.607
11468
|microcontroller|theory|triac|
<p>I am intrigued by your idea of a fully symmetrical AC switch -- how would you keep such a device off, and then later how would you turn it on?</p> <p>Most of the structure of a triac is fairly symmetrical. However, as the schematic diagram tries to imply, the gate is attached "closer" to MT1.</p> <p>With the triac off, a typical circuit drives the voltage at MT2 up and down hundreds of volts relative to MT1, but as long as the gate voltage stays the same as the MT1 voltage, the triac stays off.</p> <p>One way to turn the triac on is to "pull down" the gate. The circuit is the same as with a PNP transistor -- the "+5V" VCC of the microcontroller is connected to MT1; a gate resistor connects a microcontroller output pin to the gate of the triac; and the motor or other load is connected to MT2.</p> <p>As Thomas O mentioned, another way to turn a triac on is to connect the gate resistor to a voltage that pulls away from the MT1 voltage in the same direction as the voltage at MT2 -- positive voltage anytime during the half-cycle when MT2 is positive, negative voltage anytime during the half-cycle when MT2 is negative.</p> <p>Recently I blew up over a dozen triacs learning that (a) once a triac is on, turning a triac off is a bit more difficult, and (b) hooking the the "GND" pin of the microcontroller to MT1 and pulling the gate through a resistor to +5 V doesn't work right with a logic level triac.</p> <p>The rough draft of the <a href="http://en.wikibooks.org/wiki/Power_Electronics#Triacs">"Power Electronics" book already links to some schematic diagrams illustrating how to use triacs</a>, and links to "Thyristors &amp; Triacs - Ten Golden Rules for success in your application". Perhaps you will find those ten rules useful, and perhaps you can help us make that Wikibook better.</p>
<p>When debugging a circuit using a micro-controller and triac to control AC current I ran into an issue (the triac wouldn't switch off) that was only resolved by flipping the polarity of the triac. The circuit design had the triac and optoisolator MT1 connected to hot, I accidentally switched the triac and had the polarity reversed. Since I presumed that triacs where symmetrical devices I thought it was no big deal, but apparently it was.</p> <p>Since TRIAC's are supposed to be the equivalent of two Thyristors in reverse-parallel, I couldn't think of any reason for this switching asymmetry, maybe someone can shine light on the situation. </p>
Are TRIACs symmetrical?
2011-03-14T18:01:37.910
11472
|power-supply|power|motor|robotics|servo|
<p>Wherever possibe use a seperate power supply. (We do in a 4kg robot)</p> <p>Use a proper noise filter if you must share a power source. An isolated DC-DC converter to supply the electronics is very effective (active filter).</p> <p>Opto-isolate from the MCU to servo power amplifier.</p> <p>It's the rule in industrial, where reliability matters.</p> <p>Never share grounds.</p>
<p>I have a project that utilizes two strong digital, coreless servo motors. Whenever I use DC motors, I usually need to have separate power sources for both the microcontroller and the motors (due to noise and such). I don't have as much experience with servos, is this still the case? I'd really like to get away with using just one battery, are there any precautions I can take for this?</p> <p>Thanks.</p>
Powering a Servo: Do I need a separate power source?
2011-03-14T21:06:19.273
11502
|led|shift-register|
<p>The switch is "bouncing": Each time you open or close it, there is a period where it makes a bit of noise on the clock line. The chip sees this noise as multiple transitions and clocks in more bits than you intended. To fix this, you need a "debouncing" circuit. Google should find you something.</p> <p>edit:</p> <p>You can't just switch voltage to an input like that. Then the input is at +5V when the switch is closed, but floating when the switch is open. You need at least a pulldown resistor after the switch.</p>
<p>Building on <a href="https://electronics.stackexchange.com/questions/11344/building-a-simple-mcu-driven-array-of-leds">this</a> question, I've now got a <a href="http://3ln.org/Media/Default/Datasheets/DM74LS164.pdf" rel="nofollow noreferrer">shift register</a> to play with, and I've been trying to work it manually with a couple of switches, like so: <img src="https://i.stack.imgur.com/g5JoE.gif" alt="shift register LED array"></p> <p>I have resistors (2.2K) between the switches and VCC, even though that's not shown in the schematic. It doesn't work, though.</p> <p>When I press the clock switch, sometimes an LED will light, and sometimes it won't. Sometimes several LEDs light. Never does it "shift" a zero "bit". If I just hit the input switch a bunch of times, it shifts in bits, sometimes one at a time, sometimes several at a time.</p> <p>What gives? What have I done wrong here?</p>
Playing with a shift register and some LEDs
2011-03-15T17:06:09.420
11509
|digital-logic|low-power|mosfet|inverter|footprint|
<p>A pair of complementary MOSFETs in the standard <a href="http://en.wikipedia.org/wiki/Inverter_%28logic_gate%29" rel="nofollow">static CMOS inverter</a> arrangement should work fine. There are literally hundreds of different kinds of individual transistors and transistor arrays currently on the shelf of <a href="http://opencircuits.com/Supplier" rel="nofollow">my favorite suppliers</a> that would work. (By "work", I mean "has a threshold Vgs is small enough that you can drive it with digital logic, rather than something that needs 6 V or more to turn on").</p> <p>Randomly-picked examples:</p> <ul> <li>BSS84 p-channel FET; and 2N7002 n-channel FET, each in a discrete SOT-23 package</li> <li>Diodes Inc. DMC2004DWK-7 dual complementary MOSFET pair in a single SOT-363 package</li> </ul>
<p>I have a digital circuit in which I need only one logic inverter, and both PCB size and power consumption are serious constrains. So I thought about using a pair of complementary SMD MOSFETs (the classic coupled gate configuration) instead of an IC with many ready-made inverters. Which MOSFET would be more recommended in this case (both for small size and low gate-drain current)?</p>
Recomendation for a digital inverter made of discrete components
2011-03-15T21:11:35.890
11515
|filter|noise|oscillator|
<p>If you only use the capacitor you would have a load, like a resistor, only this time frequency dependent. The thing is that this load doesn't change the signal.<br> Enter the resistor. Now you have a <strong>voltage divider</strong>. For low frequencies the capacitor's "resistance" will be high compared to the resistor, so most of the signal will arrive at the output. For high frequencies the capacitor's "resistance" is low compared to the resistor, and the divider will attenuate the input signal: only a small portion of it will appear at the output.<br> <em>I put the capacitor's "resistance" in quotes because it's not just a real resistance, it's more complex, in every meaning of the word..</em></p>
<p>I am trying to construct a simple low-pass filter for the following scenario: A high-voltage DC signal with lots of noise. I looked at <a href="http://en.wikipedia.org/wiki/Low-pass_filter#Passive_electronic_realization" rel="nofollow" title="Wikipedia article on a simple passive low-pass filter">Wikipedia's article on a simple passive low-pass filter</a>. I understand how the capacitor "looks like a short" to high-frequency signals and open for DC. What I don't understand is the role of the resistor. I read what Wikipedia has to say, but am not quite grasping how the resistor influences the "time for the capacitor to charge up". I vaguely grasp the idea of resonant RC circuits, but don't really understand the relevance of that principle in this context. Any insight would be greatly appreciated.</p> <p>Thanks in advance, Brian</p>
Novice question about low-pass filter
2011-03-15T22:15:13.727
11519
|power-supply|voltage|voltage-measurement|
<p>You don't say what the chip is, but typical power supply will probably be 3.3V, maybe 3V. You say you already have 5V, and want to derive the 3.3V via resistors.<br> Like others have pointed out that's a Bad Idea. Say you have a series resistor of 2k\$\Omega\$ to drop 2V, because you know you will need 1mA. That would be OK, you'll get 3V, but if for some reason the current increases to 2mA, you'll only have 1V left (2mA x 2k\$\Omega\$ = 4V voltage drop), which is too low. Likewise, if the current decreases to 0.5mA the remaining voltage will be 4V, which is higher than the allowed value of 3.6V and may damage the chip.<br> A resistor divider will have the same problem. Maybe you used one with the right ratio to get 3.3V, but forgot that the chip is parallel to the lower resistor, which may explain the low voltage of 1.7V. </p> <p>The neatest way to go from 5V to 3.3V is using an <strong>LDO regulator</strong>. Common regulators require a few volts difference between input and output; LDO (Low Drop-Out) often only need a few hundred millivolts. The <a href="http://www.national.com/ds/LP/LP2981.pdf" rel="nofollow">LP2981</a> is available with 3V or 3.3V output voltage. </p> <p>An alternative is to use a <strong>zener diode</strong>. Personally I try to avoid them, because they often need a lot of current, and they don't regulate as well as the LDO. If you want to use one, be sure to select a low-current diode like the <a href="http://www.onsemi.com/pub_link/Collateral/MMSZ4678ET1-D.PDF" rel="nofollow">MMSZ4684</a>.</p>
<p>The documentation for a chip that I'm trying to use says it needs 2.7 to 3.6V. When I use a multimeter and put on probe on Vin and the other on GND I read 1.7V. Is this the correct way to read supply voltage? Does this mean that it's not getting enough voltage?</p>
Measuring supply voltage
2011-03-15T22:46:33.073
11521
|microcontroller|embedded|c|compiler|
<p>The traditional use where I've seen this being used is for reading information from files. For example, you can define a struct whose members match those of a BMP file header, and then read all of the header in one swift read operation. OK, so BMP might not be the best example (its header does not have alignment issues on 32-bit systems), but you get the idea. I suppose this is just as useful in the embedded world.</p>
<p>I have recently come across this #pragma pack(1) preprocessor directive and was wondering why it is being used?</p> <p>I Googled the usage, and found it has other options such as push,pop etc. Has anyone used this on their embedded application?</p> <p>I would like to know some examples of how/why you have used this directive and on what kind of processor? What are the pro's/con's of using this directive?</p> <p>Thanks.</p>
Usage of the #pragma pack(1) compiler directive on embedded applications
2011-03-15T23:05:18.207
11523
|components|digital-logic|integrated-circuit|
<ul> <li>74LCXH2245</li> <li>SN74ACT1071</li> <li>SN74ACT1073</li> </ul> <p>Would it make any difference if you used a "resistor network" package of 8 resistors that looks like a single IC, to conceal the fact you are using resistors?</p>
<p>Many CPLDs have a handy feature which will weakly drive pins toward their present state, so that a pin which is weakly pulled high will pull high and one which is weakly pulled low will pull low. Are there any convenient ICs which will perform that function without needing a CPLD or a bunch of resistors? A possible design for a 14-pin part would be to have eight "bus" pins with "weak" drivers, VDD and VSS, and two pairs of mode pins controlling four bus pins each. The mode pins would select one of four bus modes:</p> <ul> <li>00 - Open-circuit (no pull-up or pull-down) <li>01 - Unconditional weak pull-down <li>10 - Unconditional weak pull-up <li>11 - Pull-up or pull-down based upon current pin state </ul> <p>Such a part could be used for bus-keeper applications, and also for things like low-power polling of switches (with the pull-up/pull-down modes). Does anything like that exist?</p>
Are there any convenient "bus keeper" or "bus hold" chips?
2011-03-15T23:41:46.130
11534
|arduino|wifi|
<p>These modules are the basis of most WiFi shields for Arduino. If you are reasonably comfortable with your soldering ability, you could dead bug a module like this without too much difficulty. Just connect all the powers and grounds properly, and bring TX/RX to your Arduino.</p> <p>That said, if you dig a little deeper, you'll find the shields in stock at vendors like SparkFun, Futurlec, Adafruit, etc. If one vendor is out of stock, others will have it.</p> <p>If you're just looking at using WiFi for remote control, another option might be ZigBee. WiFi might be a little overkill for simple remote control, unless you really want the novelty of controlling the thing through the web.</p>
<p>I'm having a lot of trouble finding wifi enabled arduino shields. All the places I've seen them are out of stock for some reason. </p> <p>Would this thing work? How would I hook it up? </p> <p><a href="http://www.rovingnetworks.com/wifly-gsx.php" rel="nofollow">http://www.rovingnetworks.com/wifly-gsx.php</a></p> <p>Basically I want to build a network enabled (wireless) robot with the arduino. So you can see it's clearly better if I can get a wifi shield. </p> <p><strong>Edit:</strong> To follow up on this post, I did end up getting the Wifly shield from Sparkfun. I was unable to get it working with the Arduino (Duemilanove) I had, and I ordered an Uno on a hunch, and it works on that! Connects to APs and can host an ad-hoc network. Unfortunately no security options exist for ad-hoc. But I'm okay with that. </p>
Wifi enabling my Arduino
2011-03-16T02:21:58.800
11535
|microcontroller|embedded|compiler|
<p>The time that engineers spend thinking about endianness is not free in a commercial project. On an ARM processor, little endian is the path of least resistance. Unless you have an overriding justification, definitely choose little endian, as this is ARM's traditional endianness.</p>
<p>We have just selected a new processor for our application, and one of the project options available to me is to select the Endian mode: Little endian or Big endian (under Big endian two more choices, BE32 and BE8)</p> <p>Can you please tell me what factors I should consider to make this choice?</p> <p>I was under the impression that a processor is either Little endian based or Big Endian. Does this mean that based on the option selected, the compiler would fix the endianess to suit the processor, if required?</p> <p>Thanks a lot.</p>
How to choose between little endian or big endian for the processor settings?
2011-03-16T03:33:30.767
11559
|integrated-circuit|buffer|ttl|
<p>Wow. Can't even buy an old buffer in DIP any longer. :( I didn't check, but maybe some type of programmable logic chip will do it (e.g. <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=428-1278-ND" rel="nofollow">http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=428-1278-ND</a>)</p> <p>update: possibly <a href="http://cgi.ebay.com/74HC244B-M74HC244B1-20PIN-DIP-X2-OCTAL-BUS-BUFFER-/370179348158?pt=LH_DefaultDomain_3&amp;hash=item56306896be#ht_500wt_922" rel="nofollow">eaby</a></p>
<p>I'm looking for a three-state inverting octal buffer for a replacement part for an old microprocessor lab. The package should be DIP. Ucc should be on pin 20. Chip select should be at pins 1 and 19 and active on low, so that the buffer is in high impedance state unless both enables are low. The input/output ports should be next to each other with even pins as input and odd as output. What this would be in practice is a 74540 IC with the described pin configuration or a 74366 with 20 pins. Help would be appreciated.</p>
Three-state inverting octal buffer
2011-03-16T11:39:46.343
11577
|sensor|interface|amplifier|
<p><a href="http://www.kobakant.at/DIY/" rel="nofollow">Have you read this site?</a></p> <p>There are lots of examples of wearable electronics including some with Eeonyx fabrics. The site has examples of sensing circuits (ardunio and xbee).</p> <p>You don't need many components to build a Wheatstone bridge and your likely best off with 1 sensing circuit multiplexed to the 8 sensors, you can still get 100 samples a second or more quite easily on each input. Use a fabric PCB (again check the site above) to create the bridge. Or just run sensor wires to the glove and put all the sensing electronics in a belt mounted pack. Most fabric 'sensors' i've seen have relatively high resistance, the 0.1 ohms you can get from the wire between the belt unit and gloves doesn't matter.</p> <p>Put a temperature sensor in each glove and use the result to make a correction in the software if needed to adapt for environmental changes. Maybe calibrate the gloves before each use, may not be needed depending on the intelligence of the interpreter. </p> <p>I assume the Xbee module transmits to a computer, build the calibration function into the computer, in fact do as much processing as you can, such as temperature correction, on the computer. </p> <p>Bonus points if you just use a neural network to convert the sensor input to an action. This will make training it easy and adapt for different people's hand motions.</p>
<p><strong><em>Related</em>: <a href="https://electronics.stackexchange.com/q/11978/2118">High Resolution ADC for Noisy Sensors in Variable Conditions</a></strong></p> <hr> <p>I'm building an interface using resistive textile-based sensors that may have different resistance ranges depending on environmental conditions. In order to best make use of my A/D converters, I'd like to explore using an adaptive amplifier that will help compensate for the unreliable performance of the sensors.</p> <p>What are my options here? Or can you point me to some references on the topic?</p> <p>I can think of two general schemes that would be useful:</p> <ol> <li>Auto-calibration by finding min and max values in a given analysis window (~30s-2min)</li> <li>Explicit calibration using a toggle-to-train interface</li> <li>... Are there alternative schemes I'm not thinking of?</li> </ol> <p><strong>Some Constraints</strong></p> <ul> <li>It should be a one-chip solution (small) if possible (like capacitive sensing chips)</li> <li>It should be easy to configure and use (I'm not an engineer and I'm not getting paid)</li> <li>There will probably be a microcontroller nearby</li> </ul> <p>Even better would be a do-it-all chip with Wheatstone bridge / voltage divider, lowpass filter and amplifier.</p> <p><strong>More About My Particular Setup</strong></p> <ul> <li>A/D converters will either be the converters built into an Atmel chip (could be ATtiny85 or ATmega32u4) or the converters built into an XBee series 2 radio. I've never used dedicated A/D chips before – I'm not sure if there would be any benefit to doing that.</li> <li>The sensor will be a piece of polymer-doped conductive lycra from Eeonyx. The resistance changes by about 1 order of magnitude at 30% stretch.</li> <li>The whole thing will be mounted on the hand of a performer, so it must be small and physically robust. There's a good chance it will be wireless.</li> <li>Precision is important. The interface will be used to continuously vary realtime audio effects i.e. it's not a switch.</li> </ul>
Simple Adaptive Amplifier Options for Sensor Interfaces
2011-03-16T16:54:18.800
11583
|soldering|
<p>Actually, the MOSFET won't care whether your iron is grounded, it will only care if the iron has the same potential as the circuit you're working with (and your body, if you happen to hold the the circuit you're soldering with your hands). Many soldeing irons provide a plug (banana or similar) which you can connect to the ground of your circuit to eliminate ESD. <strong>This only makes sense to do if you already wear a grounding strip</strong>, since your body has much more capacitance which can accumulate electrostatic charges, and most parts are killed by touching them with your hands, not your iron.</p> <p>If you need to solder a particularly sensitive component with a cheap non-grounded iron, consider disconnecting the iron from mains power before doing so. Such irons tend to have poor insulation from mains, constantly leaking a small current to whatever circuit you touch with it. You may be totally unaware of it (you don't feel a few uA), but it may be enough to damage some sensitive low-voltage parts.</p>
<p>At school our soldering irons don't have grounded tips. I need one as i'm soldering MOSFETs in to my PCB. So what solutions could I use to ground my soldering iron tip?</p>
Grounding a soldering iron
2011-03-16T19:15:04.233
11587
|design|connector|prototyping|breadboard|pcb-design|
<p>Services like <a href="http://tgimboej.org/" rel="nofollow">Tgimboej</a>(The Great Internet Migratory Box Of Electronics Junk) are great for trading and getting rid of extra parts. <a href="http://www.thejunkexchange.com/" rel="nofollow">junk exchange</a> is another place, but its more like a classified ads. Personally I keep things till some one needs it, or I finally found a use for that part, dust and all.</p> <p>as for one offs on PCBs or perfboards, I Use IC sockets so chips can be re used on other boards, Try to make the power supply on a separate board if possible. leave leads as long as possible when soldering components to boards. I think making things modular is the best way to get the best results for re-usability. </p>
<p>How can I select generically re-usable parts for the unique things I build? What are good approaches for building unique devices, so that when I no longer need them, it's relatively easy to disassemble them into parts I can re-use on the next project?</p> <p>This question focuses on when I build one or a few physical objects. The <a href="http://blog.makezine.com/archive/2010/02/industrial-designer-advocates-hacka.html" rel="nofollow noreferrer">"design for disassembly"</a> techniques used in some <a href="http://en.wikipedia.org/wiki/sustainable_design" rel="nofollow noreferrer">sustainable design</a>s may also be related, although that focuses more on physical objects built in larger quantities -- is there another question that focuses on that? <a href="https://electronics.stackexchange.com/questions/7382/how-does-your-company-manage-hardware-reuse">Reusing abstract designs for hardware is already covered in another question.</a></p> <p>There are lots of items I build exactly one of: the first (or the 17th) breadboarded prototype of the electronics of a product; various unique templates and jigs used in production; test jigs, etc.</p> <p>When they reach the end of their useful life, they get tossed in the scrap box.</p> <p>I build them out of (a) random scrap still hanging around from previous projects, and (b) new stuff we got with (perhaps shortsighted) focus on this particular project.</p> <p>I can't help but notice that the shiny new stuff ends up in 3 categories:</p> <ul> <li>a Some things -- solderless breadboards, soldering iron, 1/2 inch (12 mm) socket wrench, pin headers on 1/10 inch centers, alligator clips, velcro cable-ties, etc. -- get re-used over and over again.</li> <li>b Some things that at first glance appear very similar -- 15/16 inch socket wrench, etc. -- only get used for one job, and are never used again. While those things were necessary for that one job, and so perhaps I should think of them as a "sunk cost" that I've already made back the return on their investment. Since they are still functional, it seems wasteful to simply throw them away. So they end up taking up space and collecting dust indefinitely.</li> <li>c Some things can only be used once -- zip ties, solder, etc. Sometimes it seems a little wasteful, but (if I maintain a short-sighted focus on this particular project) these disposable items are the cheapest way to get things done, and at least they don't tend to accumulate and take up space.</li> </ul> <p>Category (b) is the worst. If I knew at the time I was buying that part what I know now after watching that part collect dust for years, I would have either saved a little money and bought some disposable category (c) part instead, or else spend a little more money and bought some more generally useful category (a) part instead. (Or perhaps not. Sometimes I absolutely need some super-specialized part for some project).</p> <p>Do you have any tips for recognizing ahead of time that a part I am about to buy is highly likely to end up gathering dust as type (b), so that I can try to substitute something that is more likely to be type (a) or type (c)? Any other tips for making it more likely that parts and tools I hope to re-use actually are re-used later?</p> <p>Rather than make one all-singing, all-dancing do-everything hyper-specialized PCB that I'll only use this one time and then toss the whole thing, are there good ways to partition the design so that at least part of it is re-usable later?</p> <p>What are good ways to improve physical hardware reuse?</p>
What are good ways to improve physical hardware reuse?
2011-03-16T20:28:38.600
11588
|power-supply|rs232|automation|
<p>Yes!</p> <p>First: The supply must be capable of AEBus communication. You can find out if this is the case via the debug menu from the front panel (if your supply has one), by opening up hyperterminal and trying to communicate with it, or, easiest of all, calling AE and giving them the serial number. <strong>NOTE: The presence of a serial port on the back of the device <em>does not</em> necessarily mean that it is capable of serial communication!</strong></p> <p>Second: Even if the supply <em>is</em> AEBus capable, it may not be able to be set to every mode that one would be able to set from the front panel. In my experience, the most significant example is: <strong>If your supply has a DeviceNet port, it will be impossible to set the supply into voltage regulation mode while controlling it with the serial port.</strong> In other words, if you have a DeviceNet supply and you want to control it via RS-232 for a voltage-controlled process, you're out of luck. AE has confirmed that <em>no</em> DeviceNet enabled supplies support anything other than power-regulation while in host (i.e., RS-232) control mode. Even though you can set it into this regulation mode while in local control.</p> <p>Third: There are several different flavors of serial connector that may be present on the back of the supply. There's the so-called "standard serial port" which uses an RJ-11 type connector and (possibly present) AEBus ports which may be DB-9 or DB-25. As far as I can tell, the only difference in communicating via the "standard" port versus the AEBus ports is the baud rate. The standard port communicates at 19.2 kbaud whereas the AEBus ports communicate at 9200 baud. The structure of the commands is identical.</p> <p>On a final, semi-related note: If you do have a DeviceNet supply and wish to not use it, you don't have to supply it with 24V just to avoid an error. Open the supply up and remove the card. You then have to switch a jumper (which would otherwise be jumpered on the exterior part of the DeviceNet card), whose identifier depends on the model of your supply. Call AE and they'll tell you what its label is. Problem solved! (Unless you also want to use voltage regulation via RS-232!)</p>
<p>I am inspired to post this question and answer by <a href="https://electronics.meta.stackexchange.com/questions/42/seeding-er-with-some-high-level-electronics-questions">this meta post</a>. This problem caused me a lot of problems and took a while to figure out. I have a partial answer. Perhaps others can elaborate based on their experiences.</p> <p>I work for a small business and we have several <a href="http://www.advanced-energy.com/en/Pinnacle_Series.html" rel="nofollow noreferrer" title="Pinnacle series product page">Pinnacle power supplies</a> made by Advanced Energy. We have recently been making a push to automate a number of our processes. The hope is to control the power supplies from a computer via RS-232. Are there any caveats to be aware of?</p>
RS-232 control for Advance Energy Pinnacle power supply
2011-03-16T20:29:55.697
11596
|audio|amplifier|fuses|
<p>The headphone output is almost certainly protected with output resistors. It will be extremely hard to damage it by a typical breadboard circuit.</p> <p>Nevertheless, if you would like more protection, put a 1k resistor in series with the signal at the headphone plug. Now damage is almost impossible.</p>
<p>I am wanting to mess with the output of my guitar amp. Not actually opening it up, just taking the headphone-output and connecting it to a breadboard and such. </p> <p>What form of protection, if any, should I use to keep from frying my amplifier (which cost $100) in the case of a short or other problem. </p> <p>Are most amplifiers self-protecting? I'm unsure on how most commercial audio amplifiers work.</p> <p>Note: My guitar amp is a 60W amplifier, but I of course won't be using it at full power</p>
How can I protect the amplifier behind a headphone jack when interfacing with external circuitry?
2011-03-16T22:48:40.743
11597
|power|amperage|power-engineering|
<p>It seems you're hoping that the capacity is a function of power, so that by decreasing the voltage you can increase the current. Unfortunately, that's not the case.</p> <p>Voltage maximums for connectors are generally a function of the insulating characteristics of the materials. If you exceed 600V for this connector, you may get arcing or the insulation may break down. </p> <p>Current maximums are due to the resistance of the connector and wire used for insertion. These connectors don't give a resistance rating, but 20A will generate a lot of heat in the 28AWG wire these things are rated for, and you could exceed the maximum temperature of \$85^{o}\mbox{ }C\$. This power dissipation is not due to the voltage present on the wires, but the voltage across the resistance inherent in the connections, so it doesn't matter whether you're using 600V or 12V. </p> <p>Also, unless it says otherwise, these are generally static ratings: You need to plug everything in before you turn the power on, and turn the power off before you unplug anything.</p>
<p>Here's a really nice multi-wire splicing connector:</p> <p><a href="http://www.wago.us/news/5019.htm" rel="nofollow noreferrer">http://www.wago.us/news/5019.htm</a></p> <p><a href="http://www.wago.us/images/222415_PR.jpg" rel="nofollow noreferrer">http://www.wago.us/images/222415_PR.jpg</a></p> <p>I'm using it for power distribution for a quadcopter:</p> <p><a href="http://eastbay-rc.blogspot.com/2011/03/update-wago-connector-for-power.html" rel="nofollow noreferrer">http://eastbay-rc.blogspot.com/2011/03/update-wago-connector-for-power.html</a></p> <p><img src="https://3.bp.blogspot.com/-r4x3mQi6-Yw/TVnYSinmVXI/AAAAAAAAAXI/8w6eyvWjrSA/s1600/powerdist.jpg" width="200"></p> <p>The specs say it has a listed capacity of 600V/20A. If I am using it for 12V apps, can I go higher on the amperage? i.e., are these rating in terms of total current flow?</p>
max amperage of WAGO 222-415 connector?
2011-03-16T23:24:53.693
11608
|pic|infrared|
<p>I think generating a known frequency on IR permits the designer to eliminate the effects of background IR (from Sun and CFL's etc.) So, suppose we use 40 kHz for a '1' and 25 kHz for a '0', the IR receiver needs to figure out the received frequency. We need pauses between frequencies to separate the received bits. How fast would the interrupts come frokm IR, for 40 kHz, an interrupt every 25 microseconds. If you run the PIC 18F2550 at 20 MHz, the instruction cycles would be .1 microseconds or 10 instructions per microsecond. Assuming, minimum latency, this would approximately allow the processor to execute 150 instructions between interrupts. The timer interrupts will be needed to calculate elapsed time to figure out the frequency of received signal. I think getting all this done in a Pic18F2550 is too tight a specification. We need to run a 40 MHz processor for better performance. Other option is to do a frequency to voltage conversion and read the voltage through an Analog to Digital port. This needs calibration and an adaptive algorithm would be useful here for calibration. </p>
<p>I need to receive signal from IR transmitter LED. I am not sure how to program the microcontroler. I am looking for some concept, how to do that. Whether I have to use A/D conversion? How to synchronize transmitter and receiver? What structure will be in coming data? Let's say that I assumed 600us for 0 (binary 0) and 1200 for 1 (binary 1) when I was programming a transmitter. What are the common steps to receive infrared transmission on PIC18F microcontroler?</p>
How to receive IR signal in PIC18F
2011-03-17T11:26:33.407
11614
|power-supply|dc-dc-converter|
<p>Yes. You would expect to get efficiency gains. </p> <p>Efficiency-design capabilities of designers of new and old equipment and Cost / efficiency manufacturing tradeoffs which have been made will have significant impact on what you can achieve. (Efficiency of "what the market will accept" and "best we can do" implementations varies substantially..</p> <p>Whether it's worthwhile depends on cost versus other options.</p> <p>To go 12VDC - 110 VAC - PSU/+12/+5/...<br> Requires energy losses in the upconversion to AC - probably in the 10% to 20% losses range depending on how hard you try. Probably not less than 5% no matter how hard you try.</p> <p>Making 5/12/... from 110 VAC or 12 VDC will incur losses however done.<br> 110 VAC supply should do this with 5% to 20% losses BUT that's an estimate - I've not measured a typical PC supply to see. Easily enough done.</p> <p>Making 5/12/... also requires a switching power supply.<br> 12 -> 12 is lossless IF battery version of 12V is acceptable. As battery can droop to 10 - 11 V it MAY need boosting and as it cab go over 12 V you may need buck boost. Say 5 - 15% losses range. 5% only with great care.</p> <p>12 -> 5VDC requires a standard buck converter. Say 10% losses. Other voltages say 3.3V and CPU voltages of 1.XV. Say 10 -15 %. Could be 5% with great care.</p> <p>So overall estimates: </p> <ul> <li><p>12VDC - 110VAC - 12VDC etc at (80%-90%) x 90% =~ 70% - 80% overall.</p></li> <li><p>12 VDC -> psu at say 80% - 90% overall</p></li> </ul> <p>Difference is perhaps break even (80/80) to as good as 90/70 =~ 30% improvement.<br> Liable to be somewhere in between - say a 15% to 25% gain.<br> This translates directly either into increased run time or reduced PV panel capacity if solar powered. Or greater safety factor.</p> <p>If you do this in a solar powered system then also using an MPPT PV panel controller would make great sense.</p>
<p>Two related questions have been combined here as the answers and concepts overlap:</p> <p>(Q1) We are building a robot that will be controlled by mini-ITX PC. The power source for robot will be detached car battery. Question is how to power mini-ITX mother board (and HDD) using this battery? What devices are needed?</p> <p><strong>Edit:</strong> I think I need DC-DC converter that converts from battery voltage and converts it to 12V and stabilizes it. Right?</p> <p>(Q2) <a href="https://electronics.stackexchange.com/questions/19828/is-it-worth-it-possible-to-convert-an-existing-computers-power-supply-to-dc">Originally from here</a></p> <p>I have a linux box powered by a "deep cycle" battery, and I"m wondering, would it be more efficient / possible for me to convert (or replace) the AC power supply in the unit with a DC one so that I don't lose energy in the conversion from AC power to DC, optimizing the use of power from my battery.</p> <p>DIY link: <a href="http://www.instructables.com/id/Convert-an-ATX-Power-Supply-Into-a-Regular-DC-Powe/" rel="nofollow noreferrer">http://www.instructables.com/id/Convert-an-ATX-Power-Supply-Into-a-Regular-DC-Powe/</a></p>
Supply power to mini-ITX from car battery
2011-03-17T13:18:19.143
11621
|avr|timing|
<p>You can have your loop toggle an IO line and measure the frequency of the resulting signal, either with an oscilloscope, or a multimeter with a frequency setting.</p>
<p>I am trying to do some high time precision work (well not that high, but more than normal) and would need calculate the time delay generated by a small loop. Can anyone help me with that? These are just generic instructions like these</p> <pre><code>for(i=0;i&lt;=100;i++) { if(i&lt;x) PORTA |= (1&lt;&lt;0); else PORTA &amp;= ~(1&lt;&lt;0); if(i&lt;y) PORTA |= (1&lt;&lt;1); else PORTA &amp;= ~(1&lt;&lt;1); if(i&lt;z) PORTA |= (1&lt;&lt;2); else PORTA &amp;= ~(1&lt;&lt;2); </code></pre> <p>}</p> <p>This is just an example.</p> <p>The controller is an ATmega32 working on the internal 8MHz RC oscillator.</p>
How to calculate loop delay in avr based architectures
2011-03-17T18:33:31.910
11625
|voltage-regulator|temperature|heatsink|heat|cooling|
<p>I fixed my overheating linear regulator just by adding a big chunky heatsink. I lifted the regulator out of the PCB, attached hook up wire to the leads, and mounted it on a big chunk of metal I cut from an old power supply.</p> <p>I've run it for about 4 hours and it's only slightly warm... problem solved!</p> <p><img src="https://i.stack.imgur.com/buXJj.jpg" alt="circuit with big heatsink"></p>
<p>I've designed a simple PWM RGB LED slow fader to be used as a garden lighting effect. My circuit works great, but I under-estimated the amount of heat that is generated by the 7805 linear regulator.</p> <p>It's mains powered, with a 6Vac transformer and a 5V 1A linear regulator. If all the LED's are at full brightness then it draws around 600mA.</p> <p>I've mounted my circuit board in a plastic enclosure with a transparent lid, and it's rated at IP67 (and I want to keep it that way!).</p> <p>I've put quite a small heatsink on the regulator, and it takes around 3 or 4 hours of continuous use to get to a temperature that is just about too hot to touch, I'm guessing around 70-80&deg;C.</p> <p>My plan is to give this to my Dad for him to use in his garden, but obviously I don't want it to melt or catch fire.</p> <p>My questions are:</p> <ol> <li>Is this an acceptable temperature for it to operate at?</li> <li>Is it likely to get any hotter if left on for longer? I didn't want to test this as I didn't want to damage it, but the datasheet says the operating temp is max 125&deg;C so I guess it would be ok.</li> <li>What can I do to make it run cooler, given that I don't want to drill vents into the enclosure and ruin it's IP67 rating?</li> <li>If it does happily operate at a high temperature, do I need to be worried about heat conduction through the PCB tracks into other components that may be damaged? Will it melt the solder?</li> </ol>
Regulator cooling in a confined space
2011-03-17T21:09:39.030
11626
|resistors|stepper-motor|
<p>Do you have a choice between (a) a chopper drive that automatically turns everything off when it overheats, and lets you set the maximum current allowed through to the motor to prevent the motor from overheating, or (b) a L/R stepper drive that turns on its internal power transistor between the stepper and the power supply, and if you happen to stop sending step pulses it leaves that transistor on indefinitely, even if it makes the motor or the power transistor melt?</p> <p>If you have a choice, I recommend the chopper drive. Also, I would look at the data sheet for your motor and find the maximum recommended current for that motor, and set the chopper drive to limit its output to that current.</p> <p>If your datasheet doesn't say what the rated current is, divide the rated voltage (hopefully at least that is printed on your motor or listed in the datasheet) by the coil resistance (which you can measure with an ohmmeter) to get the rated current.</p> <p>If you are stuck with the older L/R stepper driver, then resistors in series with the stepper winding are an excellent idea. The maximum current before the motor is damaged is different than the maximum current before the L/R stepper driver electronics is damaged -- use the smaller of the two currents in your calculations. Is the smaller of the two is "750mA" in your case? Russell Laidman's tutorial <a href="http://www.stepperworld.com/Tutorials/pgCurrentControl.htm" rel="nofollow">"Stepper Motors and Control: Part III - Current Control of Stepper Motors"</a> describes how to calculate the appropriate resistor -- it appears that you are doing that calculation correctly.</p> <p>You may find the <a href="http://reprap.org/wiki/Motor_FAQ" rel="nofollow">RepRap Motor FAQ</a> useful and the <a href="http://reprap.org/wiki/StepperMotor" rel="nofollow">RepRep Stepper Motor</a> page informative. The <a href="http://reprap.org/wiki/Alternative_Electronics" rel="nofollow">RepRap alternative electronics</a> page has a list of many chopping -- or even better, microstepping chopping motor drivers. The <a href="http://opencircuits.com/motor_driver" rel="nofollow">Open Circuits motor driver</a> page has an even longer list.</p> <p>EDIT:</p> <p>If you have a chopper driver, connect it directly to the motor. Any resistance between a chopper driver and the motor reduces performance and wastes power.</p> <p>When a chopper motor driver "is rated at 750 mA", it means "The chopper motor driver will control the power sent to the motor to at most 750 mA; it is designed to supply that amount of current indefinitely". That rating does <em>not</em> mean that <em>you</em> need to do something to limit that current.</p> <p>It's kind of like a light bulb "is rated at 100 W", it means that the light bulb will control the current pulled from the power grid so that it consumes 100 W; it is designed to run at 100 W for its entire lifetime. That rating does <em>not</em> mean that <em>you</em> need to do something to limit that current.</p>
<p>I have a stepper motor rated at 1.8 ohms or resistance per phase, a driver rated at 750mA and a powersupply that gives 12V rated at 1A. This would mean that the motor will draw 6.6A per phase.</p> <p>If I wanted to limit the stepper so that it cannot draw more power at 12V than the driver can tolerate then can I add 14.2 ohms of 1/2 watt resistors (if there is such a thing) to acheive this?</p> <p>Is my math correct? 1.8 Ohms + 14.2 Ohms = 16 Ohms 12 Volts / 16 Ohms = 0.75 Amps?</p> <p>I know that the stepper will not be at full power but it doesn't have to be.</p> <p>EDIT: Sorry wrong resistance per phase. It supposed to be 3.6 Ohms per phase; would I require 12.4 Ohms of additional resistance per phase?</p>
Will adding 1/2 watt resistors reduce the current load of a stepper motor?
2011-03-17T21:54:12.853
11632
|surface-mount|
<p>I disagree with the others on the statement that caps are easy to troubleshoot. I do QC for living and when the wrong cap value is installed, it is an absolute hell to figure out the problem. Caps have the same exterior coating as most microchips. There's no real excuse for why they aren't labeled.</p>
<p>Why are SMD resistors marked with their value, but SMD ceramic (and similar) capacitors are not? Most SMD resistors, even the very small 0402 and 0603 ones, have their values written on them. Most SMD ceramic caps are not, I haven't to date seen a single one. The <em>only</em> possible reason I can think of is that resistors are far more likely to fail than capacitors as they natively dissipate heat. Supporting this theory is the fact that tantalum and aluminium electrolytic capacitors generally have a value written on them, because they are less reliable than ceramics. </p> <p>Out of curiosity.</p>
Why are SMD resistors marked with their value, but SMD capacitors are not?
2011-03-18T00:33:58.133
11633
|led|rgb|74hc595|shift-register|pov|
<p>1. A bunch of 74HC595 chips will work great. Other chips that would also work just as well and perhaps slightly better are listed at: <a href="https://electronics.stackexchange.com/questions/6676/which-sipo-chip-is-better-74hc4094-or-74hc595-or-something-else">Which SIPO chip is better, 74HC4094 or 74HC595 or something else?</a></p> <p>2. The Arduino is an excellent choice for prototyping, especially if you are comfortable using gcc. Perhaps it would be quicker to use one for now. Alas, I suspect you will soon write code for this POV display that needs more RAM than the Arduino has available -- at that time, either (a) use one or more of tricks to reduce the RAM needed, or (b) add some external RAM, or (c) port the code to some other microcontroller with more RAM (perhaps the ATMEGA1284 ?).</p> <p>The Parallax Propeller is an excellent choice for a high resolution POV display -- it has an order of magnitude more internal RAM (32 KB RAM) than the ATmega238 in the Arduino. (Is there anything I can do to support porting gcc to the Propeller?)</p> <p>Some people prefer "square pixels". I'm sure you already know that the distance around the equator of a sphere is twice as long as the distance from pole to pole (Earth's equator is a little more than twice as long). Since you have 64 pixels from the south pole to the north pole, you might choose to reload a new vertical "line" of pixels 2*64 = 128 times per revolution in order to get 128 "square pixels" at the equator. The simplest way to do that is to store the full frame uncompressed in RAM. That requires 64*128 pixels * 3 bits/pixel = 24 576 bits = 3 072 bytes, plus a few bytes of RAM for other program variables. Alas, the Atmel ATmega328 in the Arduino only has 2 048 bytes of RAM.</p> <p><a href="http://opencircuits.com/POV_display" rel="nofollow noreferrer">Earlier POV displays</a> used microcontrollers with an order of magnitude (!) less RAM than this. So people have developed a variety of tricks you can use to work around this. One trick: Only lighting up the "front" half of the globe turing the time you can see the LEDs, then turning off all the LEDs (or leaving them on some constant color) during the "back" half that you can't directly see the LEDs. That halves the amount of RAM you need, so then it fits in the Arduino. If you don't like that trick, there are other tricks you can use that are less obvious. Another trick: Store the image in the flash program memory. The Arduino has enough flash program memory to store several 3 072 byte frames. Yet another trick: use ASCII text to store the text you want to display, then use flash program memory to store the "character generator ROM" data. I'm pretty sure there are other POV tricks ...</p> <p>3. If I were building it, I would power the Arduino and the 74HC595 chips from one big power supply, and power the motor that spins the POV from a separate power supply.</p> <p>Only after I got all that working would I even consider a more complicated separated power supply system. (In principle, if you have a separate "red" switching power supply whose +V is only connected to 74HC595 chips which in turn are only connected to red LEDs, you could independently tune its output voltage to minimize the total power and heat production of the system. But it seems unnecessarily complicated.)</p> <p>4. and 5. Perhaps the simplest way for the Arduino to drive the POV display is to daisy chain all 24 74HC595 chips in one long single string, and then use the <a href="http://www.arduino.cc/playground/Code/Spi" rel="nofollow noreferrer">Arduino SPI library</a>. That requires 192 clock pulses to clock in the new column of data, and then a pulse on the RCLK (aka framing pulse, SS, etc.) to start displaying that new data. According to one <a href="http://www.arduino.cc/en/Tutorial/SPIEEPROM" rel="nofollow noreferrer">Arduino to SPI interface tutorial</a>, the fastest SPI clock rate is system speed / 4. So the 16 MHz Arduino can put out a SPI CLK of 4 MHz. If you upgrade it with a 20 MHz crystal, you can get a SPI CLK of 5 MHz. If you can get your program fast enough to keep up with the SPI hardware, you can put out a new column, at best, in 5 MHz / 193 pulses, so the maximum theoretically possible speed is 25 907 columns/second.</p> <p>At the standard cartoon film refresh rate of 24 frames/second (which flickers noticeably -- you would like something better), and at 128 columns/frame to get "square" pixels at the equator (you might want more to get better resolution), that gives 24 frames/second * 128 columns/frame = 3072 columns/second.</p> <p>There's nearly an order of magnitude of breathing room between "the speed you want": 3072 columns/second, and "the speed that is completely impossible on Arduino hardware": 25 908 columns/second. Hopefully that gives you enough room.</p> <p>Some people think you can get a faster column refresh rate by re-arranging the 74HC595 chips into 2 or more chains and loading all chains in parallel. Some people are like that -- they see unused pins on the Arduino, and they are itching to use them for <em>something</em>. But it may be counter-productive -- the SPI hardware is only connected to one set of pins on the Arduino, and so chains hooked to any other pins must be loading with emulated "bit-banging" software, which will invariably be slower and use more CPU time than the built-in SPI hardware.</p>
<p>I am planning on creating a <a href="http://leyanda.de/light/povglobe.php">RGB LED POV globe</a> only physically larger then that one.</p> <p>I am planning on using 64 RGB LEDs, requiring 3x pins per LED for a total of 192 outputs. Obviously I am going to need some shift registers. I have looked in to <a href="http://www.arduino.cc/en/Tutorial/ShiftOut">74HC595</a> (8bit) and it would require 24 of these chips to handle all of these LEDs. </p> <p>I am planning on putting these shift registers in series with 6 per channel from my micro-controller. </p> <p>The 74HC595 has a switching frequency of 100 MHz.</p> <p>I been told that I will need to spin the Globe at around 1500 RPM (25 per sec) </p> <p>The plan is to use a <a href="http://www.arduino.cc/">Arduino</a> for the micro controller but I am open to suggestions. </p> <p>My questions are:</p> <ul> <li>Is there a better suited chip then the 74HC595 for this project? </li> <li>Besides the Arduino is there a better suited micro controller for this project?</li> <li>I don't want to power the LEDs off of the micro-controller So I am going to need external power. How would I go about doing this? </li> <li>With 6x 74HC595 in series, How fast could I switch all of the LEDs colors on this channel?</li> <li>With 12x 74HC595 in series, How fast could I switch all of the LEDs colors on this channel?</li> </ul>
POV globe speed questions
2011-03-18T01:52:25.017
11648
|pic|assembly|
<p>If you can't wait for that device to be added to gputils, and you don't want to use Windows, you could download the beta MPLAB X which runs under Linux and Mac OS. I just checked and it does support the 12F1822, so you could download it and extract the files you need. Or, use MPLAB X for your development, instead of gputils.</p>
<p>I've used the PIC assembler and tool kit from gputils with success before, but I noticed that they're lacking support for my new pic12lf1822 chips. How do I go about getting it supported?</p> <p>After checking out their source code I couldn't find any useful information other than lots of existing .inc and .lkr files which seems to be taken from MPASM. As I don't have a Windows box I can't download MPASM and use their files.</p>
How do I add support for PIC12LF1822 to gputils
2011-03-18T13:16:18.370
11654
|voltage-regulator|voltage|diodes|resistance|
<p><a href="http://ww1.microchip.com/downloads/en/AppNotes/00905a.pdf" rel="nofollow">http://ww1.microchip.com/downloads/en/AppNotes/00905a.pdf</a> is a fair description of dc motor control issues. You should look at the Basic Drive Circuits section to see some appropriate circuits. Set VCC across the FET/motor to be 3V and use a FET that can cope with at least 5V gate input and you should be fine.</p> <p>In particular, you should note the diode placed in parallel with the motor. This is extremely important to prevent the mosfet and your controller from damage. The motor is essentially an inductor and it isn't possible to make an instantaneous change in the current flowing through an inductor. When you turn the motor off, this means that the current flowing through the motor gradually decreases. If there isn't a diode placed as shown, then the voltage at the motor will increase and potentially be high enough to damage other connected devices. With the diode in place, the voltage is limited to its forward voltage and so no damage occurs. This is a well known phenomena called back EMF.</p>
<p>I want to connect <a href="http://www.sparkfun.com/datasheets/Robotics/310-101_datasheet.pdf" rel="nofollow">this dv motor</a> to the 5V output of an Arduino board. Of course I need to get the 5V down to 3V in order for the motor to function correctly. I've read that I could use a diode with the correct voltage drop for this, or just use a resistor.</p> <p>Going the resistor way, I've got some trouble figuring out the correct resistor value.</p> <p>From the datasheet I calculated that the resistance of this motor would be 40ohms at 3V (3 / 0.075 = 40). Is this correct?</p> <p>The ratio between 5V and 3V is 0.6. So I figured I need a (40 * 0.6) = 24ohm resistor to get the correct voltage over the motor.</p> <p>Are these calculations correct? I'm still an electronics beginner so I'm not quite sure :). And even if they are correct, would I be better of using a diode (or maybe even a voltage regulator)?</p>
5V to 3V, calculate resistor value (or use diode?)
2011-03-18T13:49:51.627
11666
|arm|assembly|freescale|imx31|
<p>To answer your base question, to get to the address of pin A10 of the memory you need to look at the memory map for the ARM device...</p> <p>In this case it looking at the memory map:</p> <p>0x8000 0000 -> 0x8FFF FFFF is mapped to CSD0 (SDRAM/DDR)</p> <p>and </p> <p>0x9000 0000 -> 0x9FFF FFFF is mapped to CSD1 (SDRAM/DDR)</p> <p>You'd need to know what chip select was used in the PCB design to determine your answer as to which bank your DDR is attached to.</p> <p>This implies that A10 is located as either 0x8000 0400 (as you mentioned) or 0x9000 0400.</p> <p>As to why 0x8000 0F00 was used in place of 0x8000 0400...reading the datasheet for that memory implies, but does not state that the other address pins, A(n) are don't cares for this operation so the coder probably just tossed in an F there instead of figuring out that it was only a 4 that was needed.</p> <p>I also don't find those 2 sections of the datasheet to contradict each other. The first is basically just saying that you need to reference the device's memory map to locate the real address where the memory is mapped so you can use that address as a base.</p> <p>The second quotes tells you that bit 0 of the address corresponds to address pin 0 on the memory in this mode, which may not always be the case in normal operation. It may depend on the data/address width of the memory combined with alignment issues for the core.</p>
<p>[This is a re-post of <a href="https://stackoverflow.com/q/5346225/69172">https://stackoverflow.com/q/5346225/69172</a>]</p> <p>I'm new to iMX31 and embedded systems, please help me to understand the translation from SDRAM address to ARM CPU address, especially in "special" command modes of the SDRAM controller.</p> <p>Here is the SDRAM initialization code I have problem with:</p> <pre><code> ldr r0, ESDCTL_BASE_W mov r2, #SDRAM_BASE_ADDR /* 0x80000000 */ ldr r1, =0x92100000 /* Precharge */ str r1, [r0] ldr r1, =0x0 ldr r12, =0x80000F00 str r1, [r12] ldr r1, =0xA2100000 /* Auto-refresh */ str r1, [r0] ldr r1, =0x0 str r1, [r2] ldr r1, SDRAM_0xB2100000 /* Load Mode Register */ str r1, [r0] ldr r1, =0x0 strb r1, [r2, #0x33] ldr r1, =0xFF ldr r12, =0x81000000 </code></pre> <p>The RAM I have is <strong>Micron LPDDR MT46H64M32LF</strong>, and this code follows the initialization procedure nicely, but in <em>PRECHARGE</em> step, where is the address <code>0x80000F00</code> coming from?</p> <p>From iMX31 reference manual I learned that during the <em>PRECHARGE</em> step, I need to set SDRAM pin <code>A10</code> to HIGH which will therefore result a <em>PRECHARGE ALL</em>. Here is the text on <em>PRECHARGE</em> from RM:</p> <blockquote> <p>...While in this mode, an access (either read or write) to the SDRAM/LPDDR address space will generate a precharge command cycle. SDRAM/LPDDR address bit A10 determines whether a single bank, or all banks, are precharged by the command. Accessing an address with the SDRAM/LPDDR address A10 low will precharge only the bank selected by the bank addresses, as illustrated in Figure 19-75. Conversely, accesses with A10 high will precharge all banks regardless of the bank address, ...Note that A10 is the SDRAM pin, not the A10 bit ARM address bus. Translation of the SDRAM A10 to the corresponding ARM address is dependent on the memory configuration.</p> </blockquote> <p>And here is another text on multiplexed address bus during “special” mode:</p> <blockquote> <p>During “special” mode, for example, precharge mode (SMODE=1) or load mode registers (SMODE=3) there is no address shifting, means that CPU address A0 is mapped on MA0 at all memory width. For example, in order to drive MA10 bit (for the precharge all command) the CPU A10 bit should be set (for both 16 or 32 bit external devices). The same logic is valid for the load mode register command, as can be seen on the initialization routine example on Section 19.5.4.1, “SDRAM Initialization.”</p> </blockquote> <p>According to the text above and assuming A0 is the first bit of <code>0x80000000</code>, setting A10 to 1 should give address <code>0x80000400</code>, not the <code>0x80000F00</code> in the code. Why???</p> <p>The code snippet I showed here is supposed to work with DDR. For SDRAM, it actually uses <code>0x80000400</code> in <em>PRECHARGE</em>.</p> <p>Is there anything related to the characteristics of DDR? And how can I get the proper translation between SDRAM pins and ARM CPU address?</p>
On Freescale iMX31, how can I translate SDRAM address to CPU address?
2011-03-18T15:52:44.860
11670
|arm|pwm|beagleboard|dev-kit|
<p>Atmel sam3x8e (used on the Arduino Due) has 12 PWM outputs, loads of memory, USB, the works. It is a bit expensive, though. You'll have to pay at least 10 USD. The AT32UC3L032 may be a better option if you want cheap.</p>
<p>I am looking for a Arm development board for a new project I am working on (64 RGB LED POV Globe). <a href="https://electronics.stackexchange.com/questions/11633/pov-globe-speed-questions">POV globe speed questions</a> I have lots of experience with the Arduino boards but I would like to take a step up to a more powerful board for this project. Also I have been wanting to play with ARM for a while and this seems like a good project to start on. </p> <p><strong>Requirements</strong> </p> <ul> <li>Not insanely expensive, &lt;= $250 preferably</li> <li>Lots of PWM outputs at lest 10 idealy 24 </li> <li>Program able by the USB port. </li> <li>32k of chip memory</li> </ul> <p><strong>Nice to have</strong></p> <ul> <li>Ethernet, Not that I would need it for this project but most of my other projects require it. </li> <li>SD card or other persistent storage, Logging, loading of settings files, ect... </li> </ul> <p>The first board I looked in to was the <a href="http://beagleboard.org/hardware" rel="nofollow noreferrer">beagleboard</a> as it has a huge community and lots of resources but it does not appear to have any PWM outputs?</p> <p>Next I looked in to mbed-NXP-LPC1768 from <a href="http://www.sparkfun.com/products/9564" rel="nofollow noreferrer">sparkfun</a> But from as far as I can tell from <a href="http://mbed.org/handbook/mbed-NXP-LPC1768" rel="nofollow noreferrer">the spec</a> it only has 6 PWM pins, and I was looking for more of a complete board with power supply, ect.. </p> <p><strong>My question:</strong></p> <ul> <li>Suggestions on a Arm development board with lots of PWMs?</li> <li>Am i missing something with the PWMs on the beagleboard? It seems strange that the board would not have any I/O </li> </ul>
Arm development board with lots of PWMs
2011-03-18T17:33:05.203
11671
|audio|integrated-circuit|dac|
<p>A stereo DAC that is pretty cheap and relatively simple to interface to microcontroller is NXP <a href="http://www.digikey.com/product-detail/en/UDA1334ATS/N2,112/568-3443-5-ND/1129396" rel="nofollow">UDA1334ATS</a>. It has on-board PLL to generate internal system clock; just clock in the audio bits. It is usable from 16 to 24 bit resolution, and $1.70 in single qty from Digi-Key. Comes in a tiny 16-SSOP package but SparkFun has the <a href="https://www.sparkfun.com/products/498" rel="nofollow">breakout board</a> to DIP footprint for $2.95.</p>
<p>I was wondering if anyone could recommend a simple, low cost DAC chip that I could use for audio playback. I am not trying to achieve anything amazing or complicated, just throw some numbers into it and listen to the noises that it makes (I'll probably start by trying to play a sinewave) I've seen lots of complex SOC solutions, as well as lots of evaluation boards, but I prefer to start with a single IC and go from there. Any suggestions?</p> <p>EDIT: My goal is to eventually move into more advanced DSP processing, and possibly synths, so I would prefer a chip based solution.</p>
simple audio DAC
2011-03-18T17:46:04.020
11673
|resistors|inductance|
<p>When looking at fast signals it is usually beneficial to use the 10x setting on the probe, for the reasons discussed in the other posts.</p>
<p>So while trying to interface a 5v SPI to a 3.3v SPI device, using the inline resistor method outlined below, <a href="http://www.sparkfun.com/tutorials/65" rel="nofollow">http://www.sparkfun.com/tutorials/65</a></p> <p>I discovered that at high clock speeds (above 200khz), my clock signal was being corrupted by the inductance in the resistor (with an oscilloscope, the clock looks signal looks triangular shaped) I am using carbon film (through hole) resistors for prototyping and I heard that these can have high parasitic inductance and not suitable for high frequency use. Is this information correct? </p> <p>What types of resistor instead should I be getting (digikey link would be appreciated)? Right now, I'm just working on a protoboard but eventually I would like to manufacture this prototype on a PCB using surface mount components. It seems like from what I read about surface mount resistors, the inductance is not typically a problem for applications under 20Mhz.</p>
types of resistors and inductance
2011-03-18T18:32:31.043
11690
|pcb|eaglecad|eda|
<p>Not an ideal solution, but <a href="http://www.designspark.com/pcb" rel="nofollow noreferrer">DesignSpark PCB</a> is reported to run fine under Wine. From their site:</p> <blockquote> <p><strong>What are the limitations on designs?</strong></p> <p>There are no intentional limitations on designs. Unlimited schematic sheets per project, up to 1m squared of board size and no limits on layers allow you to get your creativity flowing without restraints.</p> </blockquote>
<p>Hey I am trying to make a etchable pdf for a project of mine. It is supposed to be a 2x9inch board. But I cannot find a good software to make this. Eagle's free version will not allow me to make this size and I cannot understand gEDA. Is there other simpler option?</p>
Making Etchable PDFs in linux
2011-03-19T02:48:13.343
11714
|pcb|drc|via|
<p>I Think you are using the term plating incorrectly. Plating will <em>decrease</em> the diameter of the hole, not increase it.</p> <p>The larger dimension (the pad surrounding the via hole) is called the <em>Annular Ring</em>.<br> All the fabs I have worked with generally want a 0.005" per-side annular ring, or the via diameter + 0.010".</p> <p>You <strong>definitely</strong> have some really hairy registration issues on the board you posted pics of. It may work, but you're really pushing it. </p> <p>Generally, you never want the via hole to break out through the edge of the annular ring, which is happening a few times in the picture you posted.</p> <p>Anyways, <strong>Registration</strong> refers to the accuracy between a fab-house's etching and drilling process.<br> Basically, if a fab house etches a circle in the coper of a board, and then drills a hole in the middle of the circle, how close is the drilled hole to the center of the copper circle?</p> <p>Remember, drilling a board and etching it are separate processes, and involve the board being unmounted and remounted in different equipment.<br> Generally, you can get as good registration as you are willing to pay for, and it looks like your boards are from a pretty budget board-house.</p> <p>You need to allow enough annular ring that you never wind up with the via hole too close to the edge of the pad. This is generally specified by the fab house (they should have a minimum annular ring spec on their board requirements). However, it is important to remember that they <em>may</em> run your boards <em>anyways</em>, even if it does not meet their minimum required specs. </p> <p>The board house may run the boards anyways, and just refuse to fix any issues if they don't work out.<br> This is particularly common in China, where the general philosophy seems to be "Let the Buyer Beware".</p> <hr> <p>Anyways, I think the reason you are finding your vias a bit odd looking is that you have <strong><em>tented your vias</em></strong>, which is the practice of covering the annular ring and the hole for the via with soldermask.</p> <p>With 0.015" vias, you will occasionally get a contiguous layer of soldermask over the hole, and they will look different.</p> <p><img src="https://i.stack.imgur.com/FO89T.jpg" alt="enter image description here"></p>
<p>As in the title. I've noticed several PCBs of mine have vias which are not plated - they do not have a characteristic "gold" shine to them. I suspect this is because I was pushing the limits of drill sizes - my fab specifies 12 mil and I used 15 mil (20 mil including plating.) I've checked a few with a multimeter and they do have continuity, which is good, but I've only checked a few, so have no idea if there might be a few dodgy connections because of this. Is it something to be concerned about? Board passes DRC as specified by fab.</p> <p>I've seen quite a few high density boards like motherboards and graphics cards without plated vias.</p> <p>Here's an older board of mine which shows a similar problem to my newer boards. Note that some vias look gold, while others don't look plated at all.</p> <p><img src="https://i.stack.imgur.com/2hcgU.jpg" alt="enter image description here"></p>
Is it important that vias are plated on a PCB?
2011-03-19T21:41:52.483
11717
|sensor|light|infrared|photodiode|
<p>I figured I should post what ended up working for me. Someone suggested I just use a typical 100 Watt incandescent light bulb, so I did. It worked great and gave off the right amount of IR for this project. I imagine an IR bulb would have been overkill. </p>
<p>I'm currently using a photodiode (found <a href="http://www.vishay.com/photo-detectors/list/product-81509/" rel="nofollow">here</a>) along with the appropriate emitter to send data between mobile robots. I'd like to the sensor to optionally be used as an ambient light sensor using a filter with lower sensitivity.</p> <p>My trouble is picking out what this "ambient light" should be. Since the photodiode is only sensitive between 750 and 1150 nm, I imagine I need an IR bulb. However, every IR bulb I look at doesn't seem to specify what wavelengths it outputs. They also seem to all be used as heat sources, which I'm not sure I need. Ideally I'd like a cheap option that I could just stick in a lamp, but I'm open to other ideas. Does anyone know where to buy the correct IR bulb? Or what the correct IR bulb would be?</p> <p>Thanks!</p>
Which infrared bulb should I use with a photodiode?
2011-03-19T22:09:02.943
11720
|laser|optoelectronics|
<blockquote> <p><strong>Moderator note:</strong> This answer had arrived to this thread as a result of a merge.</p> </blockquote> <p>The problem appears to be that you want to detect a person passing between the line of sight of two transducers. Let's say the aim is to have a digital output indicate the presence or abscence of something interrupting the line of sight.</p> <p>There are various ways to achieve this. One important spec is the distance. Since you mention detecting a person, I'll say you need to span of about 4 feet. This could be done with a laser on one side and some sort of light sensor on the other. That light sensor could be a CdS photoresistor, a photodiode, or even a solar cell. The circuit for each of those is a bit different, but all of them are fairly simple. I'd probably start with a photodiode in leakage mode. CdS cells are simple and highly sensitive, but react slowly. That won't work well with modulation, as I think you will want (see below).</p> <p>One issue is ambient light. Good mechanics around the transmitter and receiver, perhaps including optics, can limit the effect of ambient light. However, it's still a good idea to factor it out. I would do this by modulating the light beam. You don't look for a particular light level, but rather the amplitude of the modulated signal.</p> <p>For example, the light could be sent in pulses 1 ms long every 2 ms, or put another way, a 500 Hz square wave. The receiver circuit creates a analog signal that does some high pass filtering to eliminate the ambient bias, then presents the result to a microcontroller. Looking for a 500 Hz signature from the analog signal is a simple task for a microcontroller. That also allows for some logic to make sure the signal is blocked long enough to be considered a real event, and probably a little hystersis to avoid too much chatter if things are on the edge.</p> <p>At 4 feet or so, you don't need a laser and you should be able to put the transmitter and receiver on the same side with a passive reflector on the other. That simplifies the electronics and providing power because everything is integrated into a single unit. That also allows the micro not only to know the expected frequency, but also the phase, which will make it easier and more reliable to detect the modulated signal.</p> <p>To not require extra accurate alignment, like a true mirror does, you could use a retroreflector. Those reflect light mostly back in the direction it came from, at the expense of some overall attenuation. They are also cheap and available in hardware and automotive stores and the like.</p> <p>A laser would work, but I'd also look into IR LEDs. It's not immediately obvious whether LEDs with some optics or a laser is the best alternative, in part because you haven't said what your criteria really are. The advantage of IR is that people can't see it, so it is easier to hide the fact that a human passing is being detected.</p>
<p>I'm thinking about making my own laser security system (think mission impossible). So I was thinking I'd use a laser diode to shine a beam across a doorway into a light dependent resistor that's on the high side of a voltage divider and look for that signal to go low and raise an alarm if it does. </p> <p>So I've done some quick research for parts and I'm surprised at how expensive laser diodes seem to be: <strong>Do I really need to use a "laser diode" to satisfy my requirement to shine focused light across say a 3 foot gap, or is there some other component that is cheaper and gets the same effect?</strong></p> <p><strong>Does my LDR concept on the "receiver" side of the gap make sense or is there a better way?</strong> I guess my biggest concern is that it won't respond (resistance won't rise) fast enough when the beam is broken and I'll fail to pick it up as a logic low. If that's the case I imagine what I'll want instead is something like a photo-transistor rather than an LDR.</p>
Laser Diode Security System
2011-03-19T23:22:26.467
11728
|arduino|power|data|poe|
<p>The Power over Ethernet (PoE) is likely most suitable if the devices are network-aware, otherwise one Ethernet cable is pretty much equivalent to a (low current) power cord or a USB cable.</p> <p>For any devices that to be "worn" or "attached" by test subjects, I would strongly consider an un-tethered design, powered using rechargeable batteries. For small signal (i.e. sensors, data logging, no motors, very simple LED lighting) this option should be easily economic and practical for up to 24 hour periods or longer. <a href="http://en.wikipedia.org/wiki/Nickel-metal_hydride_battery" rel="nofollow">NiMH</a> would be my first choice due to low cost and wide availability, with Lithium as a second. Just ensure you use an appropriate charger for the battery type, and things should just work. </p> <p><strong>Note</strong> that most rechargeable batteries such as 'AA' size cells, only provide 1.2 rather than 1.5 volts, so 4 of them is not sufficient for 5V needed to stably power an Arduino, while non-rechargeable (i.e. disposable) cells such as alkaline or zinc-carbon would.</p> <p>With electricity you need to be aware of both voltage and current. The Arduino itself takes an input range of 7-12 DC, up to 500mA (I don't have a reference on average / typically current, but would guess around 100-125mA or less), from an external DC power source. The USB port can also be used to draw 5 volts, up to 500mA from a powered USB hub or powered USB port. </p> <p>Using a low-cost low current (e.g. 250-500 mA <em>output</em>) AC-DC power adapter (<em>wall wart</em>) would be a default method if there is non-trivial power consumption, or needs to continuously operate for a long period of time. A modern switch mode power supply (SMPS) based unit can be had for a modest cost, and is light weight, being able to dispense with the need for a large power transformer encased in it. Combined with the power limiting capabilities already included in the Aruino (UNO) from the <a href="http://www.littelfuse.com/resettable_fuse.html" rel="nofollow">resettable fuse</a> (PTC, I believe) used for USB power source, and/or the linear voltage regulator used to regulate power from a AC-DC power adapter which also includes over-voltage, current limiting, and short circuit protection unless you need addition power requirements (e.g. motors, high power LEDs) you can use the protection built into the Arduino as sufficient for electrical shock/burn protection. </p>
<p>I'm carrying out a research project this year at uni, which will include creating small electronic sensory devices for children (under 7) with autism. Obviously, safety has to be taken very seriously.</p> <p>Only relatively small amounts of current will be used - probably powering simple sensors on an Arduino board - but seeing as my knowledge of all things electronic is pretty limited, I thought I'd try and get some suggestions first.</p> <p>From the research I've done, I found PoE at littlebird: <a href="http://littlebirdelectronics.com/collections/freetronics/products/4-channel-power-over-ethernet-midspan-injector" rel="nofollow">http://littlebirdelectronics.com/collections/freetronics/products/4-channel-power-over-ethernet-midspan-injector</a> - which looks like a pretty good solution, seeing as I want the ability to control the device remotely, over a local network. A benefit also being that I can keep the number of wires poking out of the device to a minimum and also not have a direct lead going to a wall socket.</p> <p>So far, I'm really only at the stage of planning the 'core' of these devices, which would be an Arduino board with limited sensors attached, possibly using the internal parts from a Wii remote. Because I don't yet have confirmed participants, I don't know exactly what sensory needs I'll be working with (each autistic child will have specific sensory issues) and therefore exactly how much power I will need for the devices. I will aim to keep it at a minimum though, simply for safety reasons.</p>
Safe Powering Methods - Working with Children
2011-03-20T07:50:41.563
11736
|voltage-regulator|
<p>The MC34063 is the classic choice for a switching regulator. Take apart any cell phone car charger, and you're likely to find one of these guys. It's available in single quantities for about 75 cents (plus a bunch of external components, which might double that cost), and in production quantities for 25-35 cents.</p> <p>Here's a really good design calculator: <a href="http://dics.voicecontrol.ro/tutorials/mc34063/" rel="noreferrer">http://dics.voicecontrol.ro/tutorials/mc34063/</a></p> <p>At the top of that page is a link to Dave Jones' EEVBlog, in which Dave does a pretty good job of explaining the design considerations of a switching regulator.</p> <p><a href="http://www.eevblog.com/2010/09/10/eevblog-110-lets-design-a-dc-to-dc-switchmode-converter/" rel="noreferrer">http://www.eevblog.com/2010/09/10/eevblog-110-lets-design-a-dc-to-dc-switchmode-converter/</a></p>
<p>I have a circuit that inputs 24 volts from two 12 volt sla batteries. It has two analog LM317 regulators.One is configured as 5 volts @ 30 ma load, the other @ 3.3 volts @ 250 ma load. The problem is the 3.3 volt regulator gets really hot! The power dissipated on the LM317 measures a heat loss of 200+ deg F! I thought of using a LDO off the 5 volt regulator, but that would just transfer the heat to that regulator. A switching regulator I think would do the job, but is not going to happen due to cost. Trying to keep the cost around $1.</p>
Need 3.3V regulator
2011-03-20T18:17:31.000
11745
|diodes|dc-motor|h-bridge|protection|l298|
<p>As far as a reference design, Solarbotics has a pretty solid little breakout board for the L298N. If you don't already have the chips, I would consider purchasing one: <a href="http://www.solarbotics.com/products/k_cmd/" rel="nofollow">Solarbotics L298N</a>.</p> <p>If you already have the parts, then you could probably follow their design, <a href="http://www.solarbotics.com/assets/schematics/solarbotics_-l298_schematic.pdf" rel="nofollow">L298N Schematic</a></p>
<p>I'm thinking of buying a pair of <a href="http://uk.farnell.com/stmicroelectronics/l298n/motor-driver/dp/1589425" rel="nofollow">L298N</a>s, to control a pair of 1.6A motors. I'd like to control each motor with a signal PWM wire and a direction wire. However, I've hit a couple of problems.</p> <ol> <li>It is unclear whether the chip includes internal diodes or not. Some sources say yes, some say no. There also seems to be general confusion between the 298 and the 293.</li> <li>Looks like I need to invert the direction line so that the two inputs are opposite. However, if that messed up, current could flow through the chip. <ul> <li>Would pulling the PWM "enable" line low while switching the direction signal solve this?</li> <li>Would a MOSFET be suitable to negate the signal?</li> </ul></li> </ol> <p>Or would I do better just to buy <a href="http://www.pololu.com/catalog/product/713" rel="nofollow">this</a> complete motor driver?</p>
What components do I need to build a motor controller from the L298?
2011-03-20T21:09:15.737
11750
|control|
<p>A quick comment on a highly rated answer above: "In short, poles and zeros are a way of analyzing the stability of a feedback system."</p> <p>While the statement is true, the system doesn't have to have feedback for these concepts to be useful. Poles and zeros are useful in understanding most real systems with a frequency response, other than a flat response, such as filters, amplifiers, and any type of dynamic system. </p> <p>To add some math (we have to, it's a mathematical concept), you can (for many systems) express a frequency response of a system as:</p> <p>H(f) = B(f) / A(f)</p> <p>and B(f) and A(f) can be expressed as complex polynomials in frequency. </p> <p>A simple example: Consider an RC low pass filter (voltage in -> series R -> shunt C -> voltage out).</p> <p>The gain (transfer function) can be expressed in the frequency domain as:</p> <p>Vout(f)/Vin(f) = H(f) = 1 / (1 + j*2*pi*f*R*C), </p> <p>where j (or i) is the square root of -1.</p> <p>There is one pole at frequency fp = 1/(2 pi RC). If you plot the magnitude of this complex equation, you'll find the gain at DC is 1 (0dB), that the gain drops to -3dB at f = fp = 1/(2*pi*RC), and that the gain continues to drop at -20dB per decade (10x increase) in frequency after the pole.</p> <p>So you can think of the pole as a break point in the gain response vs. frequency. This simple example is a lowpass filter with a "corner frequency" at w=1/(RC) or f=1/(2 pi RC).</p> <p>In mathematical terms, a pole is a root of the denominator. Similarly a zero is a root of the numerator, and gain increases at frequencies above a zero. Phase is also affected... but perhaps that's more than enough for a non-mathematical thread.</p> <p>The "order" is the number of poles and the "type" is the number of poles at f=0 (pure integrators).</p>
<p>Can someone explain, or provide a good reference to an explanation of Poles and Zeros for say, a power supply compensator, or any control system for that matter. I'm not really looking for a mathematical explanation, as that seems rather straight forward, but what they mean in a practical sense.</p> <p>It seems common, for example, for papers or app-notes to mention something like "a type III error amplifier configuration has three poles (one at the origin) and two zeros" or "adding capacitor C1 introduces an additional zero into the system" as if I'm supposed to take something from that without any further explanation. In reality, I'm like "ughhh, so what?"</p> <p>So what would something like this mean from a practical sense. Are poles points of instability? Do the number of zeros and poles indicate something about stability, or lack of it? Is there a reference about this somewhere written in an understandable manner that would allow me (more of a practical use, not hardcore math for the sake of math type) to join the in-crowd when it came to app-notes referencing Zeros and Poles?</p>
Poles and Zeros in English
2011-03-20T21:50:38.120
11755
|rf|radio|noise|
<p>PC video cards can generate a lot of hash in the 70cm band. I've found that to be a problem in my home if the wife is playing video games.</p>
<p>Are there common sources of 434MHz noise or interference in a residential/household environment? I've been playing with some radios, and they seem to be behaving flakily at my friend's house even at close range, and working flawlessly at my house... I'm a bit stumped. </p> <p>I suppose another possibility is some kind of crazy noise on the wall power at my friend's place, but I'll have to try out a battery power source on the receiver to rule that out, and can post back once I do. </p> <p>Unfortunately, I don't own or have access to a spectral analyzer either.</p>
434MHz Noise Sources
2011-03-21T00:17:02.347
11757
|dsp|
<p>Just look at the waveform.</p> <p>If a sine wave goes through a complete cycle every t, and you full-wave rectify it, there will now be two upward humps in every t. Since each hump is a complete cycle, you've doubled the frequency:</p> <p><img src="https://i.stack.imgur.com/x5lFz.png" alt="enter image description here"></p> <p>More generally, a perfect full-wave rectification means the response function has even symmetry. This means that, for a sine wave input, the output will consist of only even-ordered harmonics, starting at the second harmonic, which is 2&times; the fundamental.</p> <p><a href="http://en.wikipedia.org/wiki/Even_and_odd_functions#Harmonics" rel="noreferrer">http://en.wikipedia.org/wiki/Even_and_odd_functions#Harmonics</a></p>
<p>I'm performing envelope detection in the digital domain. This consists of rectifying the signal (i.e. taking the absolute value) and low pass filtering it to extract the slower varying envelope signal. I've heard that rectification doubles the frequency content in the original signal, therefore this information has to be taken into account when designing the digital low pass filter.</p> <p>I would like to understand the mechanism in which rectification doubles the frequency content of the original signal.</p>
Why does rectification of a digital signal double the frequency content?
2011-03-21T01:17:13.570
11763
|dsp|fir|
<p>Both answers are very good, but I hope my 2cents and a different perspective will add some value. I am in the middle of having to do essentially the same thing as a radar system.</p> <p><strong>Baseband versus RF</strong></p> <p>First off, Radar can be viewed very similar to wireless communication systems in that you have a baseband signal that you modulate, transmit, and then demodulate. Often phase shift keying is used in comm systems. In PSK, you are trying to detect a phase shift, usually between -pi and pi and based off of that phase shift you would determine the bit that was being sent.</p> <p>In radars, the delay/reflection time creates what can be viewed as a phase shift. The only problem is that the delay in a radar is more then likely going to be greater then the 2*pi span that you can detect normally. In order to get a greater range you have to turn off your signal and wait long enough for you to receive the reflected signal.</p> <p>In Radars, you could use an <a href="http://en.wikipedia.org/wiki/Envelope_detector" rel="nofollow noreferrer">envelope detector</a> and/or an RF mixer. An RF mixer is the same as a multiplier.</p> <p><strong>DSP</strong></p> <p>The key at this point is to remove all noise and determine the time delay between when you transmitted and where your current signal is at. Just like the comm systems, this delay can be viewed as a phase shift. Because of this you want your filter to have a linear phase response otherwise you wouldn't be able to tell (at least not easily) what delay your signal actually had. Here is an example of the frequency response of an FIR filter I just made:</p> <p><img src="https://i.stack.imgur.com/tbudj.png" alt="FIR"></p> <p>As I am sure you can see, the phase graph is a straight line, so it is linear.</p> <p>Now here is an example of an IIR with similar passband and stop band specifications:</p> <p><img src="https://i.stack.imgur.com/iAtPs.png" alt="IIR"></p> <p>The phase graph isn't so linear this time. Now it is possible to reverse this phase effect in your delay time calculations, but it usually isn't worth the effort, instead people just use an FIR filter.</p>
<p>Digital signal processing in radar applications is usually done using finite impulse response filters. Why is that the case? Wouldn't the use of an infinite impulse response filtering be much faster and feasible since we are talking about processing in the gigahertz range?</p>
Why does radar processing always require FIR filters?
2011-03-21T01:51:19.890
11768
|simulation|mac|osx|
<p>Many years ago, my Apple Hardware Design friends (including chip designers) used to design stuff using Unix workstations. Now they use Macs (which <em>are</em> Unix workstations, come to think of it), and Xgrid to distribute the insanely large simulation jobs.</p> <p>I run <a href="http://www.linear.com/designtools/software/#LTspice" rel="nofollow">LTSpice</a> on my Mac using <a href="http://www.winehq.org/" rel="nofollow">WINE</a>. I also run <a href="http://www.macspice.com/" rel="nofollow">MacSpice</a>, <a href="http://www.cadsoftusa.com/" rel="nofollow">EagleCAD</a> and <a href="http://www.kicad-pcb.org/display/KICAD/KiCad+EDA+Software+Suite" rel="nofollow">KiCad</a>. Last time I checked the <a href="http://www.geda-project.org/" rel="nofollow">gEDA</a> tools, they didn't immediately compile and work.</p> <p>I'm about to try out <a href="http://icircuitapp.com/" rel="nofollow">iCircuit</a>, which looks more basic and costs $10, but has a nice UI. There is a <a href="http://www.falstad.com/circuit/" rel="nofollow">free Java simulator</a> on which iCircuit is based, but it's not a Mac UI.</p>
<p>Apple computers are great. I love my MacBook, however, I haven't been able to find any decent circuit design and simulation software that runs on a Mac. This brings me to a question: If Mac OS X has no professional electronics design software, then Mac electronics are designed on PC's? </p> <p>This would be interesting news for "MacFanaticsPCHaters" and for all of us trying to develop hardware on a Mac.</p>
What software is used to design and simulate Mac computers, iPod and iPhone circuits?
2011-03-21T02:25:08.363
11774
|vhdl|synthesis|
<p>There's nothing wrong about using integers for RTL <em>per se</em>, but there are reasons that some avoid it. This really is a question about subjective "best practice" and you'll eventually have to find out yourself what you prefer. As a help to that, I'll share my experience and thoughts on this.</p> <p><em>Principally</em> , I'm in favour of using (constrained) integers, also when writing for synthesis. I sometimes do it, but <em>in practice</em>, usually I stick to <code>signed</code> and <code>unsigned</code>. I'll elaborate on why.</p> <p><strong>You will be forced to use a vectorized datatypes in part of your design anyway:</strong></p> <ul> <li><p>Hardly any vendor-IP or 3rd party-IP will use <code>integer</code> type for ports </p></li> <li><p>E.g. when sending data through BlockRam, even if you infer it and therefore never need to interface to any IP/macro/primitive, you'll most likely need to convert to vectorized type anyway</p></li> <li><p>Even if neither of the above apply, you will mostly need to interface to something else at <em>some</em> point (a top-level port, if nothing else)</p></li> </ul> <p><strong>Since you can't use <code>integer</code> for the full design, you might want to skip it all together, because:</strong></p> <ul> <li><p>At some points, you'll need to do the conversions anyway, and this takes away part of the point of using <code>integer</code> in the first place</p></li> <li><p>Also, for simulation, these conversions will typically be called with vectors of <code>'U'</code> or <code>'X'</code>, either before reset, or at other times, and every single such function call will generate a warning messages from the package function, cluttering your simulation warnings/prompt</p></li> </ul> <p><strong>Drawbacks of using <code>integer</code></strong>:</p> <ul> <li><p>Contrary to the vectorized types, integers don't have <code>'U'</code> and <code>'X'</code>; I find those very helpful in simulations. You see how uninitialized signals propagate through the design, and you will probably react if you see a lot of uninitialized signals after the reset. This won't be the case if using integers.</p></li> <li><p>With integers, there's a greater risk of simulation/synthesis mis-match when adding or subtracting resulting in under-/overflow. (As already pointed out by someone else.)</p></li> </ul> <p><strong>Typical cases where I find <code>integer</code> to really be a good option:</strong></p> <ul> <li><p>For debug signals/counters that you monitor through chipScope/signalTap etc.</p></li> <li><p>Totally internal representation of counters, that never go into or out of your own code. Yes, there are such cases, e.g. if you're writing a FIFO and you are dead-reckoning writes/reads to form the signals <code>full</code>, <code>empty</code>, <code>almostFull</code> etc. (however arithmetics on the pointers is a better way than dead-reckoning in this case...)</p></li> </ul> <p><strong>My own conclusions:</strong> I do use integers sometimes, but sparingly, and mostly in the cases described above. I don't see much overhead in using <code>unsigned</code>and <code>signed</code> instead of integer, and therefore, usually stick to them. </p>
<p>I'm a bit confused on if I should be using integers in VHDL for synthesis signals and ports, etc.</p> <p>I use std_logic at top level ports, but internally I <em>was</em> using ranged integers all over the place. However, I've stumbled across a few references to people saying you should only use signed/unsigned for synthesis-targeted code.</p> <p>I've gone and reworked my current project to use unsigned... and, well, it's noticeably uglier.</p> <p>Is it a bad practice to use integers? What's the problem? Is there some uncertainty on what width the tool will map integers to?</p>
VHDL: integers for synthesis?
2011-03-21T05:37:28.400
11790
|led|rgb|pov|
<p>Forewarning: You can do this the easy way, or the hard way. <strong>The easy way is to pick an RGB LED that has good stocking at all the major distributors, try it, and be happy.</strong></p> <p>The hard way is to learn a little bit about <a href="http://en.wikipedia.org/wiki/Photometry_%28optics%29" rel="nofollow noreferrer">photometry</a>, which is the study of measuring light, and then make your decision. No guarantees that the latter will produce better results, though. But, it's probably best to know a little background, so here we go. Warning: Long post.</p> <h1><strong>Basic Criteria</strong></h1> <p>The basic criteria for selecting an LED are, ignoring color for now:</p> <ul> <li>Intensity/brightness</li> <li>Viewing angle</li> <li>Lens style (clear/diffuse/external)</li> </ul> <p>From the top: </p> <h2>Intensity/Brightness</h2> <p>This is a measurement of how bright you want your LED to be, and is startlingly complex. For an RGB LED, you'll probably find it easiest to first specify the viewing area, and then select the number of lumens you need. This selection will probably be experimental, especially since you want to do it at Burning Man, which has a really bright environment. </p> <p>There are two ways to measure intensity: Radiometrically and photometrically. The watt is a radiometric measurement for power, defined by the metric system in terms of electronics as: </p> <p>$W = A^2 * \Omega $ </p> <p>In words, the power dissipated by one amp of current flowing through a one ohm resistance. </p> <p>Photometric measurements define how bright a source appears to the eye. The candela (or, for LEDs, the millicandela or mcd) measures the intensity in a direction. The lumen is a measurement of power, and is defined as one candela over one steradian of area (a steradian is a cone about $64^o$ across). Both are weighted with respect to the radiometric units by the luminosity curve, which looks something like this (dotted black line): </p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/a/a0/Luminosity.png" alt="luminosity curve"></p> <p>Notice that it peaks around 550nm, or the color green. What this means is that your red and blue colors need to have high wattage ratings to get even coloration. If you use the millicandella ratings (for a variety of viewing angles) or the lumen ratings (if you've already selected a set of similar viewing angles), you don't have to worry about this curve.</p> <p>If you're still paying attention, don't worry, the rest is more straightforward and shorter.</p> <h2>Viewing angle</h2> <p>The viewing angle is the maximum inclination that you can have with respect to the LED and still see the color emitted. This is a function of the lens, and isn't always uniformly distributed. For a diffused (cloudy) lens, if you can see the lens, you can see the color, if only a little bit. The viewing angle is not necessarily this number; they're usually more realistic and only define the area which the lens is designed to illuminate. For a clear lens, optical properties of the lens will define the viewing angle more rigidly. Hint: It's not 180 degrees for the T 1 3/4 package (the standard 5mm LED you showed in most of your links - that's usually no more than $30^0$).</p> <p>For a POV globe, you probably want a fairly wide viewing angle.</p> <h2>Lens Style</h2> <p>Lenses can be tinted or colorless. For an RGB LED, you probably want colorless. They can also be water-clear or diffused (cloudy). Your choice in this selection will depend on the viewing angle of the LEDs. A diffused lens will help to eliminate bright spots, but will also reduce the effectiveness of any focusing the lens is designed to do. If you get an LED with a spherical lens, it needs to be diffused, or you'll blind your users as it spins, and it will be hard to see in others.</p> <p>You also need to decide whether you want an integrated or external lens. Some superbright LEDs will have an external lens which allows higher quality optics but costs more and requires more components. For this project, you almost certainly want an integrated lens.</p> <h1><strong>Electrical Properties</strong></h1> <p>Next, you need to consider the electrical properties: </p> <ul> <li>Current, both nominal/test and maximum (Will be different for each color of an RGB LED)</li> <li>Forward voltage $V_F$ (will be different for each color of an RGB LED)</li> </ul> <h2>Current</h2> <p>An LED creates light by dissipating power across a semiconductor junction. Below a certain current, the electrons aren't boosted to the next shell, and you get no light. Above a certain current, you destroy your device. By modulating the (average) current between these two values, you can get varying degrees of intensity. This is a non-linear function with respect to light intensity, but you can get a more linear function by using a constant current and rapidly pulsing the LED on and off. This technique is known as pulse-width modulation, or PWM. If your PWM never exceeds a given duty cycle, and is sufficiently fast, you can set the constant current at which would, at steady-state, exceed the maximum power rating of your LED. This doesn't usually get you a brighter average, though. </p> <p>You need to select LEDs whose current requirements are within the limits of your drive circuit and whose power requirements are sustainable using your chosen power source.</p> <h2>Forward voltage</h2> <p>The forward voltage will be different for each color in the LED. This just complicates the calculation of the current a bit. If you're using a resistor to set the current, and the LEDs are common-anode, you should probably select LEDs with similar forward voltages to minimize power losses in the resistors. Be aware that the forward voltage is a function of the forward current!</p> <h1><strong>Standard stuff</strong></h1> <p>Then, there are the generic properties that you need to select for any electronic device: </p> <ul> <li>Package</li> <li>Soldering temperature</li> <li>Manufacturer/Supplier</li> </ul> <h2>Package</h2> <p>You may be tempted to use a standard T 1 3/4 5mm dome package. Don't accept this unless you're sure that it's what you want. To get 4 leads under this package, you need small, tight holes (soldering and PCB manufacturing will be hard), and the optical properties are less than optimal. </p> <p>There are a plethora of surface mount packages which are lower profile and lower weight (which is desirable if you want to spin your project) and which have high viewing angles without using diffused lenses. </p> <h2>Soldering temperature</h2> <p>LEDs are some of the most sensitive components to heat when soldering because of the optical requirements of their lenses and because of the unique semiconductors used to generate the light. Be careful if you're using anything but a temperature regulated soldering iron or oven for this. </p> <h2>Manufacturer and distributor</h2> <p>For a one-off project or prototype, Adafruit or Sparkfun products are fine, but (1) you'll pay a premium for their selection and endorsement and (2) you're out of luck if they drop the product. The hobbyist sites are fine if you're making a one-off product, but if you want to distribute plans, make sure a compatible LED is widely available. Otherwise, contact Cree, Avago, or Lite-On (or your favorite manufacturer) directly, or use a major distributor like Digikey or Mouser. You'll have better luck and get better prices by buying in bulk and skipping the middleman.</p> <h1><strong>Color</strong></h1> <p>One of the most important factors to consider is color, but RGB LEDs basically define that for you. You do need to consider the relationships between each color in your selection, but this can usually be accounted for in software. For instance, the human eye detects green much better than it detects blue, and red LEDs are usually more efficient than blue. </p> <p>In addition to the relative power between the colors, you need to consider the spectral information. Many manufacturers have different definitions of each color - Red might be any light with a wavelength between 629nm (an orangey red) and 660nm, green could be from 515nm to 565nm, and blue could be anywhere from 430nm to 470nm (a greenish blue). And that's just the nominal peak! This isn't a laser, so not every ray of light coming from it has the same wavelength -there is an irregular distribution of the wavelength for each color. A red LED will emit a tiny amount of blue light, and vice versa. </p>
<p>I am looking for supplier for RGB LEDs for an upcoming project <a href="http://www.abluestar.com/blog/rgb-led-pov-globe-research/">RGB POV LED Globe</a>. Normally I would go to my local electronics supply story, but this project requires lots (~1000) of LEDs and my local electronics store charges a premium for the LEDs, (@1.50 each) </p> <p>I have done some searching online from a few retailers such as <a href="http://www.alibaba.com">http://www.alibaba.com</a> (~$0.19) or <a href="http://ledssuperbright.com">http://ledssuperbright.com</a> (<a href="http://www.ledssuperbright.com/100-5mm-4-pin-rgb-led-4000-mcd-p-227">$0.35</a>) or <a href="http://www.adafruit.com">http://www.adafruit.com</a> (<a href="http://www.adafruit.com/index.php?main_page=product_info&amp;products_id=302&amp;zenid=9d36137d8bb2f6da9071f934d4cd405f">$1.0</a>) or <a href="http://www.sparkfun.com">http://www.sparkfun.com</a> (~<a href="http://www.sparkfun.com/products/9985">$0.6</a>) or <a href="http://www.digikey.com">http://www.digikey.com</a> (<a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=754-1492-ND">~$1.1</a>)</p> <p>I trust adafruit and sparkfun and have had good experiences from both of them in the past but I am worried that there is a such a huge range in price difference between each of these sites that I might be missing something critical. </p> <p>Also I looked at other POV projects and some use diffuse others use clear LED. I'm not sure what type of LED I should use for this project. The <a href="http://www.ladyada.net/make/minipov3/parts.html">MiniPov3</a> uses diffuse. </p> <p>My questions are:</p> <ul> <li>What make a good RGB LED? </li> <li>What features should I be looking for in the data sheet for this type of project.</li> <li>Should I use diffuse or clear LEDs on my <a href="http://www.abluestar.com/blog/rgb-led-pov-globe-research/">RGB POV LED Globe</a> project? </li> </ul>
What makes a good RGB LED
2011-03-21T19:32:13.397
11805
|memory|cpu|addressing|
<p>If one has a half-egabyte of byte-addressable memory, there has to be a way of generating a 19-bit address. One nice easy approach is to have a CPU whose address bus has 19 or more address lines (e.g. an 8088). Another approach is to have some of the address lines generated by something other than the CPU's address bus. For example, suppose one has a CPU with a 16-bit address bus and one wants to construct a system with 32K of RAM and ~512KB of ROM. One could use a 13-input AND to detect an access to address 0xFFF0-0xFFFF (one input of the AND would be tied to an 'address valid' signal), and a 4-bit latch to grab the bottom 4 bits of such an address. Fifteen of the ROM address bits would be attached to the CPU's address bus; the other four bits would be connected to latch outputs. The net effect would be that the ROM would be divided into sixteen banks of 32KB each, all of which would be accessed from 0x8000-0xFFEF.</p> <p>Note that such a system wouldn't quite have 512KB of usable ROM, since accessing any of the last 16 bytes of each 32K bank would switch to one particular 32K bank. Thus, 0xFFF0 would only be available on bank 0, 0xFFF1 from bank 1, etc. Further, in many cases, one would end up having to duplicate some code in different banks. Still, such a system would be quite practical and is in fact very close to what was done in many things like 1980's arcade games.</p>
<p>If you are trying to control memory from a CPU, then if you use two banks instead of one, you can remove the first address line. If you use four banks, then you can also remove the second as well. Why is this?</p>
Reducing the memory address bus by adding banks
2011-03-22T01:38:17.610
11806
|microcontroller|stepper-motor|interface|
<p>This should do what you want:</p> <p><a href="http://www.sparkfun.com/products/10267" rel="nofollow">http://www.sparkfun.com/products/10267</a></p> <p>You will need to connect the Direction and Step pins to I/O pins on the microcontroller.</p>
<p>I am a neewbie here so don't cush me yet but I have a question concering stepper motors and Microcontrollers (more specificaly PIC16F84A). Does anyone know how to Inteface these two devices? Steppers - <a href="http://www.sparkfun.com/products/9238" rel="nofollow">http://www.sparkfun.com/products/9238</a> Microcontroller - <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010230" rel="nofollow">http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010230</a> Thanks in advance - James</p>
Intefacing a PIC Mircocontroller (PIC16F84A) to two stepper motors
2011-03-22T01:43:42.363
11811
|stepper-motor|motor-controller|
<p>I am having this same issue with my stepper motor powered device at all but the fastest speeds. </p> <p>I decided to chime in with the great feedback I've read above and on other sites.</p> <p>I'm using a toothed belt and was looking for a way to dampen the pulses. Right now it is noisy and at slower speeds it is just "hammering" with each pulse.</p> <p>In my research, I came across a belt tensioner (spring loads belt) to help dampen the step pulse. If you are using a belt this could help. </p> <p>To reduce vibration: </p> <ol> <li>add mass - such as a flywheel, etc.</li> <li>insulate - use third party to deliver power </li> <li>reduce force - lower current, microstep or (In my case add a spring belt tensioner) many others ways to reduce force.</li> <li>tuning - run motor at higher speeds with reduction if applicable</li> <li>dampen - such as a "shock absorber", could be like a spring belt tensioner with shock</li> </ol> <p>I think the best way is to choose a different type of motor as responses above have noted.</p>
<p>I'd like to run a stepper motor at a very smooth, constant speed, with minimal vibrations to both the mount holding it and its output. How do I drive the stepper motor so that speed remains constant, even between steps?</p>
How do you minimize stepper motor vibration?
2011-03-22T04:20:59.807
11813
|mains|
<p>I bought a single wide mobile home to work out of in Phx. Several of the units including mine had a handyman "double lugged" the A/C disconnect to power the 220 dryer outlet to the laundry room in conduit 30 feet away in a aluminum shed, where he next pig-tailed the 110v washer and lighting to the same circuit.</p> <p>My first day of ownership I removed the entire circuit and have since put a new dedicated sub-panel in the laundry room not attached to the a/c. While something will work, code means "minimum safety level." The question is how can I install "above code"? The neutral wire on the lighting circuit was wire nutted to the bare ground wire ... all connected to the 50 amp AC circuit.</p> <p>If you could put on glasses that could see electrical current, you would see 50 amp current seeking a path to ground on all metal grounded surfaces.</p> <p>A deadly recipe for stray current with zero GFCI or AFCI protection, combined with a wet location. </p> <p>Having a history as a DIY landlord, I know what it's like to have a tenant move the breakers around in the panel trying to fix a melted neutral wire nut in a lighting circuit.</p> <p>Imagine having to kill that circuit for maintenance or for an electrical fire - where do you find the hidden breaker to de-energize the circuit? Trust me, it will happen when you are tired or when you have a maintenance worker or relative who is not familiar with your creative wiring.</p>
<p>I have an 220V air compressor (30A) in the attic of my garage. </p> <p>It has a 110V automatic drain valve connected to it.</p> <p>A the breaker box downstairs I want to be able to turn the power off to BOTH. </p> <p>Ideally I could simply turn off the 220V circuit (the compressor is the only load).</p> <p>The 220V circuit is single phase and the receptacle is a <a href="http://en.wikipedia.org/wiki/NEMA_connector" rel="nofollow">NEMA 14-50</a>. </p> <p>It is my understanding that this is a <a href="http://en.wikipedia.org/wiki/Split_phase" rel="nofollow">split-phase 3-wire system</a>. It's really 4-wires: Ground, Neutral, Leg 1 (110V), Leg 2 (110V).</p> <p>What I want to know is if there is any problem with me using one of the two legs (plus ground &amp; neutral) to power a 110V outlet for the automatic drain valve. I'm 99% sure there's no technical problem. I just want to double check on any safety issue or something I may not be aware of (as a DIY). </p>
Have 60A 220V circuit, want to use one 110V leg of it. Can i?
2011-03-22T05:47:18.933
11816
|capacitor|charging|discharge|
<p>Maybe you could use onse of these: <a href="http://www.ebay.com/itm/Boost-High-voltage-Generator-DC-3-6V-to-40kV-Booster-Ignition-Coil-Power-Module-/231527277338?hash=item35e819e31a:g:cdcAAOSwqu9VIfeq" rel="nofollow">http://www.ebay.com/itm/Boost-High-voltage-Generator-DC-3-6V-to-40kV-Booster-Ignition-Coil-Power-Module-/231527277338?hash=item35e819e31a:g:cdcAAOSwqu9VIfeq</a></p> <p>Edit: "high voltage generator power module 40 kv" is a good search term (if the link wouldn't work anymore)</p> <p>40kV should generate a spark on the spark plug. </p>
<p>I wanted to create a remote fired trigger for a spud gun so I can trigger it remotely.</p> <p>Ideally I'd like to use a spark plug to fire because it should work well for gas mixtures but the trigger is pretty small/simple. Basically it's a a little remote box with a push button trigger that runs off of batteries.</p> <p>It has a light, arm switch, and push button that triggers a relay but I currently don't have anything connected on the relay switch end.</p> <p>Would it be possible to charge up some caps and get enough juice to bridge a spark plug with a small battery source (4 AAA or AA batteries) or would I need to step it up to something bigger (lipo or lead acid).</p> <p><em>Note: I have used caps for filtering before but never for charging/discharging.</em></p> <p><strong>Update:</strong></p> <p><strong>Just wanted to clarify. I know that a gas grill push-button igniter is a viable option but I'm looking for something more reliable. Ie, an igniter that I'm 100% positive it'll fire a good spark when I push the button. Check out <a href="http://www.youtube.com/watch?v=Mr1k4G0T-3U" rel="nofollow">"Tater gun Fires a Hunert yards"</a> to see what I mean by unreliable.</strong></p>
Is it possible to fire a spark plug from batteries
2011-03-22T07:28:39.407