Stopwatch accuracy question


i created stopwatch using , arduino uno, lcd display, start button, , reset button. code uses millis() function current number of milliseconds, little math, , displays minutes:seconds:hundredths. when arduino plugged usb port on computer, accuracy (when checked racing stopwatch) accurate. when plug 9v battery arduino, homemade stopwatch accurate.

so... wanted make more permanent. built standalone arduino using atmega328, 20 mhz quart crystal, 9v-to-5v step-up/step-down regulator pololu, , foot switch start/stop stopwatch (this why built homemade stopwatch begin -- foot switch operated stopwatch). soldered board. standalone stopwatch runs faster should. example, when racing stopwatch says 20 seconds, homemade stopwatch says 25 seconds.

does have ideas why homemade stopwatch running fast? ideas how can fix it?

thanks!

quote
does have ideas why homemade stopwatch running fast? ideas how can fix it?


an arduino clocked 16mhz. if built custom board 20mhz clock , compile sketches standard arduino settings complete timing wrong.

you can add entry in boards.txt change clock setting 20mhz, compile again board chosen , clock more accurate uno because you're using crystal instead of uno's ceramic resonator.


Arduino Forum > Using Arduino > Project Guidance > Stopwatch accuracy question


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support