Pages: [1]   Go Down
Author Topic: Capacitance measurement - analog sampling rate  (Read 2435 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See:
http://playground.arduino.cc/Main/CapacitanceMeasurement

The sketch seems 'broken' when I run it on Arduino 1.0.1 (or 1.0.3) and a Uno type board with ATmega328. It relies on a method given in forum postings in 2008 to speed up the analog sample rate:
http://arduino.cc/forum/index.php/topic,6549.0.html

It seems the method used in the sketch for changing the analog sampling rate from 128 to 16 does not work or is being subsequently changed back to 256. The example given (using 56pF capacitor) does 10 samples then calculates capacitance. When I run it with a 56pF capacitor it does 3 samples before the capacitor is discharged.

Is there an alternative method of speeding up the analog sampling rate?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Done further experimenting. Changing the pre-scale to 16 does work, so there must be other factors at play. More experimenting needed!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have now got things going and have referred some issues to writer of the sketch.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13478
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you can post  your improved code here too if you want ...
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: