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
7525
|multiplexer|solenoid|
<p>Whichever solution you end up using I would recommend taking a look at the power supply for this beast. You have the potential for really drawing a lot of current by accident (shorting out a transistor due to transient, a clock glitch setting a '1' to many, many outputs, etc.) -- Individual PTCs on each coil protects an individual coil, and I would also suggest either a low-ohm (0.1?) shunt resistor or a hall-effect current sensor which will cut power to the entire driver section if an overload is detected. An op-amp that integrates the overload over time is probably a good hardware trip design, but you can do it in a micro if that's your thing, too.</p>
<p>I need to switch 128 solenoids either on or off individually, several times a second. I'd like to drive this from either a PC, or an embedded device. </p> <p>How would you recommend I do this? Perhaps there is a way I can enable addressing of a group of (8 or 16) solenoids and send a <code>turn on</code>, or <code>turn off</code> command to them?</p> <p>Considering what's out there, what is the easiest way to go about this? What is the best or most preferred way?</p> <p>I am looking at these solenoid valves that run at about $50 each. Do share information if you know of any cheaper/better ones. The purpose is to control an indoor waterfall. It's low-pressure so all the water drips downwards.</p> <p><a href="http://www.ascovalve.com/Applications/ProductSearch/ProductInfo.aspx?productid=8262H001AC120/60,110/50D&amp;userAction=view" rel="nofollow">http://www.ascovalve.com/Applications/ProductSearch/ProductInfo.aspx?productid=8262H001AC120/60,110/50D&amp;userAction=view</a> </p>
How can I control 128 (or more) solenoids?
2010-12-04T23:48:26.473
7530
|arduino|video|netduino|mobile-robot|
<p>I would suggest to use your phone as a camera as well as the controller. </p> <p>This is what I am planning to do in the near future with an Android phone and Arduino BT (or Arduino + Bluetooth chip) connecting the to devices via Bluetooth.</p>
<p>I'm working on a Netduino based mobile robot that's controlled by software on a PC or phone (WP7). One goal of the project is to be able to steer the robot from another room of the house. Is there a small wireless (wifi) web cam that runs on battery that may work for this situation? I don't think the Netduino has enough processing power to stream video, though technially it could using a wifi shield. If that's out of the question would it be possible to sporatically take pictures using some other camera sensor &amp; the Netduino (photos could be stored on the SD card and later served up over wifi to the client)?</p>
Wireless, battery operated web cam for mobile robot
2010-12-05T02:02:00.373
7535
|analog|design|layout|digital-logic|
<p>Those all sound like excellent ideas. A few comments:</p> <p>"Do not split the ground plane. Use one solid plane under both analog and digital sections of the board." -- Henry W. Ott (EMI consultant), in <a href="http://www.hottconsultants.com/pdf_files/june2001pcd_mixedsignal.pdf">"Partitioning and Layout of a Mixed Signal PCB"</a> <em>printed circuit design</em> magazine (June 2001). The Massmind has some more information on the <a href="http://techref.massmind.org/techref/noises.htm#unsplit_ground">split vs unsplit ground plane controversy</a>.</p> <p>"Slew rate control" Yes, as long as you do this by adding a <a href="http://techref.massmind.org/techref/electips.htm#series_resistor">series resistor</a> right at the source output pin. (Too many misguided individuals add a "smoothing capacitor" near the destination input pin, which only makes things worse).</p> <p>There's a few more mixed-signal <a href="http://opencircuits.com/Techniques">PCB design techniques at the Open Circuits wiki</a> and the <a href="http://en.wikibooks.org/wiki/Practical_Electronics/PCB_Layout">Practical Electronics Wikibook</a>. They are wiki -- feel free to make further improvements.</p>
<p>What precautions should I take when mixing analog audio and digital (uC control) on the same board? I don't want to hear the I2C bus in my speakers. I'm thinking about </p> <blockquote> <ol> <li>Separate power supplies </li> <li>Separate ground planes, with each part within its own ground plane </li> <li>A single connection over a ferrite bead between ground planes </li> <li>Lots of decoupling, preferably by RC instead of simply a C </li> <li>Slew rate control, esp. on serial buses (lots of edges!) </li> <li>Physical distance between both world </li> </ol> </blockquote> <p>The RC decoupling may or may not be overkill, but it costs only a resistor.<br> Other suggestions? </p>
What precautions should I take when mixing analog audio and digital on the same board?
2010-12-05T09:48:59.070
7538
|arm|programming|isp|
<p>You can use the lpc21isp programmer which was originally written for the LPC21xx series but recent versions also support the LPC17xx series. It requires only a serial port but it is helpful to connect the RESET and ISP pins because they will have to be manipulated to force the chip into the bootloader.</p> <p>There are binaries for Windows and the code compiles without problems on both Linux and OS X.</p> <p>PS. There is also JTAG but who would want to use that. :)</p>
<p>I plan to buy an <a href="http://mbed.org/" rel="nofollow">mbed</a> module to get started with NXP LPC17XX. Developing and downloading code seem the easiest possible. What are my options for in-system programming this code in non-mbed devices? I understand the bootloader only requires a UART connection to my host PC.<br> What tools are available for Windows PCs? Can they directly work with the object code I created on the mbed site?<br> Can I use code for the LPC1759 directly on other LPC17XX devices? </p>
How do I in-system program LPC17XX?
2010-12-05T12:59:54.670
7540
|sensor|infrared|
<p>The sensor outputs a high level if it detects the proper input signal, being an IR carrier of 30..56 kHz, depending on the type you chose. Build a IR transmitter which transmits such a carrier. You don't need a microcontroller for that. (I leave it to you to solve this; I'm not going to do your homework completely! :-)) Direct the transmitter to any possible obstacles. If the receiver looks in the same direction it will pick up the reflected signal if you get close enough to the obstacle.<br> Success!</p>
<p>I am asked as a term project to design a circuit that is somewhat similar to a park sensor. Let me first say that I am a 2nd year undergrad student, and we are very newly beginning to get into the circuit design stuff.</p> <p>As for the project, I roughly have what to do in mind, except I have no idea how to utilize the TK-19 sensor. I have provided the link to the datasheet below, I would be very glad if someone can tell me what happens when this thing detects IR radiation, or does not, that is the main question in my mind.</p> <p>Here's the link to the datasheet: <a href="http://www.datasheetcatalog.org/datasheets/restul/305097_DS.pdf" rel="nofollow">http://www.datasheetcatalog.org/datasheets/restul/305097_DS.pdf</a></p> <p>Edit: Let me note that we are only allowed to use diodes(including LEDs and IR LEDs), capacitors, resistors and opamps.</p>
How can I use a Integrated IR Receiver IC in a sensor circuit without microprocessors?
2010-12-05T14:34:18.800
7541
|stepper-motor|
<p>Generally yes, although the half step positions may be slightly less accurate than the full ones. Bear in mind you are putting twice the power through the motor so heat may be more of an issue.</p>
<p><br> I have some stepper motors with a step angle of 1.8 degrees and I am wondering if it is possible that powering the coils next to each would it get the spindle to go to midpoint between the two coils? So for example power coil 3 and 4 to get it to go between both points(so step angle between 0.9 degrees) or will it keep moving very slightly? I only ask as the stepper motors are at college and its the weekend so can't test it. </p>
Is half stepping possible by powering the two consecutive coils?
2010-12-05T14:40:45.687
7544
|pcb|repair|damage|
<p>The burnt traces are a symptom. Something shorted out and caused them to burn. Unless you can find and fix the root cause, there is no sense in repairing the traces.</p>
<p>I've got a PCB (from a multimeter) that apparently has 2 traces on the PCB burned away. How they did it, I don't exactly know, but the traces are really gone completely. The problem is however, that these traces disappeared up to a via they were connecting to...</p> <p>So little graphical representation("=" = trace, "-" = disappeared trace, "o" = via) : =====-----o</p> <p>Another complication: if I would solder a small wire through the via, it can't protrude at the other side, because the other side are the sliding contacts of the dial of this multimeter.</p> <p>So, who's got the best option to repair these traces? Thanks!</p>
Repair a burned trace on a PCB
2010-12-05T15:24:57.167
7549
|i2c|
<p>Pick a device you positively won't be using in your design and use it's I2C address. For instance, if you won't be needing a RTC, you can use 0xA2 and 0xA3, which are used by the NXP PCF8563 (and probably other RTCs).</p>
<p>Now I know in order to have an I2C address reserved for yourself you have to pay the I2C people some money. But I don't want to do this.</p> <p>I'm asking for advice on what address I should choose for my slave and master MCUs on my project. There will also be an EEPROM on the board. So I will avoid using the address of the EEPROM. I plan for the master to connect to a wide range of sensors, including gyros and accelerometers, and perhaps additional memory devices. Are there any blocks of addresses I should stay clear of? I was thinking of just using 0x00 for the master and 0x01 for the slave, because those seem to be rarely used.</p> <p>Another question: would it be a bad idea to mix 10-bit devices and 7-bit devices on the same bus? I was considering the possibility of having my MCUs communicate with 10-bit addressing, but only using 7-bit addresses for sensors.</p>
What I2C address should I choose?
2010-12-05T18:54:04.493
7555
|wireless|radio|video-transmitter|uav|
<p>Use analog video and a video transmitter/receiver pair.</p> <p>Total cost less than $50 US.</p>
<p>I've been inspired by the guys at <a href="http://diydrones.com/" rel="nofollow">DIY Drones</a> and I'm toying with the idea of making a UAV. To transmit the sensor data, I was thinking I'd go with a 60mW XBee, but I also would like to transmit live video. I'm having a hard time finding a way to transmit live video because I think the XBee will only transmit at low speed. Any idea what camera/transmitter/receiver combo would be possible? I think 1-5 miles range would be ok.</p> <p>I'm looking for specific products/links.</p>
Want to make a UAV
2010-12-05T21:21:23.057
7559
|pcb|soldering|pcb-fabrication|
<p>Use soft wire wool after milling and then a spray coat such as <a href="http://www.kaisertech.co.uk/acatalog/Products__Servisol_Plastic_Seal_60_65_Conformal_Coating_476.html" rel="nofollow">Servisol plastic seal 60</a> </p>
<p>I am making a PCB with a subtractive PCB mill, and I am having difficulty soldering some components to the finished copper. The solder isn't flowing onto the traces easily, and by the time it does flow, the pad lifts. </p> <p>I'm not sure if the boards need to be cleaned more, or if they need to be covered with a tinning solution (or both). What can I do to make the board easier to solder?</p> <p>When should I clean my boards - just before or after milling?</p>
Improving ease-of-soldering in home-made boards
2010-12-05T23:11:51.260
7566
|microcontroller|
<p>Is there a sure-fire way to detect <em>every</em> failure? No.</p> <p>Failure or damage can occur in a variety of ways, some of which are very subtle.</p> <p>Fundamentally, ass you can really do is exercise whatever aspects of a device you are intending to use, in such a way that any erroneous behavior is detected.</p> <p>Some failures are obvious (failure short-to-ground, for example). On the other hand, if you have damage to an onboard peripheral which causes 1 bit error every 500 bytes, how would you check for it?</p> <p>Anyways, I would imagine that the PIC <em>may</em> be ok. I once accidentally ran a PIC12 on 12V for long enough that it actually melted my breadboard (the voltage regulator failed short input-output), and it apparently kept working fine, it just got really hot.</p>
<p>I have a PIC24FJ32GA002. I think I killed by accidently exposing it to 5V instead of the rated 3.3V. It was very quick, less than half a second. I am not able to get it to communicate with my programmer, but I didn't test it beforehand, so I am not sure if my circuit is wrong or I have wired something up incorrectly. Unfortunately I can't get any more MCUs any time soon. Is there any way to determine if the MCU is truly dead?</p>
Is there a sure-fire way to determine if an MCU is fried?
2010-12-06T01:09:36.117
7570
|arduino|software|
<p>If I understand your symptoms correctly, you need a second delay.</p> <p>Here's what the code looks like if you executed the loop a few times:</p> <pre><code> n0(); delay(1000); ndash(); n0(); delay(1000); ndash(); n0(); delay(1000); ndash(); n0(); delay(1000); ndash(); </code></pre> <p>ndash() is only displayed for however long it takes for n0() to execute, which is probably too fast to see.</p>
<p>I am trying to make some Arduino code count on a 7 segment display. I have the wiring all right but this code will not delay one second and go to next function. Any ideas?</p> <pre><code>/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(6,OUTPUT); pinMode(7,OUTPUT); pinMode(8,OUTPUT); pinMode(9,OUTPUT); } void n0() { digitalWrite(3,LOW); digitalWrite(4,LOW); digitalWrite(5,LOW); digitalWrite(6,LOW); digitalWrite(7,LOW); digitalWrite(8,LOW); digitalWrite(9,HIGH); } void ndash() { digitalWrite(3,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); digitalWrite(6,HIGH); digitalWrite(7,HIGH); digitalWrite(8,HIGH); digitalWrite(9,LOW); } void loop() { n0(); delay(1000); ndash(); } </code></pre>
What is wrong with my Arduino 7-segment display code?
2010-12-06T02:53:12.700
7572
|power-supply|
<p>This is a pretty common mistake for people new to electronics. Most power supplies are designed to provide a constant voltage (5v in your case). Your circuit then provides a resistance of some sort, with microcontrollers and capacitors and such the resistance will change with time, but for beginners its usually best to think of your circuit has having a constant resistance as well.</p> <p>So V/R=I, since V and R are constant, I will stay the same also.</p> <p>The current that is given for your power supply is just the max that the power supply can output and guaranty a steady 5v. So if you work the V/R equation out and get 1Amp, then a 500mA power supply wont work for you, but a 22Amp supply will.</p> <p><strong>Sometimes this analogy helps people understand what is happening</strong></p> <p>Think of:</p> <ul> <li>voltage as the height above the ground you are</li> <li>current being the act of an object falling</li> <li>max current as how much area you have to fall down in</li> <li>an orange and an elephant as being 2 different circuits you have built</li> </ul> <p>So if you have an elevator shaft that you drop an orange in from 100ft it will act the same (or close to if you ignore stuff like wind) as dropping an orange from 100ft off the top of the building. Now if you try to drop an elephant down an elevator shaft it will act much differently then if you drop an elephant off the top of a 100ft building.</p> <p>So in the case of your original circuit (the orange) a 500mA max power supply (the elevator shaft) will act just the same as a 22amp power supply. (Off the top of the roof)</p> <p>But when you go to your new circuit (the elephant) a 500mA max power supply will act much differently then a 22amp power supply.</p> <p><strong>Warning</strong></p> <p>A power supply that can output more current means that you have a greater chance of killing components if hooked up wrong. If you always hook stuff up correctly it wont ever be an issue, but I don't know anyone who has never accidentally hooked something up wrong.</p>
<p>I'm still pretty novice at electronics. I've recently been thinking of a project to make. The difference in this from my other projects is that for this I would need quite a bit of power. I'm use to using only a USB or battery powers supply. For this one though I think a PC power supply will be needed. </p> <p>What precautions and considerations should I have when working with more amps(though the same amount of voltage)? If I hook an LED up to 5V, 500ma then it lights and works well. Will that be the same if I hook it up to 5V, 22A? What about for microcontrollers and other integrated circuits? Will they not be fried by the higher amperage? </p> <p>If I do have something that does specify a max amperage rating, how do I decrease the amperage without affecting the voltage?</p>
What considerations should I have for high-current power supplies?
2010-12-06T04:36:17.673
7579
|connector|sparkfun|
<p>Are 1.0mm pitch terminals easy to crimp? No.</p> <p>Having bought some 1mm crimp connectors in the past thinking "that's huge" (in soldering pitch terms), I soon regretted it after having crimped 30. In later projects when I needed a bunch of low-current connections I used <a href="https://electronics.stackexchange.com/questions/7589/looking-for-a-board-to-board-cable/7592#7592">FFCs</a>.</p> <p>If you only have two crimps to make, it might be worth a shot, though if you can find pre-crimped pigtails, I would jump on that.</p>
<p>I'm trying to buy <a href="http://www.sparkfun.com/products/10206" rel="nofollow">these recently stocked connectors from Sparkfun</a> from either Farnell or Digikey, but have no idea what they are called or how to find them. Also, what about the female connector that mates to this? And would I be easily (without an expensive tool) be able to crimp connectors for this series of connectors?</p>
Where to find Sparkfun's 1.0mm pitch connectors?
2010-12-06T11:33:47.950
7585
|i2c|addressing|
<p>The data sheet clearly indicates that there are "8 programmable slave addresses using 3 address pins" right there in Section 2 bullet 7. In other words, there is a 7-bit address, 4 of those bits are the same for all chips (<strong>internally hard coded</strong>), and 3 of them (bits 0, 1, and 2 in particular) are programmable by setting (i.e. <strong>electrically connecting</strong>) the pin values to either Vss (GND) or Vdd (i.e. 5V). What the top 4 bits are <strong>internally hard coded</strong> to depends on the chip you are using - table 4 indicates that those bits are A[6:3] = 0100 for the PCA8574 and table 5 indicates that those bits are A[6:3] = 0111 for the PCA8574A.</p> <p>To make it crystal clear, for the PCA8574 the lowest address possible is 010 0000 == 0x20 and the highest address possible is 010 0111 == 0x27. Likewise for the PCA8574A the lowest address possible is 011 1000 == 0x38 and the highest address possible is 011 1111 == 0x3F. </p>
<p>The <a href="http://ics.nxp.com/products/pca/datasheet/pca8574.pca8574a.pdf" rel="nofollow noreferrer">datasheet for the NXP PCA8574/74A</a> contains the following line on addressing (p.6):</p> <blockquote> <p>When AD2, AD1 and AD0 are held to VDD or VSS, the same address as the PCF8574 or PCF8574A is applied. </p> </blockquote> <p>I'm afraid I don't understand what is meant here. Can someone clarify please?<br> Also, while address ranges are given as (depending on inputs AD0..AD2) </p> <blockquote> <p>PCF8574: 0x20 - 0x27<br> PCF8574A: 0x38 - 0x3F </p> </blockquote> <p>both the text and fig.7 suggest that the device address can freely be chosen between 0x01 and 0x7F (though I don't see how this would be done). </p> <p><img src="https://i.stack.imgur.com/Kr6hl.png" alt="alt text"> </p> <p>Or am I reading this wrong?</p>
Confused about I2C addressing in PCA8574/74A
2010-12-06T15:10:14.753
7586
|capacitor|capacitance|ratings|
<p>It caused less confusion than sometimes arose with a decimal point, which was missed sometimes when documents were copied or faxed. That's not such a problem these days, but it is in common use, especially here in Europe. I always use that notation.</p>
<p>I'm looking at an electrolytic capacitor (and old blue, Philips one used in electronics classes) and am wondering why it is printed with <strong>4µ7-M</strong>.</p> <p>I tried Googling, figuring that it was a common enough occurrence, but found nothing.</p> <p>Is that supposed to be a 47µF cap? Why is the µ in the middle of the number? What is the -M for?</p> <p>Thanks.</p>
µ in the Middle of a Capacitor Rating
2010-12-06T15:43:28.993
7589
|cables|interconnect|
<p>DigiKey has a product category called Rectangular Cable Assemblies. Under that select socket to socket. They have pre-made ribbon cable assemblies from 2" to 6'. Also many other connector options, such as DIP plugs on each end. Here is a link to 10-pin assemblies.</p> <p><a href="https://www.digikey.com/products/en/cable-assemblies/rectangular-cable-assemblies/450?k=&amp;pkeyword=&amp;pv28=1602&amp;FV=ffe001c2%2C160000a%2C1f140000&amp;mnonly=0&amp;ColumnSort=0&amp;page=1&amp;stock=1&amp;quantity=0&amp;ptm=0&amp;fid=0&amp;pageSize=500" rel="nofollow noreferrer">https://www.digikey.com/products/en/cable-assemblies/rectangular-cable-assemblies/450?k=&amp;pkeyword=&amp;pv28=1602&amp;FV=ffe001c2%2C160000a%2C1f140000&amp;mnonly=0&amp;ColumnSort=0&amp;page=1&amp;stock=1&amp;quantity=0&amp;ptm=0&amp;fid=0&amp;pageSize=500</a></p>
<p>I am wanting to connect 2 boards together with a cable. I want the connectors on the boards to be surface mount and have clips to hold the cable onto it. I need about 8 - 10 pins. I don't want to have to crimp wires or solder them, I would prefer something like a ribbon cable. </p> <p>I have been searching all morning and cannot find anything really to fit the bill. I checked at mouser and digikey. I really don't know what all the keywords mean e.g. </p> <pre><code>Interconnects • Attenuators (146) • Audio / Video Connectors (5,867) • Automotive Connector Accessories (410) • Automotive Connectors (5,458) • Circular Connectors (66,507) • D-Subminiature Connectors (20,969) • DC Power Connectors (597) • Fiber Optic Connectors (2,042) • I/O Connectors (4,135) • IC &amp; Component Sockets (9,755) • Lighting Connectors (320) • Memory Card Connectors (1,610) • Photovoltaic (Solar) Connectors (139) • Power Entry Modules (2,273) • Power Line Filters (3,257) • Rectangular Connectors (146,383) • RF Connectors (8,466) • Telecom &amp; Ethernet Connectors (6,423) • Terminal Blocks (46,818) • Terminals (12,834) • Test Connectors, Probes &amp; Testleads (2,002) • Test Points (124) • Unspecified Connectors (84) • USB &amp; Firewire Connectors (1,130) </code></pre> <p>Some of them I can figure out. Any help would be appreciated. I can find really anything but cables. </p> <p>Thanks in advance.</p>
Looking for a board-to-board cable
2010-12-06T16:08:04.017
7597
|adc|
<p>If you're feeding this to a MCU or similar, I would use a basic resistor voltage divider to cut the 0-10 V to 0-5 V or similar. I might pad the range a little to avoid saturation near the top-end due to tolerances, and maybe add some clamping diodes depending on the application. Many MCUs are capable of 100 ksps nowadays, some DSPICs can even do 1 Msps.</p> <p>Random anecdote: One of my first PCBs I had made as an intern was a big resistor divider array for our test engineers who had to connect automotive analog stuff (0 V to BATT; 9 to 16 volts) to their 0-5 V DAQs.</p> <h3>Additions</h3> <p>24-bit @ 100 ksps...not doable with any MCU (I know of). You can use <a href="http://www.atmel.com/dyn/resources/prod_documents/doc8003.pdf" rel="nofollow noreferrer">oversampling and decimation</a> to hit 24 bits, but you take an effective 4x sample rate hit per bit of increased resolution.</p> <p>I don't know about your application, but I might try to cheat and go with a 96 ksps rate. 96 kHz audio is fairly common nowadays, so it might be easier/cheaper to get an ADC for that.</p> <em>Possible parts available @ DK:</em> <ul> <li>Cirrus Logic CS5343-CZZ - <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=598-1189-ND" rel="nofollow noreferrer">IC ADC AUD 98DB 108KHZ 10-TSSOP</a> (Cirrus has a few others, CS5346-CQZ, CS53L21-CNZ)</li> <li>Analog Devices AD1974YSTZ-ND - <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=AD1974YSTZ-ND" rel="nofollow noreferrer">IC ADC 4CH W/ON-CHIP PLL 48LQFP</a></li> <li>Texas Inst. PCM1808PWR - <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=296-26307-1-ND" rel="nofollow noreferrer">IC ADC 24BIT STER <strong>96KHZ</strong> 14-TSSOP</a></li> </ul> <p>In any case, regardless of the IC, halving the range per bit with a voltage divider is a very clean and basic method, almost assuredly lower noise than passing through any demultiplexer.</p>
<p>I have a signal from 0 to 10V dc. I need to 24bit or better ADC that signal at 100ksps or greater. I can't find ADCs that will do that, they either read at lower voltages or not as fast. I have contemplated using a normal ADC with a MUX <a href="http://www.sparkfun.com/products/9907" rel="nofollow">http://www.sparkfun.com/products/9907</a> and tune each section to a seperate voltage range, then scan till its in range and ADC the signal then. I didn't want to have to manipulate the data that much. Or use a 4 2.5V ADCs using relative ADC line references and scan 0 - 2.5, 2.5 - 5, 5 - 7.5 , and 7.5 - 10. Then add them together in the end to get the total ADC. I would like to do this on one chip or know a "good" way to do it. </p> <p>Thanks for the help.</p>
24bit or better ADC at 10V with at least 100ksps?
2010-12-06T18:18:42.780
7603
|microcontroller|breadboard|
<p>Ah! I think I fixed it!</p> <p>And I learned some things about my MCU in the process.</p> <p>I2C is not working properly because of a <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/80470e.pdf" rel="nofollow">chip errata</a>. Item 10.</p> <pre><code>Module: I2C™ (I2C1, SDA Line State) When using I2C1, the SDA1 line state may not be detected properly unless it is first held low for 150 ns after enabling the I2C module. In Master mode, this error may cause a bus collision to occur instead of a Start bit transmission. Transmissions after the SDA1 pin has been held low will occur correctly. In Slave mode, the device may not Acknowledge the first packet sent after enabling the I2C module. In this case, it will return a NACK instead of an ACK. The device will correctly respond to packets after detecting a low level on the line for 150 ns. The I2C2 module operates as expected and does not exhibit this issue. </code></pre> <p>This explains why the screwdriver trick works. I was shorting SDA to Vss when I ran the screwdriver along the pins, which allowed the module to start correctly. It only affects A3/A4 silicon.</p>
<p>I'm trying to get an I2C bus working. I'm using a PIC24FJ32GA002 micro. At the moment it's not connected to any other devices. It doesn't work. I then run a screwdriver along the pins of the MCU and it starts working. Power cycle and it's not working, same trick with the screwdriver and it starts working. The most confusing thing is I do not need to hold the screwdriver there - simply running it across the pins once or twice is enough to get it working.</p> <p>The software is basic, just an infinite loop sending out I2C data. What could be wrong? It's on a breadboard. I'm beginning to suspect a faulty connection, but what about a breadboard would cause it to stop working after power is reset?</p>
My board works intermittently... when I short some pins
2010-12-06T22:21:26.000
7609
|i2c|level-shifting|
<p>OMG, epic fail. I just found out that I grabbed from the wrong box and placed all BC857 where there should be BSN20.</p> <p>However, it could be that I was right (and the BSN20 wrong) in the first place and made the mistake not before I replaced them. I don't know, because I am out of BSN20 and put in BSH108 (which have better specs anyway). Now it works fine.</p>
<p>I am using the well-known I²C level shifter from that <a href="http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf" rel="nofollow noreferrer">appnote from Philips</a>.</p> <p><img src="https://i.stack.imgur.com/CgUKc.gif" alt="schematics"></p> <p>The 3V side is supplied by an LP2950-3.0 regulator and is loaded only moderate (a few quite lazy 74's).</p> <p>The problem I'm obserivng is that the 3V side is being pulled to 5V.</p> <p>I loaded the 3V side with a resistor and calculated that the level shifter presents a resistance of only 2.7 kOhms. I consider this rather low and I wonder:</p> <ol> <li><p>Is that normal behaviour or did I make some mistake?</p></li> <li><p>Isn't this harmful for the devices on the 3V side? There are several ICs that according to the datasheet are explicitly not 5V tolerant, not to forget the regulator.</p></li> </ol>
I²C level shifter pulls low side up
2010-12-07T03:32:37.237
7610
|serial|rs232|baudrate|
<p>Bear in mind error is peak-to-peak - this can be an issue at high baudrates on a jittery clock - RC oscillators can have quite a lot of jitter, so a 1% (avarage or RMS) calibrated clock may actually have instantaneous errors larger than that. At lower baudrates this will tend to get avaraged out.</p>
<p>What is the maximum clock difference between a transmitter and receiver for error-free asynchronous serial communication?</p>
What is the maximum acceptable baud rate error for RS-232 serial communication?
2010-12-07T04:53:55.093
7613
|mosfet|schematics|dc-motor|
<p>A quick search on the 'net' gives the following</p> <p>Model: R370</p> <p>Round type diameter: 24.4 x 30.8 (L)</p> <p>Voltage (V): 6.0 No load current 0.03 A; speed 4,950 rpm Max efficiency current 0.19 A; speed 4,280 rpm; torque 19 gcm Max output current 0.625 A; speed 2,475 rpm; torque 170 gcm Stall current 1.22 A; torque 140 gcm </p> <p>Voltage (V): 31.0 No load current 0.035 A; speed 11,140 rpm Max efficiency current 0.2 A; speed 9,530 rpm; torque 43 gcm Max output current 0.63 A; speed 5,570 rpm; torque 149 gcm Stall current 1.22 A; torque 298 gcm </p> <ul> <li>This sounds like a possible for your motor...</li> </ul> <p>If the motor you have is about this size (24.4mm Dia x 30.8mm L), then its stall current will be about the same.</p> <p>And for your FET - a max current around 22A peak around 80A</p> <p>This FET should easy handle the stall current for your motor.</p>
<p>I am trying to create a small motor driver for a DC motor, 9 V - 12 V. Max current and stall current I do not know, but I am using the stock motor of a Blade CP Helicopter. I just want to know if I am using parts that will work and what parts I should replace. The FET i am using is a 22N50 N-channel FET. Any advice or things I should look out for?</p> <p>Motor will be only going one direction and will be controlled from a 3 V - 5 V PWM</p> <p>Yes, I know about the diode across the motor which is a 1N4000.</p> <p>The schematic: <img src="https://i.stack.imgur.com/hFrIH.jpg" alt="enter image description here"></p>
Simple Motor driver circuit diagram help
2010-12-07T07:37:25.467
7616
|magstripe|nxp|smart-card|
<p>In Serbia, we too have chips in ID cards, but they aren't mandatory.</p> <p>I'm going to write a bit about what I found out here. I assume that at least some of that could apply to other users of electronic ID cards.</p> <p>I'd say that first step is to have large amount of information. Smart cards can hold larger amount of information that magnetic cards (or at least I got that idea from somewhere).</p> <p>Next interesting point is that because smart card itself is "active" you can make relatively easy upgrades without modifying entire infrastructure. For example here we added fully qualified certificates for electronic signatures into ID cards some time after they rolled out. With smart cards, he private doesn't leave the card itself, so it is more secure than other storage mediums. Magnetic strip cards can be copied and data from them removed. </p> <p>Another interesting thing is that it is easier to hide information your government doesn't want you to know it's there in a smart card. For example, ID cards here have fields for apartment number and floor number as a part of the address, but officially government shouldn't have access to such information and those fields weren't supposed to be in ID cards. </p> <p>I'd also say that smart card format itself is more accessible than magnetic card. Smart card readers are more common than magnetic card readers, so users who want to use their ID cards for signing documents, registering vehicles and so on could just buy a regular smart card reader instead of a more expensive proprietary one with encryption functionalities which may or may not be safe.</p> <p>Also, smart cards can be used to encrypt data in Windows and for logging in (but I couldn't figure out how to do the second part). Users of smart ID cards could avoid having to obtain another smart card for those functions.</p>
<p>Why did Germany choose NXP's SmartMX chip in the new Electronic ID Card (see <a href="http://egovasia.enterpriseinnovation.net/content/germany-issue-national-identity-card-smartmx-chip">here</a>) instead of having a more conventional solution, like an old credit-card-like approach? </p> <p>In fact, the question is more general: Why is the chip solution considered the best approach for identity cards vs. magnetic bands, MRZ et al.?</p> <p>FTR, I think that a much more cost-effective solution would be by having the cryptographic engine in the reader/writer and the card should be a rather dumb storage media which will store the encrypted data. </p> <p>(Also, we all know that there are also solution to 'workaround' the chip's security features. See <a href="http://www.dw-world.de/dw/article/0,,6211080,00.html">here</a>)</p> <p>What do you think?</p>
Why are chips used in electronic identity cards?
2010-12-07T10:22:33.733
7620
|diodes|stepper-motor|
<p>If you stay well below the max rated current of 500mA , say 350mA max, the clamp diodes connected from COM to V+ should be ok, but beware of excess heat dissipation if using PWM mode then use external clamps. and common mode chokes for coil pairs.</p>
<p>When I've driven coils in the past (such as mechanical relays) I've had to put a diode to protect it against back EMF once turned off. Does that need to be done when driving stepper motors with a <a href="https://www.ti.com/lit/gpn/uln2803a" rel="nofollow noreferrer">ULN2803a</a>?</p>
When driving stepper motors do I need to worry about back EMF?
2010-12-07T11:21:51.780
7624
|fpga|verilog|
<p>FWIW I thought I should add that one obvious goal in asynchronous logic solutions woukd be the global reduction in power consumption.</p> <p>Those global clock/PLL/buffers burn lots of Joules.</p> <p>As FPGA solutions meander into battery powered arenas (e.g, Lattice Icestick) then this aspect will acquire much more attention.</p>
<p>We had a very short FPGA/Verilog course at university (5 years ago), and we always used clocks everywhere.</p> <p>I am now starting out with FPGAs again as a hobby, and I can't help but wonder about those clocks. Are they absolutely required, or can an FPGA-based design be completely asynchronous? Can one build a complex bunch of logic and have stuff ripple through it as fast as it can?</p> <p>I realise that there are a whole lot of gotchas with this, like knowing when the signal has propagated through all parts of the circuit and the output has stabilised. That's beside the point. It's not that I want to actually build a design that's entirely asynchronous, but just to improve my understanding of the capabilities.</p> <p>To my beginner eye, it appears that the only construct that absolutely requires a clock is a <code>reg</code>, and my understanding is that a typical FPGA (say, a Cyclone II) will have its flip-flops pre-wired to specific clock signals. Is this correct? Are there any other implicit clocks like this and can they typically be manually driven by the design?</p>
Can an FPGA design be mostly (or completely) asynchronous?
2010-12-07T12:57:22.270
7632
|sensor|robotics|uav|
<p>If I were going to do this using a downward facing camera, the first thing i would want is high performance and relatively low resolution (this is a sensor, I'm not interested in the camera's input really) and so the camera i'd use for this would be from an optical mouse: they have very high speed, low resolution cameras. With a bit of hacking about I'm sure you could come up with a lens arrangement to let it distinguish between features on the ground and then you could use a difference-extracting optical flow algorithm to process this input.</p>
<p>I will be building a 4 propeller quadrocopter drone at some point. I want to make it relatively easy to fly by getting it to hover still when the controls are not touched.</p> <p>Can someone offer some information on how I'd get the quadrotor to stay put in the air? I was thinking accelerometers to measure drift and roll/pitch/yaw, but they're not sensitive enough to detect very slow drift due to, for example, a light breeze. Is GPS accurate enough to stamp out drift on the 10cm scale (that is, detect a 10cm drift (or less, maybe?) from the drone's original position)?</p>
Stopping drift in hovering quadrocopter
2010-12-07T14:42:15.353
7633
|lpc|can|timing|bus|
<p>The problem was about selecting the wrong pins. Case is closed.</p>
<p>I am trying to get a CAN bus sniffer working, based on <a href="http://www.keil.com/dd/chip/4152.htm" rel="nofollow">LPC2368</a>. I keep getting a bus error interrupt, of type "form error". I suspect my timing settings. I verified that the sending party is transmitting at 125&nbsp;kbit/s (8&nbsp;μs bit duration). Here is my setting for a 72&nbsp;MHz CPU clock and 125&nbsp;kbit/s bus speed:</p> <pre><code>#define PULSE_BEFORE_SAMPLE 8 #define PULSE_AFTER_SAMPLE 3 #define PULSE_PER_BIT (PULSE_BEFORE_SAMPLE + PULSE_AFTER_SAMPLE + 1) #define TSEG1 (PULSE_BEFORE_SAMPLE - 1) #define TSEG2 (PULSE_AFTER_SAMPLE - 1) #define SJW 3 //sync jump width #define SAM 0 //sampling 0=single sample 1=triple sample #define CAN_PRESCALER 7 //((CPU_CLK_HZ / PCLK_DIVIDER / CAN1_BAUDRATE / PULSE_PER_BIT) - 1 ) ... PCLKSEL0 |= PCLK_CAN1 &lt;&lt; 26; //clock source = CCLK/6 ... CAN1BTR = (CAN_PRESCALER | (SJW &lt;&lt; 14) | (TSEG1 &lt;&lt; 16) | (TSEG2 &lt;&lt; 20) | (SAM &lt;&lt; 23)); </code></pre> <p>Am I making an obvious mistake here? The controller is running in listen-only mode, all other mode bits are set to 0.</p>
Debugging a LPC23XX based CAN bus sniffer
2010-12-07T14:43:59.130
7637
|identification|
<p><img src="https://i.stack.imgur.com/w7dfE.png" alt="alt text"></p> <p>Micro Power Systems: <a href="http://www.datasheetarchive.com/pdf-datasheets/Datasheets-111/DSAP0025577.html" rel="noreferrer">http://www.datasheetarchive.com/pdf-datasheets/Datasheets-111/DSAP0025577.html</a></p>
<p>Can you identify the logo on these ICs? </p> <p><img src="https://i.stack.imgur.com/IzODI.jpg" alt="alt text"></p>
Can you identify this logo?
2010-12-07T15:54:37.770
7641
|components|
<p>Seen in <a href="https://twitter.com/kenshirriff/status/1741661696320766233" rel="nofollow noreferrer">Ken Shirriff's tweet</a>, a list of Russian logos: <a href="https://madelectronics.ru/book/prominfo/2009-04-16-08-29-39-318.htm" rel="nofollow noreferrer">https://madelectronics.ru/book/prominfo/2009-04-16-08-29-39-318.htm</a></p>
<p>This question is inspired by <a href="https://electronics.stackexchange.com/q/7637/1240">this</a> question.</p> <p>I'm interested in on-line resources which can be used to identify logos. Are there any databases of commonly and not so commonly used logos on ICs which can help there?</p> <p>I know that <a href="http://www.datasheetcatalog.com/" rel="nofollow noreferrer">http://www.datasheetcatalog.com/</a> brings up logos of manufacturers when searching for datasheet, but it happened to me few times that I was looking for a component with unknown manufacturer and none on the logos matched.</p>
Identifying manufacturer logos on components
2010-12-07T16:34:29.700
7653
|arduino|atmega|avrdude|
<p>It's either dead or needs fuses resetting as other have said.</p> <p>If you have access to an electron microscope and some impossibly thin wires or a very precise and glitchy power supply, other options are available:</p> <p><a href="http://www.cl.cam.ac.uk/~sps32/mcu_lock.html" rel="nofollow">http://www.cl.cam.ac.uk/~sps32/mcu_lock.html</a> </p>
<p>I have an ATmega328P that seems to be fried. It was in an Arduino board (Freakduino-chibi, specifically) and working when it suddenly stopped responding at all.</p> <p>Investigation showed that the fault followed the chip from board to board.</p> <p>Using a BusPirate, I tried to access the chip via avrdude and the ICSP header on the Arduino. No dice: avrdude failed to initialize the chip. Using the same board and a different 328P, avrdude was successful.</p> <p>Any thoughts on how to possibly resurrect the broken chip?</p>
Suggestions for rescue of an ATmega328P
2010-12-08T07:34:52.457
7657
|power-supply|atx|24v|
<p>Another way can be by modifying the -12&nbsp;V rail: </p> <p>If you see the schematic of the power supply, you can see that there is no difference between the +12&nbsp;V rail and the -12&nbsp;V rail, except the rectifier diodes and the electrolytic capacitor in the output. </p> <p>If you get the rectifier diodes (from another PC power supply) you can put the high current rectifiers in the -12&nbsp;V. In this way, if you use -12&nbsp;V to +12&nbsp;V rail you will get 24&nbsp;V with 7&nbsp;A at least if the +12&nbsp;V is specified with 15&nbsp;A.</p>
<p>I am looking for a cheap way to get +24V DC max 3A from computer power supply. I prefer easy soldering solution like DIP, and standard components that do not need to be purchased over internet. Any ideas, please?</p>
24V 3A from ATX power supply?
2010-12-08T09:28:09.970
7660
|c++|interrupts|keil|
<p>The "weak" reference just means that the routine will be replaced by a routine in your code of the same name. When using C this is simple, the names will always be identical but C++ name mangles the functions (for function overloading etc) so the compiled name will probably not match the default ISR name. You need to wrap the function (or at least a forward reference, I'm not sure of specifics I mostly work in C) in an extern "C" wrapper to force the compiler to not mangle the name.</p> <pre><code>extern "C" { void SysTick_Handler(void) { // do whatever } } </code></pre>
<p>I have a problem with writing interrupt handlers in Keil ARM compiler for LPC1114. When I write program in C++ and specify --cpp compiler option all code from interrupt handlers disappears, it is replaced with infinite loop. I wrote simple program that illustrates my trouble.</p> <pre><code>#include "LPC11xx.h" // LPC11xx definitions #define SYSTICK_DELAY 120000 // for 10 ms systick @ 12MHz osc void SysTick_Handler(void) { __NOP(); } int main (void) { SystemInit(); // from system_LPC11xx.c SysTick_Config(SYSTICK_DELAY); // from core_cm0.h // Loop forever while (1) __NOP(); } </code></pre> <p>When trying to compile this code with --cpp compiler option I get infinite loop in disasm:</p> <pre><code>SysTick_Handler PROC EXPORT SysTick_Handler [WEAK] B . ENDP </code></pre> <p>This is the place where __NOP() from above program must be. And it is there when I'm compiling code with --c99 compiler option or without additional options. Keil MDK version is 4.12. Can anyone tell me is there any solution or workaround ?</p>
Bug in Keil ARM compiler with interrupt handlers and C++?
2010-12-08T14:03:41.487
7664
|microcontroller|digital-logic|level|
<p>It's not uncommon for different parts of a system to be powered by different supplies which share a common ground. This may be because some parts need 3.3 volts while others need 2.0 or 5.0, because some parts may need to be powered on and off separately from others, because some parts may generate a level of electrical noise on their supplies which other parts would be unable to tolerate, etc. In some cases, the circuitry which generates a reset may not operate or be controlled by the same supply that operates the CPU. Having the reset generator on a different supply from the CPU is not a problem if one is using an active-low reset and either the CPU can tolerate voltage levels above VDD or the reset line can be weakly pulled high by something attached to the CPU supply.</p> <p>As a simple example, imagine a 3-volt CPU which is interfaced with 5-volt chips. The external circuitry will malfunction in arbitrary fashion if VDD drops below 4.75 volts and would require reinitialization after voltage rises above that point. The CPU itself might be able to run code just fine if the main supply voltage drops to 3 volts, but might not be able to do anything useful; the cleanest way to ensure that the external hardware will get initialized after VDD rises above 4.75 volts will be to reset the CPU whenever VDD is below that point. Using an open-collector reset chip and a passive pullup to the CPU's VDD would be the simplest approach.</p> <p>About the only disadvantage to that approach of handling reset is that a passive pull-up will consume current continuously while the system is in reset. In systems powered by mains, energy storage devices [capacitors] expect to be drained completely dry without damage. In systems powered by rechargeable batteries, however, draining current from a discharged cell may cause excessive wear. Even in systems powered by disposable batteries, continuous current draw may undesirably increase the risk of batteries "venting" [spewing goo].</p>
<p>Convention?</p> <p>Easier to implement?</p> <p>Another reason?</p> <p>Is there a reason things like MCLR or RESET on microcontrollers are active-low, that is, you have to pull them down to reset the IC, and pull them up to "run" the IC. </p> <p>I'm just curious because this causes me some problems. If it were active high, I could avoid the capacitor on MCLR required in some instances and deal with just a pull-down resistor. It seems only to add to complexity.</p>
Why are things like RESET/MCLR active low on most ICs?
2010-12-08T15:53:00.997
7668
|pcb|pcb-fabrication|
<p><strong>Identification</strong>: </p> <ul> <li>client's name, </li> <li>(project ID), </li> <li>unique PCB ID</li> </ul> <p><strong>PCB metrics</strong>: </p> <ul> <li>material, </li> <li>CTI (Comparative Tracking Index),</li> <li>thickness, </li> <li>color, </li> <li>number of layers, </li> <li>layer stacking: reference to Gerber filename for each layer,</li> <li>copper thickness, </li> <li>solder mask color, </li> <li>silkscreen color </li> </ul> <p><strong>Panelization</strong> </p> <ul> <li>Tooling for PCB edges: V-cut or milling, </li> <li>PCB outline drawing with tolerances. This may be as simple as a rectangle, but <a href="https://i.stack.imgur.com/KyS5k.png" rel="noreferrer">this board</a>'s outline consists of 52 line segments </li> </ul> <p><strong>Layout</strong> </p> <ul> <li>If there's room for it some shops like to add a quality logo (like UL) and/or a production date to the silkscreen. Tell them which area of the PCB they can use for this.</li> </ul>
<p>I have seen wide varieties at previous companies, from too few to too many with boilerplate, old revisions of standards, etc. Can you suggest a middle of the road list? This is for regular PCB fabrication for production.</p>
What standard PCB notes should I use?
2010-12-08T20:37:53.117
7670
|sensor|robotics|uav|
<p>The answer effectively boils down to two questions:<br> "How Much do you want to spend"<br> "What are your size requirements?</p> <p>Realistically, there are three way to measure altitude without looking at the ground below: </p> <ul> <li>GPS - Not very precise (~3m), unless you know people in the military.</li> <li>Inertial Measurement - Expensive, if you want decent precision. Theoretically could work anywhere.</li> <li>Barometry - Requires an air column. Sparkfun <a href="http://www.sparkfun.com/products/8128" rel="nofollow">has one</a> that claims a resolution of 9 cm.</li> </ul>
<p>I'm building a quadrocopter and would like to prevent drift using a down facing camera. To do this properly, I need to get the height of the drone from the ground. Obviously the ground can vary, so maybe something like radar would be an idea, but I was wondering... how accurate are altimeters (electronic) these days?</p>
How accurate are altimeters?
2010-12-08T21:23:22.987
7672
|power-supply|atx|
<p>I don't want to whine too much about safety and I don't like kilometers long safety notices which don't say anything, but I feel that my behavior is justified in this case, so here it goes: If you're uncomfortable with opening the supply, DON'T USE IT AT ALL!!! IT COULD BE VERY DANGEROUS!!! I'll try to explain a bit later why.</p> <p>I'm actually planing to modify a PC power supply for my project too, so I have several useful links to share.</p> <p>Take a look at following links:<br> <a href="http://web2.murraystate.edu/andy.batts/ps/powersupply.htm">http://web2.murraystate.edu/andy.batts/ps/powersupply.htm</a><br> <a href="http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply">http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply</a><br> <a href="http://www.instructables.com/id/Convert-an-ATX-Power-Supply-Into-a-Regular-DC-Powe/">http://www.instructables.com/id/Convert-an-ATX-Power-Supply-Into-a-Regular-DC-Powe/</a><br> <a href="http://www.instructables.com/id/Yet-Another-ATX--Lab-Bench-Power-Supply-Conversion/">http://www.instructables.com/id/Yet-Another-ATX--Lab-Bench-Power-Supply-Conversion/</a><br> <a href="http://www.mbeckler.org/powersupply/">http://www.mbeckler.org/powersupply/</a><br> <a href="http://www.marcee.org/Articles/PCPowerSupply.htm">http://www.marcee.org/Articles/PCPowerSupply.htm</a></p> <p>They show several projects where people used ATX power supplies for home experimenting. </p> <p>I'd also recommend that you read some basic theory about switching power supplies. It will be clear to you then why yours isn't starting. I don't have any interesting links at the moment, but <a href="http://en.wikipedia.org/wiki/Switched-mode_power_supply">here</a>'s a start.</p> <p>Basically, for SMPS to work, they need a minimum load. That's why yours isn't starting. When power supply is correctly connected to a computer, the computer will provide minimum load to start the supply. As you can see, if you follow the links above, people get around that by providing a low resistance resistor with high power rating and connecting it to the supply. The resistor will provide load for the supply to start. Some articles say that one on the +5 V line is needed, but on some supplies a resistor may be needed on each of the power lines. That's one of the reasons why you should open the supply and take a look how it's working inside. You should be able to identify which cable is connected to which power line. If you can't then I'd recommended that you do some more researching before doing anything. Some articles mention that they use 10 Ω 2 W resistors on + 5 V. I'd use a bit stronger resistor, so its power rating wouldn't be exceeded (but articles also mention that resistors are cool).</p> <p>About sensing wires: They are there to allow supply to regulate itself and some supplies may have as much as one for each power line. Articles I linked talk about them and on how to identify them. If I'm correct, they should already be connected to the 24 pin connector and ready to work, but as you mentioned, you didn't connect anything to the connector, so it's not surprising that they are making problems. You'd have to modify PSU cable if you want to solve the problem with them, but if you're still uncomfortable with opening the supply, I'd recommend that you don't try modifying the cable.</p> <p>As for detecting if the supply is working correctly, use the <a href="http://pinouts.ru/Power/atx_v2_pinout.shtml">PWR_OK</a> pin and a voltmeter. You should get +5 V once the supply has stabilized itself.</p>
<p>I've been trying to turn on an ATX power supply I had lying around, and I plan to use it for some electronic experiments. Note: I don't want to have to open up the PSU for any reason.</p> <p>I've tried connecting the green wire (PS-ON) and a black wire (ground), but nothing happens. The fan doesn't come on or anything. I heard something about a SENSE wire and other things. What should I do to make the power supply work?</p> <hr/> <p>OK, I got it to turn on now. Apparently it was on the entire time, but the fan in it is super quiet, so I didn't notice it. But still what of the SENSE wires and of minimum loads?</p>
How can I use an ATX power supply for my own experiments?
2010-12-08T23:35:43.803
7675
|mechanical|
<p>I found a description of a similar arrangement on p. 333 of <a href="http://books.google.com/books?id=WiXOAAAAMAAJ&amp;dq=elevator%20control%20schematic&amp;pg=PA333#v=onepage&amp;q&amp;f=false" rel="nofollow noreferrer">Electric Journal, Volume 9</a>.</p> <p>The relays close in series to gradually accelerate the car and to come to a smooth stop.</p> <p>This truth table shows how each relay is closed as the car accelerates and decelerates up and down.</p> <p>This is just for a simple elevator control that does "up", "down" and "stop". Fancy modern elevators have pushbuttons for each floor, so there would be a more complex system, with relays operated by switches on each floor, and relays keeping themselves energized, a form of one-bit memory.</p> <p><img src="https://i.stack.imgur.com/WonLt.png" alt="enter image description here"></p>
<p>Today Scouting New York ran some <a href="http://www.scoutingny.com/?p=3219" rel="nofollow noreferrer">photographs of the mechanicals of an old, working elevator</a> that dates back to the 1920s.</p> <p>I was especially intrigued by this amazing picture of the control system:</p> <p><img src="https://i.stack.imgur.com/OsMoV.jpg" alt="picture of outdated electronic motor controller"></p> <p>Can anybody explain what the heck is going on there?</p>
How do old school, electromechanical elevators work?
2010-12-09T04:45:51.937
7677
|sensor|adc|light|photodiode|
<p><strong>Important notice</strong> This is an IR diode: <code>Daylight blocking filter matched with 870 nm to 950 nm emitters</code>. IR photodiodes usually have an opaque black package, while visible light photodiodes are in clear packages. You could look for a photodiode (a phototransistor is even more sensitive) with an eye sensitivity curve. I remember having used the <a href="http://catalog.osram-os.com/catalogue/catalogue.do;jsessionid=47E3D7FBEFB6E147F4A69D8BBFEC9005?act=downloadFile&amp;favOid=0200000200007f72000200b6" rel="noreferrer">SFH3410</a> from Osram here.</p> <p>Then the good news: a photodiode or phototransistor acts as a current source, so a series resistor is sufficient to convert the current to a voltage. In your datasheet the graph of figure 3 is the one you need. The reverse current varies between 1uA and 100\$\mu\$A. A series resistor of 10k converts this to 10mV - 1V. You could increase this to get a higher voltage, you'll have to experiment with light levels and resistor value to achieve a full range of 5V. Also keep in mind that the input impedance of the ADC is parallel to the measurement resistor, reducing sensitivity. </p> <p>The graphs below are from the SFH3410's datasheet. If you keep in mind that you need a \$V_{CE}\$ of at least 0.5V (right graph), you'll be limited to 4.5V output from a 5V power supply. </p> <p><img src="https://i.stack.imgur.com/eqAiT.png" alt="alt text"></p> <hr> <p><strong>Further reading:</strong><br> <a href="http://catalog.osram-os.com/media/_en/Graphics/00039053_0.pdf" rel="noreferrer">SFH3410 application note</a></p>
<p>I'm trying to use a photodiode to measure light levels via an ADC on an ATMega168. I've got the microcontroller code working properly (measuring values on a pin and reporting it as an led brightness) but I'm having trouble getting the photodiode to report a voltage dependent on light levels.</p> <p>I see that I could accomplish this with an op amp (<a href="http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/photdet.html" rel="noreferrer">here</a>) but I'd like to be able to do this without an op amp if possible. I have a 5 volt source and I'd like to make the photodiode spit out values between 0 and 5 volts. Is there a crafty circuit I could use for this purpose that doesn't require an amplifier? I'm asking this question because I'd like to know how to use a photodiode for this purpose (I don't want to use an LDR). Thanks!</p> <p><strong>edit</strong></p> <p>Oh yeah, <a href="http://www.vishay.com/docs/81509/bpv22nf.pdf" rel="noreferrer">here is the datasheet for the photodiode I am using.</a> </p>
Measuring light levels with a photodiode and an ADC
2010-12-09T08:12:00.797
7682
|microcontroller|i2c|
<p>If you are going to run an I2C bus with mixed speeds, and you have devices on the bus that can <em>only</em> work at 400 KHz and below, then they must be disabled somehow (e.g. powering them down, so their I2C bus leads will be tristated) when running the bus at the 1 MHz speed, since they will not be able to parse the high-speed addresses and may respond incorrectly.</p>
<p>I'm thinking of migrating from an I2C bus at 400 kHz to one running at nearly 1 MHz.</p> <p>I am using 1.2k pull-ups at the moment and on the clock and data lines, I get a rise time of 383ns average when sending out pulses. Fall time is approaching the limits of a 100 MHz oscilloscope at ~15ns. Are there potential issues with this kind of rise time? What about noise and signal integrity? Clock jitter? etc. Would there be significant issues? I will probably stick with 400 kHz on my breadboard which works fine, but the final product may use 1 MHz I2C. </p>
What kind of issues might I face when moving from 400 kHz I2C to 1 MHz I2C?
2010-12-09T18:58:38.703
7684
|pic|programming|microchip|hi-tech-compiler|
<p>Make sure you have the port you are using defined as digital. ANSEL = 0; </p> <p>If a port is defined as analog and you do a digital read it returns 0. So, when the PIC F16xxx does the read-modify-write operation it reads 0 on all analog pins. Then is writes 0 back to all these pins.</p> <p>If you have ANSEL set to 1 for PORT B the code below will turn on PORT B for 500ms, then read PORTB as 0b00000000 (because it is analog). Then turn PORTB off because it thought it was off.</p> <pre><code> ANSEL = 0b11111111; TRISB = 0; PORTB = 0b11111111; __delay_ms(500); current = PORTB; PORTB = current; __delay_ms(500); </code></pre> <p>Make sure you set the corresponding ANSEL bit to 0 for any pin you want to use as digital!</p>
<p>What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port? I can work around this problem by writing a byte to the entire port, controlling all pins simultaneously, instead of just a bit to control the pin state. I'm using the Hi-Tech C compiler here. I am determining the state of the pin with 9 LEDs each consuming 3 mA. This is way below the max power specs.</p> <p>The mplab header file has the 0 pin on port A declared as such:</p> <pre><code>volatile bit RA0 @ ((unsigned)&amp;PORTA*8)+0; </code></pre> <p>I am turning the pin on by writing a high value to it.</p> <pre><code>RA0 = 1; </code></pre> <p>Is the problem that the complier is treating the "1" as a byte and writing to the whole port? Do I need to cast it? If so, shouldn't have the complier given me an error?</p> <pre><code>RA0 = (bit) 1; </code></pre> <p>If I write to the whole port everything works as expected:</p> <pre><code>PORTA = 0b00000001; </code></pre>
What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port?
2010-12-09T19:58:05.740
7692
|pcb|
<p>This is not my area of expertise so I cannot point you towards any MTBF data but I work with tools that routinely operate in environments up to 175°C so I can tell you from experience what I watch out for. </p> <ol> <li>Voltage regulators with thermal protection. These usually cut out about 125°C.</li> <li>Solder. Depends on the lead/tin ratio this can vary greatly. You have to check the rating on each type but you can typically get solder that doesn't melt until around 220°C</li> <li>Components vary greatly. You have to read the datasheets carefully. For instance, a microcontroller might be rated to operate at 125°C but that is 100 MHz. If you only run it at 12 MHz it might run much hotter. There is a good article <a href="http://www.eetimes.com/design/signal-processing-dsp/4209479/Go-beyond-the-datasheet--Part-2--Understand-the-considerations" rel="noreferrer">here</a> that talks a bit more about this.</li> </ol> <p>I haven't experienced any trouble with traces separating from the boards before these other failures occurred.</p>
<p><strong>What is the maximum temperature you would recommend for an isolated trace on the surface of FR-4?</strong> (I.e.: not an inner-layer track.) <strong>Is there an IPC recommendation?</strong> Does it really matter if it is past the <em><a href="http://en.wikipedia.org/wiki/Glass_transition">glass transition temperature</a></em>? (What is this value for FR-4? Wikipedia says "above 120C".) I mean, even if it's soft, will the track still stick with high reliability? 'Suppose what I'm looking for is a MTTF vs. temperature (vs. trace area) set of curves, but experienced guesses are encouraged.</p> <p>This is useful when calculating trace widths vs. temperature rise. I've always limited traces to the lower of about 100C or whatever the connected parts can manage.</p> <p>[For the Mech-E, Chem-E, and Mat-E: I guess the question can be boiled down to the intersection of shear stress between copper and FR-4 caused by differences in thermal expansion, which would be related to track width, and the decrease in shear modulus as temperature rises.]</p>
maximum trace temperature on FR-4
2010-12-10T03:13:08.703
7696
|voltage-regulator|filter|pwm|
<p>If you have access to the regulator's voltage reference, you could use the PWM signal to lower the V_ref according to the PWM's duty cycle. Will be slow, because you will need a significant low pass filter, but it might work.</p>
<p>I am looking for a small IC that provides a regulated dc voltage based on the duty cycle of the input. This is probably asking for a lot but does anyone know if one exists. Essentially I need a low pass filter but I need to conserve board space as much as possible as I am VERY limited. Also, I have done LPF's in the past with just a resistor and capacitor but I can never seem to get the noise out. I usually end up with at least 20mA of ripple. My PWM would likely be 3.3V pk-to-pk but I could also manage 5V as well. Any ideas?</p>
Is there a voltage regulator IC that takes PWM input?
2010-12-10T11:39:48.713
7697
|lcd|camera|
<p>This would solve a problem in videography: CMOS rolling shutter effect ("jello effect", wobbly vertical lines when panning), which is due to the sensor being read one line at a time.</p> <p>Modern cameras with a "global shutter" (where all the sensor is read at once) are <strong>very expensive</strong>. I guess if is just an easy and cheap, all video cameras would be equipped with that now. But I read that LCD shutter cause a great reduction in light transmitted of 50% or more by polarizing light, and it's very hard to make them totally transparent.</p> <p>Red seem to have used an LCD shutter on one of their (very expensive) digital cinema cameras. I don't know how they do it, and how bad the side effects are.</p> <p>Anyway if there is an answer I'd be very interested. I mean LCD shutters are found in cheap 3D glasses - I am interested in an LCD shutter with great optical qualities.</p>
<p>I'm <em>not</em> looking for a graphic or text LCD display here, just essentially a single, large pixel, capable of going from dark-light-dark in under 1ms. The faster, the better.</p> <p>The idea is to create a secondary shutter for a still camera, increasing the <a href="http://www.kenrockwell.com/tech/syncspeed.htm#why" rel="nofollow">flash sync speed</a> of the camera. Here's a video of a similar idea, but on a CMOS video camera. Seems like they're using a pane from a pair of 3d shutter glasses, which operate at video speeds (60 or 120 hz, not fast enough.)</p> <p>Something like the panel in an auto-darkening welding helmet would be along the lines of what I need, providing they can also transition from dark-light at high speeds.</p> <p>What are these called? What can I search for (LCD panel obviously doesn't help)? Where might I be able to find one? (Aside from hacking apart a welding helmet.)</p>
Where can I find a fast (1KHz) LCD plate?
2010-12-10T11:50:23.203
7699
|jtag|icsp|
<p>Yes, you should. It can be used to check connections between the chips. If there are a lot of such connections, it can really help. If they mainly go to other chips w/o JTAG (e.g. memories), then it won't be as helpful.</p>
<p>Both my microcontrollers on my project (dsPIC33FJ128GP804 and PIC24FJ64GA004) support JTAG boundary scan testing. Should I wire these up and expose a JTAG port for hackers? The product is intended to be open hardware and as such be modified. ICSP and ICD ports will also be exposed. Of course these ports and traces take up space - so is it worth it? Would people be able to use them with basic PIC micros?</p>
Should I include a JTAG port on my product?
2010-12-10T12:08:40.853
7715
|data|modem|fsk|
<p>With an 8KHz channel I would consider the very simple 1200 baud BELL 202 AFSK widely used for packet radio. Note that this is different than the 1200 baud PSK used on the very narrow bandwidth of voice telephone circuits.</p> <p>You would then put a software-based verification scheme on top of this. That's going to be a bit trickier in a one-way link than in a two-way one where you can use acks and resend corrupted data. If you can just discard bad packets and wait for good ones, that's better.</p>
<p>I'm looking for a way to send binary data over an audio channel on a video/audio transmitter. This will be an add-on feature to my product because it already has an audio interface. I'm hoping to be able to reach about 1 kbit/s data rate at a minimum, but higher would be nice. The requirements for any such protocol would be:</p> <ul> <li>High noise immunity - so a signal with some noise and interference on it doesn't cause problems. Ideally, data would be either error free or flagged as having errors, as corrupt data could cause lots of problems. Weaker signals may introduce jitter and other nasties into the signal, so it should be capable of withstanding these.</li> <li>Be able to work on a bandwidth limited (approx 8 kHz) audio channel. This includes slew rate limitations and variable jitter, including between clocks or bytes.</li> <li>Be easy to implement, both transmitting and receiving, on a small microcontroller.</li> </ul> <p>The protocol only needs to be one way as data will only be sent. The reason I ask this is because I've gone through lots of possible options (FSK, PSK, duty cycle modulation, Manchester, etc.) but have no idea which would be the best. </p>
Best method for sending data over a mono audio channel
2010-12-10T19:01:08.943
7718
|soldering|soldering|
<p>It doesn't necessarily mean your tip is too hot etc., sometimes it might well be low quality solder. </p> <p>I bought two rolls of solder (a 1lb and another 1/2lb) when I'm using it I kept getting this same result: While my iron is on it it's pretty shiny but as soon as I move the iron it turns to a matte grey colour. </p> <p>I ended up buying another 1lb spool 60/40 Nippon America brand and it's perfectly shiny after every joint, however this solder I end up getting is a bit too thick for my daily use at 1.2mm. </p> <p>I still uses my low quality solder though because it still gives a good joint just not shiny, I uses my NA brand solder now as just a tip tinner and tin the tip with it when I putting it away, it leaves the tip with a shine when I'm done with it. </p> <p>Here are some tips:</p> <ul> <li>Try not to leave the iron too long on the joint because you can damage the pad and burn away the flux resulting in a poor connection.</li> <li>Always tin your tip before, during and after soldering to prevent oxidation.</li> </ul> <p>With practice you will master this skill, soldering isn't hard to do just keep on practising.</p> <p>Have fun and happy soldering. </p>
<p>I have a relatively new soldering iron. I can't remember when this started(and I've only used the iron 5-10 times) but I stopped being able to tin the tip. When I stick soldering to it it just balls up in one spot on the iron and then after 5 or 10 seconds on the tip, the solder turns a dull gray color(rather than shiny silver).</p> <p>I have used nothing out of the ordinary on it. Only a brass sponge, a wet piece of cloth, and solder tip tinner/cleaner(which I only just started trying to use). </p> <p>Even with the tip tinner, the tip will stay shiny(and conductive) for about 5 seconds and then rapidly turn a dull gray color, eventually even with a few black spots.</p> <p>Is there something I can do to fix this? Did I just get a lemon tip or is this all normal(note I'm sorta new to soldering still)</p> <p>Also, the soldering iron is <a href="http://www.sparkfun.com/products/9507">this one</a> with the included tip</p>
Why does solder turn dull grey on my iron and exhibit poor wetting?
2010-12-10T19:25:07.873
7726
|switch-mode-power-supply|
<ol> <li>Label the wire which is currently ground "-12V".</li> <li>Label the wire which was previously 12V "GND". (There is no step 3)</li> </ol> <p>To test: Connect a DMM's ground lead to the wire you've labeled "GND". Connect the positive lead to the wire you've labeled "-12V". The display will read -12 volts.</p> <p><br> Of course, this won't work if you've got any other signals referenced to the original ground, so it's rather tongue-in-cheek. Just wanted to point it out in case it wasn't obvious.</p> <p>More seriously, my solution would be a charge pump driven by an RC oscillator. Without transistors, this will limit you to the output current of your opamps. On further consideration, it might not be possible due to the problem of bootstrapping your opamp power supplies. </p>
<p>Is there any way to get -12 V (DC) using only:</p> <ul> <li>+12 V DC</li> <li>Ground</li> <li>OPAMPs</li> <li>Resistors</li> <li>Capacitors</li> <li>Inductors</li> <li>Diodes</li> </ul>
Is there any way to acquire -12 V from +12 V?
2010-12-10T21:26:01.793
7731
|microcontroller|
<p>I totally understand your desire to hook something up and have a toolkit that <em>just works</em>. As Chris already mentioned, you can go with Netduino, which might be more familiar to you since it uses the .NET 4.0 Micro Framework. I personally haven't used it because I can't get it anywhere! Totally out of stock.</p> <p>I did, however, just receive an mbed microcontroller to use, and in my opinion, it's way easier to use all around than Arduino and its environment. The compiler is quite nice, the editor is online (which might be the only bad thing if you don't have the local toolchain installed, which I don't know anything about). But you literally plug it in, launch the webpage that's stored in its flash, register it, and you can hop into the compiler and start twiddling bits. I was at least flashing and PWMing its LEDs in about 5 minutes from the time I opened the box.</p>
<p>Background -</p> <p>I programmed my first SBC on an MEK6800D2 evaluation Kit (that I had build) in the late 70's and other boards of that time like the Rockwell 6502 Kim-1, 8085, etc. Now I'm a 61 a Big Box MS C# vs2010 programmer, but my real interest has always been embedded, but it's been oh so many years. Now that I'm close to retirement I would like move to recreation programming back to my roots of embedded. C, objective C, ASM, other? (OK I draw the line at forth).</p> <p>Inquiry -</p> <p>So now I'm looking at the latest embedded chip sets and oh wow I only understand about half of it. Is there a resource, you might recommend for someone like me? Books, Sites etc. ?</p> <p>BTW - I've found this particular stack exchange style site very useful. many Thanks</p>
Tips for an old previous and renewed embedded programmer
2010-12-10T21:47:44.323
7740
|usb|
<p><a href="https://electronics.stackexchange.com/questions/5498/how-to-get-more-than-100ma-from-a-usb-port/5581#5581">I am going to link you to an answer I wrote with respect to the USB charging spec. I hope it can be of help.</a></p>
<p>I recently made a USB charger that takes a 9V battery. I've noticed it doesn't work with a lot of devices though. It was very simple though, just a 5volt regulator hooked to a USB plug and 9V battery and a switch. </p> <p>Note: I'm wanting to use what I have on hand(all sorts of capacitors, resistors, and 5v regulators) so the minty boost is out of the question(requires some components I don't have any of, such as inductors) </p> <p>So what did I do wrong? I just shorted together the data+/- pins(bad idea now that I've thought about it). Should I have these hooked to something or just left unhooked? Also, should I worry about installing a 500mA PTC fuse? And lastly do I need any kind of capacitors to handle any rippling and such? </p>
Best way of making a battery powered USB charger?
2010-12-11T00:35:13.263
7744
|energy|piezoelectricity|
<p>If you want to charge a cap in a very simple manner you can just run the piezo output into a rectifier (or doubler if you want the extra voltage and don't mind the reduced charge rate) and then connect the DC output straight across a capacitor. As the piezo vibrates you will see the voltage on the cap slowly increase - if you have a high enough input impedance volt meter that is - there are some good papers by Ferrari et al that cover the basics. Shad Roundy's PhD thesis also covered this rather well I think but it is a trifle long.</p> <p>If you want to get really fancy with the inductance you could look into a technique called SSHI (synchronized switch harvesting on inductor) the maths is heinous but it is clever.</p>
<p>How do you extract the maximum amount of energy from a piezoelectric element? (For energy harvesting purposes.) </p> <p>The <a href="http://en.wikipedia.org/wiki/Maximum_power_theorem">maximum power theorem</a> would seem to say that you need to load it with a resistance equal to the piezo's internal resistance, but a piezo's internal impedance is capacitive rather than resistive. So the load would have to be an inductor? Or a resistance tailored for a specific frequency of vibration? How would you use this to do something more normal, like charge a capacitor for powering other circuitry?</p>
Maximum power out of a piezo?
2010-12-11T01:54:51.533
7748
|arduino|sensor|voltage|wire|
<p>I'm going to assume that you're using a relay similar to this one I found on <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=CC1118-ND">Digikey.</a></p> <p>It lists the control current at 5V as 3mA, which I'll use as a good ballpark number. If we want to know if the relay will turn on, then we want to be sure that the control voltage at the relay will be greater than the minimum control voltage of 3V. </p> <p>The first check is whether or not we can source the current. In this case, 3mA is well below the typical maximum current source/sink of a microcontroller (20mA), so we're fine. If your relay uses more current than that, you may need to look at using a transistor to drive the relay.</p> <p>The second check is to see what the voltage at the relay will be after the resistive losses of the wire. If we assume the worst-case resistance of the wire, then that is 0.188 Ω/m, like Ildefonso stated. Note that this is the loop resistance, not the resistance for a single wire.</p> <p>At 11.5 meters length, you will have a total wire resistance of 2.2Ω. (11.5m * 0.118Ω/m). At 3mA current, this creates a voltage drop of 6.5mV (2.2Ω * 3mA). If you drive the relay using a 5V source, the voltage that the relay would see is 4.993V (5V - 6.5mV), which shows that <em>at DC</em> those wire lengths are negligible. </p> <p>You would need to be drawing 900mA, or using a wire length of 5km to start seeing a voltage close to the minimum threshold (3V) of the relay.</p> <p>For powering a sensor, the same calculations will hold true. If you know the DC current your sensor requires, then you will probably find that CAT5 will power your sensor fine. If the sensor has an analog output, there shouldn't be a big issue, and with a digital signal you probably will need to go slower than if the sensor was on the Arduino board.</p> <p>To answer your other sub-questions,</p> <ul> <li>You always loose power in wiring, but at low current DC, it usually isn't much. What you're probably meaning is will I lose too much voltage.</li> <li>The plenum/shielding would not impact your ohmic/resistive losses.</li> <li>If the wire resistance was too high, you could use twice as many wires to cut the resistance by half. The wire in CAT5 is fairly high gauge, so using a low gauge wire would help in a similar way.</li> <li>If you couldn't afford to use more wire, but wanted to send more power down the line, you could increase the voltage sent over the wire, and use a DC-DC switching supply to reduce the voltage. This is similar to what goes on in Power over Ethernet, and AC Power Grid Transmission.</li> </ul>
<p>So I have this crazy idea to illuminate a few Christmas lights on the exterior of my house this weekend. I plan on running 2 Cat5e cables about 11.5 meters (~38 feet) from an Arduino board to sensors and Solid State Relays (all DC and all around 5VDC). I would like to take this "network" next year and setup a little home automation. The current setup would use: </p> <p>The SSRs can crunch anything from 3-32 VDC. The sensors are looking for 5 VDC.</p> <p>Do you believe that Cat5e cable can deliver what the input and output requires? Am I going to loose power running with Cat5e at that distance? (It is twisted pair but not plenum or shielded twist pair)</p> <p>If not, should I be looking at thicker wire, a power boost at the end, or is this just not feasible?</p> <p>I plan to test the setup in the morning either way, but I value your input!</p> <p>Thank you in advance for your reply!</p>
Arduino Input/Output Range (Cable Length)
2010-12-11T07:22:30.920
7755
|led|
<p>I recently made a circuit with 10 LEDs which works on 6 V. <a href="http://ledcalc.com/#calc" rel="nofollow">This</a> site was of great help for me. You just supply parameters you gave us to it and it will produce a schematic of a circuit and will provide information on type of resistors which need to be used and so on.</p> <p>Also, if you want to use a battery, check out its datasheet for its voltage when discharged. This way, you'll be able to calculate how well circuit works with used batteries. </p> <p>Also, I agree on Leon Heller that 9 V batteries are a bad choice. the thing is that they start out at 9 V, but for example VARTA No.4922 battery has end voltage between 4.8 and 5.2 volts. It's too low to use 2 LEDs in series. Also capacity is lower than in the 1.5 V batteries.</p>
<p>I want to wire 10 of <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=37&amp;products_id=301&amp;zenid=99e4189acfc892bbd3a7b70a40c4783e" rel="noreferrer">these</a> LEDs into a circuit with a 9-V battery. The site states that the forward voltage is 3.2-3.8 V at 20 mA current. Should I assume 20 mA is the max amount of current that can flow throw this circuit? </p> <p>Using <code>V = RI</code>, I calculate that I need a resistor that is 450 Ω (9/0.02). Is this correct? Secondly, if I want to have 10 LEDs here do I need a higher voltage (38 V)?</p> <p>This is the first LED circuit that I am making, so I'm not familiar with most of the basics.</p>
What resistor should I use when wiring 10 LEDs in series?
2010-12-11T13:25:34.317
7771
|camera|infrared|
<p><code>EDIT:</code>After seeing <a href="https://electronics.stackexchange.com/users/1681/mikeselectricstuff">mikeselectricstuff</a>'s comment, I agree: <strong>buy both.</strong> Then upvote his comment.</p> <p>Pick the 850nm one. As shown in the following image (from <a href="http://www.microscopyu.com/articles/digitalimaging/ccdintro.html" rel="nofollow noreferrer">here</a>), it is attenuated less than 950nm.</p> <p><img src="https://i.stack.imgur.com/SIAR2.jpg" alt="http://www.microscopyu.com/articles/digitalimaging/ccdintro.html"></p> <p>The green and blue portion of your camera's Bayer filter will attenuate the IR light considerably, making their channels noisy, so you may want to look into getting raw image data output such that it can be processed on your PC, rejecting those channels. <a href="http://public.fotki.com/ROBERT1010/scitech/photosensor_array.html" rel="nofollow noreferrer">The filter</a> cannot be removed.</p> <p>Be careful with your IR "flash bulb", or whatever it ends up being. Although we can't see it, it still hurts and damages eyes. Many animals/insects are more sensitive to and can even see IR.</p>
<p>So, I recently saw <a href="https://electronics.stackexchange.com/questions/7746/test-if-webcam-picks-up-infrared">this question</a> and thought it looked simple enough. Instead of a webcam though i used an actual (but old, 3MP) digital camera. The camera was a bit broken anyway(always exposed with weird colors and too dark usually). Well, I've confirmed the IR works now by holding my TV remote up to it. I don't actually have any IR LEDs on hand though. </p> <p>The two prevalent kinds I see seem to be 950nm and 850nm. For the purposes of making a night vision camera, which one would be more bright? I would think 950nm because it's closer to the visible spectrum, but everyone else seems to say 850nm is brighter. So which one works better? Or should I just buy one of each and see for myself which one is brighter?(as in, it depends on the camera) </p>
Best wavelength for IR LEDs to be used with a hacked up IR camera?
2010-12-12T11:03:16.377
7779
|programmer|
<p>I have been using the DEMO9s08SH8/SG8 BDM part of the board to work CodeWarrior from a XP VM on Win7. The open source version USBBDM has driver problems.</p> <p>On the DEMO board pull the 08 processor and connect a BDM port cable between both. Use the PEmicro v10 drivers installed on the Win7 side and the drivers from the demo board on the XP side. I have shoved code and done tracing in this setup using CodeWarrior 6.3 Special Edition. Cost you might ask? $70.00 Problem solved. Need to migrate to the RS08 side. Development kit $70 = Same solution.</p>
<p>I have a number of Freescale MC9S08GT32 devices I plan to use in some projects if I can find the right toolchain. Code development would be Codewarrior, which is free for up to 32K of C code.<br> Programmer/debugger is Background Debug Module (BDM), but this doesn't seem to be standardized; at least I couldn't find one on the Freescale website. I found the following, with varying prices: </p> <blockquote> <p><a href="http://www.cncgeeker.com/index.php?main_page=product_info&amp;cPath=7_4&amp;products_id=10" rel="nofollow">CNCgeeker</a><br> <a href="http://www.pemicro.com/products/product_viewDetails.cfm?product_id=27" rel="nofollow">PEmicro</a><br> <a href="http://www.softecmicro.com/products.html?type=detail&amp;title=inDART-One" rel="nofollow">Softec microsystems</a><br> <a href="http://www.witztronics.com/index.php?main_page=product_info&amp;cPath=2_25&amp;products_id=53" rel="nofollow">Witztronics</a> </p> </blockquote> <p>I guess there are others. I would like to know if you have experience with certain BDMs and which type you can recommend.</p>
Background Debug Module (BDM) recommendation for HCS08 controllers wanted
2010-12-12T17:01:44.943
7781
|protection|
<p>You might try what's called a Schottky diode. A normal diode has a drop of around 0.6 V, but Schottky's are around 0.2 V. At very low currents, the drop can be even lower.</p>
<p>I want something for my power that acts like a diode, but without the voltage drop, to protect the circuit from damage if the batteries are connected the wrong way. Is this even possible?</p>
Circuit Protection
2010-12-12T20:31:44.347
7783
|eaglecad|library|h-bridge|
<p>As others have said, make your own footprints.</p> <p><a href="http://www.sparkfun.com/tutorials/110">http://www.sparkfun.com/tutorials/110</a></p>
<p>I've scoured the internet for an EAGLE library with the SN754410NE part. I found one, but it's for a version previous to 4.11 and I'm on a Mac and have no way to convert it 55.10. The original file is at <a href="http://db.tt/66pnv4Y" rel="nofollow">http://db.tt/66pnv4Y</a>. Can anyone hook me up with a recent version?</p>
Please convert Eagle Library
2010-12-12T20:56:16.347
7784
|microcontroller|
<p>You should use LATx for outputs, to avoid R-M-W problems.</p>
<p>See image. Camera shot of my oscilloscope.</p> <p><img src="https://i.stack.imgur.com/Vfz5F.jpg" alt="alt text"></p> <p>I'm having this weird problem with my project. I'm using a dsPIC33FJ128GP802 DSC/MCU. In this application, I'm sync-separating a CVBS signal using a LM1881 and feeding it into the MCU (channel 1.) The MCU is set up to interrupt on pin change. This part works correctly, and it drives an on screen display which I have written perfectly. </p> <p>But, the weird part is that on each interrupt I'm briefly pulsing the pin RB12 to debug something. This is causing the weird decaying waveform on channel 4!! I'm expecting only a brief pulse, but it takes almost 64 microseconds (the line time) to decay to zero, almost like there is a very large capacitor on the pin (but there isn't.) Also, you can see the same effect on the falling edge, as the interrupt also triggers on that. What could be causing this? It has me completely lost!</p> <p>I am using this code in my ISR:</p> <pre><code>TRISBbits.TRISB12 = 0; asm("nop"); PORTBbits.RB12 = 1; asm("nop"); TRISBbits.TRISB12 = 1; asm("nop"); </code></pre> <p>The nops are to ensure read-modify-write problems don't occur, but it happens with or without those nops.</p>
What is causing this weird decaying waveform on one of my MCU pins?
2010-12-12T21:38:17.000
7791
|antenna|gps|transmission-line|
<p>We provide equipment that will bring the GPS signal indoors. Yes, you need a passive antenna and an active antenna - you have to be able to calculate the correct amount of cable and possibly the use of an amplifier. All of this is regulated by the FCC. Unless you are a Federal agency, part of the military or using this in an anechoic chamber, you have to apply for a license from the FCC.</p>
<p>Is it possible to passively pipe GPS satellite signals indoors via a waveguide, or 2 antennas connected by a coax? If so, with what type of waveguide, antennas, coax, etc. should I try and experiment? Thanks.</p>
Is passive GPS retransmission possible?
2010-12-13T00:22:05.420
7796
|digital-logic|books|
<p>Take a look at <a href="https://embeddedmicro.com" rel="nofollow">https://embeddedmicro.com</a> . I consider this the "Arduino" of FPGAs. They have a whole system that includes an inexpensive development board, easy to use software, and tutorials for Verilogue and even a new language they are developing called Lucid. It is really a great resource. I found it easy to use and would recommend it for anyone wanting to try digital circuit design! </p>
<p>not sure if "digital circuit design" is exactly what I'm aiming for, but someone can tell me and I'll edit it if another name matches better.</p> <p>Basically, circuit design interest me a lot. I like the idea of working with AND OR NOT etc gates and building things with them. I've been wanting to build a CPU for quite a few years now, but I lack the knowledge. I'm fairly decent at programming however, so I can think "logically", but with circuit design it all is very difficult for me to understand past simple adders and such. </p> <p>So, I'm looking for a beginner's book on the subject. I plan on doing all design and testing in a simulator such as Logisim, but being shown how to actually put circuits together on a breadboard out of gates(or even transistors and such) would be a definite plus, but I wouldn't want for that to be the focus of it all. </p> <p>My end result hopefully is to build a CPU in a simulator. So, tell me what book(s) I need to buy to get there for someone who is a novice at electronics and a decent computer programmer. </p>
Book recommendations for digital circuit design?
2010-12-13T05:46:27.623
7800
|clock|crystal|
<p>A better crystal is one way to solve it, but it's going to cost. And even then you get maybe 10ppm, good (or bad) for 5 minutes after 1 year. </p> <p><strong>Temperature compensated crystals</strong> are good to get a predictable stability, but they don't solve the tolerance problem; if you have a 20ppm deviation from nominal frequency, you're sure you'll always have this deviation. BTW, this is also more expensive, and I haven't seen it for 32kHz crystals. </p> <p><strong>Software compensation</strong> is a cheap solution, and I've used it a few times. For production runs you'll have to measure the frequency and program the compensation value on a test jig. </p> <p>You can also use a <strong>trimmer capacitor</strong> for the oscillator's load capacitor. </p> <p>What I find the nicest solution, however, is to add an <strong>atomic clock receiver</strong> module (WWVB for North-America, DCF77 for Europe), and resync once a day or so. The picture shows an miniature <a href="http://www.conrad.com/DCF-receiver-board.htm?websale7=conrad-int&amp;pi=641138&amp;ci=SHOP_AREA_17348_1101115&amp;Ctx=%7Bver%2F7%2Fver%7D%7Bst%2F3ec%2Fst%7D%7Bcmd%2F0%2Fcmd%7D%7Bm%2Fwebsale%2Fm%7D%7Bs%2Fconrad-int%2Fs%7D%7Bl%2Fint%2Fl%7D%7Bsf%2F%3Cs1%3Edcf%3C%2Fs1%3E%2Fsf%7D%7Bp1%2F69144408677f909cea2152aca24d9b8a%2Fp1%7D%7Bmd5%2Fa96e76949b5972d3d3687cbfb0e6db47%2Fmd5%7D" rel="noreferrer">DCF77 module</a> from <a href="http://www.conrad.com/" rel="noreferrer">Conrad</a>. </p> <p><img src="https://i.stack.imgur.com/k3Wid.png" alt="enter image description here"></p>
<p>I want to use a crystal as the base clock for a watch. Most reference designs I could find use a 32.768 kHz crystal at 20 ppm (parts per million) precision. According to my calculations, this leads to an error of max 52 seconds in a month. After 6 months, that 5 minutes. I would like something better!</p> <p>There are some solutions I could think of (better crystal, or compensate in SW), but I am surprised not to find any reference online.</p> <p>Surely I am not the first person to try and address this problem. Do you have any suggestion as to how to deal with this, and possibly reference design?</p>
Real-time clock and Crystal precision
2010-12-13T09:11:59.083
7802
|sensor|accelerometer|gyro|
<p>From a control system perspective it really does not matter where you place your sensors. The most important thing is that you know where they actually are!!! I mean this with regards to knowing where the sensor is relative to the centre of the rotary wings. As long as you know the offsets you can apply translations to calculate what your vehicle is doing.</p> <p>From an electrical and performance perspective away from motor wiring and h bridges, away from vibrations sources and suitably mounted and damped. The dampening is important for the accelerometers to ensure that they do hit mechanical rails from high frequency vibration (do the math to work out the maximum displacement your accelerometer can with stand at various frequencies and you will understand this point). Similar for, but not as important for the gyros.</p>
<p>Im looking for some placement help for 2 sensors, <a href="http://www.sparkfun.com/products/10122" rel="noreferrer">A gyro</a> and an accelerometer both are going into a helicopter. my guess is to put the gyro and the accelerometer right below the main rotor, getting it as close to the center as possible, but on the rc receiver (has been removed) the gyro was mounted to the front. The data sheets do not give any placement suggestions either. any help would be appreciated.</p>
Placement of sensors, Gyro + accelorometer
2010-12-13T10:16:23.143
7816
|led|resistors|
<p>An LED has two important characteristics called, respectively, "Forward Voltage Drop" (often denoted Vf in datasheets), and maximum forward current (often listed under absolute maximum ratings as DC Forward Current) or If . You are also usually operating from a known supply voltage (lets call it Vcc, e.g. 5 volts). </p> <p>To operate the LED at its brightest you want to use a current limiting resistor that will draw just about the maximum rated forward current (that's what governs brightness of LEDs). If you attach the cathode of the LED to ground, you know it's anode will be at V_f. So the voltage drop across a resistor in series with the LED from Vcc to the anode, will have a voltage drop across it of (Vcc - Vf), and will draw a current of (Vcc - Vf) / R. Therefore, to size the resistor, use the formula:</p> <pre><code>R = (Vcc - Vf) / If </code></pre> <p>R calculated from this equation is the <strong>minimum value</strong> of resistance you should ever use for the current limiting resistor, as smaller values would yield higher forward currents, and therefore exceed the absolute maximum rating of the LED.</p>
<p>What is the formula to obtain the resistor value I should use to drive a LED to its maximum luminance for a given input voltage?</p> <p>And for the maximum power effectiveness (luminance / watt)?</p>
How to get the maximum luminance out of a LED?
2010-12-13T16:48:11.993
7820
|pcb|pcb-design|checklist|gerber|
<p>In addition to all the good answers, I would suggest doing a 1:1 scale print, double sided if possible, to check component dimensions, board dimensions, writing orientation, drill sizes, clearance for for container if any.</p> <p>Few mistakes I have made in the past. </p> <ol> <li>Mirrored text</li> <li>Slightly wrong footprint for a specialized component</li> <li>Drill holes for resistors too small</li> </ol> <p>If you can someone else to question your design it would also be a plus. </p>
<p>As and after the PCB is designed, I check it using the native CAD tools. What do I need to check to make sure the generated Gerber files are ok?</p>
After the PCB is designed, what do I need to check in the Gerber files?
2010-12-13T21:04:15.363
7828
|arduino|soldering|
<p>To add to the other answers, I would be cautious if you're soldering on a board where you have an internal power/ground plane or some other sea of copper. Remember that the more copper your pin comes into contact with, the more heat dissipation will occur and the longer you need to heat the pin before the solder will flow properly. I haven't creamed a chip this way but I have noticed my board makes a nice temporary hotplate after soldering around copper planes. Conversely this may bite you if you then turn to pins hooked up to normal traces and use the same technique to solder those pins in that you did with the power/ground plane pins.</p> <p>Also when soldering fine pitch parts (like a QFN package) I find solder-wick invaluable. That way I can allow some amount of bridging between pins and 'soak-up' the excess with the solder-wick. Usually I find the solder-wick will definitely soak up the bridge and leave just enough to make a connection between pin and pad which I either leave or touch up with a little additional solder.</p>
<p>I need to solder some headers onto an Arduino shield - what's the recommended wattage for working on that scale? I ask because the shield is already populated with ICs and I don't want to burn them out.</p>
Proper soldering iron wattage for working with uP scale electronics?
2010-12-13T22:47:34.087
7834
|usb|
<p>One difference is you probably can't get the Primesense unit unless you are a volume manufacturer. Hardware-wise, the Kinect includes an audio processor and tilt motor. The performance of the depth sensor is likely to be the same. </p>
<p>I'm trying to determine if the Kinect or the <a href="http://www.primesense.com/?p=487" rel="nofollow">PrimeSensor</a> is right for general purpose hobbyist work (X10 light control, relay activation, etc). </p> <p>Does anyone know the difference?</p>
Difference between the Kinect and PrimeSensor?
2010-12-14T01:53:05.783
7839
|sensor|light|
<p>Funny you should ask .... I just finished building one of these circuits for myself.</p> <p>I wanted a circuit that would do what you asked for but I also did not want things like car headlights turning it off for a while as they passed by, or having a passing cloud going by turn it on during the daytime. </p> <p>My solution was to use a 555 timer chip and put the photosensor (I used a phototransistor but a photoresistor will work too) as part of the timing resistance.</p> <p>I was going to post the circuit diagram but they only let you attach images here if they are already on a web page somewhere.</p> <p>Anyway, I'll try to describe it.</p> <p>On the 555 timer you tie the Trigger and Threshold pins (pins 2 and 6) together and from those pins put a 100 microfarad capacitor to the negative side of the DC power supply. Also from those pins tie a variable resistor (I used 250k) to a fixed resistor (I used 50k) to the negative side of the power supply. Tie your photoresistor from the positive side of the power supply to the wiper on the variable resistor. That way the variable resistor will change both the charge time and the sensitivity to light.</p> <p>The output comes off of pin 3 of the 555 which can drive a 5 volt relay, or it can drive a transistor, or in my case I wanted to control a light that runs 120 volts AC so I had the 555 output drive the LED inside of an optotriac (a MOC3021) and then the optotriac drives a larger triac (a BT136-60) that can handle up to 5 amps.</p> <p>Since a 555 can run on any voltage from 5 volts up to 15 volts I used a 12 volt DC power supply to power my circuit. But you can use any voltage within that range.</p> <p>Also since I used a phototransistor but you are using a photoresistor it is virtually certain that you will have to adjust the resistor values to suit the range of your photoresistor.</p> <p>The cost of the parts in the light sensor were $1.22 for everything except the 12 volt power supply. The power supply cost me $5.60</p> <p>I really wish I could have uploaded a PDF of the circuit diagram.</p>
<p>I have a project planned where I want for some LEDs to turn on when it's dark and turn off when it's light. I have some transistors, diodes, and a photoresistor(and of course other basic components). The photoresistor has lower resistance when in daylight though. How do I 'NOT' this so that I can turn something on when it's night instead of daylight? </p>
How to make a simple daylight on-off switch?
2010-12-14T06:00:21.580
7844
|pic|i2c|c|imu|mplab|
<p>I bought an IMU3000 too, i installed that software that invensense rold me to, and i managed to compile it somehow, and get a libfile out of the whole thing. I am trying to make it work with a pic too...im using pic18f4550..but i dont even know where to start. Are those source codes of some use? or should i forget about it, and try writing my own stuff for this?</p>
<p>Has anybody experienced using the Invensense IMU3000 gyroscope with some microcontroller? </p> <p>The hardware comes with a really good library integrating full control of its features. This library is structured in 3 different layers, the bottom one is the one that implements the communication with the chip itself. The vendor provides this layer for using the IMU3000 with an adapter board in WindowsXP. Basically, what I need to do (and what is suggested in the application note) is rewrite this layer to use the whole library with my PIC (I2C communication). After that, I can just use the library (this is what it's said in the application note).</p> <p>I am trying to build the IMU library in Visual Studio 2005 (the project was originally made this way) for a PIC but I am stuck with the dependencies..</p> <p>Alternatively, I can compile the .lib with the PIC IDE, but.. is it possible=</p> <p>Any hint, even with other platforms, would help!</p> <p>Thank you all!</p> <p>P.S. Unfortunately I cannot find the DS online.. just after you install the package you find it.</p>
Invensense IMU3000 with PIC
2010-12-14T11:39:42.540
7850
|pic|memory|
<p>In many applications, one will need to allocate memory, but won't need to free anything while keeping something that was allocated after it. On such a system, all one need do is use the linker to define an array using all available RAM, set a pointer to the start of that array, and then use a nice easy malloc function:</p> <pre> char *next_alloc; void *malloc(int size) { char *this_alloc; this_alloc = next_alloc; if ((END_OF_ALLOC_SPACE - this_alloc) &lt; size) return -1; next_alloc += size; return this_alloc; } void free(void *ptr) { if (ptr) next_alloc = (char*)ptr; } </pre> <p>Nice and easy, and just two bytes total overhead for any number of allocations. Calling free() on a block will deallocate that block and everything after it.</p> <p>Slightly more complicated allocation patterns can be handled by using two pointers--one which allocates stuff from the bottom of memory moving up, and one of which goes from the top of memory downward. It's also possible to use a compactifying garbage collector if the data in the heap is homogenous and one knows where all the outside references to it are.</p>
<p>How can I use <code>malloc()</code> and <code>free()</code> functions in a PIC? I've checked the <code>stdlib.h</code> header and there's no mention of them. I'm using MCC18.</p> <p>Has anybody had to use them?</p> <p>I need them because I am porting a library from Windows XP to the PIC. The porting guide says to </p> <blockquote> <p>adapt the Operating System's specific functions to my PIC ones</p> </blockquote> <p>But I don't know how to "translate" the <code>malloc()</code> and <code>free()</code> functions.</p>
Use of malloc in PIC
2010-12-14T14:34:25.263
7857
|digital-logic|
<p>In the diagrams, lines to the right are outputs and all others (from the top, bottom or left) are inputs.</p> <pre><code>next b0 b1 b2 number B0 ─ XOR ─┬──┘ B1 ─ XOR ─┬──┘ B2 ─ XOR ─┬──┘ counter ┌──┘ └─ NOT ─┐ ┌──┘ └─ NOT ─┐ ┌──┘ └─ NOT ─┐ 1 ─┴──────────── AND ─c1─┴──────────── AND ─c2─┴──────────── AND ── ... c[0] = 1 | Note: sum[i] = c[ i ] + B[i] for i in n | = 2*c[i+1] + b[i] b[ i ] = B[i] ^ c[i] | = c[i+1] &lt;&lt;1 + b[i] c[i+1] = ~b[i] &amp; c[i] | = (~b[i] &amp; c[i]) &lt;&lt;1 + b[i] carry-out = c[n+1] | = (B[i] ^ c[i]) + | (~(B[i] ^ c[i]) &amp; c[i]) &lt;&lt;1 </code></pre> <p>If a half adder must be used:</p> <pre><code> b[i] B ────┬── XOR ──── to use a half B[i] ──┬───────┬───── XOR ────┘ ┌──────┘ half adder without │ ┌─ XOR ─────┘ │ └────┐ adder circuit trace XOR ─┤ C ──┴──── AND ──── crossings you │ └─ XOR ─────┐ can use this: C[i] ──┴───────┴───── AND ─ c[i+1] ── ... </code></pre> <p>A simple decrement is a complemented negation: <code>D-1 = ~-D</code>.<br> Negation is 2's complement which is an incremented complement: <code>-D = ~D +1</code>. </p> <p>Thus, <code>D-1 = ~(~D +1)</code>, so a bit-wise combinational (parallel) complementation before and after a sequential incrementation suffices. </p> <p>However, <a href="https://en.wikipedia.org/wiki/Half_subtractor" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Half_subtractor</a> the sequential decrement circuit is even simpler: </p> <pre><code> previous d0 d1 d2 count D0 ── XOR ─┬──┘ D1 ── XOR ─┬──┘ D2 ── XOR ─┬──┘ (decrement) ┌──┘ └──┐ ┌──┘ └──┐ ┌──┘ └──┐ 1 ─┴─────── AND ─ b1 ─┴─────── AND ─ b2 ─┴─────── AND ── ... b[0] = 1 for i in n d[ i ] = D[i] ^ b[i] b[i+1] = d[i] &amp; b[i] borrow-out = b[n+1] </code></pre>
<p>You can use cascaded full adders to add any two binary numbers together. Is there a circuit for when I only want to add 1 (incrementing the value)? Is there a similar circuit for subtracting (i.e. adding 0b1111 1110)? I'm working with 8 bit numbers, but this applies for all word lengths.</p>
Logic circuit to handle incrementing by 1
2010-12-14T15:32:42.210
7859
|arduino|attiny|fuse-bits|clock-speed|
<ol> <li><p>Choose an ATTiny board from "boards manager" that includes the ATTiny85. This is in the "Tools" Menu. I think this includes "16MHz internal PLL" now. (You can install one from <a href="http://drazzy.com/package_drazzy.com_index.json" rel="nofollow noreferrer">http://drazzy.com/package_drazzy.com_index.json</a>)</p></li> <li><p>Select ATTiny85 explicitly if required.</p></li> <li><p>Choose a clock. Until you know more, choose an <em>internal</em> clock.</p></li> <li><p>Click "Burn Bootloader" as a Menu Item.</p></li> </ol> <p>Caution, you may no longer be able to program the MCU if you choose very low values. If this is your intent, do this last unless you have spares or an High Voltage Programmer to reset the fuses. </p>
<p>I'm following this <a href="http://hlt.media.mit.edu/?p=1229">tutorial</a>, programming the ATtiny85 with an Arduino, using it to play some tones (through a piezo speaker). I'm struggling with getting the tones at the right pitch (I'm creating the wave forms manually, as the tone() function is unsupported on the ATtiny85). </p> <p>I believe the problem may be down to differing clock speeds on the Arduino and ATtiny. I understand the clock speed can be altered on the ATtiny, how do I accomplish this using the arduino environment?</p>
How do I set the clock speed fuses on an ATtiny85 when using an Arduino as a programmer?
2010-12-14T16:47:29.460
7864
|robotics|infrared|rc5|
<p>You could do this cheaply by repurposing several old TV remote controls. Then, you can just use an RC5 decoder on the robot.</p> <p>Your beacon could be 4 TV remotes each with a different button glued down.</p>
<p>I'd like to make a beacon system for robots where the beacon will have some IR LEDs around it pulsing at some known frequency. The module that hooks up to the robot will have a few IR photostransistors (are photodiodes better?) to detect direction. I'm thinking I'll have an MSP430 as the brains for each and speak I2C or TTL to indicate direction on the robot side. How do I detect that specific frequency so I don't mistake sunlight, etc. as the signal? How sensitive would this be? Do I need really powerful LEDs? What are all the considerations?</p> <p>I want something like a 1 way version of <a href="http://www.pololu.com/catalog/product/701" rel="nofollow">this pololu beacon</a> except one way (although two way might be a good idea too).</p>
How would I make an IR beacon system
2010-12-14T17:35:24.733
7872
|arduino|dc-motor|
<p>What is the current requirement of the motor? If it's less than 60mA, you can probably get away with sinking the current. </p> <p>Be aware that some digital pins can sink more current than they source. At 60mA, you will still be at 1.5V out (so watch your power dissipation!), but you won't get far at all trying to source that kind of current. 40mA is a generous maximum for sourcing. Therefore, you should connect to the negative terminal of your motor.</p> <p>If you need to use multiple outputs together, be aware that the transistors in those outputs will likely have subtle differences, and not share the current very accurately. A &lt;10 ohm resistor on each output should help them to share the current more evenly. </p> <p>Try to split shared outputs between different ports on the microcontroller, because this will separate the heat on the chip. This has the drawback that it takes more time to set multiple ports, so try to avoid doing read/write/modify if you can help it.</p> <p>Finally, as Joby noted, don't forget a diode.</p> <p>Edit: I'm assuming this is a simple DC motor, and you want to operate it in one direction. If you have anything more complex, you should brave the cold and get yourself a proper driver. </p>
<p>I have a small motor which I removed from a mobile phone. I want to control it from a digital output on my Arduino board.</p> <p>Will I damage it if I connect the motor directly to to the board and it needs more power?</p> <p>Can I use 2 outputs of the Arduino together?</p> <p>I know the best way to do this would be to use a transistor as a driver but I'd really like to avoid it since I don´t have it on stock and it is cold in Copenhagen now.</p>
Using 2 outputs on an arduino to drive a motor
2010-12-14T20:58:33.317
7874
|adc|potentiometer|low-power|
<p>I would suggest wiring both ends of the pot to port pins that can be configured not to burn quiescent current while sitting at half-rail (many processors have pins that can be configured to be either digital outputs or analog inputs) and float both ends of the pot while not taking readings. Connect the midpoint of the pot to an ADC input, with a significant-value cap to ground. If you have multiple pots and can't afford to use three processor pins for each one, you could e.g. use external chips to connect and disconnect the ends of the pots. Note that the ends of the various pots should not be tied together; when a pot is disconnected, it should not connect to anything else.</p> <p>If you do things this way, the ADC input voltage, with its cap to ground, should remain roughly constant when the pot is connected and disconnected. When powering up the cap, take readings repeatedly until either they stabilize or it becomes clear they won't (because they go up and down, rather than asymptotically approaching some value). If there isn't too much leakage in the circuit, you shouldn't have to have the pot powered up very long if it isn't being moved, since the cap should start out at, and remain at, the proper voltage.</p>
<p>I'm designing a microcontroller based device which spends most of the time in deep sleep. Every 10 seconds it wakes up, reads a potentiometer connected on an ADC line then goes back to sleep. My aim is to achieve a long battery life.</p> <p>How should I wire the potentiometer up to the microcontroller in order to minimise power use?</p> <p>For my first attempt, I wired a 1K pot to 3V3 and GND with the wiper attached to the ADC. No matter what resistance is set on the pot, this seems to consume 3-5mA continuously.</p> <p>Should one or more of the pot pins be connected to GPIOs and driven only when needed? If so, should the pins be driven low or tristated when not in use?</p>
How to wire a potentiometer to an ADC for low power
2010-12-14T21:08:16.760
7880
|pcb|surface-mount|
<p>From <a href="http://www.edaboard.com/thread128769.html%22here%22" rel="nofollow">here</a> "The document is "IPC-7351A Generic Requirements for Surface Mount Design and Land Pattern Standard". You have to buy it from www.ipc.org." You CAD package may have it already. There are 3 variantes, so you would use the "least" (i.e. smallest one).</p> <p>"If you want to look at the recommended footprints, without buying the standard, you can download a free viewer at: <a href="http://landpatterns.ipc.org/default.asp" rel="nofollow">http://landpatterns.ipc.org/default.asp</a></p> <p>There's more info available at: <a href="http://www.ipc.org/ContentPage.aspx?pageid=4.6" rel="nofollow">http://www.ipc.org/ContentPage.aspx?pageid=4.6</a>"</p>
<p>How close can I place two 0603 resistors on a PCB?</p>
How close can I place 0603 resistors?
2010-12-14T23:27:45.863
7882
|rf|antenna|matching|
<p>I'll take a shot at this one as I'll be doing the exact same exercise for my work soon.</p> <p>So the antenna impedance appears to be 60-j21 ohms:</p> <p><img src="https://i.stack.imgur.com/gwhgX.png" alt="alt text"></p> <p>And the impedance looking out into L3 is 31-j7 ohms:</p> <p><img src="https://i.stack.imgur.com/Cm2CZ.png" alt="alt text"></p> <p>(This would imply a source impedance of 31+j7 ohms).</p> <p>So how can we get from 60-j21 to 31-j7 ohms? A two-element matching network can do it.</p> <p>All that's necessary to make a match is two components. Here are a couple possibilities:</p> <p><img src="https://i.stack.imgur.com/355rr.png" alt="alt text"></p> <p><img src="https://i.stack.imgur.com/XyaDf.png" alt="alt text"></p> <p>So the two two-component possibilities are high-pass (series L, parallel C) or low-pass (series C, parallel L). If the matching network is used as a filter for harmonic suppression, then the low-pass form is preferred. </p> <p>On the other hand, the 24L01 outputs have a DC level at the power supply voltage. If you don't want DC on your antenna, a topology with a series capacitor for DC blocking may be desirable.</p> <p>If the matching network is being used for filtering, it is desirable to be able to set the Q of this filter to get a steeper shape factor. Two topologies for this are the "PI match" and the "Tee match." Essentially they are two back to back two-element networks, matching to an intermediate impedance to set the desired Q.</p> <p>(to be continued)</p>
<p>I've got an RF transceiver (Nordic's nRF24L01+) which shows a typical circuit to match its antenna output to a single ended 50 ohm impedance.<img src="https://i.stack.imgur.com/wsvWW.png" alt="alt text"></p> <p>I've also got a chip antenna which comes with an example circuit to match a 50 ohm line to the antenna feed point.<img src="https://i.stack.imgur.com/YrJnl.png" alt="alt text"></p> <p>If I am going to place the transciever and the chip antenna very close, then there is no need for a 50 ohm transmission line right? If so, can I somehow merge those two matching circuits into one and thus reducing component count?</p>
Can I merge two impedance matching circuits?
2010-12-14T23:50:11.470
7883
|arduino|netduino|
<p>Most electronics will still operate at temperatures lower then their rating, it's just that they may drift outside their specifications. Wireless communications would be the only thing that would be fairly sensitive to this; the tolerance on most wired embedded communications is fairly loose.</p> <p>What I would be more concerned of besides temperature is condensation on the board. If you put the Arduino into a relatively enclosed box in your warm house then take it into the freezing cold, all the excess moisture will come out, possibly onto your board. Despite me being "more concerned" about this, my level of concern would still be very low unless you're doing high precision analog readings or the like.</p>
<p>If this has already been ask I apologize as I cannot find it using the search option, please send link.</p> <p>For my first project I'm thinking of building a monitor, in stages, for my outdoor pond (about 30 feet from the house) with wireless data transmission for various conditions like water level, waterfall pump failure, icing, and maybe even the occasional Heron that likes to feed on my Koi. I'm also leaning heavily towards the Netduino board as I would like to leverage my C# skills.</p> <p>Anyhow, when I look at the specification for the Netduino board, it specifies an operating temperature of 0 to 70C. Right now it's -8C outside and will probably go to -13C tonight. The coldest I ever remember it being here (Rochester NY) is maybe about -28C (-18F maybe -20F) but that is very very rare.</p> <p>The Arduino site lists no specific temperature specification, but links to the Atmel specification.</p> <p>The Atmel processors (<a href="http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf">ATmega328</a> and <a href="http://www.atmel.com/dyn/resources/prod_documents/6120s.pdf">AT91SAM7X512</a>) for both both boards are rated from -40C to +85C; well withing my requirements.</p> <p>So the question is, can I also assume the Arduino board is also limited to some range less than the microcontroller? What board factors might limit the temperature range for such a project?</p> <p>Thanks</p>
Ambient operating temperatures for *duino boards
2010-12-15T00:53:25.630
7888
|microcontroller|output|
<p>The terms "set low" and "set high", applied to an output pin, mean to drive the output voltage to VSS or VDD, respectively, regardless of whether the pin's value will be interpreted as an active-low signal. The terms "release" or "float the pin" means to set an output to high-impedance mode. The term "assert", applied to an output pin which has clearly-defined active and inactive states, means to drive the pin to the active state (which may in some cases be low and in other cases be high). The term "deassert" means to either drive such a pin to in inactive state, or float it and allow an external resistor to do so.</p>
<p>I often see those phrases in tutorials with microcontroller I/O. An example use is "set pin 3 high", or "set pin 5 low for 20 ms".</p> <p>I also recall reading several different definitions on what that terminology means. Does the low in "set low" mean low impedance? Does it mean low logic level (0 volts)? Or does it mean low as in negative voltage? Or is there even a universal meaning for those phrases?</p>
meaning of set low/set high
2010-12-15T05:05:24.130
7890
|rfid|mbed|parallax|
<p>As I said in my original question, I thought about hooking up a lab supply even though, according to the specs, both devices combined fall under the 500mA USB spec. I put a voltmeter across the 5V bus, and sure enough, it was dropping well below 2.5V anytime I sent a command to the reader.</p> <p>I hooked up my lab power supply, and immediately my !RW\x0F command returned 12 bytes as expected. Not the correct 12 bytes, but at least the data was being sent. It's possible that my reader just doesn't support this "legacy" command.</p> <p>I then sent the login command, using the default password. Without a tag, I would receive 0x02, which is "could not find a listen window from the tag". Makes sense! I then put my tag over the reader, and unfortunately got a 0x03, which is a "received NAK" message. Oh well. I have other things to sort out, but at least I know my mbed code and RFID reader are functioning properly.</p> <p>Hopefully, this basic debugging technique is helpful to someone.</p>
<p>I just received an <a href="http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/28440/List/0/SortField/4/ProductID/688/Default.aspx" rel="nofollow">RFID reader from Parallax</a> (#28440) to play with, and am having some problems getting it to send me data. I'm interfacing it with the mbed microcontroller that I also just received.</p> <p>The RFID reader interfaces via RS232 (5V level), so that matches my mbed serial port perfectly. I have written test code on the mbed side so I know my RS232 code works. However, whenever I send commands to the reader (e.g. "!RW\x0F"), I get result codes that aren't even in the documentation. Specifically, most of the time I get back 0xE1 or 0xF8, when the actual result codes should be something like 0x01 - 0x07.</p> <p>What's annoying is that their documentation doesn't give any timing tables, so I'm just guessing when I send all of the data at once and read immediately. I've tried different time delays, and nothing works.</p> <p>I am powering both mbed and RFID reader from the USB port. Since USB supplies 500mA without external power, and the mbed uses 100ma and the RFID reader uses &lt; 200mA, I figure I have plenty of headroom. Perhaps tomorrow I should hook up the lab supply.</p> <p>Has anyone here used this reader with reasonable success?</p>
Having some issues with RFID reader
2010-12-15T07:26:11.897
7900
|connector|
<p>This is the view looking straight down (top view) on the header pins as they stick out of the board. The cable on my P&amp;E Micro BDM would plug in from the left, with the red stripe at the top.</p>
<p>I'm designing a device which contains a Freescale HCS08 (9S08GT32). In the datasheet I found this drawing (page 237): </p> <p><img src="https://i.stack.imgur.com/STEAH.png" alt="alt text"></p> <p>I can't tell from the text whether this is a view on the PCB's header or on the BDM' cable connector. Can you tell me which it is?</p>
Freescale HCS08 Background Debug Module (BDM) connector: clarification wanted
2010-12-15T15:16:28.773
7901
|microcontroller|avr|java|
<p><a href="https://joc.systems/en/home.html" rel="nofollow noreferrer">You can use Java on a Chip (JoC) is the programmable java microcontroller</a></p> <p><a href="https://joc.systems/en/hardware/javaino.html" rel="nofollow noreferrer">JoC has a reference Board called Javaino</a></p> <p>Also, <a href="https://demmel.com/en/products/ilcd-features/javavm.html" rel="nofollow noreferrer">Demmel iLCD product have Java VM on board, display with JVM</a></p>
<p>My hardware team is planning to use an Atmel AVR 8-bit microcontroller for a future project.</p> <p>So far as I know, it must be programmed in C. I have found a <a href="http://www.harbaum.org/till/nanovm/index.shtml">JVM</a> for AVR, though it is more limited than the native C libraries from Atmel.</p> <p>Can you suggest me an 8-bit microcontroller which supports Java?</p> <p>PS. I don't know C and I am inexperienced in microprocessor programming.</p>
Microcontroller with Java API
2010-12-15T15:58:19.873
7913
|pcb|routing|eda|
<p>No one said it before, so here is a little explanation: When a PCB trace turns a corner at a 90 degree angle, a reflection can occur. This is primarily due to the change of width of the trace. At the apex of the turn, the trace width is increased to 1.414 times its width. This upsets the transmission line characteristics, especially the distributed capacitance and self–inductance of the trace — resulting in the reflection. It is a given that not all PCB traces can be straight, and so they will have to turn corners. Turns at 45 degrees offer much better characteristics. The best characteristic you can obtain with rounded turns. You can find such tracks in RF applications.</p>
<p>I've always wondered this: every single modern PCB is routed at 45 degree angle increments. Why does the industry prefer this so much? Doesn't any-angle routing offer more flexibility?</p> <p>One plausible theory would be that the existing tools only support 45 degree increments and that there isn't much pressure to move away from this.</p> <p>But having just researched this topic on google, I stumbled across <a href="http://eda.eremex.com/products/topor/" rel="noreferrer">TopoR - Topological Router</a> - which does away with the 45 degree increments, and according to their marketing materials it does a considerably better job than the 45-degree-limited competitors.</p> <p>What gives? What would it take for you personally to start routing arbitrary angles? Is it all about support in your favourite software, or are there more fundamental reasons?</p> <p>Example of non-45-degree routing: <img src="https://i.stack.imgur.com/y5y1Q.jpg" alt="alt text"></p> <p>P.S. I also wondered the same about component placement, but it turns out that many pick &amp; place machines are designed such that they can't place at arbitrary angles - which seems fair enough.</p>
Why is there such a strong preference for 45 degree angles in PCB routing?
2010-12-15T23:51:52.427
7919
|components|identification|breadboard|header|
<p>You really want them to come with equal lengths (like me)</p> <p>See these Sullins ones <a href="http://www.digikey.com/product-detail/en/PEC36SABN/S1022E-36-ND/859189" rel="nofollow">on digikey</a>.</p> <ul> <li>The <a href="http://www.sullinscorp.com/catalogs/77_PAGE108-109_.100_MALE_HDR.pdf" rel="nofollow">datasheet</a> gives the codes for the head length == tail length.</li> </ul>
<p>What is the part in the picture below? It's like a male header, but with long pins on both sides. I've got some temperature probes I've built that end in female connectors and I'd like to use something similar to use the probes with a breadboard. I've looked on Digikey under headers and haven't been able to find anything.</p> <p><img src="https://i.stack.imgur.com/v6MW4.jpg" alt="alt text"></p>
What part is like a male header with long pins on both sides?
2010-12-16T04:12:08.150
7929
|capacitor|identification|markings|electrolytic-capacitor|
<p><a href="http://www.youtube.com/watch?v=JCPXckfT-6g">Here's a (somewhat artistic) video</a> of those features in action.</p> <p>The first two events (0:00, 0:03) are what happens when the stamped features do <strong>not</strong> work, but all the subsequent electrolytic capacitor failures (0:14, 0:16, 0:18, 0:34, 0:36, 0:39...) rip the case open in a relatively safe and controlled manner, notably not causing shrapnel to fly around.</p>
<p>I often see a marking like the following pattern on the top of radial PTH elcos. </p> <p><img src="https://i.stack.imgur.com/mQjFu.png" alt="alt text"></p> <p>What does it mean? Is it an identification of the manufacturer? </p>
What are markings on top of electrolytic capacitors?
2010-12-16T12:11:28.067
7940
|power-supply|high-voltage|
<p>Going with @markranges' suggestion, <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=102-1573-ND" rel="nofollow">here's one at Digi-Key</a> that does 85-264 V AC 110-340V DC in and 12 V, 420 mA out.</p>
<p>I have a 200V DC power input and I need to, with no external voltages, generate a 12V-24V voltage to run the control electronics off, at about 50mA. </p> <p>I've considered zener diodes and potential dividers but they waste too much power; the resistor at the top must dissipate 9.4W to provide 0.6W, which is a ridiculous waste and difficult to handle. I've tried to look at how switch mode wall warts do it, but they seem to have some kind of fancy mechanism of powering themselves from the output, which I don't really understand. (Neither do I understand how they initially get a voltage.)</p>
Best way to get a low DC voltage from a high DC voltage for a power supply?
2010-12-16T16:03:33.633
7941
|schematics|layout|eda|
<p>I digged 2 online EDA tools, including PCB Layout and Schematic Capture:</p> <p><a href="http://www.pcbweb.com/" rel="nofollow">http://www.pcbweb.com/</a> and <a href="http://easyeda.com/" rel="nofollow">http://easyeda.com/</a> .</p> <p>Both of them are beta now, not full-featured compared to host-based EDA tools, BUT it is the trend. Free, OS-independence(only need a web browser), maybe HTML5 will help them more powerful. </p>
<p>I'm still using PCAD2006 for my schematic capture and PCB layout. I'm not very happy with this; it is rather buggy, but it's a leftover for which I have an extensive library.<br> Due to the problems I'm having with PCAD and the fact that it is no longer supported by Altium I'm looking for an alternative. Shopping list: </p> <blockquote> <ol> <li>Free or low cost (Altium Designer is out) </li> <li>No restrictions in board size beyond the obvious. E.g. Eurocard (160x100mm) or 200x150mm should be possible. 1 meter square shouldn't. Some free packages have a 100x80mm limit IIRC. </li> <li>Gerber output </li> <li>Extensive library of both PTH and SMT components </li> <li>Nice to have: real-time DRC </li> </ol> </blockquote> <p>Suggestions?</p>
Schematic capture/PCB layout program recommendations
2010-12-16T16:19:42.190
7964
|wireless|
<p>While there are some special exceptions, most radio communication is usually achieved with the aid of upconversion and downconversion.</p> <p>Basically, a transmitter starts with a circuit for modulating information (be it voice or data) onto a signal of conveniently low frequency that is easy to work with - a few tens or hundreds of kilohertz for narrowband applications, often somewhere between 10 and 45 MHz for wider band ones. At these frequencies analog circuits work well, or one can actually use a D/A converter at the output of a DSP that does the modulation mathematically. (For data rates higher than a "DSP chip" can handle, parallel logic in an ASIC or FPGA is used, so each individual path may only have to calculate every 8th or 32nd or whatevereth sample needed by the DA). </p> <p>The transmitter also contains an oscillator or synthesizer for generating a signal closer to the desired transmitter frequency, and a mixer which multiplies the two signals together, causing generation of sum and difference frequencies. Either the sum or the difference will be the desired transmission frequency, and is selected by a filter, amplified and sent to the antenna. (Occasionally multiple stages of conversion are needed)</p> <p>The receiver works the same way, only in reverse. A local oscillator signal is subtracted from the amplified antenna signal (or the other way around), creating an intermediate difference frequency that is back down in the range more convenient to work with (In AM broadcast receivers, typically 455 KHz - for FM, traditionally 10.7 KHz and then converted down againto to 455 KHz, though today staying at 10.7 MHz works too). This intermediate frequency can be processed by a demodulator circuity, or digitized in a fast A/D converter and fed into a potentially parallel DSP to complete the process.</p> <p>If the desired bandwidth of data to be transmitted is less than about 10 KHz, one can actually use a computer soundcard to make a high performance receiver or transmitter, by positioning the intermediate frequency at say 10 KHz and using software to process a bandwidth spanning 5-15 KHz.</p> <p>Today a common technique is to exploit some properties of complex numbers, and do the modulation/demodulation balanced around a center frequency of 0, such that it contains both positive and negative frequencies. By using two phases of the oscillator and something called an image reject mixer, one of the two resulting frequencies cancels and the other reinforces. However, two D/A or A/D converters are needed - one for the "I" phase and the other for the "Q". You can sort of do this with a stereo soundcard, though the DC blocking caps will create a hole in the passband right in the middle, at what gets converted to 0 frequency.</p>
<p>This is a problem that's always baffled me a bit. How does high frequency (more than 100MHz anyway) wireless communication actually work? I understand that it has an antennae and for receiving it amplifies it and checks for a logical 1 or 0 and reversed for transmitting. </p> <p>What I do not understand is how an IC can communicate at such speeds? Take for example wifi, 2.4GHz. Is there a chip that is actually processing each bit 2.4 billion times per second? That seems impossible. Could someone explain how a transmitter and a receiver actually work electrically? </p>
How does wireless communication work?
2010-12-16T21:55:27.953
7965
|arduino|timer|timing|rtc|
<p>It pays off to read a datasheet thoroughly. On page 2 this typical application circuit is shown: </p> <p><img src="https://i.stack.imgur.com/qW2YB.png" alt="enter image description here"> </p> <p>This schematic shows no load capacitors, and indeed, the block schematic on page 3 shows that the capacitors are integrated. </p> <p>Most RTC ICs don't have their crystal on board. I used to think that this had to do with the required size for such low frequency crystals; larger crystals typically resonate at lower frequencies. Case in point: the Maxim <a href="http://datasheets.maxim-ic.com/en/ds/DS32kHz.pdf" rel="nofollow noreferrer">DS32kHz</a>, a 32.768 kHz oscillator with integrated crystal comes in a 16-pin package, despite that only 4 pins are used. </p> <p>However, recently I discovered the Abracon <a href="http://www.abracon.com/Resonators/ABS06.pdf" rel="nofollow noreferrer">ABS06</a> 32kHz crystal, which is just 2mm x 1.2mm, that's 0805 size! </p> <p><img src="https://i.stack.imgur.com/rBbCL.jpg" alt="enter image description here"></p> <p>The real reason for not integrating these small crystals in the RTC's package is probably cost. This crystal costs 10 times what the cylindrical can costs.</p>
<p>So I am attempting to tie a real time clock (<a href="http://pdfserv.maxim-ic.com/en/ds/DS1302.pdf" rel="nofollow">DS1302</a>) into an Arduino and then eventually a AVR chip directly. From all of the schematics I have seen, it appears a crystal is required. I read through the datasheet (above) and did not get the feeling you can run the chip without one.</p> <p>Am I mistaken? I hope so as I would just like to hook this up to the Arduino and also have a coin cell battery back it up. Does this IC require a crystal or does it have its own built on board?</p>
DS1302 Real Time Clock Question
2010-12-16T21:58:54.793
7975
|embedded|
<p>Create a variable that is located at the top (or bottom) of your stack. Initialize the variable at the beginning of main. You can check the value of the variable in the main loop to see after-the-fact that the stack has overflowed. Or if your debugger allows, set a breakpoint when that variable is written. It should be written only when it is initialized. </p>
<p>I have run into a problem where I believe my stack is overflowing. The reason I am inclined to think this way, is due to the following:</p> <p>1) Compile code, dump into the device: - no activity from the device (I am expecting an 'I am alive' message)<br> 2) In this situation, I increased the stack size by 10 bytes, recompiled and dumped to the device, and the problem went away.<br> 3) Tried the above two steps 10 times, back and forth, and can reproduce the problem reliably, and fix it reliably.</p> <p>I want to see the stack falling over, how do I do this? </p> <p>I am currently using an M16 Microcontroller, with 2K RAM (30 bytes left), 256 Bytes Stack size. The IAR Workbench that I am using, does not have the call graph utility.</p> <p>Are there other ways to do this - check the stack falling over and by how much in code?</p> <p>Any help will really be appreciated.</p> <p>Thanks!</p>
How to check for Stack overflow in an embedded application?
2010-12-17T03:33:43.937
7979
|microcontroller|fpga|
<p>I'm also interested in this processor and am poking around their site. I wouldn't mind spending $100 for the bare minimum to get started, as Leon had mentioned. However, I wasn't sure what to buy -- their development board page talks about different chips, but I couldn't figure out the differences between them.</p> <p><a href="https://www.xmos.com/processors" rel="nofollow noreferrer">Here's a helpful link</a> that outlines the types of XMOS processors. I wasn't able to find it by clicking around their website.</p> <p>In a nutshell, it looks like they have 4 different processors:</p> <ol> <li>XS1-G4: 4 cores</li> <li>XS1-G2: 2 cores</li> <li>XS1-L1: 1 core</li> <li>XS1-L2: 2 cores</li> </ol> <p>The strange thing is that, for beginners, I would expect the XS1-L1 to be the best choice, as you can still learn how to leverage multithreading, but possibly save a little money on the development board. However, this doesn't seem to be the case. Both the <a href="http://www.xmos.com/xk-1a" rel="nofollow noreferrer">XK-1A</a> and <a href="http://www.xmos.com/products/development-kits/xc-1a-development-kit" rel="nofollow noreferrer">XC-1A</a> are $99, and include JTAG hardware.</p> <p>Maybe Leon can add a comment here and let us know what he thinks is the best starter kit for those interested in getting into XMOS.</p>
<p>Ok, so I recently have been seeing the name XMOS appear in places. I've looked on their website and searched online but I can't quite figure out what it is? So what is it? It appears to be a cross between a microcontroller and an FPGA? </p> <p>I've also looked on <a href="http://xmos.com" rel="noreferrer">their site</a> and I wasn't able to see anything I could understand (just example designs and other reference documents) for what XMOS is and what is different about it from other microcontroller lines. </p>
What is the XMOS series?
2010-12-17T05:37:54.660
7985
|pic|usb|driver|
<p>The major thing you want to do is get your device to use drivers that are already there.</p> <p>The <a href="http://en.wikipedia.org/wiki/USB_human_interface_device_class" rel="nofollow">USB HID specification</a> allows you to tunnel through drivers that are of a standard type and already available on the system.</p> <p>To my knowledge Windows/Mac/Linux all have this.</p>
<p>I'm planning to use a PIC for a MIDI pedal that can be configured from a PC (through USB). Is there a way to do crossplatform (at least mac/windows, better if also linux) USB in userland (or another way to avoid the hassle of writing a device driver)? I know there's libUSB but I want to know if there's a better solution.</p> <p>Microchip own drivers are windows-only, if I'm not wrong. Thank you.</p>
Pic-PC (Crossplatform) USB interfacing without writing custom drivers
2010-12-17T10:58:31.323
7986
|batteries|cellphone|storage|
<p>The answer to this would be impacted by how often you swap the batteries, i.e. how long do you store them?</p> <p>If you use a battery until it is dead, then put in the fresh one, while the now-used one is put in a charger, then I would not consider this <em>storage</em> at all, but merely normal use.</p> <p>If you usually use just the one battery, and have a second for emergencies, then @Thomas answer makes more sense.</p>
<p>I've got a spare battery for my cell phone. I'm wondering what the correct way to store it would be, so as to maximize the battery time. Should I recharge the battery to 100%, then leave it aside, or should I use about 20-30% of the battery before putting it aside?</p>
How to correctly store spare Cell Phone Battery?
2010-12-17T11:09:51.820
7990
|batteries|cellphone|
<p>Your battery is degrading from the charging station. The person whom makes your charging station probably expects you will use it before placing it in. They are then pumping a top-off charge into for 30 minutes when, although it did self discharge a little in those couple seconds, it should not get one.</p> <p>It is possible the charging station is pumping way too much charge, but I am hoping the system can recognize it is almost done charging and go to slow-charge. From battery university about lithiums:</p> <blockquote> <p><a href="http://batteryuniversity.com/index.php/learn/article/charging_lithium_ion_batteries" rel="nofollow noreferrer">No trickle charge is applied because lithium-ion is unable to absorb overcharge. A continuous trickle charge above 4.05V/cell would causes plating of metallic lithium that could lead to instabilities and compromise safety. Instead, a brief topping charge is provided to compensate for the small self-discharge the battery and its protective circuit consume. Depending on the battery, a topping charge may be repeated once every 20 days. Typically, the charge kicks in when the open terminal voltage drops to 4.05V/cell and turns off at a high 4.20V/cell.</a></p> </blockquote> <p>There are phases to charging a lithium battery, as show in this picture: http://www.batteryuniversity.com/images/partone-12.gif"></p> <p>I have seen charging circuity before, when I have helped students build these, that will start with the heavy current phase and test the voltage, this means that if you unplug and plug in you can degrade the battery significantly.</p>
<p>I've noticed that if I recharge my cell phone battery to 100%, then take it out, and put it back in and put the phone back on charging, it resumes charging the battery and continues to do this for upto 30 mins, despite having just received a 'battery full' message about 30 minutes ago. </p> <p>Why does this happen? Is this normal or does this indicate that the battery is degrading?</p> <p>It is a Li-Ion battery.</p>
Could my Cell Phone Battery be degrading?
2010-12-17T11:51:51.097
7992
|batteries|cellphone|
<p>I did mine research and found out that lithium based batteries don't suffer the memory problem but allowing your battery to drain to much can in fact do more harm than good, you can top up your phone anytime you wish, it's always advised to keep your battery between 40% to 80% charged, as for leaving on the charger, yeah it's safe as I always do and have no problem and it's over 2 years I have mine phone</p>
<p>If I leave my cell phone with the charger plugged in all the time, would this weaken the batter, and why? I've heard that you should only charge the cell phone when you receive a 'battery low' message and leave it off the charger at other times?</p> <p>The cell phone has got a Li-Ion battery.</p>
Does leaving a cell phone on charge all the time weaken the battery, and why?
2010-12-17T12:15:17.603
7993
|capacitor|h-bridge|decoupling-capacitor|
<p>The smaller capacitor is able to filter out higher frequency noise that the large capacitor is unable to. </p> <p>This has to do with the non-ideal aspects of capacitor, mostly their internal inductance and resistance.</p>
<p>The Below is a H-Bridge Schematic from this site: <a href="http://www.societyofrobots.com/schematics_h-bridgedes.shtml" rel="nofollow noreferrer">http://www.societyofrobots.com/schematics_h-bridgedes.shtml</a>. Wouldn't the 10-100nF cap be rendered useless by the 10000 uf cap? Wouldn't the caps just have a equivalent capacitance of 10000 uf + 10-100nf </p> <p><img src="https://i.stack.imgur.com/DMFul.jpg" alt=""></p>
Cap's on H-Bridge... Seem a bit redundant?
2010-12-17T13:03:32.113
7996
|prototyping|output|logic-analyzer|
<p>You could program an Arduino with a pretty basic sketch to give you this capability... and you could write a fancy little C# application to do the pattern definition... that would be the easiest imo. That should cost you not more than $30 and a couple hours of free time :). Maybe someone's already done it... </p>
<p>It's becoming quite frequent to me having a new digital subsystem which I want to test in isolation before trying to make a prototype circuit. I've been using the digital analyzer by Saleae for inputs, which is quite handy, but I'm wondering if I could find or build its counterpart. Ideally it would be a device to plug in an USB port, would have many digital outputs (let's say 20 or more) and would come with software that would enable me to do a playback from a prerecorded file, or generate the output with a program or script.</p> <p>Does anyone know about such a product, or have guidelines to build on my own?</p>
Recommendation for a USB digital simulator
2010-12-17T13:33:00.253
8000
|surface-mount|integrated-circuit|
<p>There are 3 approaches to converting a difficult-to-work-with package into something easier to use:</p> <ul> <li>generic SMD-to-PTH adapters, as stevenvh mentioned. For example, it seems that lots of microcontrollers come in a 44-pin TQFP package; you can solder any one of them to a generic 44-pin TQFP-to-PTH adapter. A few of them are "breadboard compatible". Alas, this usually requires you to find <em>someone</em> capable of doing this soldering.</li> <li>"breadboard compatible" plug-in modules that come with a CPU already soldered to it, pins that plug directly into a breadboard, and perhaps also including a crystal and a program-download header and a few other parts. See <a href="https://electronics.stackexchange.com/questions/5658/searching-for-atmel-arm-mcu-in-a-breadboard-setup-like-arduino-nano-but-obvio">https://electronics.stackexchange.com/questions/5658/searching-for-atmel-arm-mcu-in-a-breadboard-setup-like-arduino-nano-but-obvio</a> . Sparkfun sells a bunch of breakout boards with other complex non-CPU surface-mount chips soldered to them.</li> <li>"<a href="http://opencircuits.com/Demo_board" rel="nofollow noreferrer">demo boards</a>" with a CPU already soldered to it and a few other parts, often including some kind of connector for connecting your other parts to it. There are many <a href="http://opencircuits.com/ARM_links" rel="nofollow noreferrer">ARM demo boards</a>. There seem to be quite a few projects standardizing on the "Arduino" form factor and upgrading to a more powerful processor. I see the ARMmite PRO, Cortino, FEZ Domino, Maple boards, and netduino all use some kind of <a href="http://opencircuits.com/Arduino_Links" rel="nofollow noreferrer">ARM processor in a Arduino form factor</a>.</li> </ul> <p>Yes, the vast array of devices is pretty overwhelming. Things have sure changed from the day where, if you wanted a CPU for less than $100, you had one and only one "choice".</p>
<p>As you can probably tell from the question I am a beginner in the embedded world. The extent of my experience is some playing around with C and assembly using the Arduino. I'd like to make the jump to the more complex embedded chips that use surface mount device package types rather than through hole device package types. How does one integrate them into an amateur project?</p> <p>Are there breakout boards or CPU sockets for them? I was particularly thinking about Motorola ColdFire devices or ARM Cortex M3 devices. Apologies for the question but I'm somewhat lost by the vast array of devices on offer and just need a starting point really.</p>
How to use multiple terminal surface mount chips in amateur project?
2010-12-17T15:30:39.493
8001
|resistors|
<blockquote> <p>If I put 3 1MΩ resistors in series, is that the equivalent of one 3MΩ resistor?</p> </blockquote> <p>I don't know exactly whether your question contains a trap.</p> <p>If you put at most 2 resistors in super cold environment and the remaining one(s) in hotter place, the combined resistance will probably no longer equal to 3 mega ohms.</p>
<p>If I put 3 1MΩ resistors in series, is that the equivalent of one 3MΩ resistor?</p>
Can I put multiple resistors in series to get higher resistance?
2010-12-17T15:34:20.890
8011
|resistors|
<p>Yep, putting them in parallel increases the group power dissipation and lowers group resistance. You still need to calculate power dissipation separately.</p> <p>$$R1 \parallel R2 = \frac{R_{1}R_{2}}{R_{1}+R_{2}}$$</p> <p>$$P = IV = I^{2}R = \frac{V^{2}}{R}$$</p> <p>If you have N resistors in parallel and they are all the same value, power dissipation will be N-times their individual rating and group resistance will be 1/N times their individual rating.</p>
<p>Is there anyway I can connect resistors to allow them to take more power such as using 4 1/4 watt resistors to get a 1 watt resistors. Or do i just have to use 1 1 Watt resistor. </p>
Getting higher power output by using more resistors
2010-12-17T16:52:35.270
8019
|voltage-measurement|thermocouple|
<p>It sounds like you're describing a <a href="http://en.wikipedia.org/wiki/Ground_loop_%28electricity%29" rel="nofollow">ground loop</a>, also an obnoxious problem in audio applications. </p> <p>Even though your computer and roaster are presumably grounded, "ground" is not perfect. There are all sorts of high impedance paths between various ground points, and all sorts of effects, from mechanical triboelectric to electrochemical to stay fields from other conductors will cause small, subtle variations in the voltage. In short, it's total chaos, so you have to deal with it.</p> <p>In a coffee roaster I assume you have motors which are relatively noisy, and there might be an actual (very small) electrical current flowing out a vent, as all the rubbing and heat is bound to create charged particles.</p>
<p>I developed my own circuit board which reads temperature from a thermocouple. This board also plugs into a computer via USB and my software communicates with the firmware on the board. It's fairly simple.</p> <p>This is being used to record temperature readings from coffee roasters (<a href="http://my.jaho.com/photo/probat-l12-coffee-roaster" rel="nofollow">here is an example</a>). Sometimes, a voltage develops between the roaster and computer. What happens is that this voltage can be transmitted through the TC wire to the circuitry and throw off the temperature reading (since TCs work on the principle that the potential changes between the two wires as a function of temperature). I've gotten around this by using ungrounded thermocouples exclusively, which isolate the actual TC wires from the outside world.</p> <p>However, I'd really like to understand <em>why</em> this happens. I'm not an EE genius...I prototyped this board on an Arduino and paid a real EE to build and program the actual circuit. I'm simply confused about what is going on exactly, and how I can be sure to eliminate any stray potentials which can interfere with the temperature readings.</p>
Understanding extra thermocouple voltage between computer and machinery
2010-12-17T17:53:17.517
8021
|resistors|measurement|resistance|
<ul> <li>Top accuracy of resistance measurement is limited by Quantum Hall based Resistance Standard (now accepted internatiolally), which is now about 0.02 ppm (part per milion) = 2/100 000 000; = 0.000002%. </li> <li>Good National laboratories, for example NIST, measure customer's special (stability) 1 Ohm and 10 kOhm resistors to 0.05ppm (I have one, calibrated to 0.05ppm :-) ). Stabilty of best Primary Standard Resistors is 0.05 ..0.2ppm/year, when properly handled (not exposed to elevated temperature and thermal/mechanical schock). The price of resistor /measurement is of the order of 1.5k$. To avoid influence of temperature, manganin resistors are kept at 25.00'C temperature bath during measurement.</li> <li>Good quality bridges and 8.5 digit mutimeters allow for measurement with 3..15ppm accuracy (limited by drift with time 3..10ppm/year). But they allow for comparison of resistors with 0.1 ..0.5ppm uncertainty. So having Good Resistor Standard allows for better accuracy. Secondary Standard resistors (eg Rosa Type (made of manganin), old sells for about 80$) have annual drift 0.3 ...3ppm/year, TC -20 ...+20ppm/deg (depending on temperature). Resistors made of Evanohm have lower temp coefficient &lt;3ppm, but have higher EMF to copper. </li> <li>Main limits of accuracy in resistance measurements are due to drift of resistors with time, temperature and humidity. For low value resistors &lt;10 kOhm) four wire connections and methods must be used to avoid voltage drops on connecting wires. Precision Measurement of High value resistors (>1MOhm) requires special guarding circuits to avoid leakage.</li> </ul>
<p>This question is inspired by some basic questions on resistors I've read here lately. </p> <p>What's the most accurate/precise technique for measuring the value of a resistor you can think of? What level of precision can be practically achieved? Can you repeatably measure a resistance to +/- 1 micro-ohm? +/- milli-ohm? Can you somehow distinguish between a resistor of a given value and equivalent series resistors? equivalent parallel resistors?</p> <p>Not to limit answers too much, but I'd be interested in using a microcontroller plus external circuitry to take the measurements. Sorry if this is too vague of a question, I struggled to narrow down the scope. I'm thinking of techniques that incorporate GPIO pins and onboard peripherals like ADC and Analog Comparators. </p>
Precise Resistance Measurement Techniques
2010-12-17T18:48:59.647