I am new to the forum, electronics and Arduino. I purchased a force sensing linear potentiometer from Interlink through DigiKey. As I am new to this I am not sure about how to hook it up and don't want to fry anything. Below is a crude sketch of the circuit and instructions from the manufacturer.
Questions:
What is the difference between GPIO and GPIO/ADC? Are these just analog input/output pins?
Is output LOW the same as ground?
There are two sets of instructions one for measuring position and one for measuring pressure.
Is it possible to measure both at the same time? How would you do this? on one Arduino or two Arduinos?
The instructions say
Configure the GPIO pin connected to the bottom of R0 as a high impedance input What is high impedance? I thought impedance was resistance?
isn't this what the 4.6k resistor is doing? or am I confused
5.1
Measuring Position
Step 1: Clear Charge on Sensor
?
Enable all lines as outputs and set them to 0 Volts. This will clear all charge from the sensor and help reduce noise on readings.
Step 2: Set Up Appropriate Driveline Voltages
?
Configure sensor terminal 2 as output high (+Vcc).
?
Configure sensor terminal 3 as output low.
?
Configure the pin connected to the bottom of resistor R0 as an output low. This drains any charge that may have capacitively coupled to the sense line during the transitions of sensor terminals.
?
Configure the GPIO pin connected to the bottom of R0 as a high impedance input.
?
Configure sensor terminal 1 as an ADC input.
Step 3: Wait For Voltage to Stabilize
?
The voltage generated on the sense line can have an input resistance ranging from 2k? to 300k?. Higher resistances result from very light pressure on the sensor. Depending on the input impedance of the ADC, allowing five to ten microseconds before taking the measurement will help to increase the sensitivity of the sensor and detect light touches.
Step 4: Take the measurement
?
Start the A/D conversion and store the result. An 8-bit ADC will yield a result within 0 and 255 counts. This value is proportional to the physical distance from sensor terminal 3.
5.2
Measuring Pressure
Step 1: Setup the appropriate drive line voltages
?
Configure sensor terminal 2 as an output high (+Vcc).
?
Configure sensor terminal 1 as an ADC.
?
Configure sensor terminal 3 as an ADC.
?
Configure the pin connected to the bottom of R0 as an output low.
Step 2: Wait for voltage to stabilize
?
The voltage generated on the sense line can have an input resistance ranging from 2k? to 300k?. Higher resistances result from very light pressure on the sensor. Depending on the input impedance of the ADC, allowing five to ten microseconds before taking the measurement will help to increase the sensitivity of the sensor and detect light touches.
I appreciate any and all help given and I am very excited to learn all about the Arduino and electronics.
For example the Arduino Uno has 13 digital inputs/outputs (sometimes called GPIO = General Purpose Input/Output) and 6 analog inputs. The 6 analog inputs can also be configured as digital inputs/outputs.
I think you have to be able to switch between analog input and digital output for the sensor.
There are no analog outputs, but some digital outputs can be used with PWM to be able to dim leds, lights, motors, etc. What is PWM ?, see Wikipedia: Pulse-width modulation - Wikipedia
If a digital output is low, it's output is 0V. That's ground level.
A high impedance is a high resistance. If a pin of the Arduino is set as an digital or analog input, it's input resistance is extremely high. That's called "high impedance".
The 4k6 resistor is a used for a nifty trick to be able to be able to distinguish between position and pressure. It has to do with impedance and charge of the sensor. I don't understand how exactly it is done, but just follow the instructions.
You need only one Arduino. You have to implement both instructions in code to get the position and the pressure. They cannot be measured at the same time, but that's okay. A few milliseconds between them should be no problem I assume.
For example:
sensor pin 1 : connect to Arduino analog input, for example A0.
via Ro of 4k6 : connect to Arduino digital pin, for example 3 (pin 1 and 2 are used for Serial output to the computer).
sensor pin 2 : connect to Arduino digital pin, for example 4.
sensor pin 3 : connect to Arduino analog input, for example A1.
Thank you very much Krodal for the very helpful information. Sorry about the links, I should know better. Yes, the sensor is the same as the one in the link you provided. I'm waiting for a connector to be delivered, once it is in I'll give it a try and report back.
The only thing I can't quite wrap my head around is the fact that the datasheet shows 2 different connection methods, one for position and one for pressure. If I hook it up the way you suggest:
sensor pin 1 : connect to Arduino analog input, for example A0.
via Ro of 4k6 : connect to Arduino digital pin, for example 3 (pin 1 and 2 are used for Serial output to the computer).
sensor pin 2 : connect to Arduino digital pin, for example 4.
sensor pin 3 : connect to Arduino analog input, for example A1.
I will be able to read both pressure and position by changing the code to read different pins? In the instructions for position it says pin 1 is ADC input, but for pressure it says just ADC (I'm going to assume this is input, is this correct?) If this is correct, then the only difference in the two setups would be pin 3 which would be output low for position and ADC (again assuming input?) for pressure? So in the code, I would flip pin 3 from output low to ADC input?
Yes, I think you are correct.
But I'm a little confused myself. It is also a little confusing which pin we are talking about (sensor pin or Arduino pin).
Perhaps it's easier if you would use Arduino analog input pins for all connections, since those pins can be anything (analog-in or digital-in or digital-out). After that everything can be sorted out in software.
They use the term 'ADC' for the "Analog-to-Digital-Converter". This is for analog inputs.
If you need to set something "high impedance", just configure it as an input (analog or digital).
So an analog input ("ADC") is also "high impedance" for the Arduino.
One digital pin has to change between 'low' (drain charge) and 'high impedance'.
The pinMode() function is ment for that, it can switch between output and input.
To change an analog pin to digital, use the pinMode() function.
After that, use digitalWrite() to write a high or low output.
To change an digital pin to analog, use pinMode() to make it input, and use analogRead() to read the ADC value.
There is only one thing to remember: Writing the output for a digital input pin is used for an internal pull-up resistor.
If you upload a drawing or photo how it is connected and past the code in the message, it will be easer to check step-by-step if it's right.