Wireless fencing scoring system - detecting a PWM signal without common ground

HI! I've been googling for about 2 weeks for a solution to this problem but can't find any practical solution, so I decided it was time to get some help from the Gurus.

This is the problem:
I need to sense if a PWM signal is present on a metal surface if I touch it with a single wire from a device that does not share the same GND.

The purpose of this device is to make a wireless fencing score system. When touching the guard of the opponent weapon that hit must not be considered by the system.

There are several devices that work well in the market but they co$t a LOT of money. And I was planning to make this for our fencing club.

There is a patent that describes the frequency detection solution and that is why I am trying to figure out how to make it work this way.

Anyone care to share any ideas?

Thank you

The referred patent drawing (FIGURE 6):

OK, so the first mistake here is your description of this as "PWM".

It appears you wish to detect a certain characteristic frequency which will identify the contact. Or in Arduino terms, a code which is actually PCM.

You need to define the problem properly. Is it the case that you wish to detect contact with the hand-guard which is electrically separate from the foil itself?

Apparently you need WiFi to convey the information in "real time".

Can you explain the meaning of the patent drawing figures? What alternate occurrences to you have to manage?

This should not be too difficult at all.

Thank you for your reply.

At this time I would only like to detect the presence of "a" frequency. Not a specific frequency.

I understand what you say about PWM, since that will only have positive o zero levels, so not a true oscillating signal.

On the tip of the sword there is a button connected to 2 wires that will pass the hit to a digital input. The same line will also pass the oscillating signal if the hit was on the metal hand guard. The tip of the button is made of metal and will be internally connected to both wires when the button is pushed in, but isolated from the lame and hand guard.

I figured out a way of dealing with the "same-wire-two signals" by using an analog switch. When the hit is detected on the digital input, the analog switch is commanded to cut the + signal from its dedicated digital input and connect the wire to what will become the "frequency detector" to check if there is a frequency detected. If there is, it was a hit on the guard and the hit will be canceled. If not, it's a valid hit. This analog switch is a 74HC4053 and that part is working well.

It's the "frequency detector" part (number 23 and 24 of the patent) that I'm having trouble with.

I tried the "touch sensing" ability of the ESP, but that doesn't work, because the fencer hand would always activate it's own sensor, sice the glove will be trenched in sweet after a while.

The closest I came to a solution was to connect the frequency sensing wire to the gate of a 2n2700 n MOSFETs in a transition threshold plus a couple more active parts (transistor and opamp) but the results are inconsistent.

I guess this must work as an antenna detecting a radio frequency. But my knowledge of radio is only at a level of "curious".

Tomorrow I'll post a couple more pictures to aid my explanation.


The red part is all electrically conductive. So when to red coil touches the tip of the wires, any signal coming from the tip will be passed on to the wires

Why do you think that no common ground exists in your application? Aren't the fighters attached with cables to the score board?

You also misinterpret the tip image. The two wires only react on a short circuit when the tip is pressed hard enough. An electric signal from the opponent can be caught only by a single wire as indicated in your first post.

Using AC instead of DC allows to suppress noise and other environmental effects. E.g. IR remote controls use a carrier frequency of about 40kHz and the receiver only recognizes signals of that frequency.

The reason why there is no common ground is because it will be wireless, as I mentioned in my first message. I'm using 2 masters ESP32 connected to a slave base ESP32 trough ESP-NOW. So both masters will be battery powered and thus, no common ground. That part is also working well, with all the correct timings, dual hits, and blocked hits. Only the not valid hits to the guard (and to the posted, for that matter) is missing.

Regarding the tip, it is exactly how I described it: once the button is pressed, the wires will short and pass the +3.3v to the digital input. I guess I could pass the frequency signal on top of the 3.3v carrier and separate them to two different destinations. But for that I have to solve the single wire connection without common ground, and that is the problem I need help solving: how to detect the frequency signal without common ground.

Hi,
If you wait long enough.
You may find a member who is experienced in this sort of sport and the electronics to go with it.
You need to change your subject to this thread to some thing like.
"Wireless scoring system for sport of fencing"

You current subject is not descriptive enough.
You can edit the thread title/subject.

Tom... :slight_smile:

The easiest way is to detect specific frequency, that will eliminate interferences = no reaction to touching by fingers. Use the program from my post, it working for 5kHz, attach your wire to A0, if it not sensitive enough add op amp.

https://forum.arduino.cc/index.php?topic=718351.0

TomGeorge:
Hi,
If you wait long enough.
You may find a member who is experienced in this sort of sport and the electronics to go with it.
You need to change your subject to this thread to some thing like.
"Wireless scoring system for sport of fencing"

You current subject is not descriptive enough.
You can edit the thread title/subject.

Tom... :slight_smile:

Done, thank you

79galinakorczak:
The easiest way is to detect specific frequency, that will eliminate interferences = no reaction to touching by fingers. Use the program from my post, it working for 5kHz, attach your wire to A0, if it not sensitive enough add op amp.

Smoothing - Programming Questions - Arduino Forum

I'm currently traveling but during this weekend I'll give it a shot. Thank you

Put some protection(5V zener diode) for electrostatic discharge.

