summaryrefslogtreecommitdiff
path: root/digital/asserv/doc
diff options
context:
space:
mode:
authorNicolas Schodet2007-08-06 10:52:58 +0200
committerNicolas Schodet2007-08-06 10:52:58 +0200
commit376828cba34f417d2df04878c8ef7fcd87303b66 (patch)
tree829c2bd9f0666ca514f354ea968521b461b207d3 /digital/asserv/doc
parent597eb3821de45a02fe5820266dbc87069162211a (diff)
Added encoder computations to choose between different decoding solutions.
Diffstat (limited to 'digital/asserv/doc')
-rw-r--r--digital/asserv/doc/encoders.m31
1 files changed, 31 insertions, 0 deletions
diff --git a/digital/asserv/doc/encoders.m b/digital/asserv/doc/encoders.m
new file mode 100644
index 00000000..03b287a0
--- /dev/null
+++ b/digital/asserv/doc/encoders.m
@@ -0,0 +1,31 @@
+disp ('max encoder freq (Hz), from datasheet');
+f_max = 100000
+disp ('pulse per revolution');
+n = 500
+disp ('max angular speed (tr/s)');
+f_max/n
+disp ('max angular speed (tr/min)');
+f_max/n * 60
+
+disp ('one state length (deg)');
+phy_deg = [90-15, 90+15]
+disp ('one state length at max freq (s)');
+phy = 1/f_max * (phy_deg / 360)
+disp ('minimum state length (s)');
+min_phy = min (phy)
+
+disp ('');
+
+disp ('AVR freq (Hz)');
+avr_f = 16000000
+disp ('AVR instructions per cycle');
+avr_instr = [32, 22]
+disp ('AVR cycle length (s)');
+avr_cycle = avr_instr / avr_f
+
+disp ('');
+
+disp ('CPLD cycles needed for correct detection with an input filter');
+cpld_cy = 5
+disp ('CPLD needed frequency (Hz)');
+cpld_f = cpld_cy / min_phy