Hello friends, I hope you all are doing great. Today, I am going to share the Sign Language Glove with ESP32 and Flex Sensors in Proteus Simulation, the sixty-first project of our IoT Projects series. If you have searched for an ESP32 flex sensor project, a smart glove, or a Proteus simulation of gesture recognition, here is a complete one. A flex sensor runs along the back of each finger of a glove; when a finger bends, its sensor's resistance rises. The ESP32 reads all five, works out how far each finger is bent, recognises the hand shape, shows the word on a small OLED, chirps, and builds a sentence on a dashboard that a laptop or a phone can show to someone who does not know the signs.

Gloves like this are a well-known assistive technology project and the first step into gesture recognition: the same idea drives data gloves for virtual reality, remote robot hands and rehabilitation tools. In this tutorial, we will go through the circuit, see what a flex sensor is and how a voltage divider reads it, why the program converts the voltage back to a resistance before anything else, how a two-point calibration fits the glove to any hand, how the nearest-shape method recognises a sign, why the hand must be still before a sign counts, walk through the code, and then run the simulation: the calibration, seven signs, the OK sign with two half-bent fingers, and a hand shape that is not a sign. At the end, you can download the project with the sketch and every library file.

NOTICE: Our team has put a lot of effort into this project: the circuit, the code and every part in the simulation are our own work, and you get them all free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below. And if our free projects help you, you can buy us a coffee. So, let's get started with the sign language glove with ESP32 and flex sensors in Proteus simulation:

Figure: The sign glove in a Proteus simulation: I LOVE YOU on the OLED.
Figure: The project working in the Proteus simulation (an animation of the main steps).

What Does This Sign Glove Do?

  • Reads five fingers: a flex sensor module on each finger, each read on its own analog input twenty times a second.
  • Turns voltage into bend: each reading becomes the strip's resistance, and the resistance a bend from 0 % (straight) to 100 % (the fist).
  • Fits any hand: two clicks on the dashboard calibrate the glove: CAL OPEN with the hand open, CAL FIST with a fist.
  • Recognises eight signs: HELLO, YES, YOU, GOOD, PEACE, I LOVE YOU, CALL ME and OK, by the nearest stored hand shape.
  • Waits for a still hand: a sign counts only when no finger has moved for 1.5 seconds, so passing shapes are never said.
  • Says no when unsure: a shape too far from every sign is reported as not a sign, with a low tone.
  • Shows it all: the word and five finger bars on an OLED, a chirp from a piezo, and a dashboard with the sentence, the bends and a picture of the hand.

It is a great project for learning analog sensors, voltage dividers, calibration and simple pattern recognition on the ESP32. In the simulation, every flex sensor has its own pop-up with a gloved finger, buttons for 0, 15, 30, 45, 60, 90, 120 and 180 degrees, and live readouts of the resistance and the output voltage, so you can shape the hand one finger at a time. The flex strips also bend on the schematic itself.

Components Used in the Proteus Simulation

All the parts come from our Proteus libraries, each with its own tutorial. The project zip at the end includes every LIB and DLL file.

The parts of the sign language glove and their library posts
PartProteus deviceLibrary postConnection
ESP32 DevKit V1ESP32 DEVKIT V1ESP32 DevKit V1 Library for ProteusU1, ESP32_Sign_Glove.hex, TEP-WiFi 192.168.1.101
5 x flex sensor module (2.2 in)FLEXMODADVTEPFlex Sensor Library for ProteusU2 .. U6: thumb VP, index VN, middle D34, ring D35, pinky D32
SSD1306 OLED 128x64OLED12864WHITEADVTEPOLED SSD1306 Library for ProteusOLED1, I2C at 0x3C on D21 / D22
27 mm piezo discPIEZODISC27TEPPassive Buzzer LibraryBZ1, D25
Laptop WiFi MonitorLAPTOP WIFI MONITORLaptop WiFi MonitorPC1
Mobile WiFi MonitorMOBILE WIFI MONITORMobile WiFi MonitorMOB1

