Week 8 - Journal

Ideation

Tell us about your assignment's idea for this week. Why do you care about this idea? What inspired you? (Please include images or links to sources of inspiration)

Imagine going back in time just for 100 years ago, and tell people that they can control stuff wirelessly! They wouldn't have believed you for sure! Okay, well, talking to and communicating with things became more and more familiar recently. This ranges from communicating with home appliances and mobile phones to cars! Wireless Communication can be through IR, Bluetooth, and Wi-Fi.

Through your journey through this week assignment documentation, you'll have unmatched experience to turn on/off a motor (a simulation of a vehicle engine) just with your voice, and to play your favorite sound clip at your finger using your mobile!

LET'S GIVE IT A SHOT!

I used an HC-05 Bluetooth module to establish a wireless communication between the Arduino UNO from one side and a DC motor and a buzzer from the other side via Bluetooth using mobile applications. I have written anArduino IDE code and the microcontroller by then uses it TX & RX communication pins to transmit/receive data to/from Bluetooth module.


Talk to your car, it will listen!

Image credit


Smart home objects control via Bluetooth using mobile phone

Image credit

Tool Chain

Which software/machines/materials did you use in the assignment? Why?

Software:

Hardware:

  • Arduino UNO board

  • Bluetooth module (HC-05)

  • One channel 5V Relay module

  • DC motor with gearbox

  • Buzzer

  • 9V adaptor

  • Two screws adaptor plug

  • Jumpers wires

  • Breadboard

  • Digital Multimeter

  • Bluetooth enabled smart phone for sure!


Arduino Bluetooth Control application

Image credit

BT Terminal application

Image credit

Design/Preparation Process

Explain the design and/or preparation process of your assignment. How did you use the tool or software to design and/or prepare your assignment before fabrication/implementation?

--I started to 'drag and drop' the components of the circuit in design workspace in Fritzing.

--The '5V' and 'GND' pins in Arduino were connected with the common rail +Ve and -Ve in the breadboard.

--I used one channel relay to control the DC motor while the buzzer were connected to digital pin (9) and GND.

--Relay (IN) signal was connected to Arduino pin (12).

--I used 9V DC Adaptor to power the DC motor.

--The HC-05 Bluetooth module was connected RX and TX pins in Arduino in a presence of 500 and 1K Ohm voltage divider circuit as well as 5V and GND.

Before writing the code on Arduino IDE, and connecting the real components, I drew a flow chart for inputs and expected outputs of the circuit that code is supposed to do.


After creating the flowchart, I started write the real code in Arduino IDE.

I used the buzzer tones code from the hands-on minds-on activity of week 6 lecture to play some tones 😄

Screen shots for the coding lines in Arduino IDE are shown below 😄

Development/Implementation Process

Explain the development/implementation process of your assignment. How did you use the machine/tool to manufacture or implement the design of your assignment?

I started to connect all components on breadboard as per Fritzing wiring as shown below.

I performed the compiling check in Arduino IDE and here is the code lines:

// Play your favorite sound clips with your mobile

char IncomingData = '0';

#define buzzer 9

#define motor 12


void setup() {

Serial.begin(9600);

pinMode(buzzer, OUTPUT);

pinMode(motor, OUTPUT);



}


