User Tools

Site Tools


arduino_phase_characterization

In order to get 4 distinct phase shifted outputs for our haptic PCB, we are using two hardware timers on an Arduino Uno, each with 2 output compare registers, giving us 4 distinct 40 kHz signals.

Here is the relationship between the register values and the phase differences:

10 → 9 = 0.9(199-OCR1B)

10 → 6 = 0.9((OCR1B-TCNT1)+27)

10 → 5 = 0.9((OCR1B-TCNT1)-(199-OCR0B)+27)

The left side of the equation indicates which pins the phase difference is between. We are assuming pin 10 is our relative 0. The right side of the equation indicates the phase difference in degrees.

Using these equations, I tuned the phase shifts to be 0, 50, 80, and 90 degrees on pins 10, 5, 6, and 9 respectively. We calculated that these values as our first attempt at creating an acoustic focal point.

arduino_phase_characterization.txt · Last modified: 2015/12/03 12:26 by sky237