Introduction

The Multi-Sensor Example Application can be used to cover a larger screen by using multiple Neonode Touch Sensor Modules. The example allows connecting up to four Neonode Touch Sensor Modules to a Raspberry Pi 4 and presenting them as a single absolute mouse input to the connected PC. The Touch Sensor Modules will be positioned on opposite sides of the display facing each other.

By connecting all sensor modules to the Raspberry Pi, it can handle and parse the touch input data from each module before sending it to the OS through USB HID as an absolute mouse device. The Multi-Sensor Example Application is open source, and uses the zForce SDK function library to send messages to the sensor module without having to consider deserialize or serialize the ASN.1 encoded messages.

Please refer to the Multi-Sensor Example Application for further information. 

Prerequisites

Please refer to the below prerequisites to run the implementation example

  • 2 or 4 Neonode Touch Sensor Modules. Two of each must share the same length.
  • 2 or 4 Neonode Interface Board 
  • 2 or 4 USB Cables
  • Raspberry Pi 4
  • USB type-C male-to-male cable
  • 5V 3A power supply
  • Power supply to 2-pin 2.54mm header pin converter

Get Started

  1. Measure the height and width of the display to make sure that the two Touch Active Areas can overlap each other. The size of the TAA depends on the sensor module's length, please refer to Mechanical Data for further information.
  2. Download Multi-Sensor Example Application to the RPi4. 
  3. Choose the preferred Mechanical Setup below: 

Dual Horizontal Sensor Alignment

Please refer to the below step-by-step guide to create a Horizontal Sensor Alignment using two sensor modules. 

  1. Position the two Touch Sensor Modules above and under the display, facing each other:

    1. The upper sensor should have the PCB side facing outward, and the connector to the left.
    2. The lower sensor should have the steel chassi facing outward, and the connector to the left.
    3. Slightly tilt all sensor modules ~3° outwards to reduce interference. The degree of tilt might increase or decrease depending on how large the surface is, but you should strive not to over shoot the opposite sensor by more than 2-3 cm.

  2. Connect the sensors to the RPi4 using the Interface board through USB.
  3. Connect the RPi4 to the power supply using the header pin converter.
  4. Connect the RPi4 to the computer through USB-C.

  5. Go to Source >> Common.h and adjust the following definition accordingly.

    #define NUMBER_OF_SENSORS 2             // Number of sensors connected to the raspberry pi.
    #define SENSOR_ORIENTATION_HORIZONTAL 1 // Which orientation the sensors are mounted on the screen. 
    										// 1 for horizontal (top and bottom), 0 for vertical (on the sides).
    
    const int32_t hostScreenWidth = 3456;   // Width of the screen which the raspberry pi will be sending touches to.
    const int32_t hostScreenHeight = 4500;  // Height of the screen which the raspberry pi will be sending touches to.

    If the Touch Sensor Modules are longer than the display, or if the facing Touch Active Areas are overlapping more than 3 cm, it is recommended to minimize the Touch Active Area to reduce interference. Please refer to section Apply a new Touch Active Area Size below for further information on how to minimize the Touch Active Area.

  6. Build executable, and run the application.

  7. Verify that each sensor is in the correct position by touching within the Touch Active Area of each sensor. If motion is reversed, visit the sensor_position.csv file to adjust the sensor positions.

    1. Go to sensor_position.csv and adjust the defined sensor positions:

      typedef enum SensorPosition
      {
      	SensorPositionTopLeft = 0,
      	SensorPositionBottomLeft = 1,
      	SensorPositionTopRight = 2,
      	SensorPositionBottomRight = 3
      } SensorPosition;
  8. Shutdown and re-run the application.

  9. The connected Touch Sensor Modules should now cover the display. Please refer to Multi-Sensor Example Application for further documentation.

Dual Vertical Sensor Alignment

