0
\$\begingroup\$

I am working on a project for university measuring the extension of a cars suspension.

I have a potentiometer available to me, but have a few questions regarding how to use it. I understand that it acts as a simple variable resistor, however, how is the changing resistance used to measure extension?

I was told a voltage reading was used in some way to give an extension (unsure of this) but if V=IR, will V not be constant due to battery, and will I not decrease as R increases as it resists the current?

I need a way to collect this data and then transmit it 50m and display it. I'm unsure of how to collect the data (and what data I'm collecting, resistance/extension) and transmit it. But I'm thinking of using an Arduino to receive the data and display it on a monitor.

\$\endgroup\$
1
\$\begingroup\$

A potentiometer is a variable resistor with three terminals - two are the two ends of the resistance element, and the third is a contact that slides along the resistance element, so the reistance between the sliding contact and either end varies with the slider's position.

You would use it something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

If it's a potentiometer then there will be usually three electrical connections - two outer connections that would measure a constant resistance between them and a wiper that travels, through mechanical intervention, the length of the resistor. Put a voltage across the two outer ends of the device (such as 5V and 0V) and the wiper can be mechanically moved to produce between 0V and 5V on that wiper. Halfway it would give 2.5V. One tenth of the way from the 0V end it would produce 0.5 volts and 9 tenths of the way it would indicate 4.5 volts.

That's how a pot works basically.

If you can mechanically connect it to the car's suspension then you can interpret the voltage out as some distance but this is mainly down to the mechanical linkages involved.

Transmitting it 50m is the hard part especially if you want to maintain accuracy and keep noise out. I suggest you look up wheatstone bridges and see how they do it. Look for 4-wire strain gauge amplifiers to see how they provide power to such devices and use extra wires and an instrumentation amp at the receiving end to produce a relatively clean and error-free voltage. Then feed that signal into your arduino. However, be aware that your arduino's analogue input can only convert to digital with 10-bit resolution i.e. divide your received signal into 1024 bits and that is your resolution. If that is good enough then no problems. If not then you'll need a better ADC such as 12 or 14 bit or maybe higher.

\$\endgroup\$
0
\$\begingroup\$

this is the circuit you can use

enter image description here

What is the maximum resistance of your potentiometer? (in this case it is 10k Ohm what is a god value)

if you use this code:

/*
  AnalogReadSerial
  Reads an analog input on pin 0, prints the result to the serial monitor.
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

 This example code is in the public domain.
 */

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);        // delay in between reads for stability
}

Source

You will get a digital value from 0 to 1023 all you have to do is measuring once the dimension and the corresponding so you know what value reprents which expansiveness.

For transmitting the best is to form the analog voltage value into a digital one and send it over CAN or LIN

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.