BenKohn2004 / Mask_Lights_and_VSM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mask Lights and VSM

A demonstration of the Mask Lights on Youtube. Yes, I know it is a saber mask. It is what I installed the lights in for the proof of concept.

The goal of this project is to demonstrate how to use the output of the Virtual Scoring Machine (VSM) to activate LED lights in a fencing mask. Though I chose to use the output from the VSM, this code borrows heavily from my projects parsing the data from the Favero machine and this project can reasonably be modified to use the output from a Favero.

A W5500 ethernet module was used to read the UDP internet protocol output by VSM using the parse and transmit arduino code and then transmit the information through a Wemos D1 Mini to a receiving Wemos using ESP-NOW with the recieving arduino code. The receiving Wemos then using a drone battery and a charging circuit, would light the LEDs. The circuit would be contained in a 3D printed enclosure and held in place using velcro cable ties. I used individually addressable LEDs and the lights can be changed to display either the Red or Green lights based on a momentary pushbutton.

One downside of using the Wemos D1 Mini, is that the Chip Select Pin, D8, GPIO15 will cause the Wemos boot to fail if pulled High, which will occur if the W5500 is connected during boot. A poor work around is to disconnect the 3.3V power when starting up the Wemos and then reconnecting the 3.3V to the W5500. The Wemos will then take a couple of minutes to connect with the UDP stream from the VSM computer. A better solution would be to use an ESP32 board that doesn't suffer this limitation.

I also disabled the Virtual Network Switches VMnet1 and VMnet8 under Network Connections to ensure that the UDP stream would go to the Ethernet port. It may also be beneficial to assign a static ip address to the parsing/transmitting Wemos code.

Future Considerations

Using an ESP32 chip would simplify the UDP decoder and the ESP32 chip is cheap enough and small enough that it might as well be used throughout the project.

The battery size should also be increased. This project used a 380mAh battery, which, though it worked, is not as practical for prolonged use.

Testing should also be done to find the best LEDs for the mask. Either a high LED concentration or even an LED matrix may work well. IP65 protected LED strips may be a good idea to protect against abrasion, moisture and corrosion. Also a runner or holder for the LEDs can be designed and 3D printed to fasten the LEDs to the interior of the mask.

A printed circuit board would make the assembly smaller and easier to use.

Since the Wemos inside the mask receives not only the Red/Green lights but also the score, time, cards and priority from the VSM stream, additional lights could be added to the mask to indicate these values. Cards would be useful for Saber since they are common due to false starts and displaying priority could be done for Foil and Epee. There could also be a specific count down light pattern associated with the last few seconds of a fencing period.

About


Languages

Language:C++ 100.0%