Saturday, April 9, 2016

Flexiforce Pressure Sensor (25lbs) Quick Start Guide

Role
This is a quick how-to explain everything you need to start using Flexiforce pressure sensors. 25lb version of this example, but the concept is applied to the flex sensors.


Flexiforce Pressure Sensor (25lbs) Quick Start Guide
Flexiforce Pressure Sensor (25lbs) Quick Start Guide

Necessity
Hardware required to follow these guidelines:
  • Arduino Arduino UNO or other compatible boards (eg Pro Micro)
  • Flexiforce Pressure Sensor
  • breadboard
  • M / M jumper wires
  • 1 megohm resistor (resistor kit on our part)


Hardware
Flexiforce pressure sensor is essentially a variable resistor. No pressure is applied, the outer leads of the resistance, probably greater than 10 Mega Ohm (meters can measure more than me) is incredibly large. When pressure is applied, the resistance measured between the leads decreases, until you have reached the maximum pressure for it to become measure. In this case, the pressure is about 25 pounds, and I have pressure sensor measures the current Flexiforce about 50K Ohms maximum amount that you're used to the pressure.

Using a multimeter you can check your sensor range. Only two of the multimeter to measure the resistance of the leads and the meter connected to the set. The strain sensor and watch the changes in resistance value.

Now, let's read the value with an Arduino. To do this, we Flexiforce sensor and a voltage divider circuit with an additional resistor. I have chosen this example because it is 1M ohm Flexiforce about the middle of the dynamic range of the sensor. Many other similar values may work as well.

5V voltage divider to make one side and the other GND. In the middle, where the sensors and prevent Flexiforce connection with a jumper cable to connect the Arduino analog pins. In this case I used to pin A0. Fritzing is a diagram of the setup:

Flexiforce Pressure Sensor
Fritzing Wiring Diagram

* NOTE *: exactly the same as the image sensor Flexiforce sensor, but do not look too close. The Flexiforce sensor has a larger surface area.
Software
Now you have your circuit is wired and ready, it's time to write some very basic Arduino code. This code is almost exactly the same as the example Arduino AnalogReadSerial value. Let's take a look to see what it is doing:

     
// Flexiforce quick start example
// Reads A0 every 100ms and sends voltage value over serial

void setup()
{
  // Start serial at 9600 baud
  Serial.begin(9600);
}

    void loop() 
{
  // Read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (5.0 / 1023.0);
  
  // Print out the value you read:
  Serial.println(voltage);
  
  // Wait 100 milliseconds
  delay(100);
}
 
100ms or 10 times a second code that is only a small loop is infinite. Each pass through the loop, it A0 pin and the corresponding value of the voltage measurement between 0 and 1023. 0 and 1023 indicate that this represents the ground are sitting at A0 5 volts. For other numbers, we are measured by the number of fraction, 5.0 / 1023.0 by multiplying the voltage can think of. We then spit the standard serial port on the back, we can see real-time changes in value.

Go ahead and try. Make sure you have connected the hardware correctly. Arduino program, Arduino open up the serial monitor (make sure it is 9600 baud), and as you change the value of the voltage and clock Flexiforce press release Pressure Sensor.

Conclusion
Now that you know how to use pressure sensors Flexiforce. Believe it or not, here's what you have learned in a variety of analog sensors, which can collect and use the data in the exact same way. Now it's all up to you to use this type of product, but you have to imagine. If you have any other questions or comments, please drop them in the box below. Enjoy!

No comments:

Post a Comment