Skip to main content

Project Based Engineering Instrumentation High Level Coding and Microcontrollers

Chapter 13 Potentiometer

List 13.0.1. Parts List
  1. Laptop
  2. CPX/CPB
  3. USB Cable
  4. Potentiometer
  5. Resistor (the Ohms depends on how large your potentiometer is)
  6. Breadboard
List 13.0.2. Learning Objectives
  1. Understand voltage division of resistors in series
  2. Measure an analog signal on the CircuitPlayground
  3. Understand the binary measurement done by the analog to digital conversion (ADC)
At this point in a standard Instrumentation course, you’ve learned about analog to digital converters (ADC). It turns out that the CPX has 8 analog ports hooked up to a 3.3V logic 16 bit ADC. The input range on the ADC is 0 to 3.3V and the output range is 0 to 65536 which is \(2^{16}\) hence 16 bits. In order to get accustomed to the ADC on the CPX, we’re going to do a simple example where we measure the voltage drop across a potentiometer. You can read about potentiometers online if you wish[60]. Basically though, a potentiometer is a variable resistance resistor that changes resistance by turning a knob. The knob changes the connection point of a wire and thus the length of the wire. This in turn changes the resistance. Potentiometers come in all shapes and sizes. Here are some potentiometer examples. I’ve done this lab with a few potentiometer. Ideally you’d like to have the potentiometer hooked up in series with another resistor so that you end up building a voltage divider but it’ possible you can do it without it as shown in the figure below (Courtesy of Kattni Rembor) [38].
Figure 13.0.3. Wiring Diagram of a Circuit Playground Express hooked up to a Potentiometer[38]
In this chapter you’re going to wire up a potentiometer to the CPX and read the voltage across it as you turn the knob.