Description:
Currently, we have no way of detecting what angle the LAD is at. This prevents us from implementing any form of electronic limits for the LAD. Having a potentiometer at the axis of rotation will allow us to estimate the angle the arm is at and determine limits so the user doesn't harm themselves.
A potentiometer is a variable resistor. It usually takes the form of a dial (similar to the volume dial in your car). This means the potentiometer has a different resistance depending on its rotational position. We can use this in combination with an Analog-to-Digital Converter (ADC) to measure the voltage across the potentiometer (giving us its position). However, many cheap potentiometers aren't linear (resistance doesn't change linearly with rotation). We want ours to be as close to linear as possible, which makes it much easier to calculate the position of the arm from the voltage across the potentiometer.
Responsibilities:
References:
- You will need to implement a voltage divider to be able to read a relevant voltage across the potentiometer (a resistor in series with the pot).
- The ADC on the ESP32 has a range of 0-Vref. It outputs an integer based on how large the voltage at the ADC pin is compared to Vref (usually 1.1V in ESP32)
- The potentiometer will need to be decently large, with a way to connect the dial to the arm hinge. Look on DigiKey for a potentiometer that satisfies these conditions.
Some Equations That May Be Helpful:
Voltage divider: Vout = Vin ( R1 / (R1 + R2) )
ADC-to-voltage conversion: Voltage = (ADC Integer) * (Vref) / (2^N)
- ADC Integer: Raw ADC reading the MCU spits out
- Vref: Voltage that the MCU compares to the input voltage (usually 1.1V with no attenuation)
- N: How many bits the ADC has to represent the analog signal as a digital value (2^12 = 4096 in our case)
Description:
Currently, we have no way of detecting what angle the LAD is at. This prevents us from implementing any form of electronic limits for the LAD. Having a potentiometer at the axis of rotation will allow us to estimate the angle the arm is at and determine limits so the user doesn't harm themselves.
A potentiometer is a variable resistor. It usually takes the form of a dial (similar to the volume dial in your car). This means the potentiometer has a different resistance depending on its rotational position. We can use this in combination with an Analog-to-Digital Converter (ADC) to measure the voltage across the potentiometer (giving us its position). However, many cheap potentiometers aren't linear (resistance doesn't change linearly with rotation). We want ours to be as close to linear as possible, which makes it much easier to calculate the position of the arm from the voltage across the potentiometer.
Responsibilities:
References:
Some Equations That May Be Helpful:
Voltage divider: Vout = Vin ( R1 / (R1 + R2) )
ADC-to-voltage conversion: Voltage = (ADC Integer) * (Vref) / (2^N)