Please refer to the below step-by-step guide to create a Vertical Sensor Alignment using two sensor modules. 

  1. Position the two Touch Sensor Modules on the left and right hand side of the display, facing each other:
    1. The sensor module on the left hand side should have the steel chassi facing outward, and the connector to the left.
    2. The sensor module on the right hand side should have the PCB side facing outward, and the connector to the left.
    3. Slightly tilt all sensor modules ~3° outwards to reduce interference. The degree of tilt might increase or decrease depending on how large the surface is, but you should strive not to over shoot the opposite sensor by more than 2-3 cm.



  2. Connect the sensors to the RPi4 using the Interface board through USB.
  3. Connect the RPi4 to the power supply using the header pin converter.
  4. Connect the RPi4 to the computer through USB-C.

  5. Go to Source >> Common.h and adjust the following definition accordingly.

    #define NUMBER_OF_SENSORS 2             // Number of sensors connected to the raspberry pi.
    #define SENSOR_ORIENTATION_HORIZONTAL 0 // Which orientation the sensors are mounted on the screen. 
    										// 1 for horizontal (top and bottom), 0 for vertical (on the sides).
    
    const int32_t hostScreenWidth = 4500;   // Width of the screen which the raspberry pi will be sending touches to.
    const int32_t hostScreenHeight = 3456;  // Height of the screen which the raspberry pi will be sending touches to.

    If the Touch Sensor Modules are longer than the display, or if the facing Touch Active Areas are overlapping more than 3 cm, it is recommended to minimize the Touch Active Area to reduce interference. Please refer to section Apply a new Touch Active Area Size below for further information on how to minimize the Touch Active Area.

  6. Build executable, and run the application.

  7. Verify that each sensor is in the correct position by touching within the Touch Active Area of each sensor. If motion is reversed, visit the sensor_position.csv file to adjust the sensor positions.
    1. Go to sensor_position.csv and adjust the defined sensor positions:

      typedef enum SensorPosition
      {
      	SensorPositionTopLeft = 0,
      	SensorPositionBottomLeft = 1,
      	SensorPositionTopRight = 2,
      	SensorPositionBottomRight = 3
      } SensorPosition;
  8. Shutdown and re-run the application.

  9. The connected Touch Sensor Modules should now cover the display. Please refer to Multi-Sensor Example Application for further documentation.

Quad Horizontal Sensor Alignment

Please refer to the below step-by-step guide to create a Horizontal Sensor Alignment using four sensor modules. 

  1. Position two Touch Sensor Modules on the upper side, and two on the bottom of the display, facing each other:
    1. The sensor module on the upper left should have the PCB side facing outward, and the connector to the left.
    2. The sensor module on the upper right should have the steel chassi facing outward, and the connector to the left.
    3. The sensor module on the lower left should have the steel chassi facing outward, and the connector to the left.
    4. The sensor module on the lower right hand sides should have the PCB side facing outward, and the connector to the left.
    5. Slightly tilt all sensor modules ~3° outwards to reduce interference. The degree of tilt might increase or decrease depending on how large the surface is, but you should strive not to over shoot the opposite sensor by more than 2-3 cm.



  2. Connect the sensors to the RPi4 using the Interface board through USB.
  3. Connect the RPi4 to the power supply using the header pin converter.
  4. Connect the RPi4 to the computer through USB-C.

  5. Go to Source >> Common.h and adjust the following definition accordingly.

    #define NUMBER_OF_SENSORS 4             // Number of sensors connected to the raspberry pi.
    #define SENSOR_ORIENTATION_HORIZONTAL 1 // Which orientation the sensors are mounted on the screen. 
    										// 1 for horizontal (top and bottom), 0 for vertical (on the sides).
    
    const int32_t hostScreenWidth = 6912;   // Width of the screen which the raspberry pi will be sending touches to.
    const int32_t hostScreenHeight = 4500;  // Height of the screen which the raspberry pi will be sending touches to.

    If the Touch Sensor Modules are longer than the display, or if the facing Touch Active Areas are overlapping more than 3 cm, it is recommended to minimize the Touch Active Area to reduce interference. Please refer to section Apply a new Touch Active Area Size below for further information on how to minimize the Touch Active Area.

  6. Build executable, and run the application.

  7. Verify that each sensor is in the correct position by touching within the Touch Active Area of each sensor. If motion is reversed, visit the sensor_position.csv file to adjust the sensor positions.
    1. Go to sensor_position.csv and adjust the defined sensor positions:

      typedef enum SensorPosition
      {
      	SensorPositionTopLeft = 0,
      	SensorPositionBottomLeft = 1,
      	SensorPositionTopRight = 2,
      	SensorPositionBottomRight = 3
      } SensorPosition;
  8. Shutdown and re-run the application.

  9. The connected Touch Sensor Modules should now cover the display. Please refer to Multi-Sensor Example Application for further documentation.

