Final Portfolio - michelle-qin/Portfolio GitHub Wiki

As I wrap up senior year and my time at the DPEA, I'm using this space to summarize my major projects and work from this past year.

  1. Zoetrope

This was the first project that I worked on this school year. Zoetrope is a kiosk that produces the illusion of motion by displaying a sequence of drawings that show progressive phases of a certain action; the effect can only be seen when the drawings are spun rapidly - like a flip-book, but using technology.

The Zoetrope was started by students in previous years, but there were some issues that I was assigned to fix. First, the Zoetrope consists of a motor and beam control. When the motor button is pressed to turn on, the Zoetrope motor starts moving. However, the motor does not turn off unless the user presses the motor button again. This could be problematic as, in a busy environment like a museum, a user could forget to turn the motor off and the motor would continuously be running and wasting energy. Thus, I implemented a timer for the Zoetrope to check the user control - if the motor button is pressed, then turn off the motor and stop the timer - or turn off the motor after a certain amount of time. This became a little complicated as the Zoetrope also has an encoder that, if moved by the user, changes the speed at which the motor is running. To account for the encoder, I programmed the timer to check the encoder and, if the encoder is moved, restart the timer at the new speed.

Also, I reset the encoder to 0 every time the motor is turned off.

Going onto the beam situation: if the beam button is pressed to turn on, then the beam turns on. However, as with the motor situation, we want to turn off the beam at a certain time if it stays idle in order to conserve energy and reset the Zoetrope for the next user. To fix this, I created a timer for the beam that checks the user control - if the beam button is pressed, then turn off the beam and stop the timer - or turn off the beam after a certain amount of time.

This project turned out to be more complex than expected because, with one timer controlling both the beam and the motor, there were some overlapping issues. For example, when both the beam and motor are turned on, the motor could stop at the 30 second mark as it's supposed to, but the call for the beam to turn off would be overridden by the motor and the beam would stay on forever. To solve this, I implemented a second timer. After doing that, it worked. When the motor is turned on, any button press from the beam will reset the timer for both timers so they can work together. When motor is turned off, the beam will turn off after its timer.

  1. Snake Pendulum System

Started new project: Snake Pendulum System (SPS) What it is: 2 arms. Each arm holds balls of the same size hung from different lengthed strings. When each arm moves, the balls form a distinct S shape, then swing into chaos/disordered pattern, and then finally return to the S shape. The idea is to have 2 arms with different sized balls to show the different movements and how they form complementing shapes.

My Task: The project will include 2 individual buttons to control the 2 pendulums. Pressing a button activates the pendulum so it swings into motion by moving the arm to a certain length. We want the buttons to be inactive after pressing it to move the pendulum into action, that way an accidental push on the button doesn’t immediately affect the performance of the pendulum. I’ll be using a similar concept to the Zoetrope to implement this objective - using 2 timers.

What I did: I created the code for SPS from scratch. Similar concept as the Zoetrope. The pneumatic cylinder (piston) activates the arm ; button includes two colors.

A fix needed to be made on the snake pendulum. What was happening was the button for the pendulums would turn green before the pendulums returned to their original position. This could be potentially misleading for kids/users who may interpret that green light as an "OK" to move the pendulum again, when in fact, we need to move the pendulum to its original position before anything can be done again. To fix this, I added a delay after the pendulum returned to its position. Some issues were encountered through this project (i.e. the pendulum wouldn't react the second time around when I first added the delay) so after trouble-shooting and rearranging the order of the code (and thus, the order that the code was read) the issue was fixed.

Throughout this project, I especially learned the importance of mapping a flowchart of the code before it's written. Organizing a state machine (e.g. ON, OFF, WAITING) was super helpful in making the code more clear and logical (thereby reducing the potential for bugs). A little planning can go a long way.

images/SPS1.jpg

images/SPS2.jpg

Potential Idea for the Future: A feature that I would like the completed product to include is the ability for the two arms/pendulums to start their performance at the same time (the swinging patterns of the pendulums are designed to complement each other -- this can only be done when the two arms start moving at the same time, because that affects the swinging rhythm of the balls). I suggested the idea to incorporate a third button to the panel - a button that can move the 2 pendulums in motion at the same time. This can ensure the 2 pendulums start the same exact time (I’m not sure how precise it will be to have the 2 individual buttons for each pendulum being pushed at the same time - a slip of the hand may cause delay for a pendulum to start, and the only way to restart would to wait until the cycle ends (bc of the timer)) plus it emphasizes the main purpose of the project.

Mr. Gibson agreed with this idea, but the panel has already been made with the 2 buttons, so we cannot incorporate the third button at this stage. But this is a good idea to have for future work.

  1. Ball Wall

For the Ball Wall, I did 2 different things: a) Code individual, interactive components for the Ball Wall, b) Create layout & Code framework for the Ball Wall

a) Adafruit Playground, Circuit Python, Mu, M4 Express Feather -- I experimented with these parts to code interactive components to be used on the Ball Wall. For example, I coded the Archimedes Staircase and Ball Pump.

images/pic1.jpg This is a photo of one of the interactive components that I am programming for the ball wall images/pic2.jpg This is a photo of the featherwing board images/pic3.jpg This is another interactive component to be installed on the ball wall

images/Archimedes Staircase.JPG A photo of the Archimedes Staircase in action (do you see the metal ball?)

b) Ball Wall -- In April, I was notified that some things have shifted with the project. While the Ball Wall team would still like to include interactive components such as the Archimedes Staircase and Ball Rotation, the team has recently updated the design of the wall to include new components, such as a gutter and a pulley, that can bring the balls to different stations. This new design requires software written up for it so I will be focusing on that in the near future, and get back to working on different interactive components afterwards. Thus, I will now be working on the Arduino board instead of the Featherwing board.

My contribution: I created a comprehensive layout/flowchart for the code and started writing a basic framework for it. I worked on the code to operate a single Ball Gate, and started the code for the different cases (INITIAL, ACTIVE, INTERMITTENT) controlling the Ball Gate.

I had to leave for a conference out of town during the finalization of this project, so it was finished while I was gone.