Show Posts
Pages: 1 ... 24 25 [26] 27 28 ... 33
376  Using Arduino / Installation & Troubleshooting / Re: Upload Timeout Error on Mega 2560 - Not Sure What Changed on: March 22, 2012, 10:36:48 pm
I have the same problem.  I have a new Mega R3.  I tried both Arduino 0022 and 1.0 on my Mac OSX 10.6.8.  Sometime my sketch will upload fine, but most of the time it times out.  Doing some Google searches, I found this seems to be a known problem, but I'm not sure how to fix it.  I've seen some talk about avrdude, but I don't know anything about fixing, compiling and uploading a boot loader.  Since this problem seems to be kind of old and my hardware and software are new, I'm surprised this problem still exists.  What should I do?
377  Using Arduino / Sensors / Re: Thermocouple and AD8495 on: February 08, 2012, 11:29:32 pm
For the resistors and capacitors on the thermocouple inputs, I used the values shown in the schematic below.  For +5V I used what is shown in the data sheet: 0.1uF and 10uF.

378  Using Arduino / Sensors / Re: Thermocouple and AD8495 on: February 08, 2012, 11:10:42 pm
Did you implement the input filter and bypass capacitors as shown in Figure 33 of the datasheet?

http://www.analog.com/static/imported-files/data_sheets/AD8494_8495_8496_8497.pdf

No, not initially.  But I just did it now and it didn't improve things.  Now the ADC value is 4 and once in a while it jumps up to a bit, anywhere 15 - 22, for a second or less.
379  Using Arduino / Sensors / Thermocouple and AD8495 on: February 08, 2012, 08:06:42 pm
I'm trying to measure temperature with a thermocouple (k-type) and Analog Devices AD8495 thermocouple amplifier. The AD8495 outputs 5 mV/°C. I  have the AD8495 wired like this:

Pin 1: Thermocouple -
Pin 8: Thermocouple +
Pin 2 & 3: GND
Pin 5 & 6: Arduino input A0
Pin 7: +5v

I have a simple sketch where I read A0, print the value, wait 250ms and repeat.

The A0 input value is not very stable, they range from about 30 to 60.  This correspond temps in the 30s and 40s F.  Actual temperature is high 60F. And the temp in the room is not changing.  I don't understand why the temp in my sketch is changing so much.

Does anyone have experience with the AD8495?  Any suggestion for getting this to work better.

AD8495 info: http://www.analog.com/en/mems-sensors/analog-temperature-sensors/ad8495/products/product.html


380  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 07, 2012, 05:30:55 pm
Thanks for the suggestion.  Just so I'm clear, you're suggesting I connect the sponge between pins 3 and 4 of your diagram, right?

I looked on Digi-key for Rail-to-Rail op amps. This one looked like a good match (MCP6004):
http://search.digikey.com/us/en/products/MCP6004-I%2FP/MCP6004-I%2FP-ND/523060
I don't know much about op amps, but I narrowed it down to rail-to-rail output, through-hole, 4-circuit.  This one was the cheapest - only 48 cents.

I did a Google search on rail-to-rail op amps to understand what they are.  From what I found it means you can get the output voltage very close to the input voltage, does that sound accurate?
381  Using Arduino / Project Guidance / Re: Ethernet Voltage Meter? on: February 07, 2012, 04:35:45 pm
I suggest sending your data to Pachube.com and let them do the graphing.  There's an iphone app called Hubcape where you can see the data you're sending to Pachube.  There's a lots of code examples showing how to use an Arduino and Ethernet shield to send the data to pachube.

Here's a link to a guy with a wind farm who sends data to Pachube: http://code.google.com/p/arduwind/
382  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 07, 2012, 04:30:49 pm
When the sponge is dry, it's reads as an open circuit with my multimeter.  When wet the resistance is around 100kΩ.
383  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 07, 2012, 04:11:21 pm
Just analogue signals, it is caused by the high impedance signal having to charge the sample and hold capacitor. You would not run digital signals with such high resistances because they would not work.


The setup I described for the analog pins also applies to a few digital pins:

GND -----\/\/\/\----- (Digital Input) ---/\/\/\/----- +5v
      100KΩ (sponge)                     1MΩ

Will this setup not work because of the 1MΩ resistance?  I didn't mention it before because it seems to be working okay - but I've only done a little desktop testing.

Also, if I configure the analog inputs as a digital inputs, will the input behave as the other digital inputs or will it behave like the analog inputs - with respect to this issue of charging the sample and hold capacitor.

Thanks again for your feedback.  It's a big help in my understanding of how these inputs work.

384  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 07, 2012, 02:27:37 pm
...You don't need any delays, you just need to read each input twice. The first read switches the MUX to this input and takes a sample (which we expect to be inaccurate because the MUX hasn't had time to settle). The second reading of the same input gives you the accurate answer because now the MUX has had much longer to settle.

The settling time could be reduced by reducing the resistances, but without changing them just reading each input twice would work just as well.

Does this need to read the input twice apply to the digital inputs, or just analog inputs?
385  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 07, 2012, 07:56:28 am
Do I need to use pinmode() to configure them like you do with digital pins?
386  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 06, 2012, 09:12:54 pm
Thanks for the info.
387  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 06, 2012, 07:13:33 pm
All the answers in this thread have explained the problem. If you read and understand any of them they will explain why this fix works.

You don't need any delays, you just need to read each input twice. The first read switches the MUX to this input and takes a sample (which we expect to be inaccurate because the MUX hasn't had time to settle). The second reading of the same input gives you the accurate answer because now the MUX has had much longer to settle.

The settling time could be reduced by reducing the resistances, but without changing them just reading each input twice would work just as well.

Great. Thanks for your help!
388  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 06, 2012, 07:11:52 pm
This is from section 26.6.1 of the ATmega datasheet:
Quote
...The ADC is optimized for analog signals with an output impedance of approximately 10kΩ or less....

So with the 100k sponge, you probably need an op-amp as a buffer.  (An op-amp has an effective output impedance of approximately zero ohms... But, don't try to drive a very-low impedance load with it because if you exceed it's current limit you can fry it. smiley-grin )



Can you tell me how I would properly wire the op amp?  Originally I wanted to just do this on the digital I/O, but I didn't have enough available.  Is the digital I/O also optimized for 10kΩ or less?
389  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 06, 2012, 07:05:54 pm
Here's what I'm doing now for a test.   1M between input and +5v for A0 and A1.  100k between gnd and A0.

Read A0
1 second delay
Print A0
Read A0
1 second delay
Print A0

Read A1
1 second delay
Print A1
Read A1
1 second delay
Print A1

When I do this the first two A0 values are fine, like always.  The first time I read A1, it's around 750, but the 2nd time I read it, it's back up to 1023, where it should be.  So the delay fixes the problem.  Can you explain what's going on.  
390  Using Arduino / Project Guidance / Re: Analog input affected by it's neighbor on: February 06, 2012, 06:54:13 pm
I print the values of the input to the serial monitor every second.  The behavior I mentioned persists, it's not just exhibited initially.  I tried a 100mS delay between reads, that didn't help.  Even a 2 second delay between reads doesn't help.

I tried it with a pair 100k and 10k instead of 1M and 100k and I don't have the problem.  The neighboring input isn't affected with the 100k/10k combo.
Pages: 1 ... 24 25 [26] 27 28 ... 33