Body
stringlengths
26
26.8k
Tags
stringlengths
3
101
Id
stringlengths
1
6
CreationDate
stringlengths
23
23
Answer
stringlengths
38
37.2k
Title
stringlengths
15
150
<p>How do use use an Arduino with a Stepper Motor? </p>
|arduino|stepper-motor|motor|
1
2009-10-28T03:18:50.070
<p>An alternative to crafting your own drivers and pushing out the correct order of controls to a stepper's pairs, is to use an off-the-shelf driver for your stepper. Most feature a simple two-pin control, one for direction and one you pulse to take a step, that greatly reduces the number of pins you use on your arduino, and the amount of logic involved. Not to mention, they also tend to support chopper (micro-stepping) driving, which reduces overall current consumption and allows you to run them at higher voltage, and gain smoother motions.</p> <p>Some example of off-the-shelf drivers include: </p> <p>Easydriver (a favorite among arduino folks) Probotix Unipolar Stepper Drivers, and Gecko drivers (Arguably the Rolls-Royce of stepper drivers)</p> <p>(I have not included links as it does not allow me to include more than one link, but they can easily be found via google.)</p> <p>An important point to note when you start driving steppers, which is often overlooked in the myriad tutorials out there: you <em>must</em> ramp into and out of full-speed stepping when making a multiple step move. I've seen many examples where they say to just send the same rate of steps to the motor at all times. Not only will this result in greater vibrations and noise when moving at full-speed, it can also result in a failure to execute move, and under- or over-shooting position. Apply proper linear (or otherwise) speed ramping to your movements. (Start and end with a larger delay between steps than the delay used in full-speed movement.)</p> <p>!c</p>
Arduino Stepper Motor
<p>How can you get the analogue sensor data into Max MSP with an Arduino?</p>
|arduino|maxmsp|
2
2009-10-28T14:06:32.277
<p>This is a particularly clean implementation for automagic analog and digital input with some built-in code for using a 4051 multiplexer on the analog pins:</p> <p><a href="http://pixlpa.com/blog/arduino-sensorbox-firmware" rel="noreferrer">SensorBox</a> by Andrew Benson (via <a href="http://cycling74.com/forums/topic.php?id=22767#post-116559" rel="noreferrer">C74 forum</a>)</p>
How can you get the analogue sensor data into Max MSP?
<p>How do I know when to use lead, flux-core, lead-free, or any other kind of solder out there? Do you have any tips on solder gauge for specific applications? </p>
|soldering|
3
2009-10-28T15:00:37.867
<p>It's a tricky topic to get good information on, but lead-free solder's supposed to be worse for you, overall.</p> <blockquote> <p>The transition to lead-free soldering has reduced strain on the environment, but for the operator, the hand soldering process has become more dangerous. The lead in the solder is gone, but to get the solder wire to flow properly, substantially more flux must be used. </p> <p>The temperature needed to create a good solder joint using lead-free solder is also higher, causing a stronger reaction within the flux and creating more solder smoke with a greater number of particles. Lead-free soldering produces up to 250 % more particles between 0.5 and 1.0 microns in diameter, the size that is the most dangerous to inhale. In addition to particles, solder smoke can contain isocyanates, aldehydes, and other unhealthy substances.</p> </blockquote> <p><a href="http://www.wellerzerosmog.com/health_risk/">http://www.wellerzerosmog.com/health_risk/</a></p> <blockquote> <p>Recent research has suggested that the fumes and vapours emanating from lead-free solders may be even more dangerous to workers and the environment than those emitted by traditional lead containing solders And it is these fumes that seem to pose the most immediate risk. Many of these lead-free solders use rosin as a fluxing agent. Tin-lead solders melt at around 180°C, whereas lead-free solders melt at temperatures 30-40°C higher. The fear is that that the higher temperatures required for lead-free soldering will significantly increase the amount of fume produced. As solder fume is one of the top eight causes of occupational asthma, Britain's Health and Safety Executive is very concerned about workers breathing in fumes from solders containing rosin-based fluxes, also known as 'colophony fume'. Anyone soldering with rosin-based fluxes is at risk of developing asthma.</p> </blockquote> <p><a href="http://dataweek.co.za/article.aspx?pklArticleId=3959">http://dataweek.co.za/article.aspx?pklArticleId=3959</a></p> <p>Yet Wikipedia claims</p> <blockquote> <p>The use of lead-free solders and components has provided immediate health benefits to electronics industry workers in prototype and manufacturing operations. Contact with solder paste no longer represents the same health-hazard it did before.</p> </blockquote> <p>You also have to worry about <a href="http://en.wikipedia.org/wiki/Whisker_%28metallurgy%29">tin whiskers</a> </p>
What are the different types of solder used for?
<p>How do I setup a hardware watch dog timer with an Arduino?</p>
|arduino|timer|
18
2009-10-30T02:06:23.157
<p>I have heard about some problems being reported with the WDT and the regular bootloader, so you may want to try another bootloader with it, for eg Adaboot.</p> <p>Also, you can do a bunch more stuff with the WDT besides just a reset. I recommend <a href="http://www.atmel.com/dyn/resources/prod_documents/doc2551.pdf" rel="nofollow">http://www.atmel.com/dyn/resources/prod_documents/doc2551.pdf</a></p>
Watch Dog Timer + Arduino
<p>Is there any method to output VGA with Arduino?</p>
|arduino|vga|
22
2009-10-30T10:58:41.967
<p>Yes, but getting the VGA timings right is all about carefully timing your instructions.</p> <p>I'd recommend the AVGA library, it can output VGA and CVBS/Composite PAL and NTSC from a humble ATMega168. It handles everything under interrupt, so you can just write your application in C and not worry about VGA timing.</p> <p><a href="http://avga.prometheus4.com/" rel="nofollow">http://avga.prometheus4.com/</a></p> <p>It even does sound.</p> <p>I built a little pong game using it: <a href="http://blog.hodgepig.org/2009/08/17/510/" rel="nofollow">http://blog.hodgepig.org/2009/08/17/510/</a></p>
VGA Output from Arduino
<p>How do you send a tweet via Arduino using an Arduino Ethernet Shield? </p>
|arduino|ethernet|twitter|
23
2009-10-30T10:59:30.220
<p>Have written what is hopefully a <a href="http://tronixstuff.wordpress.com/2011/03/08/moving-forward-with-arduino-%E2%80%93-chapter-30-%E2%80%93-twitter/" rel="nofollow">simple explanation</a> on how to send a tweet with Arduino and an ethernet shield. </p>
Arduino Twitter
<p>What's the correct DC adapter to use with an Arduino? Voltage, etc.?</p>
|arduino|
24
2009-10-30T11:02:47.427
<p>It depends on what Arduino you are talking about. The Uno has a barrel connector and recommends 7-12v. So any "Wall wart" with a center polarity positive connector that fits marked between 7v-12v should work fine. It's not clearly indicated but this is for "unregulated" and will be passed through an on board voltage regulator to turn it into 5v.</p> <p>If you are using a Pro-mini or Lilypad then these require a <strong>regulated</strong> 5v. You can couple the aforementioned 7-12v wall wart with an LM7805 or equivalent regulator. Don't just hook a "5v" wall wart up to these platforms. They often put out in excess of 5.5v and the output can vary a lot.</p>
Correct DC Adapter type to use for Arduino
<p>How do you make / connect an Analogue gauge with Arduino?</p>
|analog|gauge|arduino|
25
2009-10-30T11:04:38.293
<p>As an alternative to using an ammeter, you can use the cheap automobile instrument stepper motors like the Switec X25.168 or clones from VID and MCR. You can pick up the steppers on eBay for less than $5 each, and drive them directly from the Arduino I/O lines without a controller; without any other components whatsoever. They have enough internal friction to hold their position when the coils are unpowered, which might be useful in some battery-powered systems.</p> <p>The <a href="https://github.com/clearwater/SwitecX25" rel="nofollow">SwitecX25 driver library</a> is available on github, and the <a href="http://clearwater.github.com/gaugette/" rel="nofollow">Gaugette blog</a> has spec sheets and more info, including a source for some cheap gauge housings to mount them in.</p>
Analogue Gauge with Arduino
<p>How do you control an Arduino using Applescript?</p>
|arduino|
26
2009-10-30T11:05:47.337
<p>You can use your scripting-language of choice (python, ruby, perl, ... ) and execute the script from applescript.</p>
Applescript and Arduino
<p>What is a good software package for interfacing Arduino's input pins to MAX/MSP?</p>
|arduino|maxmsp|
27
2009-10-30T11:07:13.747
<p>I'd agree SimpleMessageSystem looks like the easiest to impalement. However you can also pick up any serial communication that pops up in Arduino's serial monitor, by using the serial object that comes with MAX MSP.</p> <pre><code>{ "patcher" : { "fileversion" : 1, "rect" : [ 54.0, 60.0, 602.0, 602.0 ], "bglocked" : 0, "defrect" : [ 54.0, 60.0, 602.0, 602.0 ], "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 0, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 0, "toolbarvisible" : 1, "boxanimatetime" : 200, "imprint" : 0, "metadata" : [ ], "boxes" : [ { "box" : { "maxclass" : "preset", "id" : "obj-3", "patching_rect" : [ 244.0, 499.0, 16.0, 16.0 ], "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "preset", "int", "preset", "int" ], "preset_data" : [ { "number" : 1, "data" : [ 5, "obj-11", "toggle", "int", 1, 5, "obj-6", "number", "int", 426, 5, "obj-1", "multislider", "list", 426, 6, "obj-24", "gain~", "list", 127, 10.0, 5, "obj-4", "filtergraph~", "nfilters", 1, 9, "obj-4", "filtergraph~", "setoptions", 0, 3, 1, 0, 0, 8, "obj-4", "filtergraph~", "params", 0, 587.329529, 9.119135, 17.75762 ] ... </code></pre> <p>This MAX 5 patch will receive data from Arduino's serial monitor, I think it was used to connect a pot to one of the analogue inputs, that could then be used to control the cutoff frequency of a filter in MAX MSP.</p>
Software package for interfacing Arduino with MAX MSP?
<p>How do you burn the Arduino Boot Loader onto the Arduino BT? </p>
|arduino|bluetooth|
28
2009-10-30T11:08:34.883
<p>You need an AVR ISP programmer. You just plug it onto the 6-pin header on the arduino board and program it with the Arduino application.</p>
Arduino BT (bluetooth) Boot Loader
<p>How do you program a sleep mode for your Arduino? Especially for battery powered designs, what are good techniques for sleeping the CPU but waking up only when needed?</p>
|arduino|programming|sleep|
29
2009-10-30T11:10:09.810
<p>here, my arduino sleep library</p> <p><a href="http://code.google.com/p/arms22/downloads/list" rel="nofollow">http://code.google.com/p/arms22/downloads/list</a></p>
How to Sleep Arduino
<p>Can you use the Arduino as an AVR programmer?</p>
|arduino|avr|programmer|
33
2009-10-30T11:44:36.307
<p>The answers from 2009 are a bit outdated now that the standard Arduino IDE includes <a href="http://arduino.cc/en/Tutorial/ArduinoISP" rel="nofollow noreferrer">ArduinoISP</a> which was based on Mega-ISP but is now officially supported by Arduino.cc. </p> <p><img src="https://i.stack.imgur.com/UOVCN.png" alt="enter image description here"></p>
Arduino as AVR Programmer
<p>I have purchased an <a href="https://www.sparkfun.com/products/9217?" rel="nofollow">ATMega328</a> from SparkFun with the Arduino bootloader pre-programmed. My intention is to replace the ATMega168 I currently have in my Duemilanove. Is this as simple as swapping the chips, or will I need to take any additional steps? As I recall, I am currently at Arduino 13 but am planning to upgrade to 17 (current version) concurrent with the part swap.</p>
|arduino|atmega|
37
2009-10-30T13:57:13.107
<p>Make sure you change the "Tools/Board" setting in the Arduino IDE to "Arduino Duemilanove or Nano w/ Atmega328"</p>
Upgrading an Arduino Duemilanove from ATMega168 to ATMega328
<p>I am a poor student, was wondering if anyone has any home-brew recipes for making conductive thread for use in wearable electronics?</p>
|conductive|thread|soldering|
42
2009-10-30T21:09:58.777
<p>while it's not so much about making conductive thread, here is a good post talking about the different types of commercially available conductive thread. Gives a good run down of various comparisons, where to buy and what they cost. hope this helps! <a href="http://www.fashioningtech.com/page/conductive-thread" rel="nofollow">http://www.fashioningtech.com/page/conductive-thread</a></p>
Is there a way to make your own conductive thread for wearable electronics?
<p>Is there a way that I can make an Arduino or other Micro-controller detect a change in capacitance?</p> <p>I'm thinking of having a screen on my door that only turns on when you touch the metal door handle. </p>
|arduino|sensor|capacitance|capacitive|capsense|
43
2009-10-30T21:40:46.470
<p>A capacitive touch sensor can be done without additional hardware. The trick is to enable the internal pull-up of a digital pin, and count the CPU cycles it takes to pull the pin up.</p> <p>Code and explanation: <a href="http://playground.arduino.cc/Code/CapacitiveSensor" rel="nofollow">http://playground.arduino.cc/Code/CapacitiveSensor</a></p>
Capacitive Sensing
<p>If I have a sketch compiled to hex, is it be possible to upload this sketch to an Arduino board using avrdude directly from command line? </p> <p>Pekkaa figured out that arduino ide executes the following command when uploading the sketch:</p> <pre><code>./hardware/tools/avrdude -Chardware/tools/avrdude.conf -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/pekka/sketchbook/Blink2/applet/Blink2.hex </code></pre>
|arduino|serial|avrdude|
49
2009-10-31T11:02:33.090
<p>The arduino IDE resets the attached arduino before running avrdude. It does this by telling the FTDI device to pulse the DTR line which is attached to the arduino's reset pin. Pekkaa found the example perl code which does this and updated the thread on the Arduino forums.</p> <p>For completeness here is the command they used to upload the .hex file:</p> <pre><code>perl -MDevice::SerialPort -e 'Device::SerialPort-&gt;new("/dev/ttyUSB0")-&gt;pulse_dtr_on(1000)'; \ ./hardware/tools/avrdude -Chardware/tools/avrdude.conf -q -q -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/pekka/sketchbook/Blink2/applet/Blink2.hex; </code></pre> <p>There is also a <a href="http://projects.cs.kent.ac.uk/projects/kroc/trac/browser/kroc/trunk/tvm/arduino/scripts/reset-arduino" rel="nofollow">python script for reseting arduinos</a> which can be used in place of the perl one if you have trouble getting it to work on your system.</p>
Upload to an Arduino from the command line
<p>I am attempting to build a cat deterrent with an Arduino, something <a href="https://www.planeturine.com/planet-urine-products-catalog/catscram/" rel="nofollow noreferrer">akin to this</a>. I have figured out detection, and now realize that I need to use an ultrasonic transducer to produce the 'blast' that I need.</p> <p>However, I am clueless as to how I would interface one of these with an arduino.</p> <p>Does anyone have any advice?</p>
|arduino|ultrasound|
56
2009-10-31T14:04:01.707
<p>Since the Arduino pin won't be able to source enough current to drive the transducer very well, you can use a transistor with base connected to the Arduino pin to drive the transducer. </p> <p>If we assume the transducer is a 40kHz (very common) one, then you would toggle the pin at 40kHz. Nice and simple. </p> <p>Here are a couple of schematic options. The first one will probably work a bit better as it will develop a higher drive voltage (higher than the supply) due to the resonant circuit formed by the inductor and transducer capacitance. </p> <p><img src="https://i.stack.imgur.com/LuvCv.png" alt="Ultrasonic 1"></p> <p>The reciever part in the above picture is not necessary for the cat deterrent project, this was taken from an ultrasonic range finder schematic where the echo needs to be timed. Unless you want know how close the cat is of course :-)</p> <p><img src="https://i.stack.imgur.com/mRdVi.png" alt="Ultrasonic 2"></p>
How do I drive an ultrasonic transducer with an Arduino?
<p>I am considering a project involving a fair share of digital signal processing. As far as I know, the best type of IC suited for this are the Digital Signal Processors. I have never worked with them before - can you recommend me any model that is simple enough for beginners? The project involves filtering hi-fi digital audio (44100Hz, 16 bit stereo) in several ways.</p> <p>Also, do I need an additional uC to for example control an UI with an LCD panel and some buttons, or can the DSP handle this along its signal processing task?</p>
|audio|lcd|dsp|user-interface|
59
2009-10-31T15:02:52.540
<p>you really, really, don't need a DSP to do even advanced audio filtering on a 44.1kHz 16bit stereo signal.</p> <p>An ARM core will be just fine for the filtering and running the LCD/buttons.</p> <p>I'd just grab a <a href="http://beagleboard.org/">beagleboard</a>, toss RT linux on it and have at it. If you get really desperate for performance there is a TI 64x+ DSP on board the SoC as well.</p> <p>There are very few applications for which a DSP is needed today, especially in the audio world. If you were dealing with 32 channels of 192khz 24bit audio thats latency critical, yea go for the DSP. But what your working with is well within the capabilities of modern microcontrollers.</p>
DSP recommendation for beginners
<p>How can I start PIC Microcontroller Programming on Mac OS X. Can I use an Arduino connected to my Mac has a programmer? Or do I need to buy specific programmer board and serial adapters?</p>
|pic|microcontroller|mac|os|
74
2009-10-31T23:28:52.823
<p>The MPLAB X (runs on Java, based on Netbeans) is available <a href="http://www.microchip.com/pagehandler/en-us/family/mplabx/" rel="nofollow">here</a> for Mac OS 10.X.</p>
PIC Microcontroller Programming on Mac OS X
<p>I'm looking to make a battery life indicator that I can use in conjunction with a micro-controller. I'm hoping that I can then read the current battery life remaining and increasingly put the micro-controller to sleep to preserve battery life.</p>
|microcontroller|sleep|indicator|low-battery|
77
2009-10-31T23:59:41.607
<p>tinker.it published a "secret" voltage level meter in the Atmega168/atmega328. With a little trick an Arduino is able to compare VCC against an internal precision 1.1v reference. The explanation and the code is here: <a href="https://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/" rel="nofollow noreferrer">https://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/</a></p>
Low Battery Indicator
<p>Are there any special requirements for charging lead-acid batteries? </p>
|batteries|charging|lead-acid|
78
2009-11-01T00:01:33.320
<p>after charge them full you can switch to trickle charging to make sure the battery stay full as lead batteries do self discharge. so if you store a battery for a long time you can connect it to a trickle/slow charger to make sure it will not over discharge</p>
Charging lead-acid batteries?
<p>I've just hidden away our entertainment centre electronics including our Infrared controlled DVD Player, Amp and Mac Mini .</p> <p>I was wondering if there is any IR Remote code for Arduino, that I can use to eventually control the entertainment centre. I plan to write a simple iPhone app, that talks to an Arduino with an Ethernet shield.</p>
|infrared|arduino|library|remote|
83
2009-11-01T00:34:17.887
<p>There is a great article about IR with Arduino on the PragPub Issue 13, July 2010 here: <a href="http://www.pragprog.com/magazines" rel="nofollow">http://www.pragprog.com/magazines</a></p>
IR Remote code for Arduino
<p>I'm trying to make an onboard system for my bike using an Arduino or maybe the Lilypad boards.</p> <p>I think I should use a Hall effect sensor, but any alternative is good as well.</p> <p>I want to output my speed to an LCD display and I'm wondering the best way to go about this.</p>
|arduino|sensor|hall-effect|
89
2009-11-01T04:02:41.727
<p>Hall effect sensors and reed switches are the most mentioned here, and they're the best solution. </p> <p>The <strong>reed switch</strong> will be cheaper, but may give you false pulses when the bike gets a shock. If that's just one from riding of the curb the software may easily filter it out, but it's different when you're riding over cobblestones, which may give you false pulses all the time. More shock resistant reed switches will require a stronger magnetic field to activate, but a Neodymium magnet will fix that.</p> <p><strong>edit</strong> in answer to m.Alin's questions<br> Reed switches are fast. That's because the reed has a low mass (= low inertia) and a low travel, often only a few tenths of a mm. <a href="http://www.meder.com/fileadmin/meder/pdf/en/Products/Reed_Switches/Reed_Switch_1A80.pdf" rel="nofollow">This reed switch</a> has an operate time of &lt; 0.6 ms, and a release time of &lt; 0.1 ms. At 36 km/h the switch travels 5 mm in 1 ms when mounted halfway the wheel's diameter. So it's fast enough to be activated when it passes the magnet.<br> <a href="http://www.meder.com/fileadmin/meder/pdf/en/Reed-switch_Life_Test_Data.pdf" rel="nofollow">This document</a> about the same switch gives a life expectancy of > 10\$^7\$ operations, and that's not as much as it seems. If you would do 25 km a day you reach that 10\$^7\$ switch events in 2 years.<br> <em>end of edit</em> </p> <p>The <strong>Hall effect switch</strong> doesn't have these disadvantages, but is somewhat more expensive.</p> <p><br /></p> <p>You get time \$T\$ between 2 pulses as information from the sensor. Then</p> <blockquote> <p>speed \$ v = \dfrac{\pi D}{T} \$</p> </blockquote> <p>in m/s if wheel diameter \$D\$ is expressed in meters, and \$T\$ in seconds. Convert to km/h by dividing by 3.6, divide by 5.79 for mph.</p> <blockquote> <p>distance \$ s = \text{pulse count} \times \pi \times D \$</p> </blockquote> <p>in meters if wheel diameter \$D\$ is expressed in meters. Divide by 1000 for distance in km, by 1609 for miles.</p>
How do I measure the RPM of a wheel?
<p>I want to make a vest that has LED all over it (for the purpose of night time cycling) but i want to be able to easily wash it.</p>
|lilypad|clothing|
91
2009-11-01T04:06:50.863
<p>I have a Lilly Pad, along with several Arduino boards. I've been wanting to do some sewable/wearable projects but just didn't want to ruin the Lilly Pad on a mistake. So after reading Pulsea's instructable: <a href="http://www.instructables.com/id/Sewable_Arduino_Interface/" rel="nofollow noreferrer">http://www.instructables.com/id/Sewable_Arduino_Interface/</a> I decided to make a "fabric shield" for a regular Arduino. It's currently a work in progress, but here are some pics:</p> <p><img src="https://farm3.static.flickr.com/2664/4182789768_c41f92cf32.jpg" alt="http://www.flickr.com/photos/morgellon/4182789768"> <img src="https://farm3.static.flickr.com/2783/4182769288_81360aaa64.jpg" alt="http://www.flickr.com/photos/morgellon/4182769288"> <img src="https://farm3.static.flickr.com/2772/4169401395_dd74202e80.jpg" alt="http://www.flickr.com/photos/morgellon/4169401395"></p>
With Lilypad boards, whats the best way to put them into clothing so they can be easiy taken out?
<p>If you have a funky Lilypad clothing and it gets rained on or you spontaneously decide to go for a swim in it :) what happen?</p>
|lilypad|clothing|
92
2009-11-01T04:08:58.713
<p>I'd vote for corrosion, here's a photo from my collection:</p> <p><img src="https://i.stack.imgur.com/onGY8.jpg" alt="When it rains on your telephone exchange..."></p>
What happens to Lilypads in the rain?
<p>Is it possible to drive a brushless motor directly with Arduino? Or should I revert on controlling a brushless motor ESC with PWM pulses? </p>
|arduino|motor|driver|brushless-dc-motor|
110
2009-11-01T16:47:20.203
<p>You <strong>can</strong> drive it directly with Arduino if by driving you don't mean literally supplying current for the windings - any MCU would be much too weak for that. Besides, Arduino can sink but not source current yet you'd need both for a brushless motor. </p> <p>However, if you use a very simple H-bridge driver IC in addition to the Arduino, you can implement pretty much every function of the ESC. In fact, depending on the application you might not even need an E*<em>SC</em>* meaning that you may not need a closed loop speed control - if the load is not too great, you may be able to just get away with simply trusting the motor to respond in sync with energizing of the winding, and the rate of the winding current changes would come from the Arduino. Check out this <a href="http://elabz.com/brushless-dc-bldc-motor-with-arduino-part-3-the-stroboscope-project/" rel="nofollow" title="Arduino with BLCD">very simple brushless (BLDC) motor control schematic</a> and Arduino sketch that you may be able to adapt to drive your motor. That one is based on SN754410NE quad H-bridge IC which is maxed at 750mA if memory serves. </p> <p>The code is not too trivial and makes use of PWM for smooth rotation but it's not too difficult to parse either to adapt to your application. The actual <a href="http://elabz.com/bldc-motor-with-arduino-circuit-and-software/" rel="nofollow" title="Arduino sketch for controlling a BLDC motor">Arduino sketch for the BLDC motor is here</a>.</p>
How to drive brushless motor with Arduino?
<p>Anyone got a good tutorial on using and Arduino to capture the Wii Nunchuck accelerometer data?</p>
|arduino|wii|nunchuck|accelerometer|tutorial|
114
2009-11-01T20:51:43.910
<p>Todbot wrote a <a href="http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/" rel="nofollow">tutorial</a> for this a while ago. He also made a small nunchuck-breadboard adapter so you wouldn't have to cut off the connector of your nunchuck to get to the wires. <a href="https://www.sparkfun.com/products/9281" rel="nofollow">Sparkfun.com</a> sells these.</p>
Using a Wii Nunchuck for data collection
<p>I've just bought a bag of random resistors from Maplin, and can't work out which way round the six band ones should be read.</p> <p>For instance I have one which is either:</p> <blockquote> <p>Violet Orange Red Brown Brown Red</p> </blockquote> <p>or</p> <blockquote> <p>Red Brown Brown Red Orange Violet</p> </blockquote> <p>The red band at either the right or left appears thicker than the others.</p> <p>Can anybody point me to somewhere with a clear explanation (or provide one themselves) as searching on Google isn't finding me anything lucid.</p>
|resistors|
119
2009-11-01T23:38:56.817
<p>The folks at <a href="http://itll.colorado.edu/index.php/electronics_center/resistor_chart/" rel="noreferrer">itll.colorado.edu</a> have a resistor chart that includes how to read 6 Band Resistors. You should start with the thick band. You can always test with a Multimeter too!</p> <p><img src="https://i.stack.imgur.com/CTxAU.png" alt="Resistor Chart"></p>
6 Band Resistors, which way should the bands be read
<p>Does anyone have a pinout diagram for the Nintendo NES Controller? I'd like to connect the NES controller to an Arduino.</p>
|pinout|
126
2009-11-02T04:18:54.630
<p>I found a great article on <a href="http://hackaday.com/2010/09/02/using-an-nes-controller-on-an-android-phone/">Hack-A-Day</a> regaring your quest. This article is on interfacing the SNES controller with an Android utilizing an Arduino. To save you some of the trouble of sifting through the article, I found the linked code they cited:</p> <blockquote> <p>This code uses an old-school 1980's NES controller to control a servo and an LED with the Arduino. With this code, the 'up' pad turns a servo to 180 degrees, 'right' turns it to 90, and 'down' turns it to 0 degrees. Also, the A and B buttons turn a LED on and off. You can get a NES controller from ebay for less than $10.00 Here is a crude drawing of the controller plug, four holes on one side, three holes on the other.</p> <hr> <pre> 0 -- 0v (ground) +5V --- 0 0 --CLOCK nothing --- 0 0 --LATCH nothing --- 0 0 --SERIAL OUT </pre> <hr> <p>You can just stick wires into the controller plug holes for prototyping. The +5 is connected to the Arduino +5 Ground to Arduino Ground Latch goes to Pin 2 (with this code) Clock to Pin 3 Serial Out to Pin 4</p> <p>The servo data line is connected to Pin 10, and the LED is on Pin 11.</p> <p>If you want to see the controller input on the serial monitor then just open up the serial monitor. It will show you the binary numbers that are coming in from the controller. Each button has its own binary number. 'Up' is 11110111, for example. I included a //hidden Serial.println code that will display "Button has been pressed" if you press down the start button. Just erase the '//' if you want to use that. The SNES plug is different, you're interested in that you will have to look elsewhere for the clock,latch,serial out info.</p> <p>Quote:</p> <pre><code>/* INITIALIZATION */ #include &lt;ServoTimer1.h&gt; ServoTimer1 servo1; int latch = 2; // set the latch pin int clock = 3; // set the clock pin int datin = 4;// set the data in pin byte controller_data = 0; int ledpin = 11; /* SETUP */ void setup() { Serial.begin(57600); pinMode(latch,OUTPUT); pinMode(clock,OUTPUT); pinMode(datin,INPUT); pinMode(ledpin, OUTPUT); digitalWrite(latch,HIGH); digitalWrite(clock,HIGH); servo1.attach(10); } /* THIS READS DATA FROM THE CONTROLLER */ void controllerRead() { controller_data = 0; digitalWrite(latch,LOW); digitalWrite(clock,LOW); digitalWrite(latch,HIGH); delayMicroseconds(2); digitalWrite(latch,LOW); controller_data = digitalRead(datin); for (int i = 1; i &lt;= 7; i ++) { digitalWrite(clock,HIGH); delayMicroseconds(2); controller_data = controller_data &lt;&lt; 1; controller_data = controller_data + digitalRead(datin) ; delayMicroseconds(4); digitalWrite(clock,LOW); } } /* THE LED, SERVO, AND SERIAL MONITOR PROGRAM */ void loop() { controllerRead(); Serial.println(controller_data, BIN); // if (controller_data==B11101111){ // Serial.println("Button has been Pressed"); //} else { //Serial.println("Button not pressed"); //} //for REFERENCE: //UP = 11110111 //DOWN=11111011 //LEFT=11111101 //RIGHT=11111110 //SELECT=11011111 //START=11101111 //A=01111111 //B=10111111 if (controller_data==B01111111){ digitalWrite(ledpin, HIGH); } if (controller_data==B10111111){ digitalWrite(ledpin, LOW); } if (controller_data==B11110111){ servo1.write(180); } if (controller_data==B11111011){ servo1.write(0); } if (controller_data==B11111110){ servo1.write(90); } delay(100); } </code></pre> </blockquote> <p><a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1254964306/0#0">Arduino SNES Instructable</a></p>
Use an old Nintendo NES Controller as an input device
<p>I'm looking for a list of cool projects that people have made with the arduino that twitter...i have read about plants that tweet when they need watering or pets who have a button to let you know when they are hungry....whole houses which twitter the power usage etc....</p> <p>So is there a place to go for a list of these....? Or could people just link the individual projects here.</p>
|arduino|twitter|
133
2009-11-02T11:37:44.100
<p>Baker Tweet is a nice arduino / Twitter project: <a href="http://www.bakertweet.com/" rel="nofollow">http://www.bakertweet.com/</a></p>
Arduino Twitters
<p>So i started this project a while back where i made a remote controlled car that i could control with the directional buttons on my keyboard via an Arduino -> now the next step i want to do is to get the tilt control in my iPhone to be driving the car :)</p> <p>Anyone got a good tutorial on this?</p> <p>Cheers,</p> <p>Mad</p>
|arduino|iphone|remote|control|tutorial|
146
2009-11-02T21:30:17.370
<p>There's a lot of stuff on controlling things with the iPhone on the Arduino forum. <a href="http://www.google.com/search?ie=UTF-8&amp;oe=UTF-8&amp;q=iphone&amp;btnG=search&amp;domains=http%3A%2F%2Fwww.arduino.cc&amp;sitesearch=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2F" rel="nofollow">Here</a> is what I found with a search.</p>
Using the iPhone to control a remote controlled car via Arduino
<p>How do i go about using the joystick with an Arduino?</p>
|arduino|
147
2009-11-02T21:34:36.743
<p>take a look here <a href="http://www.liquidware.com/projects/26/TouchShield+Tetris" rel="nofollow">http://www.liquidware.com/projects/26/TouchShield+Tetris</a></p> <p>it's a project about TouchShield Tetris </p>
Joystick with the Arduino
<p>If I'm running out of pins on an Arduino, short of buying a second one or getting a Mega board, is there a way to get more connected to the one board? Do I need to worry about overloading it?</p>
|pins|arduino|
148
2009-11-02T21:37:44.747
<p>This product is a simple and cheap way to add pins to your Arduino. There is an easy-to-use open source library for accessing the new pins:</p> <p><a href="http://nootropicdesign.com/ez-expander/" rel="nofollow">http://nootropicdesign.com/ez-expander/</a></p>
Pins on an Arduino
<p>To get full resolution from Arduino ADC when using 3.3V sensors you must do two things.</p> <ol> <li>Connect 3.3V power supply to AREF pin.</li> <li>Call <em>analogReference(EXTERNAL)</em> in the code.</li> </ol> <p>But what about if I must mix 3.3V and 5V outputting sensors. What are my options?</p>
|arduino|
149
2009-11-02T21:43:18.160
<p>You may also consider looking for newer versions of your sensors. You may be able to acquire sensors that both work with the same voltage limits, or you may find out that newer versions of the sensors are available which will give you digital outputs and can be polled with I2C or other simple serial communication protocols. It would require buying a new chip, of course, but they're not terribly expensive and not only would you eliminate the problem, but you would likely provide your project with a greater level of precision since you don't have to worry about noise in your circuit.</p> <p>Short of redesigning your entire project to fit new chips, John C and the ham provide excellent, simple solutions. In my experience, I have run a 3v3 sensor with a 5v supply and reference and have had larger issues with noise than with lost resolution for casual projects. This is the easiest way out, but does require you to do some math, and I have voted ka1kjz's post up accordingly (do check the reference sheets).</p> <p>As far as the voltage divider solution goes, as long as you use higher-precision resistors you get the advantage of having all of your measurements be in the same voltage range and you get the ratiometric correction benefit of using AREF to follow any voltage ripple. In practice, however, I've found that noise and lack of calibration techniques in my projects have contributed more error than a little voltage ripple or 10% resistors could reasonably cause. For that reason I have voted JohnC's solution up as well, since he covers all this in more detail.</p>
How to use 3.3V and 5V outputting sensors with Arduino?
<p>I am making an application using the DIY Force Sensitive Resistor (FSR) taken from <a href="http://www.instructables.com/id/DIY-Force-Sensitive-Resistor-FSR/?ALLSTEPS">this instructable</a>. The resistance of this sensor typycally ranges from 20kOhm when at rest to 9kOhm when pressed. </p> <p>How would I convert these resistance values to a signal where 0v corresponds to the rest condition and 5v corresponds to the "pressed" condition so that I can read it with an Arduino?</p>
|sensor|arduino|
158
2009-11-02T23:09:14.000
<p>You want a signal range from 0V to 5V. Don't we all :-)? Let's go for a different approach and see where that gets us. </p> <p>Starting point: cheapest and most simple solution. </p> <p>That would be a series resistor to create a voltage divider. That's the absolute minimum. I've noticed that people don't give that resistor much thought, the just pick a nice round value like 10k\$\Omega\$. But I found that there's an optimal value for this. </p> <p><img src="https://i.stack.imgur.com/OKAzI.png" alt="enter image description here"></p> <p>The curve shows the voltage difference between the minimum and maximum reading (9k\$\Omega\$ and 20k\$\Omega\$ resp.) as a function of the series resistor (in k\$\Omega\$). See, it indeed has a maximum. That's easy to find if you remember that </p> <p>\$ \left(\dfrac{f(x)}{g(x)}\right)' = \dfrac{f'(x)\cdot g(x) - f(x) \cdot g'(x)}{g^2(x)} \$</p> <p>The difference \$V_{MAX}\$- \$V_{MIN}\$ has an extremum for </p> <p>\$ \dfrac{d}{d R_X} \left(\dfrac{R_{MAX}}{R_{MAX} + R_X} - \dfrac{R_{MIN}}{R_{MIN} + R_X}\right) = 0 \$ </p> <p>Solving for \$R_X\$ gives </p> <blockquote> <p>\$ R_X = \sqrt{R_{MIN} \cdot R_{MAX}} \$</p> </blockquote> <p>A beauty!</p> <p>So in our case the series resistor will be 13.42k\$\Omega\$, you can check this on the graph. Placing the resistors between 0V and +5V this will give us an output range of [2V, 3V]. That's the maximum range you can get with 1 resistor(*). </p> <p>Is it enough? The Arduino has a 10-bit ADC, so this range will give you a range of 200 discrete levels. That should give a sufficient accuracy for a DIY sensor. So no other components like opamps needed. </p> <hr> <p>(*) The accepted answer gives a 1.9V range, but it has the <strong>wrong equations</strong>. It's impossible to get a higher range than 1V with 1 resistor and only a +5V supply.</p>
How would I get a full range voltage reading from a pressure sensor?
<p>What sort of LCD should should i be using to go with my Arduino?</p> <p>I have used the HD44780-compatible LCD in the past, but heard that the Serial Enabled LCDs make life a lot easier.</p>
|arduino|serial|lcd|
159
2009-11-02T23:20:57.270
<p>You could use the <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=19&amp;products_id=292" rel="nofollow">adafruit LCD backpack</a>. It supports either I2C or SPI. In SPI mode it's really just using a 74HC595 shift register.</p>
Serial Enabled LCD
<p>Does anyone know how to access the iPhone's serial port, from a program on the iPod to allow that application to send signals. The idea is that the iPod could be used as the brain for some kind of robot by using the serial port to tell an arduino what to do.</p>
|arduino|serial|iphone|ipod|
167
2009-11-03T00:53:06.820
<p>I wrote an application <a href="http://www.capsicumdreams.com/iphone/gps2ip/" rel="nofollow">GPS2IP</a> that outputs NMEA messages (and gpx and kml tracks) without a jailbroken device.<br> You need to connect to your iPhone with a IP socket though, so that might be difficult for a very simple project. IP stacks for micros aren't terribly difficult to get for free, these days, though..</p>
iPhone hardware serial port access
<p>Has anyone got a diagram of the layout of the Robosapien v2?</p>
|diagram|layout|
181
2009-11-03T20:48:38.947
<p>I'd suggest starting with <a href="http://www.evosapien.com/robosapien-hack/nocturnal/RoboSapienV2/" rel="nofollow">Robosapien V2 Hacks</a>, which includes a number of documented mods, along with documentation of all of the parts and connections that make up a Robosapien. I also found a site with good photos of a <a href="http://www.markcra.com/robot/hackrobos.php" rel="nofollow">Robosapien dissection</a>.</p>
Modding a robosapien
<p>Does anyone have an easy to use Servo Torque Calculator?</p>
|servo|torque|
183
2009-11-03T21:46:57.550
<p>The link I previously had here has long since died so here is a new one:</p> <p><a href="http://www.mnbigbirds.com/Servo%20Torque%20Caculator.htm" rel="nofollow">http://www.mnbigbirds.com/Servo%20Torque%20Caculator.htm</a> </p> <p>Which may or may not fit the bill.</p>
Servo Torque Calculator
<p>I'm looking for an alternative to conductive thread (since I lack some sewing skills). I have seen silver conductive pens but I'm wondering if they could be used for clothing?</p>
|conductive|thread|clothing|
184
2009-11-03T22:04:04.583
<p>Depending on the conductivity you need, there might be a solution with fabric made for clothing worn in ESD-protected areas. They contain conductive fibers to discharge static electricity. They do not necessary have a very low resistance, but might be conductive enough to sport some signal path.</p> <p>You could buy such a fabric which has a conductive thread every cm horizontally and vertically. Then you can cut those threads at specific points so that it builds a kind of schematic.</p> <p>A different problem is, how you can connect the threads to other circuit elements. I think conductive epoxy used in small drops might do the trick. </p>
Is there a way to print / draw a circuit on to clothing?
<p>How do I detect the pattern of the knock on a door, and use it as a signature to unlock a door?</p>
|sound|microcontroller|arduino|sensor|
190
2009-11-04T04:49:59.410
<p>From <a href="http://blog.makezine.com/archive/2009/11/secret_knock_detector.html" rel="nofollow noreferrer">Make magazine's blog</a>:</p> <blockquote> <p><img src="https://i.stack.imgur.com/BtkQD.jpg" alt="enter image description here"></p> <p>RFID card readers becoming passé? Maybe what you need to guard the door to your high-tech lair is a <a href="http://grathio.com/2009/11/secret-knock-detecting-door-lock.html" rel="nofollow noreferrer">secret knock detecting door lock</a>. Using an Arduino and a bunch of parts found around the lab, Steve Hoefer built a device that unlocks your door when it receives a certain knock pattern. It works by counting the time between successive knocks, and can be re-programmed at the touch of a button.</p> <p>Of course, this system is susceptible to a <a href="http://en.wikipedia.org/wiki/Replay_attack" rel="nofollow noreferrer">replay attack</a>, because anyone can listen to the knock pattern and then know how to get in. If you are planning to use something like this, I would recommend either incorporating a <a href="http://en.wikipedia.org/wiki/Timestamp" rel="nofollow noreferrer">timestamp</a> into the message, or using a series of <a href="http://en.wikipedia.org/wiki/One-time_password" rel="nofollow noreferrer">one time knocks</a>, in order to make it harder to break into. Actually, that might make it more secure than a regular lock.</p> </blockquote>
How do I detect the pattern of the knock on a door, and use it as a signature to unlock a door?
<p>Ok, so I don't really want to turn the TV-B-Gone into a universal remote, <em>specifically</em>, but I would like to know/learn how I could go about creating a universal remote (I merely thought that working off of the TV-B-Gone would be a good point to start).</p> <p>So yeah, anyone have any ideas as to how to go about making a universal remote? (ie: Can change channels, volume, on/off, maybe even the tv source...)</p>
|microcontroller|
195
2009-11-04T07:44:35.957
<p>I'm currently working on an open source project that is essentially a network enabled universal remote. The idea is, if you keep all your A/V equipment in a closet somewhere (with an Ethernet line into the closet) you can connect this device, and control your TV, cable, dvd player, etc. with any networked device. Assuming you have wifi, for example, this means you can use your iPhone, laptop, or whatever, as a remote.</p> <p>The basic pain is setup. I don't know of any open source IR libraries so you will literally have to "teach" the device every code for every remote by pointing the remote at the device, telling it which button/device you are about to program through the web page interface, and pressing the button. The codes will all be stored in EEPROM. I haven't set up a site yet but I can probably give you schematic / pcb files if you're interested. I'm just getting started on software.</p>
Turning the TV-B-Gone into a universal remote
<p>How do i connect a Wii remote to my Mac via Bluetooth?</p>
|bluetooth|wii|remote|mac|
215
2009-11-05T02:19:43.833
<p>I use a wiiremote with my mac mini, all you ned to do is pair the device. I then use MAX MSP to handle all the data, you could just access the bluetooth port directly, but there's a handy object called aka.wiiremote, it's available for free here -> <a href="http://www.iamas.ac.jp/~aka/max/" rel="nofollow">http://www.iamas.ac.jp/~aka/max/</a> this object will allow MAX MSP to receive and send data to the remote, without any ugly scaling or formating, it makes the whole programming process 100x faster. I've got a whole bunch of programs I've made to turn the wiiremote into a music controller, I mostly use it to wiiJ (wii DJing) using Ableton live. I also use the wiiremote as an infra red camera for a digital graffiti setup, you just pair it with the mac then download the whiteboard software from here -> <a href="http://www.uweschmidt.org/wiimote-whiteboard" rel="nofollow">http://www.uweschmidt.org/wiimote-whiteboard</a> it's free and works really well, the setup is simple.</p>
Connecting the Wii remote to a computer via Bluetooth
<p>Has anyone got an example of coating a Lilypad or some other electronics in resin to make them waterproof.</p> <p>I'm wanting to make something that is really resilient -> Being lazy i want to be able to chuck it in the washing machine...hand washing is far too much effort.</p>
|lilypad|waterproof|clothing|
224
2009-11-05T21:19:56.163
<p>Is there a reason you want to use resin as opposed to a product made for the purpose?</p> <p><a href="http://www.mouser.com/Search/Refine.aspx?Keyword=conformal+coating" rel="nofollow noreferrer">Conformal coating</a> is what we use in the electronics industry. One advantage of this is that some types of coating are made to be removable with solvents, which would allow you to modify or repair your board after it was coated. </p>
Coating a Lilypad in resin
<p>Can you recommend an inexpensive product for flashing an in circuit (read: powered) ATMEGA32 via JTAG. </p> <p>I have a parallel port available on my laptop dock/port replicator, which I am guessing may be the cheapest form of these. I intend to use PonyProg to flash the ATMEGA32. I do not need the capability to debug in line, but simply to load someone else's off the shelf program (monome firmware) to the ATMEGA32.</p>
|atmega|jtag|flash|parallel|
225
2009-11-05T21:30:35.987
<p>Are you sure you need a JTAG programmer? On most AVRs are two methods available to program the flash.</p> <ul> <li>Isp Programming</li> <li>Jtag Programming Isp programmer are cheaper, but JTAG supports debugging For Jtag are mainly two Programmer available: Dragon and JTAGice mkii </li> </ul>
ATMEGA32 Jtag flash
<p>Can anyone advise what hardware and software is required for debugging AVR in circuits?</p>
|arduino|avr|jtag|debugwire|debugging|
226
2009-11-05T21:42:51.407
<p>Another option for hardware may be the Bus Pirate at $27.15(sold though seedstudio) which also do other things. I haven't used it for JTAG yet, but this is what the manual says: <a href="http://dangerousprototypes.com/bus-pirate-manual/bus-pirate-jtag-guide/">link</a>.</p>
JTAG debugging AVR
<p>I'm brainstorming a new project with my wife and was wondering what type of laser I could use to cut multiple layers of fabric?</p> <p>I'm totally new when it comes to lasers and integrated electronics.</p> <ul> <li><p>The laser would be mounted on something that moves it on the x and y axis.</p> </li> <li><p>I want to cut through stacked layers of fabric.</p> </li> <li><p>I want to build a machine to cut out patterns on fabric to make cloths and what not.</p> </li> </ul>
|laser|wearable|
253
2009-11-06T20:51:15.640
<p>Cutting a single layer of lightweight fabric should be easy at 20 watts. Cutting stacked fabric will take significantly more since the focal point of the laser won't be optimum for all the layers. Still, fabric is easy to cut, so a 60 watt or so should be able to handle it.</p> <p>There are people with laser cutters all over the place - poke around in your local maker hotspots, or ask on makezine.com to find someone that is willing to do some tests for you. You may even find someone willing to do the laser cutting for you much more economically than you could build/buy a machine for yourself, at least to do a proof of concept, and get enough business to decide whether the machine investment is worth it.</p>
What kind of laser should I get to cut fabric?
<p>Anyone know of a good source for capacitive touchscreens in low quantity at a reasonable price? Just something to play around with in projects, I'm interested in either small (eg for portable applications, 3-5") or large (eg for kiosk or standalone applications, 10-20"). I know I can get a resistive touchscreen for pennies these days, but I want a capacitive one (for various reasons).</p> <p>EDIT: The reasons I'm interested in are basically just the main reasons people use capacitive screens in general. Things like more durable (a solid piece of glass instead of a flexible piece of plastic), Multitouch capable, etc. </p>
|capacitive|controller|
259
2009-11-07T00:38:37.233
<p><a href="http://m.alibaba.com/trade/search?SearchText=4+capacitive+touch+panel" rel="nofollow">http://m.alibaba.com/trade/search?SearchText=4+capacitive+touch+panel</a></p> <p>I just found this. This is meant for B2B orders, so worst case, I will have to ask my electronics reseller to order them. There is also aliexpress.com, which is a wholesale site. This is just the touch panels, by the way. You would have to add some sort of display screen yourself. The advantage is that you get individual connectors for screen and panel. I'm definitely going to try this. If I don't forget, I will let you know how it went.</p>
Capacitive Touchscreen for DIY usage?
<p>I'm setting up an attiny2313 to drive an array of LEDs and blink them in different patterns. Rather than putting a series resistor in line with each LED (they'll be controlled separately, so I can't do tricks like putting them in series with each other), I was wondering about just using a couple diodes to get the voltage down to the right range.</p> <p>The system is running at 3.3V (with a regulator to keep it pretty constant), and two 1N4001 diodes will drop that down to 1.9V - right in line with the lower end of the 1.8 - 2.2V these LEDs are specced for. Since the diodes will always want to maintain the same voltage drop across themselves, I don't have to worry about that voltage changing as I turn the LEDs on or off. Overall I save 6 components.</p> <p>Has anyone else tried something like this? Any gotchas I've overlooked? I realize the diodes will have to dissipate the full current from all the LEDs, but for this small amount of current that doesn't seem like it will be an issue.</p> <p>(edit: I'm putting these diodes between the common cathode of the LEDs and ground)</p>
|avr|led|diodes|
263
2009-11-07T04:46:28.383
<p>When a diode is used as a voltage dropper for LEDs, diode capacity could be a problem at turn on and allow a very brief, but high LED current before the diode conducts. Scope checks of LED currents at turn on would show if this is happening.</p>
Using diodes to limit current to LEDs
<p>I've been writing Linux character device drivers for other people's stuff for some time. I'd like to find a new hobby and the thought of making my own USB gizmos seems really neat.</p> <p>I would be thrilled to be able to control some LEDs, servos, and step motors. I really enjoy learning new things on my own and the excitement when something finally works. I've not done any serious MC programming, but do know my way around.</p> <p>Can anyone recommend some kits that would be helpful to a complete noob? Ideally, they are:</p> <ul> <li>Linux Friendly</li> <li>Able to ship internationally (I'm currently living in Asia)</li> <li>Offer breadboard kits</li> </ul> <p>If you have the time and inclination, links to projects on other people's sites that include schematics and parts lists would be greatly appreciated. I want to study from examples, but <em>good</em> examples, which is why I'm asking here.</p> <p>My eventual goal is to make my own data collectors - everything from rainfall to average decibels to light levels. Sorry if this has been asked before, I did search (and searched tags).</p>
|microcontroller|led|usb|motor|servo|
267
2009-11-07T14:01:21.300
<p>Note that you don't have to start at such a low electronic level and spare more development time for the "gizmo" itself. Many companies sell USB devices for the DIY market, for instance:</p> <p><a href="http://www.yoctopuce.com" rel="nofollow">http://www.yoctopuce.com</a></p> <p><a href="http://www.phidgets.com" rel="nofollow">http://www.phidgets.com</a></p>
I'd like to learn how to make my own USB gadgets
<p>I'm starting a project using the Realtek <a href="http://realtek.info/pdf/rtl8305sc.pdf" rel="nofollow">RTL8305SC</a> ethernet switch. Does anybody have a good idea of how to use it, some code for it, or even a flow diagram of how it should be used in conjunction with an Ethernet enabled PIC?</p> <p>Any help would be appreciated! I'm currently wondering what I need to do to get it working with the PIC, specifically the order of events. Do I need to reset the switch before enabling the ethernet in the PIC, or do I enable the ethernet on the PIC while the switch is in reset mode? </p>
|pic|ethernet|microcontroller|
272
2009-11-07T15:55:24.957
<p>The RTL8305SC doesn't require any actual code, but you need to read through it's <a href="http://realtek.info/pdf/rtl8305sc.pdf" rel="noreferrer">datasheet</a> for a good description of how to wire it up.</p> <p>In general, connect the output of the PIC's ethernet to one of the RTL8305's ports in a cross-over (or enable auto crossover on the RTL8305). Connect the rest f the RTL8305's ports to ethernet jacks (w/ magnetics).</p> <p>While I haven't used this particular switch, it's usually easier if you release the switch from reset, then enable the PIC's ethernet core. But if you do things the other way, it will just look like an unplugged cable to the PIC.</p>
Using a RealTek Ethernet Switch
<p>Has anyone used the <a href="http://pjrc.com/teensy/index.html">teensy</a>? - I have a need for a serial port as well as USB connection and this looks good. Any opinions welcome. Is it difficult to use with the Arduino IDE? What are the downsides compared with the Arduino?</p>
|arduino|avr|teensy|
276
2009-11-07T19:43:52.063
<p>I bought a teensy 4.0 to in January 2020 while in states after reviewing all the details and comparing with arduino. After I moved out of states to Asia, the pjrc website always displays that my ip is blocked and I have never been able to access their forum or read discussions. This has essentially left me to troubleshoot everything on my own. It is certainly an important limitation to consider when someone (especially novice) outside US or EU would like to put their hands on teensy. That said, I have found the graphics applications to be very fast with teeny vis-a-vis Arduino due.</p>
Teensy development
<p>I'm trying to get the Lilypad working on my machine but i get the following error.</p> <p>I had a Google for it but everything keeps pointing to a problem with the board. I swapped it out and tried another Lilypad but got the same error...</p> <p>the one i am using is the first <a href="http://web.media.mit.edu/~leah/LilyPad/01_computer_attach.html" rel="nofollow">Lilypad with the FTDI connection</a>.</p> <p>This is the error message i am getting:</p> <pre><code>avrdude: stk500_recv(): programmer is not responding </code></pre> <p>Any thoughts?</p>
|lilypad|ftdi|programmer|avrdude|
278
2009-11-08T04:21:36.503
<p>It sounds like you're not selecting the correct board within the Arduino IDE. Be sure to: </p> <p>1) Download the latest version of Arduino from <a href="http://arduino.cc/en/Main/Software" rel="nofollow">http://arduino.cc/en/Main/Software</a> 2) Install the Arduino IDE and FTDI drivers 3) Select Tools>Board>LilyPad Arduino W/ATMega328</p> <p>Cheers, </p> <p>Marcus</p>
Lilypad upload error
<p>Is there any cheap and very extensible robot kit, which can work with Microsoft Robotics?</p> <p>I want to have a great choice of cool parts for a robot to buy :)</p> <p><hr /></p> <p>If where is no such robot kit which can work with MS Robotics, is there any chance to buy a very extensible robot which just can be programmed, maybe even in assembler?</p>
|robotics|programmer|kits|microsoft|
286
2009-11-08T19:28:57.457
<p>We built this autonomous robot with an Arduino. <a href="http://www.youtube.com/watch?v=6J_eh1HPu54" rel="nofollow">http://www.youtube.com/watch?v=6J_eh1HPu54</a></p> <p>Granted its a hobby robot, but you can get more advanced.</p>
microsoft robotics: cheap but very extensible robot?
<p>What is the difference between Codevision AVR C and Atmel AVR C compiler?</p>
|avr|compiler|
292
2009-11-09T02:40:31.313
<p>In addition to @NeedTungsten answer, codevision support bit type global variables to be stored in specific GPIO registers. These variables only take 1 bit of memory that is very great feature in memory constrained MCUs.</p>
Codevision AVR C and Atmel AVR C compiler
<p>What is a good microcontroller for doing Ethernet applications? Or do I just need a good Ethernet library to connect with an Ethernet MAC/PHY?</p>
|microcontroller|ethernet|tcp-ip|
297
2009-11-09T18:53:27.737
<p>You can use almost <strong>any</strong> MCU with Wiznet <strong>W5500</strong> embedded <strong>MAC</strong> + <strong>PHY</strong> controller, it is driven by SPI. The advantages are: it has built-in network stack, Tx/Rx buffers, requires minimum MCU pins, simplified programming.</p> <p>I just found another interesting option - <a href="http://www.asix.com.tw/products.php?op=pItemdetail&amp;PItemID=104;65;86&amp;PLine=65" rel="nofollow">AX88796C</a> from ASIX, it also has both <strong>MAC</strong> + <strong>PHY</strong>, 10\100Mbps Ethernet and up to 40MHz SPI interface option, so looks nice fit for <strong>any</strong> ARM based MCU.</p> <p><strong>UPDATE:</strong> Netduino 3 is already using this chip, here are interesting details:</p> <p><a href="http://forums.netduino.com/index.php?/topic/12117-deep-dive-on-asix-ax88796c-netduino-3-ethernets-fancy-new-networking-chip/" rel="nofollow">http://forums.netduino.com/index.php?/topic/12117-deep-dive-on-asix-ax88796c-netduino-3-ethernets-fancy-new-networking-chip/</a></p>
What is a good microcontroller for Ethernet applications?
<p>I'm using an ATTiny2313 to act as a serial concentrator. It only has 128bytes of RAM. I think I'm running out of RAM during the ISR. My question is how much RAM (stack) does an ISR use to save the context (registers). I.e. if I use ISRs how much will I have left out of 128 bytes. Is there a way to detect stack overflow?</p>
|avr|microcontroller|memory|
304
2009-11-09T22:35:03.667
<p>Well, checking the <a href="http://www.atmel.com/dyn/resources/prod%5Fdocuments/DOC2543.PDF">ATTiny2313 documentation</a>, on page 15, it states:</p> <blockquote> <p>The interrupt execution response for all the enabled AVR interrupts is four clock cycles minimum. After four clock cycles the program vector address for the actual interrupt handling routine is executed. During this four clock cycle period, the Program Counter is pushed onto the Stack. The vector is normally a jump to the interrupt routine, and this jump takes three clock cycles. If an interrupt occurs during execution of a multi-cycle instruction, this instruction is completed before the interrupt is served. If an interrupt occurs when the MCU is in sleep mode, the interrupt execution response time is increased by four clock cycles. This increase comes in addition to the start-up time from the selected sleep mode.</p> <p>A return from an interrupt handling routine takes four clock cycles. During these four clock cycles, the Program Counter (two bytes) is popped back from the Stack, the Stack Pointer is incremented by two, and the I-bit in SREG is set.</p> </blockquote> <p>Thus you're really only looking at 2 bytes on the stack during an interrupt (the PC); anything else that an ISR puts on the stack is up to the ISR itself. I wouldn't expect a well-written interrupt handler to need a whole lot of stack space.</p> <p>As for the Stack Pointer itself, on page 13, it states:</p> <blockquote> <p>The Stack is mainly used for storing temporary data, for storing local variables and for storing return addresses after interrupts and subroutine calls. The Stack Pointer Register always points to the top of the Stack. Note that the Stack is implemented as growing from higher memory locations to lower memory locations. This implies that a Stack PUSH command decreases the Stack Pointer.</p> <p>The Stack Pointer points to the data SRAM Stack area where the Subroutine and Interrupt Stacks are located. This Stack space in the data SRAM must be defined by the program before any subroutine calls are executed or interrupts are enabled. The Stack Pointer must be set to point above 0x60. The Stack Pointer is decremented by one when data is pushed onto the Stack with the PUSH instruction, and it is decremented by two when the return address is pushed onto the Stack with subroutine call or interrupt. The Stack Pointer is incremented by one when data is popped from the Stack with the POP instruction, and it is incremented by two when data is popped from the Stack with return from subroutine RET or return from interrupt RETI.</p> <p>The AVR Stack Pointer is implemented as two 8-bit registers in the I/O space. The number of bits actually used is implementation dependent. Note that the data space in some implementations of the AVR architecture is so small that only SPL is needed. In this case, the SPH Register will not be present.</p> </blockquote> <p>In your case, I think there's only SPL present (128 bytes of RAM = 7 bits).</p> <p>Beyond the hardware, it depends upon your framework, which for most AVR parts is going to involve GCC, <a href="http://www.gnu.org/software/binutils/">GNU Binutils</a>, and <a href="http://www.nongnu.org/avr-libc/">avr-libc</a>. A quick look at the avr-libc FAQ turned up two good questions:</p> <p><a href="http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage">http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage</a></p> <blockquote> <p><strong>What registers are used by the C compiler?</strong></p> <ul> <li><p>Data types: char is 8 bits, int is 16 bits, long is 32 bits, long long is 64 bits, float and double are 32 bits (this is the only supported floating point format), pointers are 16 bits (function pointers are word addresses, to allow addressing up to 128K program memory space). There is a -mint8 option (see Options for the C compiler avr-gcc) to make int 8 bits, but that is not supported by avr-libc and violates C standards (int must be at least 16 bits). It may be removed in a future release.</p></li> <li><p>Call-used registers (r18-r27, r30-r31): May be allocated by gcc for local data. You may use them freely in assembler subroutines. Calling C subroutines can clobber any of them - the caller is responsible for saving and restoring.</p></li> <li><p>Call-saved registers (r2-r17, r28-r29): May be allocated by gcc for local data. Calling C subroutines leaves them unchanged. Assembler subroutines are responsible for saving and restoring these registers, if changed. r29:r28 (Y pointer) is used as a frame pointer (points to local data on stack) if necessary. The requirement for the callee to save/preserve the contents of these registers even applies in situations where the compiler assigns them for argument passing.</p></li> <li><p>Fixed registers (r0, r1): Never allocated by gcc for local data, but often used for fixed purposes: </p> <p>r0 - temporary register, can be clobbered by any C code (except interrupt handlers which save it), may be used to remember something for a while within one piece of assembler code</p> <p>r1 - assumed to be always zero in any C code, may be used to remember something for a while within one piece of assembler code, but must then be cleared after use (clr r1). This includes any use of the [f]mul[s[u]] instructions, which return their result in r1:r0. Interrupt handlers save and clear r1 on entry, and restore r1 on exit (in case it was non-zero).</p></li> <li><p>Function call conventions: Arguments - allocated left to right, r25 to r8. All arguments are aligned to start in even-numbered registers (odd-sized arguments, including char, have one free register above them). This allows making better use of the movw instruction on the enhanced core. </p></li> </ul> <p>If too many, those that don't fit are passed on the stack.</p> <p>Return values: 8-bit in r24 (not r25!), 16-bit in r25:r24, up to 32 bits in r22-r25, up to 64 bits in r18-r25. 8-bit return values are zero/sign-extended to 16 bits by the called function (unsigned char is more efficient than signed char - just clr r25). Arguments to functions with variable argument lists (printf etc.) are all passed on stack, and char is extended to int. </p> </blockquote> <p><a href="http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_ramoverlap">http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_ramoverlap</a></p> <blockquote> <p><strong>How to detect RAM memory and variable overlap problems?</strong> You can simply run avr-nm on your output (ELF) file. Run it with the -n option, and it will sort the symbols numerically (by default, they are sorted alphabetically).</p> <p>Look for the symbol _end, that's the first address in RAM that is not allocated by a variable. (avr-gcc internally adds 0x800000 to all data/bss variable addresses, so please ignore this offset.) Then, the run-time initialization code initializes the stack pointer (by default) to point to the last available address in (internal) SRAM. Thus, the region between _end and the end of SRAM is what is available for stack. (If your application uses malloc(), which e. g. also can happen inside printf(), the heap for dynamic memory is also located there. See Memory Areas and Using malloc().)</p> <p>The amount of stack required for your application cannot be determined that easily. For example, if you recursively call a function and forget to break that recursion, the amount of stack required is infinite. :-) You can look at the generated assembler code (avr-gcc ... -S), there's a comment in each generated assembler file that tells you the frame size for each generated function. That's the amount of stack required for this function, you have to add up that for all functions where you know that the calls could be nested.</p> </blockquote>
ATTiny2313 ISR stack usage
<p>What's a good circuit to use to generate a square wave? The exact waveform isn't too important - I just want to get a piezo buzzer cranking at 150 kHz. I also want efficiency and adjustable amplitude.</p> <p>(Motivation: I want to vaporize some oil in order to burn it. I choose 150 kHz after the Glade Wisp as hacked in Make.)</p> <p>The simplest I found was <a href="http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/square.html" rel="nofollow">this one</a> consisting of a capacitor, 3 resistors and <s>an op amp</s> a comparator. Is this design a good way to go? </p> <p>Assuming so, according to the same page, it has a period of </p> <p>\$T = 2RC ln \dfrac{1+L}{1-L}\$ where \$L = \dfrac{R1}{R1+R2}\$</p> <p>Choosing R1 = R2 gives L = 1/2, giving (1+L)/(1-L) = approximately e, giving the simpler</p> <p>T = 2RC</p> <p>I'm in the woods here, but I'll suppose that R1 = R2 = R is a good choice.</p> <p>The T I want is 1/150kHz; thus RC = 3.33e-6</p> <p>Another abitrary choice presents itself. Say, a 100 ohm resistor and a 0.033 uF capacitor? Is this choice important? Is choice of op amp important?</p> <p>Sorry for the long question, but if someone who knows what they're doing could walk with me here, I'd surely appreciate it.</p>
|generator|wave|
310
2009-11-10T08:36:13.987
<p>For a simple oscillator people often think immediately of a 555 timer IC. This ciruit is even simpler: </p> <p><img src="https://i.stack.imgur.com/VZGdO.png" alt="Oscillator"> </p> <p>The <a href="http://ics.nxp.com/products/ahc/datasheet/74ahc1g14.74ahct1g14.pdf" rel="noreferrer">74HC1G14</a> is the single gate version of the more common 74HC14 in SOT-23 package.</p>
What's a good square wave generator?
<p>What is the best way I can hook <a href="http://cid-acbfe2d16cd0ace8.skydrive.live.com/self.aspx/Public/18068op.pdf" rel="nofollow">this 5x7 LED matrix</a> to an Arduino board?</p>
|arduino|led|matrix|
321
2009-11-10T14:31:39.517
<p>i followed the instructions posted here: <a href="http://ericlathrop.com/electronics/LedGrid.php" rel="nofollow">http://ericlathrop.com/electronics/LedGrid.php</a> This one works.. i tried it using a 5x7 Led Matrix display with arduino.</p>
How to hook up a 5x7 LED matrix to Arduino?
<p>I've been playing around with a Lego Mindstorms NXT robot, gearing it for speed and power. To my dismay, when geared for power, it wasn't any harder to stop than when geared for speed -- I suspect that it doesn't have very good traction (as there really isn't much mass pushing down on the wheels).</p> <p>It would be nice to be able make quantitative statements about how much force (and thus, how much torque) a robot puts out. Does anyone know how I can do this? Would, for example, a spring scale or force gauge work well for this purpose, and if so, what is a good maximum rating to look for?</p>
|motor|torque|indicator|robotics|measurement|
328
2009-11-10T20:58:01.757
<p>I've always used a standard spring kitchen scale rotated. Put the scale between the robot and a wall (or another fixed object) and let the robot push... </p> <p>BTW: This is one of the tips that are also suggested in the robotic sumo chapter of "Building Robots With Lego Mindstorms" book by Mario and Giulio Ferrari (two italian RCX gurus). So, it's really "in topic" with the original question. </p>
Measuring force developed by a robot
<p>Do the Arduino Duemilanove USB Board with Atmega328 come with the Arduino bootloader?</p>
|atmega|bootloader|arduino|
330
2009-11-10T22:56:24.180
<p>Yes - all boards with ATMega labelled Arduino come with the bootloader. Individual chips will say specifically, generaly if ordered from an Arduino supplier then they will have bootloader, whilst if ordered from generic electronic supplier they will not.</p>
ATMega chips come with the Arduino bootloader
<p>Does the Arduino chip get wiped of any (uploaded) code when you press the reset button?</p> <p>and</p> <p>Can you retrieve the code that is currently on the chip?</p>
|arduino|reset|
339
2009-11-11T10:59:32.737
<p>Nothing gets wiped on reset. To answer your first question. </p> <p>Whether the code, or the eeprom data can be retrieved depends on the fuse settings. These determine if the flash and/or eeprom can be read. </p>
Arduino chip wipe on reset
<p>If I upgrade my arduino from the ATMega168 to ATMega328 will I be able to use the ATMega168 like a stock chip from the factory or will the bootloader prohibit this? In other words, will I be able to overwrite the bootloader, with my usbtiny ISP programmer, on the 168 to use as a Atmel stock chip with Avrdude?</p> <p>Is there any special steps I would need to take like reseting fuses?</p>
|microcontroller|arduino|avr|atmega|bootloader|
347
2009-11-11T16:44:12.617
<p>I've done this - pulled the 168 from an arduino, programmed it with the USBtinyISP. You'll need some form of target board for the USBtiny ISP. I used <a href="http://evilmadscience.com/tinykitlist/74-atmegaxx8" rel="nofollow">one of these from Evil Mad Scientist Labs</a>, along with a ZIF socket from Sparkfun. The actual circuit needed to program them is simple enough that you can build it on a protoboard without much trouble. EMSL also has a handy article on just what that circuit needs to be so you can DIY.</p> <p>In order for a target board to work, it needs to be set up with at least an approximation of how the chip is already fused. That means having the right amount of power (if the brownout detection circuit is enabled) and having an oscillator if the chip is set to use an external one (AFAIK the chip will ignore an external oscillator if not fused to use it). You either need to first set the fuses to use the internal oscillator before removing from the Arduino or put an oscillator on your target board. I don't think the Arduino comes with brownout detect enabled, so you're probably safe on that score. I'd suggest just using the jumper on the USBtiny to supply power to the target board, rather than bothering with an external power supply.</p> <p>I can't recommend using the Arduino board as the programmer target because it has a normal socket instead of a ZIF socket. I find that I'm much less likely to mangle the pins on my MCU when I use a ZIF socket. Going in and out of a breadboard is bad enough. Sparkfun seems to have the cheapest prices on ZIF sockets, if you decide to go that route.</p> <p>Since you already have an ISP programmer, you can save a little money on your 328 chip and buy one without the Arduino bootloader. Just use the Arduino software to burn the appropriate bootloader to it once you've got it installed.</p>
Arduino Bootloader
<p>If I have an unkown device which talk I2C or SPI how can I reverse engineer the protocol. Basically I am looking for something similar as <em>snoop</em> or <em>tcpdump</em>. </p> <p>For software Mac is preferred but can also run PC under parallels.</p>
|serial|spi|i2c|logic-analyzer|
350
2009-11-11T19:29:00.990
<p>The OpenBench Logic Sniffer is open source hardware and retails for around $30-$40</p> <p>It supports the Sump client that runs under Java and it has I2C &amp; SPI protocol analyzer plugins. I run it under OS X &amp; Linux</p> <p><a href="http://dangerousprototypes.com/2010/02/25/prototype-open-logic-sniffer-logic-analyzer-2/" rel="nofollow">http://dangerousprototypes.com/2010/02/25/prototype-open-logic-sniffer-logic-analyzer-2/</a></p> <p><a href="http://www.sump.org/projects/analyzer/client/" rel="nofollow">http://www.sump.org/projects/analyzer/client/</a></p>
How to reverse engineer I2C and SPI protocols?
<p>How do i connect bluetooth to Lilypad Arduino?</p>
|arduino|lilypad|bluetooth|
372
2009-11-12T07:10:41.983
<p>Without knowing which BT module you are using it will be a little difficult to help, but. As mentioned above using the BlueSMiRF board and some jumper wires you can attach</p> <ul> <li>5v to PWR</li> <li>(-) to GND</li> <li>tx to RX - I </li> <li>rx to TX - O</li> </ul> <p>If you have a specific BT module you are working with update your question and we can try to be more helpful.</p>
Connecting bluetooth to Lilypad Arduino
<p>I want to use bluetooth to grab the info off my 3pi rather then have it display on the small LCD. Pololu provides a lib for serial communication.</p> <p>I'm wondering what the best bluetooth/serial module to use is? </p> <p>A friend recommended the Xbee module - Any thoughts?</p>
|serial|bluetooth|robotics|xbee|3pi|
391
2009-11-12T23:06:04.733
<p>For the most part I agree with Hristos, but must disagree about Xbee. I have done this with both devices and there was not a significant difference in complexity.</p> <p>I would point out, there is a good rule to remember here, like occam's razor for electronics, try to stick with the most common and accessible technology. Many computers have bluetooth removing the need for a dongle, it is a very common tech, and by that fact has more available in development.</p> <p>Range relation, most people think Xbee has greater range, but bluetooth also can have radiated power of up to 100mW in class 1, although saying a device is class 1 does not imply this to be true, it just defines a maximum, if you want range you MUST read about the devices actual radiated power. Most people also overlook receiver sensitivity, you will find out with testing it often has more to do with range than the radiated power, although both are important.</p> <p>Hope I helped. -Max</p>
3pi Robot with Bluetooth
<p>Has anyone had much experience with the <a href="http://www.pololu.com/" rel="nofollow">Pololu</a> Robots </p> <p>Which are the coolest? what do you recommend i get? </p> <p>I'd like to hear about some cool projects with these Robots :)</p>
|pololu|
403
2009-11-13T03:06:19.533
<p>Pololu now sells the <a href="http://www.pololu.com/catalog/product/2506" rel="nofollow noreferrer">Pololu Zumo Robot for Arduino</a>, which is a good choice if you are familiar with Arduinos or want to benefit from the large support community Arduino offers.</p> <p><img src="https://i.stack.imgur.com/cRFbl.jpg" alt="Zumo robot without Arduino"></p>
Experience with Pololu Robots
<p>I have an old Apple keyboard that I would like to use but it uses the ADB bus instead of the newer USB bus. Griffin used to produce a product called the iMate which was an ADB-to-USB converter but have since discontinued it.</p> <p>So I've decided to build one. It shouldn't be that difficult right?</p> <p><a href="http://pinouts.ru/Slots/apple_adb_pinout.shtml" rel="nofollow">pinouts.ru</a> has the bus specs.</p> <p>The pinouts are pretty straight forward:</p> <pre><code>Pin Name Description ----------------------------- 1 ADB Apple Desktop Bus 2 PSW Power Switch 3 +5V Power +5V 4 GND Ground </code></pre> <p>How would I go about building something like this? Would I need to get a FTDI chip to do the interface?</p>
|usb|serial|adapter|keyboard|
406
2009-11-13T03:46:12.637
<p>If you want it to behave like a USB keyboard, you're going to have to have a microcontroller that translates between the <a href="http://en.wikipedia.org/wiki/Apple%5Fdesktop%5Fbus" rel="nofollow">ADB protocol</a> and the <a href="http://en.wikipedia.org/wiki/USB" rel="nofollow">USB protocol</a>, and which implements the keyboard profile for the HID class.</p>
Apple Desktop Bus (ADB) to USB Adapter
<p>I've noticed, with regards to microcontrollers, there are several way to program them. I am sorta familiar with USB as my Arduino's can be programmed via USB. </p> <p>What is a JTAG or SPI interface? </p> <p>Ultimately I know that these interfaces provide a means to flash the chip with new instructions but how do they differ? Are there any advantages of one over another?</p>
|microcontroller|spi|programming|jtag|
433
2009-11-14T03:51:47.953
<p>As you mention serial, spi (2 wire, 3 wire?), usb, jtag, swd, etc are all used.</p> <p>Yes there are pros and cons. Jtag for example is for all the cases I know about built into the hardware, originally and primarily used for something other than processor debugging, but they happen to use it for that as well. if jtag is available it is generally the best interface for that reason, but there are exceptions. For example if the pins are not dedicated to jtag, you could have a bug in the code and/or intentionally use one of those pins for something else making it not possible to access the chip using jtag (if it boots the software in flash that repurposes those pins). Another exception is if the processor core can be hung by a bug in the software in the flash and a hung core is not debuggable via jtag. I would call that a bug in the hardware design, but have recently dealt with this on a commercial part.</p> <p>On the AVR for example the PDI, which I think folks might be calling spi here, maybe not. it appears at least on the xmega that the pdi and external jtag feed into a common pdi interface internally. So the pdi pins give you direct access to this instead of the jtag overhead. so long as this interface works when software in flash has hung the core, then this would be the ideal interface for this family. The protocol is published and relatively simple, and built into hardware. it does have the disadvantage of a bidirectional data bus, like i2c.</p> <p>Arm has a jtag with fewer wires called swd which they are not necessarily wanting openly published. the open source tools are implementing it though. this is in theory a serial jtag, the different jtag signals are sent sequentially on one wire somehow instead of in parallel on many wires. inside the part I assume it gets parallelized again and feeds normal jtag logic. This has the disadvantage of ARM wanting to keep it a semi-secret, and ARMs jtag debuggers being a royal pain to use anyway. So this is a lot of work. If/when openocd gets it working then it may be a different story. You also have to still worry about repurposed pins and what happens with a hung core.</p> <p>A number of the vendors use a solution where they have one or more boot flash areas, depending on which way a pin or two or three are pulled depends on which flash you boot from. So you might boot from the user flash, or you might boot from a flash that at least from the factory has a serial port based bootloader, or one that has a usb based bootloader. For each vendor, these software solutions can and do vary, the serial protocol changes in subtle or more than subtle ways, the usb solution can change quite a bit. The good and bad is that some of these flashes you can get at, so you may choose to change the serial bootloader, this is both good and bad, good in that you might choose to customize it to your product, bad that it is possible to erase it accidentally and brick the part, at least brick it for that interface.</p> <p>Jtag tools used to cost thousands of dollars, now they dont, for about $15 you can get an ftdi breakout board and repurpose it with openocd. For $50 plus or minus some you can get an ftdi based usb solution that works out of the box with openocd. You can get a non-commercial j-link for like $75-$80. And then there are the multi thousand dollar ones which are fast, sure but not worth the money in general. You buy those when you are a huge corporation with lots of cash to blow and want to pay for support. When you pay those prices you get the product you want and you get answers to tech support questions immediately. Like free linux vs windows or RHEL for example, linux support is free but you get what you get. Anyway this makes jtag much more attractive, being the most powerful solution in general I advise getting these tools when and where you can (where affordable).</p> <p>You should have in your debugging and development arsenal jtag tools when and where affordable. sparkfun has ftdi based usb to serial boards and the ftdi parts can be repurposed into big bangers, you can use these for spi or i2c or pdi or jtag or other interfaces. Ideally getting boards that are made for the bus/part you are interested in and using the free/open source software that goes with it. Also using these serial boards, ideally having a supply of 3.3V and a 5V (about $15 each the one you use for lillypads and arduino minis, etc) for connecting to serial ports for the various micros that have some sort of serial protocol. I find it easier to write my own loader based on those protocols, esp like the arduino/avr folks where the bootloader source is published and is a considerable subset from the supposed standard they support. YMMV.</p> <p>In short, there is no one good solution, they all have pros and cons. Be prepared to support at least two of them. usb and serial or usb and jtag or jtag and serial, etc. Just lay down pads or pin holes on the board and not necessarily populate. For your personal or lab development have a full suite of tools and be prepared to switch from one to another as you brick chips and have to recover boards or as you develop your own bootloader, usb firmware, etc.</p>
Programming microcontrollers: JTAG, SPI, USB oh my!?
<p>I'm building a <a href="http://www.lhexapod.com/blog/2009/08/a-timer-driven-pwm-servo-controller---part-4.html" rel="nofollow noreferrer">serial servo controller</a> to learn about electronics and assembly language as part of my <a href="http://www.lhexapod.com" rel="nofollow noreferrer">hexapod robot project</a>. Quite early on I decided that I needed more I/O channels than my ATTiny2313 that I was using at the time supported so I investigated some 3-8 line demultiplexer chips (<a href="http://www.ti.com/lit/ds/symlink/cd74hc238.pdf" rel="nofollow noreferrer">CD74HCT238E</a>'s) which have allowed me to create a 64 channel PWM servo controller with just 8 I/O pins for the PWM channels and 3 address lines. </p> <p>Anyway. I also bought some <a href="http://www.ti.com/lit/ds/symlink/cd74hc238.pdf" rel="nofollow noreferrer">CD74HCT138E</a>'s which are active low rather than the active high CD74HCT238E's. I understand, in principal, the differences <a href="https://electronics.stackexchange.com/questions/332/current-sourcing-current-sinking/337#337">between the current sourcing chip that I'm using and the current sinking chips</a> but I don't really know how to adjust my circuit to use the current sinking chips instead of the current sourcing chips.</p> <p>The schematic for the active high chips is here: <img src="https://i.stack.imgur.com/Djh0n.png" alt="alt text"> What do I need to change to swap the <a href="http://www.ti.com/lit/ds/symlink/cd74hc238.pdf" rel="nofollow noreferrer">CD74HCT238E</a>'s for CD74HCT138E's?</p> <p>Note that the reason for asking this question is that I bought a tube of the active low ICs by mistake and I'm curious at how much more complex the schematic and circuit design would need to be for me to make use of them. </p>
|avr|current|sinking|sourcing|
437
2009-11-14T14:29:26.360
<p>The '238 have only one of eight outputs logic high, sourcing current, the rest of the pins will be logic low, sinking current. The '138 is precisely the opposite, one of eight pins can be low, sinking current, the rest will be high, sourcing current.</p> <p>To "invert" the function of the '138, you could use eight PNP transistors with the bases each tied to an output of the '138 with a resistor, the emitters all connected to +5 and the collectors each connected to one of your servo connectors. Or use a bunch of inverters (74HCT04 or octal 74HCT240) to change the sense of the outputs.</p> <p>Your choice of 1 of 8 decoders will limit what you can do with your servos, as your circuit can only activate one output at a time. Max speed of any one servo will be limited by the number of servos that you want active. If you wanted all 64 channels on, for example, they would all be running at at average of 1/64th speed. </p> <p>The PCF8575C is very handy for expanding digital IO using serial I2C protocol from devices like Arduino. You could run 64 servos using 2 pins on the Arduino and 4 PCF8575Cs. This would give you more flexibility in setting your PWM duty cycles.</p>
How to redesign a circuit to use a current sinking IC rather than a current sourcing IC
<p>How does the Parallax Propeller stack up against other multi core solutions? I just saw an article about the open stomp project that won their design contest. I wanted to see what other people thought of the chip. Any similar, but better products? </p> <p>How does spin rate?</p>
|microcontroller|
441
2009-11-14T20:32:29.257
<p>I know this post is ancient, but I stumbled upon it while searching for something else.</p> <p>I cannot recommend the Propeller enough. I have learned more about EE using that thing that I have with just about anything else. It's just so versatile.</p> <p>Plus, one thing to mention is the PASM (assembly language). It has one of the easiest assembly language instruction sets I've ever seen. Being familiar with 6502, I found it easy to learn. And, there are very few instructions. Which sounds like a limitation but it isn't! It just makes it easier and faster to learn.</p> <p>It's not perfect (what is?) but I found the PASM so much easier to use that I actually prefer it over SPIN. </p>
Is Parallax Propeller a good product?
<p>I've been looking into doing some PIC Programming, but unlike some of the other microcontrollers available the sheer number of different chips available has caused me some confusion. It also appears that some of the chips suggested on some sites as good choices for people starting out with PIC programming may have been superseded (or I may just be getting even more confused). </p> <p>So my question boils down to three parts:</p> <ul> <li><p>What would be a good PIC chip to start out with?</p></li> <li><p>I'm quite happy doing either assembler or some other language, so what IDEs/languages would you suggest for Linux?</p></li> <li><p>What would you recommend in terms of getting the code onto the chip, over a USB connection from a Linux laptop (PicKit 2? was one possibility) and what circuit/board configuration will I need to do this?</p></li> </ul> <p>Edit: After a long discussion with Kortuk (see comments below) on the merits of various bits of kit, I've decided to start with the PicKit2 Starter Kit. This comes with a PIC16F690 chip installed.</p>
|pic|programmer|microcontroller|
442
2009-11-14T22:12:21.940
<p>If you want to use PICs I would seriously consider the PIC24 series of 16 bit pics or the very similar dsPIC33. They are faster, more powerful, in many ways easier to program, and don't cost any more than the most basic 8 bit ones. The lower end ones are available in breadboard friendly DIP socket packages too.</p> <p>It's a lot harder to find examples on the internet though, but as far as i can see that's the main disadvantage.</p>
Starting out PIC Programming
<p>I'm putting together a design for a hardware random number generator that will utilize multiple sources of entropy (<strong>combined</strong>):</p> <ul> <li>Ambient light</li> <li>Ambient sound (and sound levels)</li> <li>Ambient temp</li> <li>Ambient humidity</li> <li>Position of the device itself (upside down, tilted left, titled right, etc)</li> <li>Other sources in the future, possibly even GPS data (marked possible because two users may be standing next to each other, hence possibly deterministic if you know them.)</li> </ul> <p>My idea is to make an entropy pool 'recharger' that people can carry around with them during their day while it continues to write to a USB drive.</p> <p>After a few hours, the user will have a nice ~4GB entropy pool that can be plugged in to a PC and used. I can't afford the really expensive QRNG's based on light or radioactive decay, so I'm trying to come up with something cheaper.</p> <p>In your opinion, is Arduino the best choice for prototyping this? If not, what would you recommend?</p>
|arduino|random-number|
460
2009-11-15T17:00:13.657
<p>You could use the sensor input as seeds to a pseudo-random number generator. The Linux OS uses input from the keyboard/mouse as seeds to /dev/random. Just an idea.</p>
Is Arduino ideal for making a HRNG (hardware random number generator)?
<p>When working with AVR microcontrollers or Arduinos, what is something that if you had known sooner would have saved you a lot of time or frustration?</p>
|microcontroller|
464
2009-11-15T19:05:30.727
<p>This answer strays far from the strict question but is in line with most other answers - and should be fun and useful:</p> <p>RS232 is upside down</p> <p>Most of everything you will have problems with will be caused by "boundary conditions" - stuff that happens as things get going or start stopping.</p> <p>Always initialise your variables. ALWAYS.<br> And your interrupt vectors.</p> <p>Little endian.<br> Big endian.<br> High/low byte first.<br> Left adjust N bits.</p> <p>Flags left still set when work is done (eg IRQ flags).</p> <p>Stack overf<br> ck underflow.</p> <p>RTS versus RTI</p> <p>Watchdog what ?</p> <p>Simple interrupt driven timer real time round robin scheduler that looks like a full RTOS but can be understood and written as you go. Trivial and amazing.</p> <p>Microcontroller pin specs - Vout / Iout relationships. Vin limits. Holding pins near mid rail. </p> <p>Always define all pin states under all conditions. </p> <p>Thermal resistance.</p> <p>NEVER let a body diode conduct (or mayhap a few uA if you really really must) that your life shall be long on the face of the land - even when the great satans come and tell you it will be alright and that you CAN safely use them for input clamping.</p> <p>Absolute parameters and operating parameters in data sheets mean totally different things an must NEVER be used interchangeably (or at least not the former for the latter) that your days may be long ... etc.</p> <p>V = I x R. The V doesn't happen if the I isn't happening so drawing conclusions re V without I is pointless, or worse.</p> <p>Hex Schmitt inverters !!!! God's gift to DIY digital AND analog electronics. (74xx14, CD40106, ...). </p> <p>CMOS logic !!!</p> <p>Opamp common mode range.</p> <p>Opamp output headroom - high and low.</p> <p>Voltage regulator dropout - ON TOP OF Vout min.</p> <p>Voltage regulator Iput min when relevant.</p> <p>Lead acid battery sulfation. Don't let it !!!</p> <p>The utter magic of LiIon batteries, despite their drawbacks.</p> <p>The utter nasty chicaneries of NimH batteries, despite their nicenesses.</p> <p>LSD NimH (no, not lysergic ...)</p> <p>Adjustable current limit adjustable voltage power supplies for prototype life maintenance.</p> <p>MOSFETS !!!!!!!!!!!!!!!!!!! Yee ha</p> <p>Low Vgsth MOFETS and digital electronics and large loads. Yee Ha.</p> <p>MOSFET, 2-jellybean-transistor gate drivers.<br> Why you NEED a gate driver.</p> <p>Tantalum capacitors die die die !!! (and they do)</p> <p>Input leakage current. What's that?<br> Input off what ?</p> <p>Accuracy / resolution / linearity / monotonicity / ...</p> <p>Isochronous.<br> Asynchronous?<br> No, Isochronous.</p> <p>Asynchronous. 1 bit 2 bit 1.5 bit more.<br> LSB first!. First? YES! Start bit, stop bit, parity bit, forced parity, no parity, do you know if parity is on?<br> Bit sampling - middle of bit, samples per bit.<br> Accuracy with RC - absolute error per end, shared drift (temperature), resonator, crystal internal clock - old one and new.<br> Always more !!!</p> <p>Crystals shatter on high g./ Or just drift and jump.<br> Or shatter.</p> <p>Hot melt glue fails. Always. Always ? Always ! Weeks to months to just maybe years.<br> Acid cure silicone rubber is a no no no no.<br> Thermally or electrically conductive epoxy is filled with X - you can fill it too.</p> <p>Silicone rubber and cornflower say 50-50 to start. Try it, you'll like it.</p> <p>Heating a large pottle of fibreglass resin on a cold morning may make it go off faster but THAT fast ??? !!!!</p> <p>Tin whiskers. </p> <p>If they say ROHS their magic machine will spot your non compliance instantly.</p> <p>Larn to solder. Well.<br> Note that solderability can vary very very greatly.<br> Bad solder is a waste of calories and not worth sharing your life with.<br> ALWAYS clean / abrade a bare board that has sat around a while before soldering - time and stress saved can be monumental.<br> Learn to NOT catch falling soldering irons.<br> Learn to kick falling soldering irons while grabbing their cords, if they have one.<br> Learn not to drop soldering irons.</p> <p>Nd2Fe14B magnets are great fun BUT -<br> They can do you a very serious injury.<br> A good one can take out a wallet of magnetic cards at a single bound. They shatter chip and break with ease.<br> The US process ones are significantly inferior in field strength to the Japanese process ones.<br> Provide up to about 0.5 Tesla across an airgap of about half material thickness.<br> Magnetic field drops as inverse SQUARE of distance from one pole but two poles are always involved so it looks like 1/d^3 at a distance. </p> <p>Much more ... :-) </p>
What do you wish you had known before you started with Microcontrollers?
<p>Here's a circuit diagram for a signal response test circuit from the spec sheet for a HA-5195 op amp and looks like a non-inverting amplifier circuit with a gain of 5, plus the 200Ω resistor between Vout and ground: </p> <p><img src="https://i.stack.imgur.com/bKyZr.png" alt="enter image description here"></p> <p>It's the canonical (I assume?) non-inverting amplifier circuit with R1 = 400Ω and Rf = 1.6kΩ, plus the resistor I'm asking about.</p> <p>Can someone explain the purpose of the 200Ω resistor? </p>
|resistors|operational-amplifier|amplifier|
466
2009-11-15T21:43:52.733
<p>Test specifications always go into great detail describing test conditions and the test environment, otherwise you the test wouldn't be repeatable with the same results. For this case the test spec apparently says load must be 200\$\Omega\$.<br> But since the 1600\$\Omega\$ + 400\$\Omega\$ are parallel to the 200\$\Omega\$, the actual load is 182\$\Omega\$, and it's not likely that this is what they wanted. They simply could have used 160\$\Omega\$ + 40\$\Omega\$ instead of 1600\$\Omega\$ + 400\$\Omega\$, and they would have exactly 200\$\Omega\$ without needing the third resistor. </p> <p>In a test environment this is not so important, but in a design for production the third resistor would be an extra cost.</p>
Why the resistor in this op-amp circuit?
<p>Has anyone had any experiences with laser cutting services in the UK? I've googled but most of the results seem to be for expensive industrial setups. What I'm looking for is someone who can do pretty much what the Pololu service <a href="http://www.pololu.com/catalog/product/749" rel="nofollow">here</a> does but nearer to me to reduce shipping time and costs. </p>
|laser|
484
2009-11-16T12:32:18.903
<p>Have you considered <a href="http://www.razorlab.co.uk/" rel="nofollow">RazorLAB</a>?</p> <p>Also, if you're in London, University of the Arts appears <a href="http://www.csm.arts.ac.uk/37056.htm" rel="nofollow">to make its laser cutter available to external clients for a fee.</a></p> <p>I've not used -- and have no connection to -- either service.</p>
Reasonably priced laser cutting service in the UK?
<p>I'm trying to control a DC (pager) motor with a sound signal so that I can use an audio synthesizer to control the speed of the motor. I'm hoping to modulate the speed of the motor at audio rate (1-200hz). I need to do a few things. </p> <ol> <li>Convert AC -> DC. A rectifier will chop the negative or fold it up, but how can I shift the waveform up, per se? What is the circuit equivalent of f(x)+1? (or will a rectifier be good enough)</li> <li>I could send the rectified signal straight to the motor, but this might be a waste of energy. Two strategies present themselves: <ul> <li>Use a comparator to send only the peaks</li> <li>Use PWM (Frequency -> Pulsewidth)</li> </ul></li> </ol> <p>Which do you think will work better? Can you think of other strategies? Should I implement this with, say, a small AVR chip, or with analog electronics?</p> <p>An additional constraint is that the circuit has to be small. Ideally my motor + battery + circuit would be quarter-sized. </p> <p><em>Any advice would be appreciated.</em></p> <p>(I'll also need to do some lowpass filtering to avoid overwhelming the motors with information they can't respond to. Thoughts on this would be appreciated as well.)</p> <p>I will be using <a href="http://www.solarbotics.com/products/vpm2/" rel="nofollow">this pager motor</a> from Solarbotics possibly in conjunction with <a href="http://www.precisionmicrodrives.com/product_info.php?products_id=172" rel="nofollow">this one</a> from Precision Microdrives, who specialize in <a href="http://www.precisionmicrodrives.com/vibration_motors.php" rel="nofollow">vibration motors</a>. </p>
|frequency-modulation|sound|audio|motor|
489
2009-11-16T19:48:15.433
<p>Are you trying to spin the motor at a rate proportional to the <strong>volume</strong> of the sound, or the <strong>frequency</strong>?</p> <p>The amplitude is easy, just rectify, integrate, and amplify (diode -> cap -> amplifier).<br> Speed proportional to frequency is more involved. <strong>Way</strong> more involved. All I can think of is trying to implement a <a href="http://en.wikipedia.org/wiki/Fft" rel="nofollow">FFT</a> in a micro, and using the FFT's output to control the motor via PWM. This would involve a lot of math, and a micro fast enough to do the calculations.</p>
Controlling DC (Pager) Motor with Audio Signal
<p>I've attempted installation of AVR studio 32 (for AVR32 UC3 development) and it doesn't appear to work.</p> <p>Has anyone here gotten this to work in Vista 64?</p>
|avr|windows|
511
2009-11-17T13:36:47.157
<p>Personally I use a virtual machine running XP...</p> <p>I notice that Dean Camera (a regular over at AVRFreaks) has been playing with getting AVR tools to work on x64 boxes. See this posting on his blog: <a href="http://fourwalledcubicle.com/blog/archives/467" rel="nofollow">http://fourwalledcubicle.com/blog/archives/467</a>. He also mentions that he's recently installed a beta of AVR Studio (<a href="http://www.atmel.no/beta%5Fware" rel="nofollow">http://www.atmel.no/beta_ware</a>) which supports Windows 7 and x64.</p>
Running AVRStudio 32 and JTAGICE MKII on Vista 64
<p>Thinking of building a device for sending text and probably mouse movement into a computer, but I want it to be wireless and compatible with many computers/PDAs/phones without a specialized dongle, etc. So I thought "Hey, Bluetooth is a standard for input devices and lots of computers/PDAs/phones have it built in!" But how to get the data into the Bluetooth on the other end?</p> <ul> <li>I could buy a <a href="http://www.bluepacket.net/BluePacket/solutions/solutions.aspx">Bluetooth</a> <a href="http://www.broadcom.com/products/Bluetooth/Bluetooth-RF-Silicon-and-Software-Solutions/BCM2042">IC</a> and build a PCB for it, but I can't even find a place to buy them in small quantities, or find documentation without being part of a company and signing NDAs, etc.</li> <li>I could learn the very popular Arduino with the <a href="http://www.sparkfun.com/commerce/product%5Finfo.php?products%5Fid=8255">Bluetooth adapter</a>, but this would cost $149.95, which is not what I had in mind, and I don't know if it can even act as a keyboard/mouse.</li> <li>I could buy a cheap USB keyboard and <a href="http://www.flickr.com/photos/56868697@N00/sets/72157602444167525/">take it apart</a>, figure out how the keys map to the data lines, and just stimulate them appropriately. Mouse is not so easy, though.</li> </ul> <p>The last seems like the best, but do you have any other ideas?</p> <p>I do <strong>not</strong> want a generic serial-over-Bluetooth board, unless it can be configured to look like a standard Bluetooth keyboard/mouse at the other end.</p>
|bluetooth|wearable|wireless|keyboard|
514
2009-11-17T17:04:55.840
<p>I would still go for the microcontroller approach. Check Aliexpress or similar, you should be able to get a pretty decent deal (&lt;10 CAD) on some MCU with bluetooth. From there its just figuring out the specific of the Bluetooth driver, or using a premade library, like <a href="https://github.com/T-vK/ESP32-BLE-Mouse" rel="nofollow noreferrer">this</a> for the ESP32</p>
Cheapest, simplest way to implement a Bluetooth keyboard/mouse?
<p>I am designing a circuit that needs to output 5VDC @ 1A. I'm trying to use a wall transformer to step the voltage down to 12VAC. The next step is the diode bridge and ripple capacitor.</p> <p>The ripple voltage equation is:</p> <p>$$V_{ripple} = \frac{I}{2fC}$$</p> <pre><code>I = load current (1A) f = AC frequency (60Hz) C = Filter Capacitor (? uF) </code></pre> <p>If I choose a C of 1000 uF, the ripple voltage is 8.3 V! Do I really need to put more capacitance to lower the ripple voltage? Is there another method of converting AC to DC?</p>
|power-supply|capacitor|voltage-regulator|frequency|rectifier|
515
2009-11-17T18:09:25.687
<p>The thing is that these days switching power supply adapters are such a commodity item that unless you really want to get into the design for learning purposes, just buy one. Digikey has a few that are under $10 in single quantities (<a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=T1038-P5RP-ND">here's one from CUI</a>) and will give you regulated DC output, with high efficiency, complete with all the safety and EMI/RFI certifications. </p>
How to convert AC to DC
<p>has anyone used the arduino to convert text to speech?</p>
|arduino|speech|
527
2009-11-18T02:01:54.657
<p>Just discovered this blog post on LMR. Looks pretty cool. <a href="http://letsmakerobots.com/node/11969" rel="nofollow">SpeakJet</a></p>
Arduino Text to Speech
<p>I need to build a programmable current source from a 8051 microcontroller.</p> <p>It needs an output current from 0 to 10mA maximun. </p> <p>How do i go about doing this? what circuits do i need to build?</p> <p>I was going to do a 20 steps - with 0.5mA so from 0 to 10mA is 20 steps.</p>
|microcontroller|programmer|current|output|
528
2009-11-18T02:40:34.107
<p>One cheap solution is to create a PWM signal, filter it with a RC cell, and then feed it to a voltage-to-current converter. In the simplest case, this can be a transistor with a resistor in the emitter, and the load in the collector. But you can also use an op amp for this. Since you only need a 20-step scale, this may be enough for you.</p> <p>A better but more expensive solution is to connect a DAC to 5 of your digital outputs, and feed the output of the DAC to a voltage-to-current converter as before. I think there are even some DACs which directly control their output current. Since you only need 5-bit resolution, you can even build a R-2R DAC yourself, as described <a href="http://www.ikalogic.com/dac08.php" rel="nofollow">here</a>. </p> <p>In the end, the optimal solution depends on your project's constraints (time? price? size?). </p>
Programmable current source
<p>I have recently purchased a sparkfun protoboard that I wish to stack above an ethernet shield. (I have 2 different ethernet shields, an Arduino one and a seeed studio enc28j60 shield.)</p> <p>The problem I have is that if I use the supplied headers, or even the longer "Arduino Stackable header" then the magjack from the ethernet shield below contacts the protoboard. This happens before adding the components at the front of the board, I suspect that if I solder those in the header won't even make reliable contact.</p> <p>So, I'd like to source some extra long headers, either male-male or male-female would be fine. I did notice that the Arduino ethernet shield has extra long headers - does anyone know where to source those or any other 1.5cm long headers from? </p> <p>It would be awesome if the supplier had a reasonable shipping rate to Australia, but I'll take whatever I can get. :) I have searched farnell without luck so far, but the number of products is a bit bewildering so there is a chance I have overlooked the perfect header.</p>
|arduino|header|sourcing|protoboard|enc28j60|
532
2009-11-18T07:04:31.783
<p>On eBay use search criteria "Arduino 15 mm Headers"... You'll get some 16 entries, very reasonably priced with free shipping... They have 10 piece and 100 piece entries for 10 8 and 6 pin headers... If you're using ICSP, either cut &amp; double, or buy the 2 row 5 piece - 2 x 18 sets, which you will need to slice out 3 pin sets, sacrificing 1 or 2 pins in-between, and be carefull at what height you solder them in, to excatly match the other heights... I also noticed the new ones from Arduino come with printing on the sides... All pins individually identified... GREAT...! Arduino should add some dozen new products... These 15 mm labeled header sets, UNO R3, Due, Tre, Mega, Pi, etc...</p>
Where can I source extra long headers from
<p>I need to make a voltage level shifter. It needs to translate a TTL logic level into a 12&nbsp;V logic level.</p> <p>I have applied the 5&nbsp;V at the base and 12&nbsp;V V<sub>cc</sub> and took the output from the collector (not using any emitter resistor). The output was good, but the current was 0&nbsp;mA when V<sub>cc</sub> was 12&nbsp;V and the phase was shifted.</p> <p>I've tried connecting the load at the emitter and the voltage was just 5&nbsp;V or less.</p> <p>How do I make such a voltage level translator?</p>
|level-shifting|
546
2009-11-18T22:20:17.147
<p>In the question, a single <a href="http://en.wikipedia.org/wiki/Common_emitter" rel="nofollow">common emitter transistor amplifier</a> is described and this inverts the signal. </p> <p>You need two stages. Duplicate your circuit, feed the output of what you have now into another common emitter amplifier. Adjust the bias and increase negative feedback to reduce gain. Usually these things are done with <a href="http://en.wikipedia.org/wiki/Push%E2%80%93pull_output#Digital_circuits" rel="nofollow">totem poles</a>.</p>
Voltage level shifter
<p>What's involved in building your own RFID reader? As you guys would know industrial RFID readers aren't cheap, how do you energise the antenna, then read back the output?</p>
|rfid|antenna|
554
2009-11-19T06:23:33.180
<p>This is a bit old, but in case someone else is reading in 2012. Actually there are then three "types".. Another common one is 134.2 kHz</p> <p>Quoted from above answers: ....before beginning, you have to know that there are mainly two type of RFID Reader:</p> <p>125 khz : antenna of 100 turn coil 13.6 Mhz : antenna of 3-5 turn coil, more sofisticated can include communication protocol and security issues.....</p> <p>Cheers</p>
How do you build your own RFID reader?
<p>I'm working on making a sign that will be outdoors in full sunlight and I want it to have the longest range visibility.</p> <p>This is a project for university and I will probably need 100 LEDs or so - I need the cheapest possible but I really want people to be able to see it from afar!</p>
|led|
562
2009-11-19T21:18:08.270
<p>To be seen from a long distance you have to compromise.</p> <p>Increasing visibility from a single point or a certain direction is possible by reducing the angle of radiation without adding a huge amount of power. The narrower the cone the radiation is confined by the housing of the LED the more power will be directed to the eye of the beholder. This works well if your sign has to be seen from a linear road, i.e. if beholders follow a certain path approaching the sign. </p> <p>Another method to increase visibility without investing lots into high power LEDs is to increase contrast by surrounding all LEDs with dark non-reflective matter like cardboard with black paint.</p> <p>These are methods which do not depend on the progress of LED production in terms of power and efficiency, so I dared to add them to this old question. </p>
LEDs for full daylight
<p>Where can I get a high temperature humidity sensor for temperatures up to 700 or 800 degree Fahrenheit (~ 370 or 425 °C)?</p>
|temperature|humidity|
563
2009-11-19T22:12:07.957
<p>The moisture measurement solutions from MAC INSTRUMENTS, provided in the link below, have range up to 1200<sup>o</sup>F. These might suite your requirement.</p> <p><a href="http://www.macinstruments.com/" rel="nofollow">http://www.macinstruments.com/</a></p>
High Temperature Humidity Sensor
<p>My friend Jules asks:</p> <blockquote> <p>The aim is to get as many servo motor controls as possible - looks like the maximum an Arduino will output is 14?</p> </blockquote> <p><a href="http://arduino.cc/en/Main/ArduinoBoardMega" rel="nofollow"></p> <blockquote> <p>Digital I/O Pins54 (of which 14 provide PWM output)</p> </blockquote> <p></a> I guess then it becomes a software issue to synchronise multiple Mega boards? - ie 14 x 14 array using 14 boards</p>
|arduino|motor|servo|
565
2009-11-19T22:28:24.540
<p>Another approach is to use "digital" servos, such as <a href="http://openservo.com/" rel="nofollow">OpenServo</a>. That way you can drive a dozen or so servos using 2 Arduino pins, and a dozen or so more servos using 2 more pins.</p>
Synchronise multiple Mega boards to run multiple servo motors
<p>I'm anxiously awaiting the delivery of my second set of custom designed PCBs from BatchPCB.</p> <p>The first board I designed was pretty darn simple and didn't have any problems.</p> <p>This second set includes a full on arduino compatible board plus two shields for it. Somehow I suspect I made a mistake somewhere.</p> <p>My question is: what sorts of things have other folks gotten wrong? When I start debugging why that board doesn't work, what kind of things should I be looking for? What are the first things that you check?</p> <p><hr /></p> <p>As it turns out, my boards have two problems. The first is that there's a cap too close to the ISP header. I just didn't allow enough space. The second is that the holes I specified, while large enough for all my normal through-hole components, are too small for breakaway headers to fit into without manually reaming them out a little bit (almost like it's just the thickness of the plating layer that covers the copper). Other than that, everything is good. I very carefully checked all the power connections before doing anything to make sure I wasn't about to short something badly, and held the various boards up to the light and verified alignment of stacking headers.</p>
|arduino|pcb|pcb-fabrication|
576
2009-11-21T01:08:59.770
<p>Make sure all the mounting holes are in the correct location. Also check all the components that need to poke through the enclosure such as LEDs and switches and connectors are in the correct location.</p>
Custom PCBs... what can go wrong?
<p>I am building a distance sensor..I have the ucontroller portion done. I was going to use IR to reflect a beam and get a proportional analog voltage to estimate distance but...it has no range</p> <p>Any ideas/methods? </p>
|voltage|sensor|infrared|
581
2009-11-21T04:18:47.013
<p>I think a key to this kind of thing is to modulate the IR. Then in the detector have a lot of gain in the band you used to modulate the signal. This lets you extend the range without picking up a lot of other light noise. Reflection can depend a lot on the surface you are reflecting from so distance is still uncertain. Using time of flight is a different method, but to measure 30 cm involves measureing down to 1 nano second with light, easier to apply to sound. There is also triangulation using light, do not know any simple, reliable systems using this. Unless you are really into buiding your own I would consider buying one, perhaps as the earlier suggestion.</p>
Distance sensor IR
<p>Can anyone point me to a tutorial for electronic noobs that explains how to use op-amps and what I can do with them, besides amplification?</p>
|operational-amplifier|tutorial|
592
2009-11-21T20:01:19.477
<p>The "IC Opamp Cookbook" paperback was ~THE~ standard for hobbyist electronics back in the 80s. Still a good reference. </p>
Op-amp tutorial for electronic noobs?
<p>"The MAX6960–MAX6963 are compact cathode-row display drivers" What does cathode-row mean?</p>
|led|display|
597
2009-11-22T08:35:13.680
<p>An 8-row by 16-column, cathode-row driver will at any given time drive exactly one of the 8 row wires low, while driving a program-selectable subset (none, some, or all) of the column drivers high. An anode-row driver would drive one of eight wires high, while driving selected columns low.</p>
What does 'cathode-row' mean?
<p>I have an old CD-burner (HP 9100 plus) where I would like to control the BLDC motor from.</p> <p>My idea is to use the original IC of the burner as the driver and use an ATtiny13 for controlling it. There are however some problems. </p> <p>I found out that the IC is similar to the LB11699H <a href="http://www.alldatasheet.com/datasheet-pdf/pdf/267193/SANYO/LB11699H.html" rel="noreferrer">datasheet</a>, only lower model.</p> <p>When I hook the CD-burner up to the power the motor spins up and down by itself a couple of times and then stops. I disconnected the cable to the laser head for safety. During the time the motor spins I can make it stop and spin a bit faster by changing pins 1 and 2, but when the motor is stopped by the on-board circuit, I can do nothing... I don't get the motor spinning. What is going wrong?</p> <p>Also I need to have an analog signal between 0 and 2 volt to control the IC. Can this signal be generated with a smoothed PWM from ATtiny13 or do I need to use something else? Perhaps two batteries with voltage dividers and transistor connect to ATtiny13 pins? How do I do this?</p> <p>Could someone help me out here? :D</p>
|avr|analog|microcontroller|
599
2009-11-22T16:07:04.200
<p>(I really have no experience with this particular application, so this is a bit of a shot in the dark - hopefully it'll give you some ideas)</p> <p>How thoroughly have you separated this from the rest of the drive circuitry? From the part where you say you disconnected the wires from the laser head, it sounds like it's still in the drive. If so, you're probably fighting against the automatic drive startup behaviour where it spins up and checks to see if there's a disk before shutting down.</p> <p>At the very least, check to see if something is happening on pin 7 (BRAKE). It looks like that pin going high will brake the motor. You want it to be low the whole time. If you can see it transition low to high right when the motor stops, you've got your culprit :) If that doesn't seem to be it, try checking the other pins on the controller to see if one of them does it (they might have changed the pinout between chip versions).</p> <p>As for how to get your 0 - 2V level, smoothing a PWM output is pretty tricky and the exact capacitance needed varies based on how much current is being drawn. If you don't need to vary the voltage, I'd do a voltage divider. If you do need to vary it, but can live with discrete steps I'd look at doing several voltage dividers, either on multiple pins of the Attiny, or attached to something like a ripple counter where you could select which output pin is ON and thus control which one of several resistors is used as the top half of the voltage divider.</p> <p>Good luck on this project. Salvaging parts can be tricky. I've got immense respect for the folks who pull it off.</p>
Hacking/Controlling BLDC from CD-burner
<p>I was wondering if there was a single IC like the MAX6960 that could control a whole 8x8 RGB LED Matrix because the MAX6960 can only control a RGY.</p>
|rgb|led|
605
2009-11-23T11:06:04.533
<p>You can use 8 of the TLC5947.</p> <p><a href="http://focus.ti.com/lit/ds/symlink/tlc5947.pdf" rel="nofollow">http://focus.ti.com/lit/ds/symlink/tlc5947.pdf</a></p> <p>TLC5947 is 24 channels of PWM controlled by shifting in 12 bits of brightness data for each channel. This would give you would give you a nearly continuous spectrum of color for each LED (3 channels per LED -> 8 LEDs per 24-channel IC).</p> <p>The 8 of them could be controlled in series (look at the example on page 1 of the datasheet), so you can essentially treat them as if they are a single IC with 192 registers each of 12 bits. Though note that this will divide your refresh rate by 8, given any particular clock speed.</p>
Is there a single IC that can control a 8x8 RGB LED Matrix
<p>What are the advantages of stranded vs solid wire?</p> <p>what should i be using for prototyping circuits?</p>
|wire|prototyping|
621
2009-11-23T23:23:49.390
<p>For prototyping, solid is easier to push into breadboards, through PCB holes, etc.</p> <p>For real-life it's a combination of all the issues in all the other answers, each type has advantages &amp; drawbacks.</p> <p>Solid is used extensively for telecomms, where it gets installed/laid once &amp; left and either wire-wrapped, soldered, or punched into an IDC terminal.</p> <p>Solid is also used for fixed mains wiring; the ring main in your house wall, inside conduit in factories / offices etc.</p> <p>Stranded is used anywhere there is movement or vibration; Cars, aircraft, the mains flex to household appliances, etc. as solid wire of any significant size does not enjoy being flexed very much and will fracture/fatigue, usually at a joint or connector.</p> <p>In real-life applications you do need to be aware of the suitability of termination/connection methods and the fact that different connectors and processes (EG soldering, wrapping) work differently with each type &amp; are sometimes unsuitable. For example, IDC terminals are usually designed for a specific type of solid-core wire, and may fail with other sizes or with multi-strand. Conversely, crimp terminals may not grip a single-core wire or cable but will work excellently with multi-strand.</p> <p>Likewise soldering, solder can wick up the strands of a multi-strand wire and make it behave like a solid-core (I.E it becomes inflexible &amp; can snap).</p> <p>Often this stuff doesn't matter too much for hobby use, but can catch you out when exposed to the big bad world.</p>
Stranded vs solid wire
<p>So I've been reading a few threads here and on other forums. I understand there are various solutions for stepping down or up a voltage. What I have found are the LVC series shift regs that give a constant ouput, <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en531457" rel="noreferrer">MCP1825</a> which will step down 5 to 3.3 (and other versions which have different increments) the 74LCX245 which will step 2.5 or 3.3 to 5v and perhaps some others I am forgetting. Then there are ready made boards such as the <a href="http://www.sparkfun.com/commerce/product%5Finfo.php?products%5Fid=8745" rel="noreferrer">Sparkfun converters</a> or this <a href="http://www.futurlec.com/Mini%5FLogic.shtml" rel="noreferrer">8 pin to 8 pin converter</a>. But all of these are one direction only, or bi-direction switched by a jumper.</p> <p>How would I convert voltages down or up in both directions without requiring a pin select. </p> <p>5--3.3</p> <p>5--2.5</p> <p>5--1.8</p> <p>thanks</p>
|voltage|stepper-motor|
622
2009-11-23T23:30:15.870
<p>You're working with an I2C bus, right? I'm going to call the lines on the 3.3&nbsp;V side <em>SDA3</em> and <em>SCL3</em>; the two lines on the 5.0&nbsp;V side <em>SDA5</em> and <em>SCL5</em>.</p> <p><strong>"<a href="http://en.wikipedia.org/wiki/MOSFET" rel="nofollow">MOSFET</a> and two resistors"</strong></p> <p>As todbot and cyphunk already pointed out, the "MOSFET and two resistors" circuit described in the <a href="http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=65" rel="nofollow">SparkFun "sensor interfacing" tutorial</a> does what you want: The logical data flow is symmetric -- data flows in both directions on the SDA lines, from the low side to the high side and, milliseconds later, from the high side to the low side.</p> <p>The "will not work the other direction" note points out the circuit is physically asymmetric: your 5.0&nbsp;V I²C device must be connected to the "high side", your 3.3&nbsp;V device must be connected to the "low side". Because the circuit is physically asymmetric, it's certainly not obvious that it is logically symmetric. (That tutorial links to a AN97055 application note that shows a "two MOSFETs and two resistors" circuit that is physically symmetric, and therefore is obviously logically symmetric).</p> <p>The lines labeled "TX" on the <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8745" rel="nofollow">SparkFun converters</a> -- that the original poster pointed out -- implement that "MOSFET and two resistors" bidirectional circuit. So connect SDA3 to TX_LV, SDA5 to TX_HV, SCL3 to TX2_LV, and SCL5 to TX2_HV.</p> <p>Then data flows in both directions: When your low-side device drives the SDA3 and SCL3 pins, the appropriate voltages are seen on the high-side SDA5 and SCL5 pins. Milliseconds later, when the high-side device drives the SDA5 and SCL5 pins, the appropriate voltages are seen on the SDA3 and SCL3 pins.</p> <p>(Inconsistently, the lines labeled "RX" on that converter board will only transmit data in the high-voltage to low-voltage direction.)</p> <p><strong>Bi-directional optoisolator</strong></p> <p>Since you are using I²C, you might also be interested in a <a href="http://david.carybros.com/html/schematic.html#isolator" rel="nofollow">bi-directional optoisolator for I²C</a>. The two-optoisolator circuit is more expensive and slower than the "MOSFET and two resistors" circuit, but it works when one side has signals that swing between 0&nbsp;V and 5.0&nbsp;V, and the other side has signals that swing between 500.0&nbsp;V and 505.0&nbsp;V.</p> <p>The two-optoisolator circuit is also completely physically symmetric -- and therefore logically symmetric -- it doesn't matter which side is the high side and which side is the low side.</p>
Bi-Directional Step up and Step down (3.3v <-> 5, etc)
<p>I'm looking to start a few different projects and stock up on some basic components - I was just wondering if anyone knows a good supplier of DC motors, stepper motors and servos?</p> <p>I'm in vicinity of Sydney in Australia, so big pats on the back if they ship here. Thanks!</p>
|motor|stepper-motor|servo|sourcing|
627
2009-11-24T00:00:23.110
<p>Even though they are in Victoria, you might consider <a href="http://www.oceancontrols.com.au" rel="nofollow">http://www.oceancontrols.com.au</a>. They have a few types of motors including some interesting stepper motors.</p>
Good motor supplier?
<p>I do a lot of firmware work at my job, but I'm looking for more advanced books on the topic. Things not like the basics of "what is an interrupt". I'm reading the O'Reilly book on embedded systems development which is OK, but not advanced enough. For instance, its rare for books to discuss things like Flash pages (which can be really useful), how to put a section of code in a specific area of memory.</p> <p>Perhaps something with some tips and tricks. I do primarily PIC programming.</p>
|pic|microcontroller|books|development|
632
2009-11-24T02:19:50.567
<p>For ARM chips I have learned a lot from: <a href="http://rads.stackoverflow.com/amzn/click/0201675196" rel="nofollow">ARM System-on-chip architecture</a> by Steve Furber</p> <p>It is a well-written book with a lot of technical background and will probably be useful even if you work on other architectures.</p> <p>I had a PIC32 book which is ok and focuses on PIC: <a href="http://rads.stackoverflow.com/amzn/click/0750687096" rel="nofollow">Programming 32 bit Microcontrollers in C</a></p>
Good book for non-beginner firmware development
<p>I am trying to minimize interference in a sensor project. Can anyone recommend a good shielded wire I can solder into my board?</p>
|sensor|wire|interference|shielding|soldering|
639
2009-11-24T06:41:53.750
<p>Simple twisted pair (with no shielding) might be all you need. The twists in the wire make noise common to both wires be out of phase with each other and thus cancel each other out.</p>
Wire to use with Sensors
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
0
Edit dataset card