Hello friends, I hope you all are doing great. Today, I am going to share the new PAJ7620 Gesture Sensor Library for Proteus Simulation. The PAJ7620 lets your project understand hand movements without touching anything: swipe up, down, left or right, move your hand towards or away from it, draw a circle either way, or wave - nine gestures in all, recognised inside the chip and handed to your Arduino over I2C. With this library you can run a full Proteus simulation of the common PAJ7620 module, wake it, enable it, read its gesture flags and build gesture control into your sketch.

Figure: The PAJ7620 simulation running: swipes change the colour, forward and backward switch the lamp, a wave starts the rainbow.
Updates

PAJ7620 Gesture Sensor Library for Proteus

Latest version: V1.0 (December 2026, this tutorial)

Related parts: I2C LCD 16x2 · RGB LED · TCS3200 Color Sensor

Helping Tools

The demo is a gesture-controlled lamp: an Arduino UNO V4.0 reads the gestures and drives an RGB LED - left and right change the colour, up, down and the circles the brightness, forward and backward switch it on and off, and a wave starts a rainbow - while a 16x2 LCD shows the last gesture and the lamp.

NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the infrared sensor board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the PAJ7620 Gesture Sensor Library for Proteus Simulation:

Figure: The PAJ7620 Gesture Sensor Library for Proteus Simulation.

What Is the PAJ7620 Gesture Sensor?

The PAJ7620U2 is a tiny package with two windows. Behind one is an infrared LED at 940 nm; behind the other a small image sensor with a lens. The LED flashes, the sensor takes pictures of whatever reflects the light - your hand - and a processor inside the chip follows the bright blob from picture to picture. It recognises the movement itself and only tells your microcontroller the result, so the Arduino has nothing to calculate. Hands are seen from about 5 to 15 cm above the sensor within a 60 degree cone, at speeds of 60 to 600 degrees per second in normal mode and up to 1200 in gaming mode.

The Nine Gestures

Each recognised gesture sets one bit in a result register. Register 0x43 holds eight of them - bit 0 up, bit 1 down, bit 2 left, bit 3 right, bit 4 forward (towards the sensor), bit 5 backward (away from it), bit 6 clockwise and bit 7 anticlockwise - and register 0x44 holds the wave in bit 0. Reading the registers clears them. Two mask registers, 0x41 and 0x42, choose which gestures are reported. The directions depend on how the module is mounted: turned upside down, up and down swap, and so do left and right.

Banks, Wake-up and INT

The chip answers at I2C address 0x73 and has two register banks - writing register 0xEF with 0 or 1 selects bank 0 or bank 1. After power-on it sleeps and does not even acknowledge its address: the first access wakes it, and a moment later register 0x00 reads 0x20 and 0x01 reads 0x76 - together the ID 0x7620. Writing 0x72 = 1 in bank 1 enables the detection. The INT pin is an open-drain output that goes LOW when a new gesture is waiting and is released when the flags have been read, so the Arduino can sleep or do other work until a hand moves.

There is one thing every PAJ7620 user must know: before it works, a real chip needs the maker's initialisation table - about fifty register writes that tune the image sensor. The common Arduino libraries carry that table, and their begin() function writes it. The simulation does not need it and runs with the enable alone; its Check page counts the set-up writes and reminds you of the table.

The Module

The common purple module is a little board of 16 x 20 mm. Besides the PAJ7620U2 it carries two 3.3 V regulators - one for the logic, one for the IR LED - and 2.2 kohm pull-ups on SDA, SCL and INT, so it runs from 3.3 or 5 V. Its five pins are VCC, GND, SCL, SDA and INT.

Features of the PAJ7620 Library

  • A real-looking module: the purple board at its true size with the chip, its LED window and lens, the regulators and the header; at Run the IR window glows and the lens rings at every gesture.
  • The registers of the datasheet: I2C at 0x73, the two banks, the wake-up, the ID, the enable, the masks and the gaming-mode register.
  • Nine gestures: the flags in 0x43 and 0x44, cleared by reading, and INT active low.
  • The hand: the object brightness and size follow its distance; beyond 15 cm a gesture is not seen.
  • Mounting: ROTATE 180 swaps the directions like an upside-down module.
  • A pop-up: the hand seen from above with its trail and distance, the nine gestures; graphs, an event log and a check page.
  • A complete package: about 2.4 MB with the library, our I2C LCD, resistors and RGB LED, our Arduino UNO V4.0 and the demo, without the source code of the model.

The PAJ7620 in Proteus

