Go Down

Topic: Capacitance measurement - analog sampling rate (Read 2 times) previous topic - next topic



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:

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?


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


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


you can post  your improved code here too if you want ...
Rob Tillaart

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

Go Up

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

shortcuts: alt+s submit/post or alt+p preview