Quad Vertical Sensor Alignment

Please refer to the below step-by-step guide to create a Vertical Sensor Alignment using four sensor modules. 

  1. Position two Touch Sensor Modules on the upper side, and two on the bottom of the display, facing each other:
    1. The sensor module on the upper left should have the steel chassi facing outward, and the connector to the left.
    2. The sensor module on the upper right  should have the PCB side facing outward, and the connector to the left.
    3. The sensor module on the lower left  should have the PCB side facing outward, and the connector to the left.
    4. The sensor module on the lower right should have the steel chassi facing outward, and the connector to the left.
    5. Slightly tilt all sensor modules ~3° outwards to reduce interference. The degree of tilt might increase or decrease depending on how large the surface is, but you should strive not to over shoot the opposite sensor by more than 2-3 cm.



  2. Connect the sensors to the RPi4 using the Interface board through USB.
  3. Connect the RPi4 to the power supply using the header pin converter.
  4. Connect the RPi4 to the computer through USB-C.

  5. Go to Source >> Common.h and adjust the following definition accordingly.

    #define NUMBER_OF_SENSORS 4             // Number of sensors connected to the raspberry pi.
    #define SENSOR_ORIENTATION_HORIZONTAL 0 // Which orientation the sensors are mounted on the screen. 
    										// 1 for horizontal (top and bottom), 0 for vertical (on the sides).
    
    const int32_t hostScreenWidth = 4500;   // Width of the screen which the raspberry pi will be sending touches to.
    const int32_t hostScreenHeight = 6912;  // Height of the screen which the raspberry pi will be sending touches to.

    If the Touch Sensor Modules are longer than the display, or if the facing Touch Active Areas are overlapping more than 3 cm, it is recommended to minimize the Touch Active Area to reduce interference. Please refer to section Apply a new Touch Active Area Size below for further information on how to minimize the Touch Active Area.

  6. Build executable, and run the application.

  7. Verify that each sensor is in the correct position by touching within the Touch Active Area of each sensor. If motion is reversed, visit the sensor_position.csv file to adjust the sensor positions.
    1. Go to sensor_position.csv and adjust the defined sensor positions:

      typedef enum SensorPosition
      {
      	SensorPositionTopLeft = 0,
      	SensorPositionBottomLeft = 1,
      	SensorPositionTopRight = 2,
      	SensorPositionBottomRight = 3
      } SensorPosition;
  8. Shutdown and re-run the application.

  9. The connected Touch Sensor Modules should now cover the display. Please refer to Multi-Sensor Example Application for further documentation.

Apply a new Touch Active Area Size

If the Touch Sensor Modules are longer than the display, decrease the Touch Active Area Size to match the size of the display for better accuracy.

A new size for the TAA can be set individually for each sensor by using the following identifiers: 

  • SensorPositionTopLeft
  • SensorPositionTopRight
  • SensorPositionBottomLeft
  • SensorPositionBottomRight

The function SetTouchActiveArea() can be used to send a Touch Active Area message to the sensor module. 