The device is PAJ7620TEP in TEPPAJ7620.LIB, under Modules > Sensors, with the model TEPPAJ7620.DLL. Search PAJ7620 or gesture in Pick Devices. Its five pins are the header of the real board. Two properties set it up: PROFILE (DEMO, a sequence of gestures, or MANUAL, only the pop-up's buttons) and ROTATE (0 or 180 degrees).

Figure: The PAJ7620 module.

Download PAJ7620 Gesture Sensor Library for Proteus Simulation

Click the button below to download PAJ7620-Gesture-Sensor-Library-for-Proteus-v1.0.zip (about 2.4 MB, without the source code of the models):

PAJ7620 Gesture Sensor Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPPAJ7620.LIB, TEPI2CLCD16X2.LIB, TEPRESISTOR.LIB, TEPRGB.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPPAJ7620.DLL, TEPLCD.DLL, TEPRESISTOR.DLL, TEPRGB.DLL and TEPARDUINO.DLL.
  • Arduino Code: the demo sketch (Wire only).
  • Proteus Simulation: the demo project, its HEX file and copies of the DLLs.

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 PAJ7620 Gesture Sensor Library for Proteus Simulation

  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. Delete TEPPAJ7620.IDX from the LIBRARY folder if it is there.
  5. Start Proteus, press P and search for PAJ7620.

Proteus Simulation of a Gesture Lamp

The demo uses an A4 sheet with our Arduino UNO Library for Proteus V4.0. The module (U1) sits on the I2C bus with A4 and A5, and its INT goes to D2, an interrupt pin. A 16x2 LCD from our I2C LCD 16x2 Library for Proteus shares the bus at 0x27. The lamp is an RGB LED from our RGB LED Library for Proteus on the PWM pins D9, D10 and D11. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open PAJ7620-Gesture-Lamp-ArduinoUnoV4.pdsprj. The hand comes from the DEMO: ten gestures, 0.6 s apart, covering all nine types.

Figure: The whole simulation on an A4 sheet.

The Sketch

The first access wakes the chip; it is not acknowledged, so the sketch simply waits a millisecond:

  Wire.beginTransmission(PAJ); Wire.endTransmission();         // the first access wakes it (not acknowledged)

Then it reads the ID and enables the sensor in bank 1 - on real hardware this is where a library's begin() writes the full initialisation table:

  pajWrite(0xEF, 0x01); pajWrite(0x72, 0x01); pajWrite(0xEF, 0x00);   // bank 1: enable, back to bank 0

The interrupt only sets a flag. The loop reads both result registers - which clears them and releases INT - and handles every bit that is set:

  const byte f1 = pajRead(0x43), f2 = pajRead(0x44);           // reading clears the flags and releases INT

As a safety net the loop also reads the registers if INT is still LOW 100 ms later, in case an edge was missed.

PAJ7620 Simulation Results

Open the project and press Run. The demo runs 6.7 simulated seconds and took about 2 minutes 20 seconds on our PC with the pop-up open and the pictures being taken. Click U1 for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.

Wake-up, ID and Enable

The sketch starts with an empty write to 0x73. The chip is asleep, so it does not acknowledge - but the access wakes it, and the event log notes it awake 0.4 ms later. One millisecond after the empty write the sketch selects bank 0 and reads registers 0x00 and 0x01: 0x20 and 0x76, which the monitor prints as "PAJ7620 ID 0x7620". Then it unmasks all eight gestures of 0x43 and the wave of 0x44, switches to bank 1, writes 0x72 = 1 and comes back to bank 0. The monitor prints "enabled - show me a gesture", and the lamp starts red at 62 %.

Swipes: Right, Up, Right

The DEMO hand begins with a swipe to the right at 0.6 s. At the end of the movement the chip sets bit 3 of register 0x43 and pulls INT low; the interrupt on D2 sets a flag, the loop reads 0x43 and 0x44 - which clears them and releases INT - and the monitor prints the gesture RIGHT at 0.98 s with "yellow 62% ON": the lamp moved one step round the colour wheel. Then an upward swipe makes it brighter, 87 %, and a second swipe right turns it green. The pop-up at 2.45 s shows the RIGHT tile lit, the banner "RIGHT - register 0x43 bit 3 was set; the Arduino read it, INT released", and the next hand already moving away from the sensor, 6 cm above it.

Figure: A swipe to the right.
Figure: The module at work.
Figure: The simulation in the workspace.
Figure: Right again: green.

Backward and Forward: Off and On

The hand moves away from the sensor - a backward gesture, bit 5 - and the sketch switches the lamp off: "green 87% OFF". The next movement towards the sensor, forward, bit 4, switches it on again at 3.39 s. These two are the gestures real sensors find hardest, because a hand moving towards the sensor also moves a little up, down or sideways; some libraries wait about 0.8 s after an up, down, left or right and read again in case a forward or backward follows.

Figure: Forward: the lamp on.

Left, Down and the Circles

A swipe left brings yellow back, a swipe down dims it to 62 %, and then the hand draws circles: clockwise, bit 6, raises the brightness in a small step to 69 %; anticlockwise, bit 7, lowers it back to 62 %. The pop-up at 5.44 s shows the clockwise tile lit and the hand starting its anticlockwise circle at the top of the field.

Figure: A clockwise circle.

A Wave

The last gesture is a wave - the hand swinging left and right over the sensor - which lands in register 0x44, bit 0. The sketch starts the rainbow mode - the monitor prints WAVE at 6.39 s with "rainbow 62% ON" - and the RGB LED now steps round the colour wheel every 100 ms. The pop-up at 6.74 s shows the WAVE tile and an empty field above the sensor: ten gestures, all nine types, all seen, and twenty reads of the flag registers.

Figure: A wave.

The Graphs, the Event Log and the Check Page

The Graphs page plots the hand's position across the sensor, its distance and INT - every swipe a ramp, every circle a sine and a cosine, every INT pulse a few milliseconds long because the sketch reads the flags at once. The Event log lists the wake-up, the enable and each gesture with its flag. The Check page sums up the run: the supply and the address; the wake-up and the ID 0x7620; the enable; the set-up, in amber - only six register writes, where a real chip needs its initialisation table of about fifty; and the gestures: ten seen, none missed, twenty flag reads, INT released.

Figure: The Graphs page.
Figure: The Event log.
Figure: The Check page.

The Arduino's built-in serial monitor prints the ID and a line for every gesture with what it did to the lamp - colour, brightness and ON or OFF - so the whole demo can be read back gesture by gesture.

Figure: The Arduino's monitor.

Polling or INT?

Many examples simply read register 0x43 every 100 ms. That works, because the flags wait until they are read, but it keeps the I2C bus busy and adds up to 100 ms of delay. Using INT is better: the Arduino reads the sensor only when there is something to read, and the reading happens within microseconds of the gesture - in the simulation the INT pulse lasts only as long as the interrupt routine and one I2C read. The demo combines both: the interrupt for speed and a slow check of the INT pin as a safety net.

Gestures and Other Sensors

Gesture control combines nicely with the other sensors in this series. Our TCS3200 Color Sensor Library for Proteus can read the colour of something you hold up, and a gesture can then confirm or cancel; a distance sensor can wake the gesture sensor only when somebody approaches, saving power. The PAJ7620 itself also has a proximity mode, with an approach flag and a brightness value, for exactly that.

Try It Yourself

  • Click U1 while the simulation runs and use the chips: each of the nine gestures can be sent at any time.
  • Set PROFILE to MANUAL and control the lamp only with the chips.
  • Set ROTATE to 180: left and right, up and down swap - the lamp changes colour the other way.
  • Remove the enable line from the sketch: the Check page and the event log show every gesture as not seen.
  • Comment out the readGestures() call: INT stays LOW after the first gesture and the pop-up shows the flags waiting.

Ideas to Extend the Demo

  • Scroll through a menu on the LCD with up and down, choose with forward.
  • Control a music player: left / right for the track, circles for the volume.
  • Open a bin lid with a wave, without touching anything.

Your Own Sketches

The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.

Things to Know Before Using a Real PAJ7620

  • Initialisation: call a library's begin() - it writes the maker's table of about fifty registers. Without it the chip does not recognise gestures.
  • Wake-up: the first access is never acknowledged - wait a millisecond and continue.
  • Distance and speed: 5 - 15 cm above the sensor at a moderate speed; too close, too far, too fast or too slow is ignored.
  • Forward and backward: the most timing-sensitive gestures - some libraries wait about 0.8 s and read again.
  • Mounting: mark the module's orientation and map the directions in your code.

Troubleshooting

  • No ACK at all: the first access is never acknowledged - wait 1 ms and try again.
  • The ID is not 0x7620: bank 1 is still selected (write 0xEF = 0) or the wiring is wrong.
  • No gestures: the sensor is not enabled, or on a real chip the initialisation table is missing.
  • INT stays LOW: the flags were not read - read 0x43 and 0x44.
  • The part is not simulated: TEPPAJ7620.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The address, the banks, the wake-up, the ID, the enable, the masks, the nine flags and INT follow the PAJ7620U2 datasheet; the board is our own drawing.
  • Our own figures: awake 0.4 ms after the first access, a gesture's flag at the end of its movement, the brightness law and the DEMO hand.
  • Not modelled: the initialisation table (a real chip needs it), the 30 x 30 image itself, the proximity mode and the limits on the hand's speed.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or the maker of the PAJ7620.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the PAJ7620 Gesture Sensor Library for Proteus Simulation. I hope it helps you add touch-free control to your next project. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!