top of page

Arduino Projects

After learning C++ from MATLAB I was introduced to the wonderful world of Arduinos and their open-source ideals. Thanks to Arduino's interactive learning programs I was able to familiarize myself with the basics of electronic wiring and microcontroller coding. This gave birth to the endless projects and designs I've been working on since then. 

 

My first real Arduino project started with my infatuation with an arcade-style game called Geometry Dash. In Geometry Dash the player takes the form of different shapes with unique mechanics such as a cube, a ball or a UFO. Using one-touch gameplay the player must try to navigate through a series of interactive obstacles in order to finish the map. After succumbing to the imperfect mechanical skills that plaque us humans I realized that Arduino controls it's time increments in milliseconds (accurate to 10 ms).  Because this far exceeds our ability, with the right configuration an Arduino could control the player and effortlessly complete each map. 

Hardware: The hardware configuration for this system is relatively simple. Because Geometry dashes interact with the player using a one-touch game-play, I needed an arm that my Arduino could extend to "tap" the screen. After countless failed designs I found the best design was the simplest. I used a touch screen stylus pen attached to a  servo motor that would turn the servo the desired amount (20 degrees) and then retracting back to its initial point (0 degrees). This would result in the stylus pen tapping the screen.

 

Software: The software required started off very simple.  Originally I used a simple open-loop control system, using only predetermined time steps to command the servo. I found that there were algorithmic periods that could solve large portions of the map, however, this method was time-consuming and not always effective. Later I upgraded to more closed-loop control. I achieved this by coding the Arduino to learn from its failure. Using a microphone to pick up the sound effects, it was able to know when the player ( Arduino) collided with an object in the game and either increase or decrease its timed reaction based on preset parameters.

Servo diagram.png

Servo Diagram 

 

This diagram shows how the Arduino communicates with the servo.

 

Note: Servos have integrated gears and a shaft that can be precisely controlled. Standard servos allow the shaft to be positioned at various angles, usually between 0 and 180 degrees.

Diagram.png

 Electrical Schematic

The servo motors have three wires: power, ground, and signal (red, black and yellow respectfully). The power was connected to the 5V pin on the Arduino board. The ground wire is was connected to a ground pin on the board. The signal pin is was connected to pin 9 on the board.

Arduino Visualizations

 

 Live music was something I would never have thought of when it came to my engineering projects.  However, after being exposed to the complexity and creativity involved in visualizations, I jumped at the opportunity to create a rig where I could control interactive spotlights, fog machines, and lasers.  Naturally, Arduino came to mind, and I immediately began coding.  Once again I started with an open-loop system, where I could use simple functions such as "digitalWrite(led, HIGH);" and "delay("  "); " in order to control the voltage going to the visualization components. Unfortunately, this type of program doesn't practice for the live show, due to the fact that bands never stay with the perfect tempo that a microcontroller follows.  in order to solve this problem, I programmed the Arduino to run different sequences of patterns that I could initiate by pressing a pushbutton. This allowed me to control the activation of the light sequences manually.

Screen Shot 2016-02-28 at 3.46.02 PM.png

Hardware:

I could have easily controlled the lighting sequences for LEDs the tricky part comes when we need to control the sequences for floodlights (120V). The Arduino pin output is 3.2V, so I needed a solid-state relay that I could switch on and off with the Arduino.

 

The solid-state relays allowed me to control the power going to any 120V device. With this box, I initiate sequences of lights, laser and fog machines via pushbuttons wired to the Arduino. Essentially, anything that plugs into a household outlet could be controlled.

Screen Shot 2016-01-12 at 9.14.40 AM.png
Screen Shot 2016-02-28 at 3.47.10 PM.png
Arduino.jpg
Screen Shot 2016-01-12 at 9.15.24 AM.png
bottom of page