void loop() {

while (Serial.available() == 0);

IncomingData = Serial.read();

if (IncomingData == '1')

{tone(9, 131, 100); // play tone 36 (C3 = 131 Hz)

delay(150); // Wait for 150 millisecond(s)

tone(9, 131, 100); // play tone 36 (C3 = 131 Hz)

delay(150); // Wait for 150 millisecond(s)

tone(9, 147, 500); // play tone 38 (D3 = 147 Hz)

delay(550); // Wait for 550 millisecond(s)

tone(9, 131, 500); // play tone 36 (C3 = 131 Hz)

delay(550); // Wait for 550 millisecond(s)

tone(9, 175, 500); // play tone 41 (F3 = 175 Hz)

delay(550); // Wait for 550 millisecond(s)

tone(9, 165, 500); // play tone 40 (E3 = 165 Hz)

delay(550); // Wait for 550 millisecond(s)

delay(1000); // Wait for 1000 millisecond(s)

;

}

else if (IncomingData == '2') {

noTone(9);

tone(9, 165, 100); // play tone 40 (E3 = 165 Hz)

delay(150); // Wait for 150 millisecond(s)

tone(9, 156, 100); // play tone 39 (D#3 = 156 Hz)

delay(150); // Wait for 150 millisecond(s)

tone(9, 165, 100); // play tone 40 (E3 = 165 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 156, 150); // play tone 39 (D#3 = 156 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 165, 150); // play tone 40 (E3 = 165 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 123, 150); // play tone 35 (B2 = 123 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 147, 150); // play tone 38 (D3 = 147 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 131, 150); // play tone 36 (C3 = 131 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 110, 500); // play tone 33 (A2 = 110 Hz)

delay(550); // Wait for 550 millisecond(s)

noTone(9);

delay(1000); // Wait for 1000 millisecond(s)

}


else if (IncomingData == '3'){

tone(9, 220, 350); // play tone 45 (A3 = 220 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 196, 350); // play tone 43 (G3 = 196 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 175, 350); // play tone 41 (F3 = 175 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 165, 350); // play tone 40 (E3 = 165 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 220, 350); // play tone 45 (A3 = 220 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 196, 350); // play tone 43 (G3 = 196 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 175, 350); // play tone 41 (F3 = 175 Hz)

delay(350); // Wait for 350 millisecond(s)

tone(9, 165, 200); // play tone 40 (E3 = 165 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 208, 200); // play tone 44 (G#3 = 208 Hz)

delay(200); // Wait for 200 millisecond(s)

tone(9, 220, 100); // play tone 45 (A3 = 220 Hz)

delay(150); // Wait for 150 millisecond(s)

noTone(9);

delay(1000); // Wait for 1000 millisecond(s)

} else {

noTone(9);

}


// Turn on your car engine with your voice!


if (IncomingData == '4') {

digitalWrite(motor, HIGH);

}

else if (IncomingData == '5') {

digitalWrite(motor, LOW);

}

else {Serial.println("Invalid Value");

}

Serial.print("You entered ");

Serial.println(IncomingData);

}

A real circuit simulation is shown in the videos below after uploading the code to the Arduino. First, I controlled the buzzer and DC motor via BT Terminal smart phone application, afterwards, I controlled the two output components via Arduino Bluetooth Control smart phone application via touch buttons and voice commands.

Buzzer and DC motor controlled via Bluetooth.mp4

Community of Learning

Did you ask for feedback? What are the ideas that others have contributed or suggested? What was someone else’s idea that you built upon? How did you help your peers? How did your peers help you?

I participated with Ghazaly and Merit in the EOW session Makeathon! All three of us, especially me, as I have never imagined that I can, one day, build, program, assemble, and control a robotic arm successfully! I really benefited a lot from the group work and shared the ideas how to correctly approach the tasks from planning, components wiring, coding, troubleshooting, and eventually fishing some awesome 'wooden' fishes 😄 !

Overcoming Challenges

When you got stuck, what/who did you turn to? At what point did you have to pause to research or learn more before moving on? What are some mistakes, pitfalls, or challenges that others can avoid if they were doing this assignment?

I was quite confused a little bit with the 'Servo motor' library calling, servo naming and controlling. With the kind help of Esraa during the EOW (Saturday) Makeathon session, I managed to understand and use Servo motor correctly😄.

Final Project

How can you use the skills and knowledge that you've acquired this week in your final project?

Integrating Bluetooth module in the circuit

One of the complete features of my final project is use Bluetooth module to communicate with the user to notify him/her if the stock of their monitored item reached a certain (reorder) level. During the EOW Makethon, I gained an interesting hands-on experience in how to integrate Bluetooth module in the circuit and ho to use it seamlessly to control output components which, in turn, very essential to my final project.

WOW!

What is the coolest thing that you've learned this week? What is something that you will never forget from this week?

I learnt how to control the rotation angle of a given 'Servo motor' in an incremental way in both directions of rotation in a given plane. With using of three servo motors while implementing the robotic arm during the Makethon, I managed to perform required motions in multi axes efficiently.

Weekly Digest [OPTIONAL]

Tell us about any other cool things that you've made this week: in the Hands-on activity, tutorial examples, exercises, or any other cool mini-project that you tried out aside from the assignment.


Title of Media


Assignment Design Files