Proteus Simulation of the Sign Glove: the Circuit

Figure: The complete circuit of the sign glove on an A3 Proteus sheet.
The connections of the sign glove
PartPinsESP32 / supply
U2 thumb / U3 indexOUTVP (GPIO36) / VN (GPIO39)
U4 middle / U5 ring / U6 pinkyOUTD34 / D35 / D32
U2 .. U6VCC / GND+5V / GND
OLED1SDA / SCL / VCCD21 / D22 / +3.3V
BZ1 piezo+ / -D25 / GND

All five fingers use ADC1 pins (GPIO32 to 39), because on a real ESP32 the second converter, ADC2, cannot be read while WiFi is on. The flex modules run on 5 V, and that is safe for the ESP32's 3.3 V inputs: each module is a divider of the flex strip and a 10 kohm resistor, and with the strip at its lowest resistance, 25 kohm when straight, the output is only 5 x 10 / 35 = 1.43 V. Bent to 90 degrees (70 kohm) it falls to 0.63 V. A 5 V supply gives a wider swing than 3.3 V, and it keeps the readings away from the bottom of the ESP32's converter, where it is least accurate.

How the Sign Glove Works

The Flex Sensor and Its Divider

A flex sensor is a thin strip printed with a carbon ink. When it bends, the ink cracks open a little and its resistance rises: the 2.2-inch strip here has 25 kohm straight, 70 kohm at 90 degrees and 115 kohm at 180 degrees, close to a straight line with the angle. A microcontroller cannot read a resistance directly, so the module puts the strip in series with a fixed 10 kohm resistor and the ESP32 reads the voltage between them: OUT = VCC x 10k / (10k + R). As the finger bends, R rises and OUT falls.

Why the Program Works in Ohms, Not Volts

The divider is not a straight line. Take a finger at 60 degrees: the strip has 25 + 60 x 0.5 = 55 kohm, so OUT = 5 x 10 / 65 = 0.769 V. Between the open hand (1.429 V) and the fist (0.625 V), that voltage looks like (1.429 - 0.769) / (1.429 - 0.625) = 82 % of a bend, but the finger is only two thirds of the way. So the program first turns the voltage back into the strip's resistance, R = 10k x (5 / OUT - 1) = 10 x (5 / 0.769 - 1) = 55.0 kohm, and measures the bend in ohms: (55 - 25) / (70 - 25) = 67 %, the right answer.

Calibration: Open Hand and Fist

Real flex sensors differ by up to 30 % from one to the next, and every hand is different, so a glove must be calibrated each time it is put on. Here it takes two clicks on the dashboard: CAL OPEN stores each strip's resistance with the hand open (0 %), CAL FIST with a fist (100 %). From then on every finger is measured as a share of its own range, so a stiff sensor and a soft one give the same 50 % when the finger is half bent.

Recognising a Sign: the Nearest Shape

Each sign is stored as five numbers, the bend of each finger: HELLO is 0, 0, 0, 0, 0 (thumb to pinky), a fist is all 100, I LOVE YOU is 0, 0, 100, 100, 0 (the thumb, the index and the pinky out). The program compares the hand with every stored shape by the root-mean-square difference of the five fingers and picks the nearest. Worked example: a hand with only the ring finger bent (0, 0, 0, 100, 0) is nearest to HELLO, but one finger off by 100 % gives sqrt(100 x 100 / 5) = 44.7 %, more than the 25 % limit, so it is not a sign. The same method, with more numbers and many examples of each sign, is the basis of the machine-learning gloves in research labs.

Waiting for a Still Hand

Moving from one sign to another, a hand passes through other shapes: from YOU to I LOVE YOU it may briefly look like PEACE. A glove that spoke every shape it saw would babble. So a sign counts only when no finger has moved more than 4 % for 1.5 seconds, and it is said only once: the hand has to move before the next sign can count. The piezo chirps at 1800 Hz for a sign and gives a low 400 Hz tone for a shape it does not know.

