Month: November 2013

13th Nov DM2009 Performance Day!

I waited anxiously for near an hour for the IT office to open. Luckily it did, and I get to borrow some components that I need for my project. I didn’t have class in the morning so I went straight to the lab to continue working on my project. After that I had to rush to my EEE lab session because our team’s web app will be assessed today too. Luckily it went well and we finished earlier. Therefore, I had some extra time to work on my project before the DM2009 class starts.

I faced some problems today as the open-ended wire no longer gives a constant input 1 when it is touched. Weird enough! Luckily it showed some changes in the value when it is connected to the analog input. When it is touched, the analog value goes down – probably the circuit is completed and well-grounded.

Then, I could not figure out how to play the right sound file according to the number of “votes” received. Luckily Mr. Dirk pointed out that this could be done by using “preload” and cue number as well. Then it works! I was so happy that the whole thing really works!!

Logic of the Game:

Logic of the game [in Max]

Logic of the game [in Max]

To judge:
Using Maxuino, Analog pins #1 to #3 are set to “D in” at the “set pin mode” section. The outputs of the analog input is connected to some comparators. If the values satisfy the condition (e.g, <=0.4), the “toggle” will be turned on. When it is “On” the “==1” condition is satisfied and value “1” will be fed to the adder “+”. “t b i” serves as a trigger to the add operator. The sum will give the player “sfplay~” a cue number to select a sound file (from preload list) to be played. The “gate” and “change” make sure that the sound file will be played correctly and smoothly.

To play:
Analog Pin #3 is set to “D in”. When its value is less than 0.15, the change will trigger the “metro” to send a bang to “random” which will generate a random number from 0 to 10. This number will serve as the cue number to the sound player “sfplay~”. There are several files preloaded with different numbers. For those numbers equal or more than 8 (>=8), the sound clip of “What does the fox say” will be played (jackpot!). These numbers will also set Digital Output #13 to 1 by turning on the “toggle”.

These are actually translated into json message and sent to the Arduino.

Circuit Connection

Overall circuit connection

Overall circuit connection

The circuit is quite simple. Two LEDs with one 330k Ohms resistor each are connected in parallel to the Digital Output 13 of Arduino. Three Photo-resistors with a 10k Ohms resistor each are connected to the  Analog Input 1 to 3 of the Arduino. An open-ended wire is connected to Analog Input 4 of the Arduino. The wires connected to the LEDs are made long because the LEDs have to be slotted into the “eyes” of the fox picture.

LEDs as the eyes of fox

LEDs as the eyes of fox

