• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Arduino Flex Sensor Circuit

Arduino Flex Sensor Circuit

Last updated on 24 November 2025 by Admin-Lavi Leave a Comment

If we want Arduino to feel the movement, flex sensor is best.

No click, no sound only smooth bending.

It bends and Arduino gets new value every time.

Perfect for beginners who want to control things by bending.

Simple circuit, simple code, powerful idea.

Arduino Coding:

int flex = A0;
int led1 = 4;
int led2 = 5;
int value = 0;

void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
Serial.begin(9600);
}

void loop() {
value = analogRead(flex);
Serial.println(value);

if(value > 600) {
digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
} else {
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
}
delay(100);
}

Code Explanation:

  • First we set flex sensor pin as analog input.
  • Two LEDs set as outputs.
  • Inside loop we read sensor value.
  • Serial monitor prints value.
  • If value high means more bend.
  • Then LED is on pin 4 turns ON.
  • LED on pin 5 turns OFF.
  • If value low means less bend.
  • Then LED on pin 4 turns OFF.
  • LED on pin 5 turns ON.
  • Simple if else logic.

Circuit Working:

Arduino Flex Sensor Circuit Diagram

Parts List:

ItemQuantity
Resistors
220Ω2
10k1
Semiconductors
Arduino UNO1
Flex sensor Module1
LED Blue 5mm1
LED Green 5mm1
USB Cable1

Power comes from Arduino 5V.

Flex sensor connects between 5V and analog pin A0.

A 10k resistor connects from A0 to GND.

This makes voltage divider.

Flex sensor acts like changing resistor.

When straight, resistance is low.

When bent then resistance is high.

Because resistance changes then voltage at A0 also changes.

Arduino reads this voltage as analog value 0 to 1023.

If sensor bends more then voltage becomes lower.

If sensor bends less then voltage becomes higher.

Arduino checks this value again and again in loop.

If value crosses set limit then Arduino turns one LED ON.

Other LED turns OFF.

If value goes below limit then Arduino switches LEDs again.

Formula:

Below is the voltage divider formula:

Vout = Vin * R10k / (Rflex + R10k)

where,

  • Vout is the output voltage of voltage divider.
  • Vin is 5V.
  • Rflex is flex sensor resistance.
  • R10k is 10k ohm fixed resistor.

How to Build:

To build a Arduino Flex Sensor Circuit follow the below steps for connection:

  • Gather all the parts as shown in circuit diagram.
  • Flex sensor has two pins.
  • One pin goes to 5V.
  • Other pin goes to analog pin A0.
  • A 10k resistor goes from A0 to GND.
  • Two LEDs are also connected.
  • Green LED goes on digital pin 4 with 220 ohm resistor.
  • Blue LED goes on digital pin 5 with 220 ohm resistor.
  • GND from Arduino connects to all negative LED pins and bottom of 10k resistor.

Conclusion:

Flex sensor gives easy way to measure bend.

Arduino reads change and controls output.

Arduino Flex Sensor Circuit is simple and uses voltage divider.

Useful in glove projects, robotics, gesture control and DIY experiments.

Project is easy for beginners.

References:

[Beginner] Using a Flex Sensor

Filed Under: Arduino Projects, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Simple Push Button Circuit with Arduino
Next Post: Measuring Bend Angle using a Flex Sensor Circuit »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (45)
  • Amplifier Circuits (67)
  • Arduino Projects (99)
  • Audio Circuits (114)
  • Automobile Circuits (19)
  • Battery Charger Circuits (65)
  • Free Energy (13)
  • Heater and Temperature Controllers (13)
  • High Voltage (1)
  • Indicator Circuits (45)
  • Inverter Circuits (20)
  • IoT projects (1)
  • LDR Circuits (26)
  • LED and Lamps (148)
  • Meters and Testers (30)
  • Motor Controllers (22)
  • Oscillator Circuits (39)
  • Power Supply Circuits (104)
  • Remote Control Circuits (10)
  • Security and Protection (29)
  • Sensors and Detectors (126)
  • Solar Circuits (29)
  • Timer Circuits (41)
  • Transistor Circuits (87)
  • Transmitter Circuit (17)
  • Tutorials (8)
  • Water Level Controller (6)

Recent Posts

  • 12V Battery Low Voltage Alarm Circuit
  • Low Voltage Alert Circuit for 9V Battery
  • Digital Code Lock Circuit using IC 4017
  • Darkness Activated LED Circuit
  • Fan Start 10 Second Delay Timer Circuit

Recent Comments

  1. TDHofstetter on DIY Variable Power Supply Circuit using Arduino
  2. feathbuff on Simple Micro Ampere Meter Circuit
  3. Admin-Lavi on Simple School Project Multimeter Circuit
  4. choke on Simple School Project Multimeter Circuit
  5. Admin-Lavi on Analog to Digital Converter Circuit using IC 555

Copyright © 2026 | New Circuit Ideas