The Arduino Code Explained

The sketch is ESP32_Sign_Glove.ino. It uses the Adafruit SSD1306 and GFX libraries for the OLED, and the ESP32's WiFi and WebServer for the dashboard. The fingers' pins and the timing come first:

const int FINGER_PIN[5] = {36, 39, 34, 35, 32};                     // thumb, index, middle, ring, pinky
const unsigned long STILL_MS = 1500;                                // the hand must be still this long

Each hand shape is five bends; here is I LOVE YOU:

  {0, 0, 100, 100, 0},                                              // I LOVE YOU: thumb, index and pinky

A reading becomes the strip's resistance, from the divider's formula turned around:

  return DIV_K * (VCC / v - 1);

Calibration stores each strip's resistance in the pose the hand is in:

  for (int k = 0; k < 5; k++) { float r = readK(k); if (open) openK[k] = r; else fistK[k] = r; }

The bend is where the resistance sits between the open hand and the fist:

    float span = fistK[k] - openK[k];                               //  (the resistance is linear in the angle, the voltage is not)
    bend[k] = span > 1 ? constrain((readK(k) - openK[k]) / span * 100, -20, 150) : 0;

Any finger that moves more than 4 % restarts the wait for a still hand:

    if (fabs(bend[k] - ref[k]) > STILL_PCT) moved = true;
  } else if (!said && millis() - stillSince >= STILL_MS && calOpen && calFist) {

The nearest shape, by the RMS difference of the five fingers, and the limit for a match:

    for (int k = 0; k < 5; k++) { float d = bend[k] - SHAPE[s][k]; sum += d * d; }
    float rms = sqrt(sum / 5);
  return dist < MATCH_PCT ? best : -1;

A recognised sign chirps:

    tone(PIEZO, 1800, 80);

On the OLED each finger is a bar, tall when straight and short when bent:

    int x = 6 + k * 25, h = constrain((int)((100 - bend[k]) * 0.3 + 0.5), 1, 30);

The dashboard's picture of the hand is a 160 x 80 bitmap drawn by the ESP32 itself, eight rows at a time; each finger is as long as it is straight:

          int len = 6 + (int)((100 - constrain(bend[f], 0, 100)) * 0.42);

The dashboard's pages are / (the dashboard), /open and /fist (the calibration), /clear (a new sentence), /hand.bmp (the picture) and /data (the bends, the sign and the sentence as JSON). Every calibration and every sign is printed on the serial monitor.

How to Run the Proteus Simulation

  1. Download the project zip below and install the library files (the steps are under the download button).
  2. Open ESP32-Sign-Glove.pdsprj from the Proteus Simulation folder. Keep ESP32_Sign_Glove.hex and the DLL files next to it.
  3. Press Play. The OLED shows CAL. Open the Laptop WiFi Monitor, press Go, then CAL OPEN with all fingers at 0 degrees.
  4. On every flex sensor's pop-up (U2 thumb to U6 pinky) press 90, then CAL FIST on the dashboard.
  5. Make a sign: set each finger on its pop-up (0 straight, 90 bent, 60 for the OK sign's thumb and index) and wait 1.5 seconds.
  6. Watch the word on the OLED, listen for the chirp on the piezo's pop-up, and press Refresh on the dashboard for the sentence.

Simulation Results: the Sign Glove in Proteus

Here is the run that made the screenshots of this tutorial, 72 seconds of simulation: the calibration, seven signs, the OK sign and a shape that is not a sign. The times are the sketch's own clock, as it printed them on the serial monitor; the parts' numbers come from their pop-ups.

Ready, and the Calibration

At 2.3 s the sketch says "ready - CAL OPEN with the hand open, then CAL FIST with a fist", and the OLED shows CAL with five full bars. With every finger at 0 degrees, CAL OPEN on the laptop at 9.7 s reads "calibrated OPEN: 25.0 / 25.0 / 25.0 / 25.0 / 25.0 k", the datasheet's flat resistance exactly. Then every finger goes to 90 degrees on its pop-up: the index finger's pop-up shows the gloved finger bent, R 70.0 kohm and OUT 0.625 V, 12.5 % of the supply, just as the divider formula predicts. CAL FIST at 17.4 s stores 70.0 kohm for all five, and the dashboard says Ready. The fist itself is not announced: a calibration pose is not a sign.

Figure: Ready: the hand open.
Figure: The OLED: CAL.
Figure: The dashboard: the open hand.
Figure: A flex sensor at 90 degrees.
Figure: The dashboard: calibrated.
Figure: The fist: every strip bent.

Seven Signs

With the thumb straightened, the hand is a thumbs-up, and 1.5 seconds later, at 23.9 s: "sign: GOOD (thumb 0 %, index 100 %, middle 100 %, ring 100 %, pinky 100 %; 0.0 % off)". The OLED shows GOOD with a full bar for the thumb, and the piezo's pop-up catches the chirp: 1812 Hz, the note A#6. Then the signs follow one another: YOU at 29.3 s (the index pointing), PEACE at 32.8 s (the index and the middle), I LOVE YOU at 38.7 s (the thumb, the index and the pinky), CALL ME at 46.5 s (the thumb and the pinky) and HELLO at 51.1 s (the open hand), each exactly on its shape, 0.0 % off. While the fingers moved from one sign to the next, no passing shape was ever said: the stillness check did its job. The ring finger's pop-up during PEACE shows it bent at 90 degrees.

Figure: GOOD: thumb up.
Figure: The OLED: GOOD.
Figure: The chirp: 1812 Hz.
Figure: The OLED: YOU.
Figure: PEACE.
Figure: The ring finger at 90 degrees.
Figure: I LOVE YOU.
Figure: The OLED: I LOVE YOU.
Figure: The dashboard: the sentence so far.
Figure: HELLO.
Figure: The OLED: HELLO.

OK: Two Fingers Half Bent

The OK sign needs the thumb and the index curled to about 60 degrees. The thumb's pop-up shows 55.0 kohm and 0.769 V; the sketch turns that into 67 % for both fingers, and at 56.6 s: "sign: OK (thumb 67 %, index 67 %, middle 0 %, ring 0 %, pinky 0 %; 0.1 % off)". Measured in volts instead, the same fingers would have read 82 %, and the sign would have been missed.

Figure: The thumb at 60 degrees.
Figure: The OLED: OK.

A Shape That Is Not a Sign

Finally, only the ring finger bent. The nearest shape is HELLO, but at 62.0 s: "not a sign (thumb 0 %, index 0 %, middle 0 %, ring 100 %, pinky 0 %; the nearest 44.7 % off)", exactly the distance worked out above. The OLED shows a question mark and the piezo gives its low tone, 401 Hz, the note G4. The dashboards on the phone and the laptop show the whole sentence: GOOD YOU PEACE I LOVE YOU CALL ME HELLO OK.

Figure: Not a sign.
Figure: The OLED: unknown.
Figure: The low tone: 401 Hz.
Figure: The phone dashboard.
Figure: The laptop dashboard at the end.
Figure: The serial monitor: the whole run.
The results of the sign language glove simulation
WhatResult
CAL OPEN / CAL FIST25.0 k / 70.0 k on all five strips (9.7 s / 17.4 s)
Seven signsGOOD, YOU, PEACE, I LOVE YOU, CALL ME, HELLO: each 0.0 % off
OK at 60 degrees55.0 k = 67 % (82 % if read in volts); 0.1 % off
Not a signonly the ring bent: the nearest 44.7 % off, 401 Hz
Chirp1812 Hz for every sign
SentenceGOOD YOU PEACE I LOVE YOU CALL ME HELLO OK
Simulation72 s of simulation

Download the Project Files

Click the button below to download Sign-Language-Glove-ESP32-Flex-Sensors-Proteus-Simulation-v1.0.zip (about 3.8 MB, without the source code of the models):

Sign Language Glove with ESP32 and Flex Sensors - Proteus Simulation V1.0
  • Proteus Simulation: ESP32-Sign-Glove.pdsprj, ESP32_Sign_Glove.hex and copies of the models.
  • Arduino Code: ESP32_Sign_Glove.ino, the sketch.
  • Proteus Library Files: the LIB files of the ESP32 DevKit V1, the flex sensor, the OLED, the piezo and the two WiFi Monitors.
  • Proteus Model Files: the DLL models.
  • README.txt: the installation steps, the properties, the test results and the links to every library post.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install the Project Files

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Start Proteus and open the project from the Proteus Simulation folder.

Changing the Code

Open ESP32_Sign_Glove.ino in the Arduino IDE with our TEP Boards for Proteus, choose ESP32 Dev Module (TEP Proteus), and export the compiled binary; U1's PROGRAM property names the .hex file it runs. New signs are one more line in SHAPE and one more word in SIGN. On a real ESP32 the same sketch runs with the standard ESP32 board package and the Adafruit SSD1306 and GFX libraries from the Library Manager.

Ideas to Extend the Project

  • Speak the words: a DFPlayer Mini with a recorded MP3 for each sign, or a phone app reading the /data page aloud.
  • Add an accelerometer on the back of the hand: many signs differ only in how the hand is turned or moved.
  • Learn new signs from examples: record a pose with a button and store it as a new shape.
  • Save the calibration in the ESP32's flash, so the glove remembers its wearer.
  • Send the sentence over Bluetooth to a phone, so the glove works without WiFi.
  • Use a small classifier (k-nearest neighbours over many recorded examples) for more signs and more reliable results.

From Simulation to Real Hardware

  • Mount the sensors on the back of the fingers: sewn into small pockets so they bend with the finger but can slide as it bends.
  • Protect the ends: the crimped end of a flex sensor is its weak point; glue it down and give the wires strain relief.
  • Calibrate every time: the readings change with the fit of the glove and the warmth of the hand.
  • Filter the readings: real strips are noisier than the model; average more readings or raise the stillness threshold.
  • Power: a small Li-ion cell and a 5 V boost converter for the modules, the ESP32 from its own regulator.

Troubleshooting

  • A finger always reads 0 %: its module needs VCC, and its OUT must reach the right pin: VP, VN, D34, D35 or D32.
  • The bends are wrong: calibrate again, CAL OPEN with the hand open and CAL FIST with a fist.
  • Nothing is recognised: hold the hand still for 1.5 seconds; the dashboard shows the nearest shape and how far off it is.
  • The OLED stays blank: SDA / SCL on D21 / D22, address 0x3C.
  • No chirp: the piezo between D25 and GND.

Limitations of the Simulation

  • The fingers are the flex sensor models' pop-ups: each finger moves at about 200 degrees per second to the angle you set, with no tremor.
  • The eight signs are a small teaching set chosen for five bend sensors; real sign languages also use hand orientation, movement and facial expression.
  • The model's strips follow a straight line from 25 kohm to 115 kohm; real ones vary by up to 30 %.
  • The network to the laptop and the phone is simulated inside Proteus.
  • ESP32 is a product of Espressif Systems; this project is not made or endorsed by them or by Labcenter.

So, that was all about the Sign Language Glove with ESP32 and Flex Sensors in Proteus Simulation. I hope it helps you understand how a flex sensor and a divider turn a bend into a voltage, why the voltage is turned back into a resistance, how a two-point calibration fits the glove to a hand, and how a nearest-shape method and a stillness check recognise signs reliably, all tested in a simulation before you sew a real glove. More IoT projects with the ESP32 and the Raspberry Pi 5 are coming in this series. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!