Skip to content

Firmware and Hardware for a Half-Life: Alyx Gravity Glove Replica

License

Notifications You must be signed in to change notification settings

StarGate01/hl-alyx-glove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Half-Life: Alyx Gravity Glove Replica

Firmware, Hardware and Models for a Half-Life: Alyx inspired glove cosplay prop. Based around an ATMega328p / Arduino Uno.

Also check out the other images!

Features

  • Detailed replica of the secondary-hand glove
    • Based on in-game 3D models
  • Custom printed circuit board
    • Small and compact due to SMD design
    • Three red LED matrices for hearts
    • Two individually controllable green status LEDs
    • Two orange finger attractor LEDs
    • Blue 128x64 pixel OLED screen for resin count
    • Red check engine LED light
    • Moveable attractor fingers
  • Uses standard components for power source and control
  • Microcontroller can be easily reprogrammed
  • Cosmetic parts are printable on any standard 3D printer

State of the Project

PCB Revision 1: Proof of concept - Completed
  • OLED rendering of resin count and sprite
  • Display animations on 3 LED matrices
  • Drive 2 green status LEDs
  • Drive check engine LED
  • Evaluate barebone IC
  • Evaluate display drivers
  • Manufacture board
  • Validate board
PCB Revision 2: Refinement - Completed
  • Add buttons
  • Add 0.1uF caps to driver ICs
  • Larger power traces
  • Re-think trace width in general
  • Properly lay out mounting holes
  • Optimize VCC trace
  • Move OLED connector
  • Optimize board size
  • Think about inertial measurement unit
  • Drive decorative yellow LEDs
  • Improve ground plane stitching
  • Add source info to silkscreen
  • Add component orientation to silkscreen
  • Evaluate acceleration sensor
  • Manufacture board
  • Validate board
Firmware Revision 1: Tests - Completed
  • Test sensor
  • Display resin count
  • Display blinking hearts
  • Flash LEDs
  • Read buttons
Firmware Revision 2: Demo mode - Completed
  • State management w/ buttons
  • LED control
  • Adjustable amount of hearts and resin
Firmware Revision 3: Proper functionality - In Progress
  • Wrist flick detection
Power System - Completed
  • Battery selection
  • Charging management
  • Verify power system
CAD and 3D-Printing - Completed
  • Acquire gloves
  • Export models from game
  • Design decorative parts
  • Adapt decorative parts to 3D-Printing
  • Think about paint and mounting
  • Design battery holder
  • Design PCB mount
  • Mount to glove
Final Assembly - Completed
  • Proper paintjob
  • Paint copper elements and add wires
  • LED mounting

Software

Clone this repository using git clone and open it up in the PlatformIO IDE.

Edit include/hardware_config.h if your pin layout differs.

Finally, use PlatformIO to compile and upload the program. A debug configuration for the Arduino Uno (uno) and a release configuration for the PCB (barebone) are available. To program the barebone chip, you need a ISP programmer such as a AVRISP, USBasp or Arduino as ISP.

Compiling Modified Sprites

Use GIMP to export the xcf image files into xdm files. Make sure to declare the buffers as PROGMEM.

Compiling Modified Fonts

Use a tool like bdfedit to view or edit the font.

Install bdfresize from your package manager.

Clone olikraus/u8g2 and change into the tools/font/bdfconv directory. Run make and copy or link the bdfconv executable to somewhere you can run it.

Change into the res directory of this repository. Then run ./font.sh to pre-compile the font.

Software Components

Electronics

Most parts are pretty standard, eg. THT resistors, capacitors and LEDs. Pretty much any electronics store should carry them.

The main controller is a ATMega328p, the same as the Arduino Uno uses. These ICs are cheap for what they offer and also available pretty much everywhere.

The 1.9mm LED matrices are a special part, because they are the "mini" version of the much more widely used 3.0mm/3.75mm 8x8 LED matrices. I bought them from AliExpress. The OLED is a fairly standard "Arduino-type" breakout board, and commonly available in blue, yellow and white. Amazon carries them, and so does AliExpress.

The surface mount LED is a 5050 SMT LED, which is also commonly used in LED strips and can be found at many stores, for example at Ebay.

The display drivers are MAX7219CWG ICs, available at many stores, for example Ebay. However, prices differ a lot depending on the retailer.

The Acceleration sensor is an ADXL335 IC on the GY-61 "Arduino-type" breakout PCB. These modules are so cheap that it is not worth the trouble of including components that can't be hand-soldered. These modules are available at Amazon/Ebay and other retailers.

The power system consists of a 3.7V LiPo Battery commonly used for drones and RC toys (available from e.g. Ebay), and an integrated charger/converter board, which is for example available at Amazon. For interfacing, a micro USB socket is used.

Fabricating the PCB

A KiCad project is available in the hardware directory. It requires my custom components.

Fabricate the PCB according to the Gerber files in hardware/gerber or send them to a factory. I had mine produced by JLCPCB. All SMD components are hand-solderable using a fine tip and a steady hand.

Solder the components to the PCB according to the KiCAD schematics. Pay extra attention to the orientation of the LED displays and the display drivers ICs, check the little circle markers on the PCB. Sometimes the orientation of the LED matrices is not obvious, so just put them into the holes without soldering and tilt them to jam them, in order to make electrical contact. Then you can verify the orientation if they display correctly.

The mounting holes of the PCB and the OLED module should be on top of each other, such that the modules can be screwed together using an M3 bolt. The acceleration module can be soldered onto the PCB.

Putting the Glove Together

The actual gloves are called "Half-Jab" by the company Highway 21. Available at motorcycle shops or Amazon/Ebay.

The directory models contains STL files for 3D printing. Please note that quite a lot of manual finishing is required depending on your printer. Print all the files in black plastic (I used PLA). The parts are not plug-and-play, you have to sand, cut and drill at various places. Use the parts as a starting point for your own creativity.

Refer to the photos to see how I assembled my version. I used silver metallic automotive sparypaint to color the base piece, and special copper colored paint to paint the copper elements. The rest was painted using acrylic colors.

The attractor LEDs are standard orange LEDs that were inserted into the tips of the finger pieces from above. Their power cables have been routed through a hole in the plastic and back to the PCB.

The "Check engine light" is a 3D printed frame with a piece of printed overhead foil. The frame then gets half-filled with semi-transparent hot glue to create a light diffusor. Print the document models/check_engine.pdf on overhead projection foil using a laser/toner printer and cut out one image to size. Insert the foil piece into the frame from the back, such that it rests on the small lip. Make sure the toner side faces inwards, such that it is not exposed to the outside. Then pour in some epoxy or hot glue, but make sure to not fill it up completely. Then position the lamp cover on the PCB where the frame is printed on. I attached it with some small drops of hot glue.

I used various M3 bolts and nuts, and some epoxy glue for the rest of the assembly. The whole assembly is attached to the glove without modifying the glove, instead relying on the two plastic hooks. Use some white zip-ties and some black spiral cable wrap to complete the look.

Using the PCB

Press the button SW1 to cycle through the effects, and SW2 to change / cycle the selected effect. The selection order is: LED hearts amount (initial state) - Green status LED D1 - Green status LED D2 - Red "Check engine" LED D3 - Orange attractor LEDs L1 and L2 - LCD resin count.

Licensing

All files in this repository are released under the terms of the MIT license. However the original idea and in-game design of the Half-Life: Alyx Glove was made by Valve Software. The copyright of the in-game design is of course held by Valve Software. The files in this repository however are a derivative / transformative work made by the author, and their copyright remains with the author.

Releases

No releases published

Packages

No packages published