Game rules:

  1. First of all, the class is divided into teams of 4. Within the teams, the members have to play paper-scissors-stone to decide who is the player and who are the judges. The winners have to play against the winner and the ultimate winner within each team is the player whereas the rest of the team members will be the judges. [Aha! unexpected #1 the audience always perceive that the player has to be the one who loses, but not for this case~]
  2. There is a fox guarding a mystery box. In the box, there are some animals. In each round, one of the animals will stick out its tail from the box.
  3. For each team to pass the round, the player has to touch the tail (open-ended wire) of the unknown animal. The animal will make some noises and the player has to guess the animal.
  4. The judges will decide if the player is correct. If they think the player is right, the judges have to cover the photoresistors using their finger (each judge covers one photoresistor). The box will play different sounds according to the number of photoresistors being covered, i.e: if one, sound of applause; two, sound of cheers; three, it’s Oppa Gangnam Style! And it is time for the player to dance. [Aha! Unexpected #2 I made a twist here at the last minute because the player would be like,”huh? isn’t that suppose to be a punishment if i get it wrong?” But, no you have to perform for us instead because you got it right! ] The judges have to put their fingers on the photoresistor for as long as they want the player to dance. When they remove their fingers, the sound of applause will be played.
  5. The best part is when the player hits the jackpot! The sound clip of “What does the fox say” will be played and the little fox will be woken up! Its eyes (Red LED) will light up. The player has “stepped on” the tail of the fox and he/she has to tell the audience what does the fox say! Ring-ding-ding-ding-dingeringeding!
  6. Same thing here. The judges have to judge if the player has made the right sound and decide if the player should give us a dance. [Step 4]

Performance:

The performance was successful and I am glad that everyone was actively participated in the game! 🙂 Thanks, my friends! I hope you had fun!

It is fun to see that different people have different values of resistance in their body. When some of my classmates touch the wire, the box did not give any sound. When I tap on my friend’s shoulder, the box will then give the animal sound. This was probably because I grounded the circuit (I’m wearing shoes with rubber soles) when I touched the person who was holding the wire.

There are 2 videos taken by Norton:

Part 1

Part 2

Pictures:

Setting up the project

Project set up

The 3 photoresistors for the judges

The 3 photoresistors for the judges

Circuit connection

Circuit connection

The circuit in the background (the mysterious animals in the box)

The circuit in the background (the mysterious animals in the box)

The tail of the animal (open-ended wire)

The tail of the animal (open-ended wire)

The fox has awaken! (its eyes - the LEDs, light up)

The fox has awaken! (its eyes – the LEDs, light up)

Reflection/Improvement:

If would be more fun if the player is judged by another team’s judges. Haha.

I am truly amazed by the programmer of MAX and the those who integrated MAX to Arduino.

Overall I find this course has brought me more fun and surprises than expected in the first day of lesson! Day to day, I find more and more passion for this module and I actually kind of sad because it is coming to an end. On top of that, I also found back my passion for electronic stuffs and programming after tinkering with MAX and Arduino. The experiences that I had from this module can never be found from my EEE courses.

I would like to thank my Instructor, Mr. Dirk Stromberg, for guiding us well through the course, helping us troubleshoot any problems that we had with our projects, and giving us much inspirations along the way! And thanks to my fellow classmates for making this module a very memorable and fun one!

TO DO LIST after exam!!

I can’t wait for exams to end!!!Here are things that I want to do after exam: (before I forget any of them, I should list them down!)

  1. Stay in ADM Library and DRAW fashion stuffs
  2. Stay at home and do collage
  3. Stay in ADM Library and DRAW Porche
  4. Take lots of photossss
  5. Go out go out go out with my Val
  6. Meet up with those best people in my life
  7. Decorate my hall room
  8. Gym!

And okay, do FYP. T.T

DM2009 9th Nov Update

I missed the Performance and Interaction make up lesson today because I had a test at the same time. Luckily the lab is accessible after the lesson so I stayed back for a few hours to continue my project. However I did not take enough components on Wednesday. 😦

Here is a little information about what I want to do!

The first idea is called “What does the Fox say?”. Basically it is a game where a group of people take turns to guess the animal sound produced by the interactive device. There will be 3 photo resistor where the player can press on one of them and this will trigger MAX program to generate a random cue number. The cue number corresponds to a certain sound file which will be played. However there is a set of numbers which will play the “What does the fox say” sound clip. The user has to mimic one of the “fox sounds” in that song in order to pass that round. I am still thinking of the “penalty” for those who guess the sound wrong. May be I can set a hidden button where if the player guesses the animal sound wrongly, I can press the switch to play the “Oppa Gangnam Style” and the player has to dance with it. hahaha. My problem is that, I’m not sure if MAX can play mp3 file? And can I adjust (or crop out) where the music file should start playing?

Update: Yes! Can crop using Audacity!

The second idea is to have a set of photoresistors. When user hovers through the photoresistors, a series of musical notes will be played according to the photoresistors’ values. But my issue is that in my assignment 1, the music files did not seem to be played “seamlessly”. But one of my classmates did it quite well, may be I can ask him about it.

Mr Dirk gave me some feedback regarding my ideas. He liked the first idea better. Yay! Me too! Haha it seems fun! So I started to work on it since Wednesday. We found out one funny thing about the circuit. The Digital Input does not take in the input from a switch but instead it could sense an open-ended wire when it is touched by bare hand. Amazing huh? Later this was developed into an idea of letting the user to touch the wire instead of pressing buttons or photoresistor.

Instead of me judging whether the player has guessed /made the right sound, Mr Dirk suggested that i could let the audience vote! Ya, that could be much more interactive! So I designed the simple circuit and connected them up to perform some simple logic test on Wednesday.

Before coming to class today, i refined the idea and thought through the whole process of performance and how the interaction should be.Here is the excerpt from my email to Mr. Dirk yesterday:

“What Does the Fox Say?”
– connect the open ended wire to one of the digital input (this serves as the “tail” of the fox)
– connect 2 LEDs to a digital output (serve as the 2 eyes of the fox)
– connect 3 photoresistors to the analog inputs (for the panel of judges)
(I still cannot figure out how to use the switch so I can only make use of photoresistor for now)
 
How does it work?
– 1 player with 3 judges
– the player will touch the “tail” (wire) of the fox and the “fox” (arduino and MAX) will output a random sound which could be an animal sound or the “What does the fox say” sound clip.
– If it is an animal sound, the player has to guess the animal. If it is the sound clip, the player has to tell the class what does the fox say.
– the 3 judges determine if the player can pass that round. If they do not wish to let him/her pass, they have to cover up the photoresistor.  The photoresistors value will sum up and if it exceeds a certain value, the music of “oppa gangnam style” will be played.
 
Concern:
1. the inconsistency of the open ended wire sometimes. I hope it works with any wire.
2. I have not try if the values of the photoresistors can be sum up … or is there a better way to do the judging or voting?

Unfortunately, I did not take enough components (photoresistor) on Wednesday so I could only make do of what I components I had. I used switches instead of photoresistors to test the input for the judges. I connected the switches to the analog inputs and hey they work! [See Figure below for the circuit connection] I shall get more components from the IT office next week! 😀

IMAG5487

I also found some cute fox pictures to be printed for the performance day! It’s Stupid Fox.

stupid fox  music  stupid fox printable

My story with EEE

I have been stuck in Electrical and Electronic Engineering (EEE) for more than 5 years. Now that when people ask me why do I choose EEE, I would stun for a while before thinking real hard for an answer. I literally lost all my reasons for it.

I guess this wasn’t the case for me 5 years ago. Back in early 2008 when I’ve just got my SPM result, straight 13 A’s, bright future, and I was determined to be an engineer. Why not scientist, why not doctor? I said I want to solve big problems. I want to improve lives of human being. I want to make this world a better place. Big dreams starts with my first step in applying to Singapore Polytechnic (SP). Oh, don’t call me a traitor because I did applied to Malaysia’s Matriculation course and Government’s Scholarship as well. I chose the engineer path instead of the biological science side. My twin seniors once said I should be a dentist, but I didn’t want to. :/ I went for the interview the day before I fly off to Singapore. I didn’t give it a damn I guess.

I hesitated for some time choosing between EEE and Mechanical Engineering. Frankly, I think I preferred Mech Engine. But, I thought EEE is more viable and flexible. 😡 hmm…

School started. Someone jumped into CCK MRT track. It was an epic day.

Weeks later, letters of rejection came. I hate rejection but I didn’t really care.

3 years of fun passed. I think I enjoyed myself in SP. Great camaraderie. Awesome lectures that I never fell asleep before. Productive tutorials because I always completed them before going for class. Lab session? The whole class had fun. Programming lesson? Everyone is chatting on group MSN. OH MAN I MISS MSN! 😦

Graduated with a Gold Medal. Oh before that, Nanyang Technological University sent me an offer letter. Great, I applied to EEE course again. I was clear that I love it and I would never leave it. I applied Nanyang Scholarship as well.

On the interview day, I met Prof Lalit Goel. He inspired me a lot. He said, an excellent person should be well-rounded. I shared with him my passion for EEE and convinced that I wanted to do EEE instead of Renaissance Engineering Programme ( a new course offered by NTU).

I got my NTU scholarship. That’s it. I closed the door in front of me. That’s it. The start of my many mistakes.

First semester, I didn’t really struggle but I was too relax. I thought I can cope. I thought I can be the kindest person on Earth. Meh. GPA dropped like shit. That’s it. No one told me how important to get a 5 on the first semester. But, yeah I should have used common sense, right?

I cried in my mentor’s office. She assured me, shared with me her stories. Second semester, I become myself again. Anyway, these are not the points that I wanted to bring up!?

Basically, I lost the motivations that I used to have. I forgot the reasons of why am I in EEE. I gave up my dreams. I lost myself.

Today, I am sitting in an Arts computer lab, facing Mac and holding Arduino Mega. I stunned again. It has been almost 3 years for not tinkering with breadboard and electronic stuffs. My classmates admire me for being in the EEE course. They expect me to know all the components and functions of them. I was ashamed of myself. My brain was rusty and therefore it took me a while to recall what I learnt during polytechnic days.

MAX and Arduino

Luckily, it wasn’t that terrible as I thought it could be. I still recall how to read schematic diagram, connecting the circuits, and I really had lots of fun doing that. Designing and building circuit from scratch are good but when it comes to logical thinking, I think I need some time to recover.

Shameful enough, it was an art course that get me applying all my technical knowledge. It got me cracking my brain for something I love! A passion that was corroded by the years that I was studying in that damn course which I thought I’m in love with.

It was a burning passion now that it is dying off.

I am not blaming the EEE course that I am taking. Some people could adapt well to it because the course fits them well. Therefore they excel and benefit the most out of it. For me, I don’t think I’m fitting well into it so I don’t really get much. I do, however, appreciate it as a life discovering lesson as a whole.

I told myself that I don’t foresee myself in an engineering field. I told everyone else. But, I have come so far and this is definitely not the end of my journey with EEE. The more lemons it gives me, the more I should make lemon juice for it. A Prof said that something is wrong with NTU education system. NTU doesn’t train the students to think critically. I agreed, my brain rusted over the years. I hardly argue with people. I hardly voice out my own opinions or even convince myself to believe in them. But is it NTU’s problem? No, it’s not.

If someone could not provide you with something, don’t blame him/her. Get it somewhere else. Find it yourself.

Sometimes I admire those people who dropped out from school and is free to do whatever thing they want. Because everyone else thinks they are failures. But they don’t give it a damn. They have something they like to do. They have all the time for themselves. They are free to manage their own time.

Actually, so do I.

I argued with my dad regarding this matter. I told him that our education system is at fault, that wasted so much of our time. Then he said, if weren’t for those education, would you even think of this?

Yeah, I bet I will be forever living under the coconut shell. Oh well.

I just wasted 2 hours writing about this and doing other stuffs while I should be writing my report due on Saturday. I need to start my stalled engine and awaken my Leonine soul within. 🙂