Martian 2 – Interior Home Entertaining System

Created by: Yuxi Chen

In Martian, Mark Watney became stranded on Mars after his team assume him dead. He rely on his ingenuity to find a way to signal to Earth that he is alive and survive until a potential rescue. Mark got rescued and became the director of the astronaut candidate program. For Martian 2, I expect Mark to have another space journey. Mark’s first journey to Mars are about survival, which is thrilling and nervous. However, for his later journey to Mars, he is well used to the surrounding. Besides the advanced technology around him, I assume something that can improve his living quality should be necessary. This led me to create the Interior Home Entertaining System, which aims to provide Mark with the background music and ambient light based on the outside light intensity. Hopefully, with this system, Mark can devote to his research while enjoying his life~

from The Martian

Design

I decided to use boxes to create a room model to represent the living system on Mars. There will be three modes for the Interior Home System, the first one occurs when the outside is too dark so Mark needs to stay inside; the second one occurs when the outside light is just right so outside work and research is feasible; the third one occurs when the outside is too bright so Mark needs to stay inside. The input would be photo resistor, which is used to detect the outside light. The three modes will be activated based on the data photo resistor receives. The output would be lcd, which aims to show what mode the system is currently in; the LED strip, which works as an ambient light; the speaker, which works as audio.

sketch

New Components

Photo Resistor

The Photo Resistor I used is the one from Arduino kit. To get the light intensity, simply get the data through an analog input. As the voltage changes between 0V and 5V, the analog output ranges from 0 to 1023.

The tutorial I followed for my light input: https://arduinogetstarted.com/tutorials/arduino-light-sensor

Speaker & Micro SD Module

The first component I started to test with is the speaker. The sound that buzzer can play with the library pitches is really limited, in this system, I want to play more entertaining music, so I applied the SD card module.

The micro SD card module I get:

The tutorial I followed for this module: https://www.instructables.com/Audio-Player-Using-Arduino-With-Micro-SD-Card/

In this tutorial, the speaker is singularly connected to the card module, however, when I tried this, this did not worked. It works after I add a buzzer as a data translator in between. I think that’s because what I get is an amplifier instead of a speaker. For the micro SD card module, the file should be in .wav format, which is the data format the buzzer can translate. The micro SD used should be under 32GB. The micro SD with storage more than 32GB can be only formatted to FATex, The card should be formatted to FAT16/FAT32 to work.

Some additional work may be necessary to protect the sd cards. As by now, two micro sd cards have broken in my hand.

Though adding an amplifier, the sound is still not really big for my circuit, here are several tutorials I found (however, they need a lot of electrical knowledge, so I didn’t successfully tried them out)

https://www.youtube.com/watch?v=UN9XPWHamHw

https://docs.arduino.cc/tutorials/generic/simple-audio-player

LED Strip

The second component I played around with is the LED strip, I originally wanted to use RGB lights from the Arduino kits. However, after searching, I found out the LED strip may be a better choice as it allows more changes.

The LED strip I bought is BTF-LIGHTING WS2812B RGB 5050SMD:

The tutorial I followed for this component is https://www.youtube.com/watch?v=9hJyyUTflXA. There is a library, which enables a lot of functions. Simply using these functions allow users to show colorful light.

The LED strip can work as beautiful as this at night:

If you buy other LED strips, the operation may be more difficult that 5050 SMD but this tutorial may be helpful https://learn.adafruit.com/rgb-led-strips/arduino-code.

Schematics & Circuit

To hide the circuit in my model, I put the components in two separate breadboards.

Schematic

Circuit

Coding

Photo Resistor

The input from photo resistor is used to control the whole system, I set analogInput < 100 leads to “Too dark outside” mode; analogInput from 100 to 800 leads to “Good to go outside”; analogInput > 800 leads to “Too bright outside”.

Speaker & Micro Sd Module

The basic code is included in the TMRpcm library, after correctly setting up the code in setup() function and the loop() function, all I need to do is put music.wav files in the sd card module.

I chose music from the Martian:

For mode “Too dark outside”, the music played inside is Turn the Beat Around by Vicki Sue Robinson. This song is played in the space station when Mark first started his plan to rescue himself. Though Mark doesn’t like Disco, I still think this is a good song to listen when staying in the home.

For mode “Good to go outside”, the music played inside is I Will Survive, which is the ending music of the film. A song perfectly fit the topic and full of hope, a good background music for outside research!

For mode “Too bright outside”, the music played inside is Starman by David Bowie, this music is played in the Martian when NASA started to rescue Mark Watney.

Mark can change the music he want to play with the micro sd card.

LED strip

With the Adafruit_NeoPixel library, I created three modes of light

For mode “Too dark outside”, the light mode is colorWipe(), which include four colors, each one wipe out the other one periodically and continuously.

The code for colorWipe() is:

For mode “Good to go outside”, the light mode is rainbow(). The color changes like a rainbow. Luckily, the Adafruit_NeoPixel library already has this function.

The code for rainbow() is:

For mode “Too bright outside”, the light mode is theaterChaseRainbow(). The color changes like a blinking rainbow, here a lot of for-loops are used.

The code for theaterChaseRainbow() is:

LCD

Besides the basic coding for LCD, the content I want to print out is longer than 16 letters so I want to scroll my content on the LCD. I tried the function autoScroll() and noautoScroll().

Basically, set the cursor to where you want your print out thing to start scroll from and then use lcd.autoScroll(). For my LCD, I want the content to start scroll from right so I set my cursor at (16,1)

The code for LCD scroll is:

The tutorial I followed is https://docs.arduino.cc/learn/electronics/lcd-displays

Here are several more functions that LCD has https://www.makerguides.com/character-lcd-arduino-tutorial/

Modeling

I created the room model with lcd on the left wall, speaker in the left back corner, LED strip on the top, and a bed as the decoration. I also draw the first picture Mark Watney took on the Mars on the room’s wall, hopefully, this can evoke precious memories.

Outcome

The video showing how the system works: https://vimeo.com/802949143

Here is the link to my film prop Arduino code: https://create.arduino.cc/editor/luciiii/603acfe1-9fd7-4c46-a6e2-4dd86c40265d/preview

Problems I faced


Posted

in

by

Tags:

Comments

One response to “Martian 2 – Interior Home Entertaining System”

  1. Haircuts Avatar

    Thanks for sharing excellent informations. Your website is very cool. I’m impressed by the details that you抳e on this website. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found simply the information I already searched everywhere and just couldn’t come across. What a perfect web-site.

Leave a Reply

Your email address will not be published. Required fields are marked *