Common ground problem - Wireless Fencing Scoring Machine

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9
Hi, I'm doing a project for myself and my fencing group, the project is a wireless fencing scoring machine, the "fencing scoring machine"is done, my problem is the wireless part, not quite the communication, but the analogRead.

So, my project works detecting changes in analog pins
(https://www.instructables.com/id/Arduino-Fencing-Scoring-Apparatus/) it's based in this project, in step 5 has a image that show how the analog pins are connected with resistors. Btw, my problem is, I have 2 arduinos nano, each one have 3 pins ( two with resistor to gnd and 1 to 5v), the code is basic an analogRead, but it's not detecting when i touch the other arduino, I know that's the ground issue, it's a way to solve that? code or even harware?





the pins 1 - 2 - 3 are Guard (sword guard) - Weapon - Lamé (clothes)

in Epee the tip close the pins 2 and 3 to make a "touch" (epee works fine, it's not reading anything from other arduino)

in sabre we use 2 pins, one for clothes, and one for weapon, the weapon touch the clothes from the opponent, the weapon drops from 1023 to around 512 anaog read. the clothes raise from 0 to 510

in foil is the complex that i dont want to do it now.

the problem is, when powered with the same psu, all runs fine. But when powered with bat, it's not reading. I've red about the common ground issue, it's 2 boards, different battery.
Thanks!
 

Attachments

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9
Hi, thanks for answer, but I cant, it's a wireless board, I just need some help to solve this problem, some way that the other arduino can detect the touch with no common ground.
 

Alec_t

Joined Sep 17, 2013
14,263
I see only 2 wireless modules. For a wireless fencing system won't you need 3? (One transmitter on each player and one receiver on the scoring unit).
 

djsfantasi

Joined Apr 11, 2010
9,155
Hi, thanks for answer, but I cant, it's a wireless board, I just need some help to solve this problem, some way that the other arduino can detect the touch with no common ground.
Detect all touches on one arduino. Transmit them to the second. If you need two Arduinos on one fencer, then why can’t you connect grounds?

Basically, since the boards are wireless, create a mesh. Hits in the first uP are transmitted via wireless to the second and vice versus. Pick one uP to transmit everything to s base station.
 

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9
Hi, thanks to answer, the problem here is, each player have a nano, and the main score board is a mega pro. I can't connect eache player with a wire since player boards are wireless, I red about using person body capacitance as gnd, but I have no idea how to do it.

the logic here is, each nano (2 in total, one with each player) send a signal to the main score box when touch is detected, but, i cant make a way to detect it.
 

djsfantasi

Joined Apr 11, 2010
9,155
Each Nano should be able to detect a hit. But to let the Mega know, you need to communicate between the two devices.

So why can’t you use the wireless connection to transmit the data?
 

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9
Each Nano should be able to detect a hit. But to let the Mega know, you need to communicate between the two devices.

So why can’t you use the wireless connection to transmit the data?
So I use a NRF24L01, but I already tested the nano's without the common ground, it's not detecting anything, just when i link both nano's that i got a read.

it's like this: .
I just dont know how this work, how it's detecting without common ground
 

djsfantasi

Joined Apr 11, 2010
9,155
So forget about Leon Paul and fencing for a bit.

Ever been in a hotel and the elevator buttons don’t press? On your smartphone, what happens if you touch the screen. Can you select items or move things around with your finger?

Is there a ground connection in either case? No. It’s using capacitive sensors. I have NO clue if that’s how Leon is sensing a foil or epee.

But it is a technology that doesn’t depend on an electrical connection between two bodies.

Once a hit is sensed, then that information can be shared, because you have a wireless connection.

Arduino has a library for capacitive touch sensing. I suggest you check it out. Using the analog pins may not be the best solution.
 
Last edited:

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9
So forget about Leon Paul and fencing for a bit.

Ever been in a hotel and the elevator buttons don’t press? On your smartphone, what happens if you touch the screen. Can you select items or move things around with your finger?

Is there a ground connection in either case? No. It’s using capacitive sensors. I have NO clue if that’s how Leon is sensing a foil or epee.

But it is a technology that doesn’t depend on an electrical connection between two bodies.

Once a hit is sensed, then that information can be shared, because you have a wireless connection.

Arduino has a library for capacitive touch sensing. I suggest you check it out. Using the analog pins may not be the best solution.

Cool, thanks! I will check this library!
 

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9
Here is the code of main unit (works fine, all weapons works and lights too)
Code:
//  Fencing Code:     Wnew
//  Developer: João Paulo Poeck
//  Prototype: Fencing Scoring Machine V6.0 MINI
//  Year: 2019 1S

//===================================================================================//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <FastLED.h>
#include <SPI.h>
#include <NRFLite.h>
//============
// #defines
//============
//TODO: set up debug levels correctly
#define DEBUG 0
#define TEST_LIGHTS       // turns on lights for a second on start up
#define TEST_ADC_SPEED    // used to test sample rate of ADCs
//#define REPORT_TIMING     // prints timings over serial interface
#define BUZZERTIME  1000  // length of time the buzzer is kept on after a hit (ms)
#define LIGHTTIME   3000  // length of time the lights are kept on after a hit (ms)
#define BAUDRATE   57600  // baudrate of the serial debug interface

//============
// Pin Setup
//============


const uint8_t groundPinA = A2;    // Ground A pin - Analog
const uint8_t weaponPinA = A4;    // Weapon A pin - Analog
const uint8_t lamePinA   = A6;    // Lame   A pin - Analog (Epee return path)
const uint8_t lamePinB   = A7;    // Lame   B pin - Analog (Epee return path)
const uint8_t weaponPinB = A5;    // Weapon B pin - Analog
const uint8_t groundPinB = A3;    // Ground B pin - Analog


const uint8_t buzzerPin  =  7;        // buzzer pin

//=================
// RADIO SETUP
//=================
const static uint8_t RADIO_ID = 0;       // Our radio's id.  The transmitter will send to this id.
const static uint8_t PIN_RADIO_CE = 9;
const static uint8_t PIN_RADIO_CSN = 53;
NRFLite _radio;
int teste[3];

//=========================
// values of analog reads
//=========================
int weaponA = 0;
int weaponB = 0;
int lameA   = 0;
int lameB   = 0;
int groundA = 0;
int groundB = 0;

//=========================
// MODE VALUES OHHHH YEAH
//=========================

int pushButton = 23;
int state = 0;
int laststate = 0;
int currentMode2 = 0;
//========================
//    LED WS2811
//========================
#define NUM_LEDS 17
#define DATA_PIN 3

CRGB leds[NUM_LEDS];

//=========
// LCD
//=========

LiquidCrystal_I2C lcd(0x27, 16, 2 );

//=======================
// depress and timeouts
//=======================
long depressAtime = 0;
long depressBtime = 0;
bool lockedOut    = false;

//=======================
// WIFI - WIRED CONF.
//=======================
int wirelessButton = 27;
int reading;           // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin
int juke = 1;
int toques [3];
int values[2];
//==========================
// Lockout & Depress Times
//==========================
// the lockout time between hits for foil is 300ms +/-25ms
// the minimum amount of time the tip needs to be depressed for foil 14ms +/-1ms
// the lockout time between hits for epee is 45ms +/-5ms (40ms -> 50ms)
// the minimum amount of time the tip needs to be depressed for epee 2ms
// the lockout time between hits for sabre is 120ms +/-10ms
// the minimum amount of time the tip needs to be depressed (in contact) for sabre 0.1ms -> 1ms
// These values are stored as micro seconds for more accuracy
//                         foil   epee   sabre
const long lockout [] = {300000,  45000, 120000};  // the lockout time between hits
const long depress [] = { 14000,   2000,   1000};  // the minimum amount of time the tip needs to be depressed



//=================
// mode constants
//=================
const uint8_t FOIL_MODE  = 0;
const uint8_t EPEE_MODE  = 1;
const uint8_t SABRE_MODE = 2;

uint8_t currentMode = SABRE_MODE;

//=========
// states
//=========
boolean depressedA  = false;
boolean depressedB  = false;
boolean hitOnTargA  = false;
boolean hitOffTargA = false;
boolean hitOnTargB  = false;
boolean hitOffTargB = false;

#ifdef TEST_ADC_SPEED
long now;
long loopCount = 0;
bool done = false;
#endif

int Wa;
int La;
//================
// Configuration
//================
void setup() {
  // set the internal pullup resistor on modePin
  pinMode(pushButton, INPUT);
  pinMode(wirelessButton, INPUT);
  // LEDS
  FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);


  pinMode(buzzerPin,  OUTPUT);


  lcd.init();
#ifdef TEST_LIGHTS
  testLights();
#endif


  lcd.setCursor(0, 0);
  lcd.print("SCORING MACHINE");

  // this optimises the ADC to make the sampling rate quicker
  //adcOpt();

  Serial.begin(BAUDRATE);
  Serial.println("3 Weapon Scoring Box");
  Serial.println("====================");
  Serial.print  ("Mode : ");
  Serial.println(currentMode);
  _radio.init(RADIO_ID, PIN_RADIO_CE, PIN_RADIO_CSN);

  leds[8] = CRGB::Gray;
  FastLED.show();
  resetValues();
}


//=============
// ADC config
//=============
void adcOpt() {

  // the ADC only needs a couple of bits, the atmega is an 8 bit micro
  // so sampling only 8 bits makes the values easy/quicker to process
  // unfortunately this method only works on the Due.
  //analogReadResolution(8);

  // Data Input Disable Register
  // disconnects the digital inputs from which ever ADC channels you are using
  // an analog input will be float and cause the digital input to constantly
  // toggle high and low, this creates noise near the ADC, and uses extra
  // power Secondly, the digital input and associated DIDR switch have a
  // capacitance associated with them which will slow down your input signal
  // if you’re sampling a highly resistive load
  DIDR0 = 0x7F;

  // set the prescaler for the ADCs to 16 this allowes the fastest sampling
  bitClear(ADCSRA, ADPS0);
  bitClear(ADCSRA, ADPS1);
  bitSet  (ADCSRA, ADPS2);
}


//============
// Main Loop
//============
void loop() {



  while (juke == 0) {
    wifiwire();
    change();
    weaponA = analogRead(weaponPinA);
    weaponB = analogRead(weaponPinB);
    lameA   = analogRead(lamePinA);
    lameB   = analogRead(lamePinB);
    lcd.setCursor(7, 1);
    lcd.print(lameB);
    lcd.setCursor(2, 1);
    lcd.print(lameA);

    signalHits();
    if      (currentMode == FOIL_MODE)
      foil();
    else if (currentMode == EPEE_MODE)
      epee();
    else if (currentMode == SABRE_MODE)
      sabre();

#ifdef TEST_ADC_SPEED
    if (loopCount == 0) {
      now = micros();
    }
    loopCount++;
    if ((micros() - now >= 1000000) && done == false) {
      Serial.print(loopCount);
      Serial.println(" readings in 1 sec");
      done = true;
    }
#endif
  }

  while (juke == 1) {
    wifiwire();
    change();


    if (currentMode == SABRE_MODE) {
      _radio.readData(&toques);
      teste[0] = toques[0];
      if (toques[1] < 1020) {
        teste[1] = toques[1] - 400;
      } else {
        teste[1] = toques[1];
      }

      if (toques[2] > 0.1) {
        teste[2] = 500;
      } else {
        teste[2] = toques[2];
      }

    } else {
      _radio.readData(&teste);
    }


    if (teste[0] == 1) {
      weaponA = teste[1];
      lameA   = teste[2];
      teste[0] = 0;
    } else {
      weaponA = 1023;
      lameA   = 0;
    }

    if (teste[0] == 2) {
      weaponB = teste[1];
      lameB   = teste[2];
      teste[0] = 0;
    } else {
      weaponB = 1023;
      lameB   = 0;
    }


    lcd.setCursor(7, 1);
    lcd.print(toques[2]);
    lcd.setCursor(2, 1);
    lcd.print(weaponA);


    signalHits();
    if      (currentMode == FOIL_MODE)
      foil();
    else if (currentMode == EPEE_MODE)
      epee();
    else if (currentMode == SABRE_MODE)
      sabre();

#ifdef TEST_ADC_SPEED
    if (loopCount == 0) {
      now = micros();
    }
    loopCount++;
    if ((micros() - now >= 1000000) && done == false) {
      Serial.print(loopCount);
      Serial.println(" readings in 1 sec");
      done = true;
    }
#endif
  }


}


//==============
// wifi - wired
//==============
void wifiwire() {

  reading = digitalRead(wirelessButton);

  if (reading == HIGH && previous == LOW )
  {
    if (juke == 1) {
      juke = 0;
      lcd.setCursor(12, 1);
      lcd.print("WIRE");
    }    else {
      juke = 1;
      lcd.setCursor(12, 1);
      lcd.print("WIFI");
    }

  }
  previous = reading;
}



//=============
// CHANGE MODE
//=============
void change() {
  state = digitalRead(pushButton);

  if (state != laststate) {
    if (state == HIGH) {
      currentMode++;
    }

    else {


      if (currentMode == 3) currentMode = 0;
    }
    Serial.print("Mode changed to: ");
    Serial.println(currentMode);


    lcd.setCursor(0, 1);
    lcd.print(currentMode);




  }
  laststate = state;
}


//============================
// Sets the correct mode led
//============================
void setModeLeds() {
  if (currentMode == FOIL_MODE) {
    // Foil
  } else {
    if (currentMode == EPEE_MODE) {
      // Epee
    } else {
      if (currentMode == SABRE_MODE) {
        // Sabre
      }
    }
  }
  delay(500);
  //All off
}






//===================
// Main foil method
//===================
void foil() {

  long now = micros();
  if (((hitOnTargA || hitOffTargA) && (depressAtime + lockout[0] < now)) ||
      ((hitOnTargB || hitOffTargB) && (depressBtime + lockout[0] < now))) {
    lockedOut = true;
  }

  // weapon A
  if (hitOnTargA == false && hitOffTargA == false) { // ignore if A has already hit
    // off target
    if (900 < weaponA && lameB < 100) {
      if (!depressedA) {
        depressAtime = micros();
        depressedA   = true;
      } else {
        if (depressAtime + depress[0] <= micros()) {
          hitOffTargA = true;
        }
      }
    } else {
      // on target
      if (400 < weaponA && weaponA < 600 && 400 < lameB && lameB < 600) {
        if (!depressedA) {
          depressAtime = micros();
          depressedA   = true;
        } else {
          if (depressAtime + depress[0] <= micros()) {
            hitOnTargA = true;
          }
        }
      } else {
        // reset these values if the depress time is short.
        depressAtime = 0;
        depressedA   = 0;
      }
    }
  }

  // weapon B
  if (hitOnTargB == false && hitOffTargB == false) { // ignore if B has already hit
    // off target
    if (900 < weaponB && lameA < 100) {
      if (!depressedB) {
        depressBtime = micros();
        depressedB   = true;
      } else {
        if (depressBtime + depress[0] <= micros()) {
          hitOffTargB = true;
        }
      }
    } else {
      // on target
      if (400 < weaponB && weaponB < 600 && 400 < lameA && lameA < 600) {
        if (!depressedB) {
          depressBtime = micros();
          depressedB   = true;
        } else {
          if (depressBtime + depress[0] <= micros()) {
            hitOnTargB = true;
          }
        }
      } else {
        // reset these values if the depress time is short.
        depressBtime = 0;
        depressedB   = 0;
      }
    }
  }
}


//===================
// Main epee method
//===================
void epee() {
  long now = micros();
  if ((hitOnTargA && (depressAtime + lockout[1] < now)) || (hitOnTargB && (depressBtime + lockout[1] < now))) {
    lockedOut = true;
  }

  // weapon A
  //  no hit for A yet    && weapon depress    && opponent lame touched
  if (hitOnTargA == false) {
    if (400 < weaponA && weaponA < 600 && 400 < lameA && lameA < 600) {
      if (!depressedA) {
        depressAtime = micros();
        depressedA   = true;
      } else {
        if (depressAtime + depress[1] <= micros()) {
          hitOnTargA = true;
        }
      }
    } else {
      // reset these values if the depress time is short.
      if (depressedA == true) {
        depressAtime = 0;
        depressedA   = 0;
      }
    }
  }

  // weapon B
  //  no hit for B yet    && weapon depress    && opponent lame touched
  if (hitOnTargB == false) {
    if (400 < weaponB && weaponB < 600 && 400 < lameB && lameB < 600) {
      if (!depressedB) {
        depressBtime = micros();
        depressedB   = true;
      } else {
        if (depressBtime + depress[1] <= micros()) {
          hitOnTargB = true;
        }
      }
    } else {
      // reset these values if the depress time is short.
      if (depressedB == true) {
        depressBtime = 0;
        depressedB   = 0;
      }
    }
  }
}


//===================
// Main sabre method
//===================
void sabre() {

  long now = micros();
  if (((hitOnTargA || hitOffTargA) && (depressAtime + lockout[2] < now)) ||
      ((hitOnTargB || hitOffTargB) && (depressBtime + lockout[2] < now))) {
    lockedOut = true;
  }

  // weapon A
  if (hitOnTargA == false && hitOffTargA == false) { // ignore if A has already hit
    // on target
    if (400 < weaponA && weaponA < 600 && 400 < lameB && lameB < 600) {
      if (!depressedA) {
        depressAtime = micros();
        depressedA   = true;
      } else {
        if (depressAtime + depress[2] <= micros()) {
          hitOnTargA = true;
        }
      }
    } else {
      // reset these values if the depress time is short.
      depressAtime = 0;
      depressedA   = 0;
    }
  }

  // weapon B
  if (hitOnTargB == false && hitOffTargB == false) { // ignore if B has already hit
    // on target
    if (400 < weaponB && weaponB < 600 && 400 < lameA && lameA < 600) {
      if (!depressedB) {
        depressBtime = micros();
        depressedB   = true;
      } else {
        if (depressBtime + depress[2] <= micros()) {
          hitOnTargB = true;
        }
      }
    } else {
      // reset these values if the depress time is short.
      depressBtime = 0;
      depressedB   = 0;
    }
  }
}


//==============
// Signal Hits
//==============
void signalHits() {
  // non time critical, this is run after a hit has been detected
  if (lockedOut && hitOnTargA == HIGH) {

    fill_solid( leds, NUM_LEDS - 9, CRGB::Red);

    FastLED.show();

  }


  if (lockedOut && hitOffTargA == HIGH) {
    fill_solid( leds, NUM_LEDS - 9, CRGB::Yellow);

    FastLED.show();

  }

  if (lockedOut && hitOffTargB == HIGH) {
    leds[9] = CRGB::Yellow;
    leds[10] = CRGB::Yellow;
    leds[11] = CRGB::Yellow;
    leds[12] = CRGB::Yellow;
    leds[13] = CRGB::Yellow;
    leds[14] = CRGB::Yellow;
    leds[15] = CRGB::Yellow;
    leds[16] = CRGB::Yellow;


    FastLED.show();

  }

  if (lockedOut && hitOnTargB == HIGH) {
    leds[9] = CRGB::Green;
    leds[10] = CRGB::Green;
    leds[11] = CRGB::Green;
    leds[12] = CRGB::Green;
    leds[13] = CRGB::Green;
    leds[14] = CRGB::Green;
    leds[15] = CRGB::Green;
    leds[16] = CRGB::Green;


    FastLED.show();

  }


  if (lockedOut) {

    tone(buzzerPin, 2000);
#ifdef DEBUG
    String serData = String("hitOnTargA  : ") + hitOnTargA  + "\n"
                     + "hitOffTargA : "  + hitOffTargA + "\n"
                     + "hitOffTargB : "  + hitOffTargB + "\n"
                     + "hitOnTargB  : "  + hitOnTargB  + "\n"
                     + "Locked Out  : "  + lockedOut   + "\n";
    Serial.println(serData);

#endif
    resetValues();
  }

}

//======================
// Reset all variables
//======================
void resetValues() {
  delay(BUZZERTIME);             // wait before turning off the buzzer
  noTone(buzzerPin);
  delay(LIGHTTIME - BUZZERTIME); // wait before turning off the lights


  fill_solid( leds, NUM_LEDS - 9, CRGB::Black);
  leds[9] = CRGB::Black;
  leds[10] = CRGB::Black;
  leds[11] = CRGB::Black;
  leds[12] = CRGB::Black;
  leds[13] = CRGB::Black;
  leds[14] = CRGB::Black;
  leds[15] = CRGB::Black;
  leds[16] = CRGB::Black;
  FastLED.show();

  lockedOut    = false;
  depressAtime = 0;
  depressedA   = false;
  depressBtime = 0;
  depressedB   = false;

  hitOnTargA  = false;
  hitOffTargA = false;
  hitOnTargB  = false;
  hitOffTargB = false;

  delay(100);
}


//==============
// Test lights
//==============
void testLights() {
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("   STARTING...");
  fill_solid( leds, NUM_LEDS, CRGB::Red);
  FastLED.show();
  delay(300);

  fill_solid( leds, NUM_LEDS, CRGB::Green);
  FastLED.show();
  delay(300);

  fill_solid( leds, NUM_LEDS, CRGB::Blue);
  FastLED.show();
  tone(buzzerPin, 2000);
  delay(300);
  resetValues();
  lcd.setCursor(0, 1);
  lcd.print(currentMode);

}

Here is the nano's code:
Code:
#include <SPI.h>
#include <NRFLite.h>

#define TEST_ADC_SPEED

const static uint8_t RADIO_ID = 1;             // Our radio's id.
const static uint8_t DESTINATION_RADIO_ID = 0; // Id of the radio we will transmit to.
const static uint8_t PIN_RADIO_CE = 7;
const static uint8_t PIN_RADIO_CSN = 10;

NRFLite _radio;


const uint8_t groundPinA = A1;    // Ground A pin - Analog
const uint8_t weaponPinA = A2;    // Weapon A pin - Analog
const uint8_t lamePinA   = A3;    // Lame   A pin - Analog (Epee return path)


//              ID - weapon - lame - CHANGE ID FOR EACH BOX
int enviar[3] = { 2 , 0  , 0};


#ifdef TEST_ADC_SPEED
long now;
long loopCount = 0;
bool done = false;
#endif

int i = 0;
void setup() {
  //adcOpt();
  Serial.begin(115200);
  _radio.init(RADIO_ID, PIN_RADIO_CE, PIN_RADIO_CSN);




}



void loop() {
  // put your main code here, to run repeatedly:
  while (1) {

    read();
#ifdef TEST_ADC_SPEED
    if (loopCount == 0) {
      now = micros();
    }
    loopCount++;
    if ((micros() - now >= 1000000) && done == false) {
      Serial.print(loopCount);
      Serial.println(" readings in 1 sec");
      done = true;
    }
#endif
    analogWrite(

    if (enviar[1] < 1000 || enviar[2] > 100) {


    _radio.send(DESTINATION_RADIO_ID, &enviar, sizeof(enviar));
      i = 0;

    } else if (i == 1) {
    _radio.send(DESTINATION_RADIO_ID, &enviar, sizeof(enviar));
      i++;
    }


  }
}

void read() {
  enviar[1] = analogRead(weaponPinA);
  enviar[2]   = analogRead(lamePinA);

}
 

Thread Starter

joao paulo mattos poeck

Joined Jun 16, 2019
9

pdight

Joined Nov 9, 2019
2
No I'm not sure. I'm going this week to store buying new resistors and equipament, but, is there any way to address each blade and detect the touch in the jacket? I can test, I have my fencing equipament with me. Just preaparing myself.
Hi

Did you get this working? We have a thread on this topic at...https://forums.adafruit.com/viewtopic.php?f=8&t=156249&start=15 and we are looking at sending a signal into the lame and reading it from the other fencer.

If you found something that works I would love to hear about it!

Patrick
 

MisterBill2

Joined Jan 23, 2018
18,061
Capacitive touch switches mostly have 2 circuits behind the button and touching the button increases the capacitance between them That will not work in a system where the blade of one touches the body of another. So you need an entirely different technology to sense one person's blade contacting the clothes of another person. It will still be "capacitive sensing" but not at all the same. Each blade will need to have a source of RF excitation and then relative to the holder's capacitance, and then contact with the clothes of the other will alter the field strength. The clear problem is that contact with the other persons blade will also have an effect that will probably be greater than touching their clothes.
So here are some questions: How well are the blades isolated from their users hand capacitance, and how much resistance does the sensing cloth have between the areas that could be touched and the point where the circuit is connected? I have an alternative concept in mind but I need those answers to be able to determine if it could even work.
 

pdight

Joined Nov 9, 2019
2
Capacitive touch switches mostly have 2 circuits behind the button and touching the button increases the capacitance between them That will not work in a system where the blade of one touches the body of another. So you need an entirely different technology to sense one person's blade contacting the clothes of another person. It will still be "capacitive sensing" but not at all the same. Each blade will need to have a source of RF excitation and then relative to the holder's capacitance, and then contact with the clothes of the other will alter the field strength. The clear problem is that contact with the other persons blade will also have an effect that will probably be greater than touching their clothes.
So here are some questions: How well are the blades isolated from their users hand capacitance, and how much resistance does the sensing cloth have between the areas that could be touched and the point where the circuit is connected? I have an alternative concept in mind but I need those answers to be able to determine if it could even work.
Lets take foil as an example (there are 3 weapons, foil, epee and sabre and they all have different characteristics but if you get foil to work the others will work with a bit of modification) all fencers must wear gloves and long sleeved jackets which will form a layer between them and the weapon. Note that as the bout continues a fair bit of sweat will be soaked into these garments.

The metal faced lame jacket a fencer wears on top of their normal jackets have a plastic back layer that sits between the metal fabric in the lame jacket and the cloth of the normal jacket and this will prevent the lame from getting sweaty.

The tip of a foil is quite a complex bit of engineering...

1573460949240.png
Essentially when the foil tip is depressed (it must be depressed for at least 5ms +/- 1ms) there is a circuit open from whatever it is in contact with back to the bodywire plug via a wire that is glued into a groove running the 95cm length of the foil. You can expect some signal interference over this 95cm.

For your information, the suggestion in the other forum (see previous link which has lots of other information too) is to put a high-frequency AC signal into the lame and weapon of each fencer, using different frequencies for each fencer and weapon, and then read this signal to determine what has been hit using a mosfet's gate and a 10M resistor. Or use Op Amps.

My background is software. I have a couple of development boards and all the fencing equipment but need a circuit diagram and list of components so I can breadboard something to do some field trials. I was thinking that when the tip is depressed we temporarily stop the signal into the weapon to allow us read whatever we have hit more easily. I was also thinking about using a "I2C ADS1115 16 Bit ADC 4 Channel Module With Programmable Gain Amplifier For Arduino RPi" to pick up the signal since it has an adjustable amplifier and will protect the micocontroller. This might be flexible for field tests.

Is this enough information for you to progress your concept?
 
Top