element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Experimenting with Gesture Sensors
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Gesture Sensors
  • More
  • Cancel
Experimenting with Gesture Sensors
Challenge Blog Smart Brain Training using MAX25405 Evaluation Kit - GUI and Python Serial Test #3
  • Challenge Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Experimenting with Gesture Sensors requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rahulkhanna
  • Date Created: 5 Nov 2022 8:54 PM Date Created
  • Views 511 views
  • Likes 7 likes
  • Comments 2 comments
  • gesture sensors
  • maxim integrated
  • experimenting with gesture sensors
  • MAX25405EVKIT
  • gesture
  • max32620fthr
Related
Recommended

Smart Brain Training using MAX25405 Evaluation Kit - GUI and Python Serial Test #3

rahulkhanna
rahulkhanna
5 Nov 2022
Smart Brain Training using MAX25405 Evaluation Kit - GUI and Python Serial Test #3

Welcome to my blog #3 of Smart Brain Training using MAX25405 Evaluation Kit. Here we will be testing Maxim Gesture Sensor EV Kit GUI and Python Serial Test application. You can find my previous blogs here: #1 Idea & #2 Getting started. 

Maxim Gesture Sensor EV Kit & 

In my previous blog, I shared how to set up the hardware and install the GUI from Maxim. As mentioned earlier, the GUI is simple and easy to interface with. We can select the Heat Map, Gesture, and Proximity tabs, which allows us to visualize the data.

  1. The Heatmap view gives a visual representation of the raw IR values with 6x10 blocks of data. We can adjust the sensitivity and the threshold using the Bias & filtering & Pixel clamping options.
  2. The gesture tab identifies pre-defined gestures such as Swipe left, right, up, and down. It also identifies Rotate CW, & CCW. 
  3. The proximity tab divides the sensing range into segments. We can divide the range into rows & columns that can be calibrated. 

image     image    image

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Serial Port Setup

As a USB device, the EV kit shows up as a COM port called Maxim Serial Port. The serial settings are as follows:

  • Baud Rate: 115200
  • Data: 8-bit
  • Parity: None
  • Stop: 1-bit
  • Flow Control: None

We will be sending the following commands: ping & poll. Ping command verifies communication at the processor level. The processor responds with an 'ACK' string. A poll command is used to retrieve gesture results from the EV kit. The poll command returns a data packet as a new-line ('\n') terminated string, with comma-delimited fields, in the following format: '[field 1],[field 2],…,[field 10]\n'

image image

From my understanding, the reg read 0xA1 2 prints the two register values stating from 0xA1. With these commands, we will be configuring the registers.  

image

To turn on analog mode, with a gear ratio of 10 (10 finger rotations = 1 dial rotation), and to turn off analog mode. (Digital dial mode, 1 finger rotation = 1 dial rotation). To enable all gestures including the CW and CCW rotations, send the following command: 

0x7F // Enable all gestures

On running the poll command, the following response is obtained. The poll command returns 10 parameters, where field 1 is the gesture result. We will run a python script to identify the gesture from the EVAL kit. 

image

Gesture Results Descriptions

This section describes the gesture results data obtained by the poll command.

Gesture Result

The gesture result values can be the following:

0 NONE
1 CLICK
2 ROTATE_CW
3 ROTATE_CCW
4 SWIPE_LEFT
5 SWIPE_RIGHT
6 SWIPE_UP
7 SWIPE_DOWN
8 RESERVED
9 RESERVED
10 LINGER_ON_REGION
11 RESERVED
12 ERROR

Install the pyserial package using the following command. 

image

if serialPort.in_waiting > 0:

        # Read data out of the buffer until a carraige return / new line is found
        serialString = serialPort.readline()

        # Print the contents of the serial data
        try:
            decoded_string = serialString.decode("Ascii")
            #print(decoded_string)
            gesture = decoded_string.split(",", 10)
            #print(gesture)

            if gesture[0] == '0':
                pass
            elif  gesture[0] == '1':
                print("Gesture Detected: Click")
            elif  gesture[0] == '2':
                print("Gesture Detected: ROTATE_CW")
            elif  gesture[0] == '3':
                print("Gesture Detected: ROTATE_CCW")
            elif  gesture[0] == '4':
                print("Gesture Detected: SWIPE_LEFT")
            elif  gesture[0] == '5':
                print("Gesture Detected: SWIPE_RIGHT")
            elif  gesture[0] == '6':
                print("Gesture Detected: SWIPE_UP")
            elif  gesture[0] == '7':
                print("Gesture Detected: SWIPE_DOWN")
        except:
            pass

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Now we have tested a basic python application using the MAX25405 EV kit. We will use the Gesture sensors with the Raspberry Pi in the next post. Follow to know more about the project. Thanks for reading,

Resources

  1. https://www.maximintegrated.com/en/design/technical-documents/app-notes/7/7422.html
  • Sign in to reply

Top Comments

  • dougw
    dougw over 1 year ago +1
    It looks like it has pretty good discrimination of gestures.
  • rahulkhanna
    rahulkhanna over 1 year ago in reply to dougw

    Yes it did. Adding a 100ms delay or higher can detect gestures properly without false positives.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 1 year ago

    It looks like it has pretty good discrimination of gestures.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube