Team Status Report 3/8

This week we wrote the design report.

We successfully simulated a game controller in Unity using the Arduino. We also received the rest of our electronic components and confirmed that they work as expected. We also made significant progress with game programming.

Design Changes

We have to make a slight design change with regard to pin assignments. Since only digital pins can be used for interrupts, we need an additional digital data pin. This is because we want to be able to use interrupts for reading encoder updates. We were originally planning on using one analog GPIO pin and one digital GPIO pin, and treating the analog pin as digital when we needed two digital pins for the encoder. We will now have two dedicated digital GPIO data pins and one analog data pin. This is not a significant change because we have the available pins that we need and our pogo pins have a spare pin available.

Significant Risks

The only risk we can think of at this time is the latency being higher than expected, but we will test this as soon as possible.

A was written by: Alan
B was written by: Angela
C was written by: John

Part A: Consideration of Global Factors

In general, the game we are designing is meant to be played at home with your friends physically next to you and hence lives in a very local space. But the general concepts that our project pushes toward have broader themes. In a more global context, our project contributes to the idea of more physical-oriented alternative controllers. Video games are a phenomenon that exist globally but many people are used to the same controller designs. Our project spreads more awareness of the possibility of controllers that can be uniquely created to enhance the experience of a specific game.

Part B: Consideration of cultural factors

Our product has a cultural aspect in encouraging players to play a cooperative game in person. The game is accessible to a wide age range considering that the modules have very simple controls such as buttons and sliders, so that young children and elderly people can both easily play the game.

Part C: Consideration of environmental factors

Our solution uses a microcontroller and the users’ personal computer, which use less energy than a large arcade machine. This efficiency is good for the environment since current power production often uses fossil fuels and other non-renewable resources.

Our design also uses easily repairable, open-sourced design, so users do not need to purchase a complete new set if something breaks. This reduces E-waste.

John’s Status Report for 3/8

Arduino-Unity Interface

I spent time integrating our Arduino code with Unity. I was able to successfully simulate the Arduino as a game controller. The game now reacts to us interacting with the buttons/potentiometers/encoders. I spent some time trying out the new electronic components that arrived. I made sure that the encoders are sending good signals and that the other components (buttons and potentiometer) work as well.

I also spent time working on the Arduino codebase and optimizing our design.

Design Report

I spent a significant amount of time this week working on the design report.

Progress and Next Week’s Deliverables

My progress slowed a bit due to midterms and time spent writing the design report, but I am still on track. By next week I hope to have some semi-permanent circuits (i.e. soldered protoboard instead of just breadboards) but that also depends on our panel/module design progress.

John’s Status Report for 2/22

Arduino-Electronics Interface

Since we received the Arduinos this week I spent time working on code to interface with the modules’ electronic components. We’ll be using the Arduino Joystick library, which works with the Arduino Leonardo.

The Arduino can be made visible as a game controller using the following initialization code:

Our code will dynamically check the ID pins and process the modules’ data pins depending on which module is currently inserted:

For reading from the encoder, we have two options: polling or interrupts. The polling option is less complex but risks skipping transitions if the encoder is turned very quickly. Here is an interrupt service routine that reacts to encoder state changes: The ISR is attached using attachInterrupt(digitalPinToInterrupt(encoderPinA), encoderISR, CHANGE);

Progress and Next Week’s Deliverables

My progress is on track. Since we’ve now ordered all of our components, I’d like to get my code working with Unity by next week. If the Arduino-Unity integration goes well, I’d like to work on planning the spatial organization of the electronics within the modules.

John’s Status Report for 2/15

I spent this week looking at different approaches to interface between the modules and the Arduino.

Module Pins

As a team we decided that each module would get Vcc and Gnd, 3 pins to identify the module, and up to 2 data pins per module. Using the identification pins instead of unique data pins per module allows us to reduce the total number of pins used which is beneficial since the Pogo pins we’re using can be expensive. This also reduces the total number of single points of failure. Each module will therefore have a unique 3-bit identification code. They will be wired as shown, with Vcc and Gnd driving the ID pins:

 

Debouncing

I also considered the problem of debouncing. We don’t want a single button press to be registered as many presses in a short period of time. I compared software solutions with hardware solutions and landed on a few different approaches. For the button-press module, a simple RC filter with a Schmitt trigger should work:

 

The RC filter smoothes the transition from LOW to HIGH and the Schmitt trigger replaces the single threshold voltage with two separate LOW/HIGH threshold voltages. This ensures that any oscillations near threshold voltages do not result in an oscillating output.

Progress

My progress is slightly behind since we just recently settled on the schematics and electronic components so I haven’t made the initial module prototypes. To catch up, we will place the remaining component orders soon and work with what we’ve got for the simpler modules.

Deliverables for next week

Since our Arduinos have shipped, I hope to have some working code that interfaces with hardware components by next week. Ideally we’ll be able to see a physical button press register in Unity software. I also hope to place the orders for the remaining electronic components so we can build all of the remaining modules.

John’s Status Report for 2/8

This week I researched ways to connect the modules to the panels and communicate between the modules and the Arduino.

Connecting modules to panel/controller

Players must be able to quickly connect and disconnect the modules without pausing gameplay and shifting their focus. This immediately rules out any connector that requires precise positioning, such as pin headers and sockets, USB connectors, audio jack style connectors, etc.

One viable option is a combination of pogo pins and magnets. Magnets will help guide the modules to the right position and the pogo pins can make a good connection without needing perfect alignment. They are also typically rated for tens of thousands of cycles (or more), which is important since the core of our game is switching modules around. These connectors are expensive, but worth it for us due to their importance.

Sending signals from the modules to the Arduino

I looked at a few different options for how modules can communicate with the pins of a microcontroller (e.g. Arduino). The simplest option would be a module that is just a button with passive electronic components.

 

I also looked at different debouncing techniques. For our MVP, a simple RC circuit might work but I also considered the possibility of incorporating a Schmitt trigger. We’ll make the decision later after more testing.

Progress and next week’s deliverables

My progress is on schedule. By next week I hope to have some working hardware that is ready to communicate with a microcontroller. It should provide reliable, noise-free signals based on user input. I will probably start with a simple module like the push-button, but will also work on more dynamic modules that involve more electronic components.