Fall 2016 Velociraptor (W): Analog to Digital Converter

By: Taylor Farr (Electronics and Control)

Approved by Lam Nguyen (Project Manager)

Table of Contents

Introduction

I chose to use the Adafruit ADS 1015 analog to digital converter. This will be used to convert the analog signals from the rotary converter to digital ones. This ADC communicates via I2C, so this satisfies our level 2 requirement.

Materials

  • 3382 Series 12mm Rotary Position Sensor
  • Adafruit ADS1015
  • Screwdriver
  • Breadboard
  • Wires
  • USB Cable
  • Laptop
  • Test Code
  • Arduino
  • protractor

Procedures

  1. Connect the ADC to the breadboard.
  2. Connect Vcc to the 3.3 volt pin on the Arduino and breadboard.
  3. Connect ground to one of the ground pins on the Arduino.
  4. Connect SCL and SDA to the SCL and SDA pins on the Arduino.
  5. Connect the Vcc of the rotary encoder to the Vcc on the breadboard.
  6. Connect ground of the rotary encoder to ground on the breadboard.
  7. Connect the signal output of the rotary encoder to the A0 pin on the ADC.
  8. Upload test code to Arduino and open the serial monitor.
  9. Using the screwdriver and protractor, move the position of the ADC to different angles and observe the digital readings on the screen.

Results

Angle (degrees) Bit reading
0 1
45 115
90 222
180 550
225 667
270 827
350 1101

Conclusion

From The table of results, we can see the digitized results of the rotary encoder. The ADC is a 12 bit analog to digital converter. The voltage on our PCB is about 3.3 volts. This is why we do not read the full span of the 11 bits (211 = 2048). Now that we know the range as well as the specific values of the encoder at specific angles, we can use this to update the control algorithm for the velociraptor.