SetTouchActiveArea(SensorDevice *Self, uint_32 LowerBounderyX, uint_32 UpperBounderyX, bool XisValid, uint_32 LowerBounderyY, uint_32 UpperBounderyY, bool YisValid);


To Apply a new Touch Active Area Size: 

  1. Open Main.c
  2. Go to [line 311], where we get the default Touch Active Area Size.
  3. Set a new Touch Active Area Size by exchanging the GetTouchActiveArea IF-statement [line 311-315] to the following:

    SetTouchActiveArea()
    if (digitizer->SensorConfiguration->SensorPosition == SensorPositionTopLeft) 
    {
    	if (!digitizer->Sensor->SetTouchActiveArea(digitizer->Sensor, 36, 3456, true, 0, 3277, true)) //Apply TAA Size for the Top Left Sensor Module
        {
        	printf("Sensor %d: SetTouchActiveArea error (%d) %s.\n", digitizer->SensorIndex, zForceErrno, ErrorString(zForceErrno));
            shutDownNow = true;
        }
    }
    else if (digitizer->SensorConfiguration->SensorPosition == SensorPositionBottomLeft)
    {
        if (!digitizer->Sensor->SetTouchActiveArea(digitizer->Sensor, 36, 3456, true, 0, 3277, true)) //Apply TAA Size for the Btm Left Sensor Module
        {
            printf("Sensor %d: SetTouchActiveArea error (%d) %s.\n", digitizer->SensorIndex, zForceErrno, ErrorString(zForceErrno));
            shutDownNow = true;
        }
    }
    
    else if (digitizer->SensorConfiguration->SensorPosition == SensorPositionTopRight)
    {
        if (!digitizer->Sensor->SetTouchActiveArea(digitizer->Sensor, 36, 3456, true, 0, 3277, true)) //Apply TAA Size for the Top Left Sensor Module
        {
            printf("Sensor %d: SetTouchActiveArea error (%d) %s.\n", digitizer->SensorIndex, zForceErrno, ErrorString(zForceErrno));
            shutDownNow = true;
    	}
    }
    else if (digitizer->SensorConfiguration->SensorPosition == SensorPositionBottomRight)
    {
        if (!digitizer->Sensor->SetTouchActiveArea(digitizer->Sensor, 36, 3456, true, 0, 3277, true)) //Apply TAA Size for the Btm Right Sensor Module
        {
            printf("Sensor %d: SetTouchActiveArea error (%d) %s.\n", digitizer->SensorIndex, zForceErrno, ErrorString(zForceErrno));
            shutDownNow = true;
    	}
    }
    else
    {
    	if (!digitizer->Sensor->GetTouchActiveArea(digitizer->Sensor))
        {
            printf("Sensor %d: GetTouchActiveArea error (%d) %s.\n", digitizer->SensorIndex, zForceErrno, ErrorString(zForceErrno));
            shutDownNow = true;
        }
    }
    
  4. Assign the new LowerBounderyX, UpperBounderyX, LowerBounderyY, UpperBounderyY. The Touch Active Area is Measured in 1/10 mm from the sensor module's origin point.

    1. If the Sensor Modules are longer than the display, adjust the TAA boundaries for the sensor modules that sticks out on the side(s).  
      1. LowerBounderyX marks the starting point for the TAA in x-direction, measured from the sensor module's origin point.
      2. UpperBounderyX marks the end point of the TAA in x-direction, measured from the sensor module's origin point.
    2. If the facing Touch Active Areas are overlapping more than 3 cm, adjust the the TAA boundaries so that the facing sensors TAA are overlapping approximately 3 cm to reduce interference.

      1. LowerBounderyY marks the starting point for the TAA in y-direction, measured from the sensor module's origin point.
      2. UpperBounderyY marks the end point for the TAA in y-direction, measured from the sensor module's origin point.

For further information, please refer to the Multi-Sensor Example Application or contact Neonode support team.



  • No labels