79galinakorczak:
The easiest way is to detect specific frequency, that will eliminate interferences = no reaction to touching by fingers. Use the program from my post, it working for 5kHz, attach your wire to A0, if it not sensitive enough add op amp.

Smoothing - Programming Questions - Arduino Forum

This doesn't compile on the ESP32. Only on the Arduino Uno family. It gives the following error:

Goertzel.cpp:19: from

Goertzel.cpp: 26:5: error: expected unqualified-id before numeric constant
   int _N
Goertzel.cpp: In constructor Goertzel::Goertzel(float, float, float)
Goertzel.cpp: 48:8: error: lvalue required as left operand of assignment
   _N=MAXN
Goertzel.cpp: 50:7: error: lvalue required as left operand of assignment
   _N=N
Build failed for project 'Smother_Test'

Here is a drawing that hopefully will explain a bit more how the sword tip button works.

The pink line is the single wire bringing the frequency to the frequency detector. Here is the problem to which I can find no solution

There is no solution :frowning:

How can you know at which end the frequency is emitted, at the sword or at the generator, or none of both?

My generator does not have access to my frequency detector. Only the opponent's frequency will come trough the pink wire. The rest of the sword, where the local frequency is present is not touching any of the two wires that go up to the tip button. So I will only detect the opponent's frequency, if it is present. If not, it was a valid hit to the body.

So an antenna is a single wire and it picks up airborne radio frequencies with ease. If the antena is directly touching the source of the signal, that signal will be at its peak maximum value on the receiver. Is this a valid assumption? Both the transmitter and the receiver only use a single wire to send and receive a signal. What would I need to pick up that radiofrequency by just touching the metal hand guard? A tuned circuit, perhaps, made by a a capacitor and a coil tuned to that specific frequency?

You still ignore that a frequency by itself does not cause an EM field. A wire attached to the oscillator may act as ground or antenna, or as none of both.

DrDiettrich:
You still ignore that a frequency by itself does not cause an EM field. A wire attached to the oscillator may act as ground or antenna, or as none of both.

The "radio" part of the electronics spectrum know-how is something that I really don't have. I'm just throwing some ideas to the wall and see if something sticks.
But it can't be that hard, for those in the knowing, to make this work. After all radio waves, frequencies, antennas, running circuits and all this stuff and its secrets are an ancient art with 120 years.

Be careful about the weapons - an epee was drawn in post #12, which uses 2 wire and a normally-open contact button that closes on a touch. There is no lame. The bellguard is electrically isolated from the button wires. Closing the button against the opponent bellguard will show a ground light on a scoring machine, and does not register as a touch. Button press against any part of body, hand, foot, non-metallic ground will score a touch. Tournaments are fenced on metallic strips so missed foot attacks do not score.
Blade and bellguard are not isolated.

Foil has a normally closed button that opens when pressed to detect a touch. There is only 1 wire from the button. Blade and bellguard are not isolated. A metallic lame is used. Button opening on the lame scores a touch. Button opening on bellguard does not. Foil lame covers torso, groin, and front/sides neck. If the button opens on something besides the lame, I believe there is an off-target light, the action stops, and the Ref calls off target attack, and a successful counter attack does not score.

Sabre is similar, but there is no button. Any part of blade/bellguard can score a touch. Blade on blade does not. Touching your blade to your lame lights your ground light. Sabre lame covers waist up (not groin) , arms, and front/sides of neck and head. If an opponent attacks and hits off target (like a leg) a successful counter attack would score (attack off target, counter attack, touch (for the counter attacker)).

There are also minimum contact times for a touch to be valid. If opponent B touch occurs within so many milliseconds opponent A's initial touch, both touches show on scoring and both count in epee. In foil & sabre, the lights also go on, but referee decides which opponent started the scoring action (whose arm/hand/leg started the attack vs being counter attacked. Sometimes simultaneous, and no touch awarded.

Off topic: I once fenced in a coaches tournament, in foil, and had pushed my opponent to the back of the strip - if you back someone off you score. He had half a foot on the strip - so I attacked it, laying my blade flat on his foot so the tip wouldn't score. He looked down at me all stretched out in a lunge like I was nuts, this was foil not epee, and while he did I scored on his torso. I thought it was pretty funny, coming from an epee fencing background, so did some other coaches, my opponent did not :fearful: . He didn't move his foot, but he didn't parry or counter attack either, just too surprised I guess.

One of the loudest noises I ever heard was also fencing foil, someone attacked with a fleche (a sort of running attack, only allowed in epee and foil, where the rear foot can pass the front foot) which I parried and our bellguards banged together - man, that was loud, and less than an armlength away from my head - a lot of folks turned to see where it came from, it was that loud. Made my ears ring for a bit.

Scoring systems like the Hitmate rely on the capacitance of the fencers body cord and body to act as a virtual ground, at least for Epee. If the button closes, a signal into one wire comes back out if button closes on the body. It the button closes on a grounded bellguard, the signal coming back is low (assuming it is pulled up at) so the unit can detect good touch vs grounded touch. There are three wires.

Foil, I suppose signal coming back all the time is expected - signal to (virtual) grounded lame would be good touch, loss of signal to non-grounded arm or bellguard would not? How would you tell?
Foil and sabre only have 2, signal runs thru the tip wire to tell when a wire is broke, or the tip is not closed.