Skip to main content

The Arcade Claw: Having Fun While Hacking Hardware

Fullstack Claw machine

By Adam Barcan, Alp Sarilar, Minseon Song and Eddie Ng

Arcade Claw is a hybrid hardware-software project that we made as a group project at Fullstack Academy of Code, a web development immersive school in New York City. We hacked a tabletop arcade claw that costs $25 on Amazon.

Through the power of electrical engineering (multimeters for the win) - the game communicates with a Raspberry Pi that is web socketed to a web server hosting our full stack app. Users login and set up a peer to peer connection with a webcam that films the game. Then they play our physical arcade game over the internet!

image


The Parts

  • Raspberry Pi Model B. Installed Node.js and Express.js. about $70, with several accessories
  • Sainsmart 8 Channel 5V DC Relay. $15
  • Toy arcade claw game. We bought two. Good idea, since we trashed one! $50
  • Large breadboard. We had one. Could also get a couple small ones.
  • 10 x NPN transistors. $7 at Radio Shack
  • Webcam. any one works. $20 at Best Buy
  • 10 x 10kohm and 10 x 2.2kohm resistors. $5 at Radio Shack
  • Misc wires. We had’em
  • Soldering equipment. Had this too.

Total cost == about $200.

Key Technologies

Raspberry Pi

  • Node.js. Use: web socket to deployed server. Runs script that translates game control logic from MEAN stack app into I/O logic, via wiring to relay board
  • pi-gpio. Use: node module that wraps Pi’s native controls for GPIO pins. GPIO pins are the Pi’s means of communicating with physical devices.

Laptop running Ubuntu

  • WebRTC. Use: real-time two-way video streaming between player and master webcam streaming claw game.
  • SimpleScreenRecorder. Use: enable screencast to Twitch.tv.

Electrical Engineering

  • Mechanical relay board. Use: communication between Pi I/O switches and claw motor; power and grounding of system; electrical isolation between control and load.
  • H bridge. Use: reversing polarity of claw motor, in order to make sudden changes to motor direction without causing a short circuit.
  • Arcade circuit board. Use: control of motor that moves claw in three planes. Through testing, we identified the native circuits for each plane of motion. We soldered wires onto board that are connected to relay.

Fullstack web app

  • Angular.js. Use: User interface and front-end logic.
  • MongoDB. Use: Database of users and queue.
  • Express.js. Use: logic for web server.
  • Stripe API. Use: payment.
  • Digital Ocean Use: deployment.

The Steps (over about a month)

image


Early concept

image


Early testing – toggling an LED via Node.js script running on Raspberry Pi. One day we reversed the current and smoked an LED!

image


Now toggle eight LEDs through a web interface running on Pi.

Each LED proves the functionality of an I/O pin on PI and a corresponding relay switch, Eight was our magic number – we needed three switches for left/right motion, three for front/back and two for up/down.

Testing the arcade game’s native circuit board.

image


The H bridge is born (or at least conceived).

The finished set up. Raspberry Pi is on left.

The smaller breadboard on left provides power and grounding. Pi I/O pins are connected to larger breadboard by a large set of wires known as a cobbler. The psychedelic wires at end of cobbler connect each I/O pin to a relay switch. Other side of relay transmits Pi I/O logic to arcade claw circuit board. The setup provides safe isolation between power input and output.

Concept for deployment. Drop Da Bass has nothing to do with our project (but we like it).

image


Done! Yeah, you saw this already, but it makes us happy to see the thing work!

Find the program that fits your life.

Learn about our coding, cybersecurity, and data analytics bootcamps offered on full-time and part-time schedules.