WEBVTT

1
00:00:00.700 --> 00:00:02.180
♪ Circles and angles ♪

2
00:00:02.180 --> 00:00:04.020
Hello.
Today we're showing

3
00:00:04.020 --> 00:00:08.170
typical interfaces from
NVE's "AAT" angle sensors.

4
00:00:08.170 --> 00:00:10.920
to simple microcontrollers.

5
00:00:10.920 --> 00:00:15.600
We have two demos:
a simple 3-digit interface;

6
00:00:15.600 --> 00:00:21.220
and a more precise 4-digit demo.

7
00:00:22.840 --> 00:00:29.619
We use a radial magnet,
and there's an AAT angle sensor on this board.

8
00:00:29.619 --> 00:00:32.040
The sensor outputs
follow the sine and cosine

9
00:00:32.040 --> 00:00:33.989
of the magnet angle.

10
00:00:33.989 --> 00:00:38.840
There are several AAT Sensor versions
with different resistances.

11
00:00:38.840 --> 00:00:45.359
The AAT003 has 40 kilohm elements,
for a 20 kilohm output impedance,

12
00:00:45.359 --> 00:00:52.299
which is ideal for direct interface to
the analog inputs of simple microcontrollers.

13
00:00:52.300 --> 00:00:57.600
We're interfacing to an Atmel MEGA328
on an Arduino board.

14
00:00:57.600 --> 00:01:03.100
The first example is a 3-digit readout
for one degree resolution.

15
00:01:03.100 --> 00:01:07.560
We have an analog output from the micro,
connected to an inexpensive panel meter

16
00:01:07.570 --> 00:01:13.410
through a single-ended scaling voltage divider.

17
00:01:13.410 --> 00:01:17.260
The program uses the microcontroller's
built-in 16-bit timer/counter

18
00:01:17.260 --> 00:01:22.060
to produce a pulse-width modulated analog
output.

19
00:01:22.060 --> 00:01:31.540
This program uses a simple 10-bit PWM library,
which is fine for one-degree resolution.

20
00:01:31.540 --> 00:01:36.460
We initialize the PWM timer.
The main program is only one line,

21
00:01:36.460 --> 00:01:43.280
where we read two sensor outputs;
calculate the angle using a two-variable arctangent;

22
00:01:43.280 --> 00:01:46.820
we assume the outputs
are centered around half the supply;

23
00:01:46.820 --> 00:01:50.240
and we normalize the output
for five volts full scale,

24
00:01:50.240 --> 00:01:55.140
or 0.1 millivolts per degree
after the voltage divider.

25
00:01:55.140 --> 00:02:38.060
So here's the three-digit
interface in operation.

26
00:02:38.060 --> 00:02:42.590
Now let's look at a tenth of a degree resolution.
Since these inexpensive meters

27
00:02:42.590 --> 00:02:47.319
don't have a full four digits,
we'll run plus or minus 180 degrees

28
00:02:47.319 --> 00:02:51.590
to resolve a tenth of a degree
with a three-and-a-half digit readout.

29
00:02:51.590 --> 00:02:55.680
So the meter is set up in differential mode,
and the voltage divider is set for

30
00:02:55.680 --> 00:02:57.900
one millivolt per degree.

31
00:02:59.480 --> 00:03:04.640
Here are the meter connections--
just some jumpers and resistors.

32
00:03:04.640 --> 00:03:09.360
The input A-to-D's
of these basic micros are only 10 bits.

33
00:03:09.360 --> 00:03:14.520
Of course we could add a preamplifier,
but that increases cost and complexity.

34
00:03:14.520 --> 00:03:16.560
The AAT's large signal--

35
00:03:16.560 --> 00:03:20.380
typically one volt peak-to-peak,
with a five-volt supply--

36
00:03:20.380 --> 00:03:24.980
is enough for sub-degree precision
without amplification.

37
00:03:25.520 --> 00:03:31.200
We pick up resolution by using both the
sine and cosine outputs in the calculation.

38
00:03:31.200 --> 00:03:35.400
Also, we're averaging several
sensor measurements for each angle calculation

39
00:03:35.400 --> 00:03:38.960
to increase the effective resolution.

40
00:03:38.960 --> 00:03:42.880
For the output side,
this library routine takes full advantage

41
00:03:42.880 --> 00:03:46.020
of the microcontroller's
16-bit timer/counter

42
00:03:46.040 --> 00:03:50.320
for a high-resolution PWM output.

43
00:03:50.320 --> 00:03:54.880
We also have a simple calibration routine
to enhance accuracy.

44
00:03:54.880 --> 00:03:58.200
The routine records the range of each output.

45
00:03:58.200 --> 00:04:01.640
Those data are used to correct for
electrical offset,

46
00:04:01.640 --> 00:04:06.560
as well as sensitivity differences
between the two outputs.

47
00:04:16.520 --> 00:04:24.320
The blue LED indicates the calibration mode.
We just have to turn the magnet a few revolutions.

48
00:04:24.320 --> 00:04:26.240
Now we're in the measurement mode...

49
00:04:26.240 --> 00:04:47.880
and we have precise readings,
with no amplification.

50
00:04:47.880 --> 00:04:53.440
So, we've shown how AAT Sensors
easily interface to popular microcontrollers

51
00:04:53.440 --> 00:04:55.480
with a minimum of components.

52
00:04:56.280 --> 00:04:59.080
Click, email, or call us for more
information, or to order

53
00:04:59.080 --> 00:05:03.120
parts or demonstration kits.


