Pages: 1 [2]   Go Down
Author Topic: ATtiny 85 to trigger Canon camera using IR LEDs and laser tripwire  (Read 3717 times)
0 Members and 1 Guest are viewing this topic.
Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1073
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just tried another attiny85 and got these result:

That should give the same error (in opposit direction)  at (1503-1500)/1500 = +0,2 %


Code:
13     B1    Finished   This         48  1493   35  3   4479   7465     49  1503   10  3   4506   7510     50  1510   48  3   4529   7548

Copy-and-paste the following line of code at the top of setup...

  OSCCAL = 0xB1;

--------------------------------------------------
                                     Left                               This                               Right
                                     -------------------------------    -------------------------------    -------------------------------
Step  OSCCAL  State      Position    Cal   9bt  Err  #   C9bt   CClk    Cal   9bt  Err  #   C9bt   CClk    Cal   9bt  Err  #   C9bt   CClk
----  ------  ---------  --------    ---  ----  ---  -  -----  -----    ---  ----  ---  -  -----  -----    ---  ----  ---  -  -----  -----
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12929
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Excellent!

Because there are only 128 steps in the OSCCAL value 1, in the worst case, you call not be able to get better than 1/128*100 = 0.78% 2.  The goal is ±1%.  Anything better than that is just good luck.


1 Tiny Tuner 2 uses the full range; 256 values.
2 The actual value is a bit lower because the relationship between OSCCAL and the frequency is not linear.
« Last Edit: October 22, 2012, 01:45:41 pm by Coding Badly » Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1073
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thankyou for the explanation Coding Badly.

BTW as an experiment I tried using 3V in room temperature - and 3V and low temperature (I put the Attiny85 in the freezer), but that didn't change much
3V ->1501
3V low temp. -> 1499
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12929
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


That has been my experience as well.

I built a three-minute timer for my wife that runs directly from two AA batteries using the internal oscillator (ATtiny13).  Over the entire voltage range (3.2 V to 1.6V) there is less than a two second difference (2/(3*60)*100 = 1.1%).

This should give you a rough idea of what Atmel guarantees...
http://arduino.cc/forum/index.php/topic,125673.msg945182.html#msg945182
Logged

Pages: 1 [2]   Go Up
Jump to: