WEEK 1
WEEK 2
WEEK 3
WEEK 4
WEEK 5
WEEK 6
WEEK 7
WEEK 6 :
Electronics & Open Design
This week we explored electronics unfortunately I was sick for most of the lessons, except for the expo. But I made the assignment at home to keep up with the rest of the class.
The expo was a material fair. This was a bit out of context for me personally. I don’t know a lot about material specifications and experienced a knowledge gap between the fair hosts and me. It was fun to see some exquisite materials. Such as the angle based reflection glass. When you stand right in front of the glass you can see trough it, but when you move aside the glass becomes cloudy.
IR Receiver & Piezo buzzer
HOME
ZINE : Desire
Humans have this natural urge to name unknown things and categorise objects. Desiring this world were everything just works perfectly together and each machine is modulair. Swapping components without having to worry if the machine will still work. Standardising every human made object. Making components accessible for everyone and everything. I believe this desire is an incredible desire to do good. Help the environment by eliminating waste, standardising cables and contacts. Creating this universal connector. Never having to worry about adapters. Having a desire, is having a dream, is hope, is wishful. And is so much more.
IR Receiver
IR receivers are little microchips with a photocell that are tuned to listen to infrared light. IR can be found in TV’s and DVD players. In combination with an IR remote the receiver can communicate wirelessly and receive data send by the remote. The remote send’s unique colours to the receiver which is programmed to interact upon receiving certain colour codes.
For instance when the user pressed the on / off button on the remote, A hex colour FFA25D is send to the receiver. The receiver is programmed to know that the colour FFA25D is the on / off button and reacts appropriately.

The IR receiver module were using today is an input sensor.
Start by connecting the G pin on the IR receiver to the End pin on the Arduino. This provides the natural ground. Next, connect the R pin on the receiver with the 5v pin on the Arduino and lastly connect the Y ( data ) pin on the receiver with the 11 pin on the Arduino

It ultimately should look like this :
Schematic
End Result
The finished product should look somewhat like this :
Common use
IR receivers are commonly used in TV’s and Led’s. This is due to the fact that it can travel wirelessly and passes trough humans. ( Humans can’t even see infrared ) You could initially even highjack your own TV with this tutorial.
Uncommon use
Some remote Toy cars use an IR receivers to become remote controlled.
Parts and Tools
Parts we need for an IR receiver :

- Arduino ( Or something comparable )
- IR receiver
- IR remote
- 3 Wires
- USB A - B cable
- -optional - Breadboard
- IRremote library
- Our own code

Supplier
IR-ontvangstmodule Iduino ST1089 1 stuks 5 V/DC | Conrad.nl
Code
Start by including the IRremote library in the Arduino envoirment.
// Include library
#include "IRremote.h"
Next, we want to declare a few variables :
// Declare variables
int receiver = 11;
IRrecv irrecv(receiver);
decode_results results;
And create a new function to recall later in the code.
// Create Function translateIR
void translateIR() {

// Use a switch for mutliple cases
switch(results.value)

{

// A Case is build using the following layout : case if, then ;
// In this "case" hehe : case colour: print this;

case 0xFFA25D: Serial.println("POWER"); break;
case 0xFF02FD: Serial.println("PAUSE"); break;
case 0xFF30CF: Serial.println("1"); break;

// A fallback for when a case is not recognised.
default:
Serial.println(" other button ");

}
// A delay to prevent overload
delay(500);

}
Once we declared the translateIR function we can create our setup function, like so :
// setup function
void setup()
{
Serial.begin(115200); // log serial frequence
Serial.println("IR Receiver start"); // log " IR is enabled and turned on
irrecv.enableIRIn(); // Actualy enable IR using the IR library

}
And finally the loop function
// Loop function
void loop()
{
if (irrecv.decode(&results)) { // If the IR receiver gets an event, decode and log it in the results variable
translateIR(); // If a log happend check if the colour code matches one of the cases
irrecv.resume(); // Look further for new events
}
}
<<<
Piezo buzzer
https://github.com/Root-ish/IR-Receiver
Piezo are an actuator. A piezo contains a small crystal that, under voltage, generates a high frequency noise / sound. Piezo’s can be found almost everywhere. Almost each computer has a Piezo for inducting errors or other events. The frequency can be manipulated using different voltages.
Piezo’s are used in computers to indicate errors or events. Basically all electronic machines have a piezo onboard. It’s a very cheap way to indicate events to the user
Common use
Hospital machines also contain Piezo’s. When an event occurs, the piezo will sound. ( A serious problem occurring more and more now a days. Is the fact that piezo sensors all resonate in the same frequency scale. The nurses and doctors are starting to get “piezo deaf”. )
Uncommon use
Supplier
https://www.conrad.nl/p/1365793-piezo-signaal-geluidsontwikkeling-98-db-spanning-30-v-1-stuks-1365793
Parts and Tools
Parts we need for an Piezo :

- Arduino ( Or something comparable )
- Piezo
- 2 Wires
- USB A - B cable
- -optional - Breadboard
- the pitch library
- Our own code
Start by including the Pitches library in the Arduino envoirment.
Code
// Include library
#include "pitches.h"
Next, we want to declare a few variables :
// Declare variables

// declair the speaker pin
int speakerpin = 8;

// notes in the melody:
int Axel_melody[] = {
NOTE_F5, NOTE_GS5, NOTE_F5, NOTE_F5, NOTE_AS5, NOTE_F5, NOTE_DS5,
NOTE_F5, NOTE_C6, NOTE_F5, NOTE_F5, NOTE_CS6, NOTE_C6, NOTE_GS5,
NOTE_F5, NOTE_C6, NOTE_F6, NOTE_F5, NOTE_DS5, NOTE_DS5, NOTE_C5, NOTE_G5, NOTE_F5, REST,

};

// Tempo of the melody
int Axel[] = {
2, 2, 4, 8, 4, 4, 4,
2, 2, 4, 8, 4, 4, 4,
4, 4, 4, 8, 4, 8, 4, 4, 2, 1,
};

// create the variabel : num_elements_in_arr and place the variable Axel in it
const int num_elements_in_arr = sizeof(Axel)/sizeof(Axel[0]);

// Craete the variable previousMillis
unsigned long previousMillis = 0;

// Craete the variable interval
const long interval = 870;

// Craete the variable Digital and set it to low
int Digital = LOW;
Next, we want to declare a few variables :
// Loop function
void loop() {

// When ( new variable this note = 0 ) thisNote is smaller than the number of notes in the melody do this :
for (int thisNote = 0; thisNote < num_elements_in_arr; thisNote++) {

// Create noteDuration ( 500 is a random number )
int noteDuration = 500/Axel[thisNote];

// Play the tone x on the speaker pin
tone(speakerpin, Axel_melody[thisNote],noteDuration);

// Create pausBetweenNotes
int pauseBetweenNotes = noteDuration * 1.30;

// Add a pause between the notes using a delay
delay(pauseBetweenNotes);

// End note
noTone(speakerpin);

}
}
Schematic
Start by connecting the ground pin of the piezo to the GND pin on the Arduino. And lastly connect the Data pin of the piezo to the 8 pin on the Arduino.

It ultimately should look like this :
End Result
The finished product should look somewhat like this :
https://github.com/Root-ish/Piezo
https://drive.google.com/open?id=1YWNxSJ-J4oto-LXx4sPDTj2LshyYDA-y
SELF-INITIATED PROJECT
MINOR-THOUGHTS