Pages: [1] 2 3   Go Down
Author Topic: Poor clock accuracy of UNO  (Read 4180 times)
0 Members and 1 Guest are viewing this topic.
Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anybody know why the UNO board uses a ceramic resonator rather than a "proper" crystal?

The price of the components is virtually the same, and the difference in complexity is negligible.  The accuracy of the resonator is poor (>0.5%), meaning the UNO cannot be used for any kind of timekeeping smiley-neutral.  A crystal of the type used by the USO's own USB interface has an accuracy of ~30ppm, or a few seconds per day -- not brilliant, but enough for a lot of things.
Logged

Humboldt, CA
Offline Offline
Full Member
***
Karma: 2
Posts: 221
Arduino BBB
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One part with three pads is significantly simpler than three parts each with two pads.
It seems to me that there aren't that many applications that are going to run for long enough for +/- 0.25% to be a problem but not long enough for the crystal's error to be a problem.  That's what RTC modules are for, after all.


I, of course, am simply guessing.
They do sell a lot of boards though, if they can save $0.50 per board that adds up over the course of 10,000 boards.
Logged

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if you take a closer look at the board you can see that around the resonator there are 2 holes and above another 2 spaces for 2 smd capacitors from the looks of it they are 0603 case pretty easy to find so you just need to remove the resonator and the 1M resistor and replace it with a high quality crystal and capacitors
Logged


Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mmm, but there are 45 components on an UNO board.  I don't see that soldering 2 extra capacitors has a significant cost.  Replacing the resonator with a crystal would actually reduce the number of different components the pick-and-place machines need to be loaded with.

A crystal would be >100x times more accurate than the resonator, keeping time to within a quarter of an hour over a year.  For home automation tasks that's pretty much good enough.  After a year my UNO would be out of whack by more than a day.

I noticed that in pictures of the UNO board there are spare solder pads around the resonator, but on the four I have here on my desk those solder pads are not present.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16499
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
A crystal would be >100x times more accurate than the resonator, keeping time to within a quarter of an hour over a year.  For home automation tasks that's pretty much good enough.  After a year my UNO would be out of whack by more than a day.

While I certainly agree that a crystal is more accurate then a ceramic resonator, that does not mean the accuracy of the clock frequency will be totally dependent on the crystals stated frequency +/- it's worst case PPM specs. The actual frequency that the crystal will oscillate at is also dependent on the accuracy of the padding capacitors, and several postings have shown long term accuracy of a crystal controlled arduino can be worst then the crystals specification because of that.

The very first release of the Uno board did have a crystal installed on the 328p chip, but seemed to later change to the ceramic resonator. Me, I avoided buying a Uno on first release mostly because of the several bugs in the bootloader and 8u2 firmware, and so far have had no reason to purchase one even though most problems with the Uno have seemed to have been addressed.

Lefty
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 63
Posts: 6049
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The accuracy of the resonator is poor (>0.5%), meaning the UNO cannot be used for any kind of timekeeping
Disagree.  The Arduino appeals to a HUGE variety of applications.  If you need pinpoint accuracy for timekeeping, wouldn't you tend to use external circuitry anyway?  The great thing about the Arduino is that if I am just flashing LEDs or logging data, I can use it.  If the "time keeping" isn't good enough for either, I can add additional circuitry.

Quote
A crystal would be >100x times more accurate than the resonator
Do you have any data to back this up?!?!  I'd love to show this in some of the work I am doing.

Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16499
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If long term time accuracy is an important part of a specific applications, then it deserves a proper solution, like a RTC. I like this +/-2PPM module: http://www.sparkfun.com/products/10160
Besides who likes having to reset the starting time on their arduino everytime they have to power off or reset to upload, etc.


Lefty
Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Me, I avoided buying a Uno on first release [...] and so far have had no reason to purchase one

If long term time accuracy is an important part of a specific applications, then it deserves a proper solution, like a RTC.

Spoken like a true engineer.  Me, I'm just a poor hobbyist and generally happy with improper solutions. smiley

Do you have any data to back this up?!?!  I'd love to show this in some of the work I am doing.

The UNO board I tested showed a timing error of 1% over 1 minute, and 0.2% over 1 hour.  I've ordered a Freetronics "Eleven" board, which is identical to the UNO except for having a crystal oscillator and a few other minor modifications.  I'll report here on what I find.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Strange, my Uno (purchased 3 weeks ago from Farnell in the UK) does use a crystal.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31369
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes but they probably bought one of the first batches and still have them in stock. My UNO also has a crystal and I dislike resonators for the same reason. However I usually end up making the arduino on strip board for most of my finished projects and I always use crystals.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16499
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Strange, my Uno (purchased 3 weeks ago from Farnell in the UK) does use a crystal.

Yes, the present board PCB layout allows them to install either. It might depend on what their parts inventory situation is at any specific time, or perhaps you got a older revision board even though bought recently?
The board rev number should be printed somewhere on it.


Lefty
Logged

0
Offline Offline
Shannon Member
****
Karma: 160
Posts: 10416
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One part with three pads is significantly simpler than three parts each with two pads.
It seems to me that there aren't that many applications that are going to run for long enough for +/- 0.25% to be a problem but not long enough for the crystal's error to be a problem.  That's what RTC modules are for, after all.


I, of course, am simply guessing.
They do sell a lot of boards though, if they can save $0.50 per board that adds up over the course of 10,000 boards.

I can think of various applications where an RTC isn't useful but accurate timekeeping is (frequency meter for one, time-muliplexed wireless mesh nodes, electronic tuning-fork or guitar tuner, strobe light trigger and most obviously electronic stop-watch...).

The irony with the Uno is that the 16MHz crystal on the 8U2 could drive the 328 or vice versa - which would be even fewer components.
Logged

[ I won't respond to messages, use the forum please ]

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The board rev number should be printed somewhere on it.

It says "Board model UNO R2".
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mine says R2 also, which I got from a workshop a few weeks ago. It has a 3-pin resonator and a 105 resistor between the two far pins.
I've heard of a term "crystal oven" to stabilize crystal oscillation frequency by stabilizing temperature. If you really want long-term accuracy on crystals, you should have that. Plus, suspending the crystal inside of vacuum may be a good idea too, to prevent it from catching any dust that reduces frequency smiley-wink

BTW, I don't have need for UNO either but it was from the workshop I paid for. It uploads faster than Duemilanove. I wonder if I can use their boot loader on a Duemilanove. smiley-roll
Logged


Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16499
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I wonder if I can use their boot loader on a Duemilanove.

Yes you can. You will however have to remember to select Uno as the board type after you do that. That is how the IDE knows what baudrate to use to talk to the bootloader for a upload operation.

Lefty

Logged

Pages: [1] 2 3   Go Up
Jump to: