Our assignment for Week 8 involves building and Programming a smart circuit that contains two actions components that I can control wirelessly via a Bluetooth module to a phone.
I chose to make a smart lighting piano with two actions components and control it wirelessly by phone.
Here's a list of software, machines, and materials I used for the assignment:
Tinkercad software for simulating
Arduino IDE
Arduino bluecontrol app
RGB led
Avometer for troubleshooting
buzzer
Breadboard
Bluetooth module
Arduino uno with cable
resistance
jumpers
5V adaptor
RCA female
Tinkercad simulation Process:
In this project, I used buzzer and RGB led as action components, and bluetooth module to control wirelessly those actions.
I used Arduino UNO to control my circuit.
I used breadboard to mount electronics and wires on it.
I connected the buzzer with pin 9 (signal) and the GND of Arduino.
I connected the RGB with 6, 7, 8 pins and the GND of arduino using resistance for protection.
I connected the bleutooth module with the GND, VCC, connected the Tx of bluetooth module with the Rx of Arduino, and connected the Rx of bluetooth module with the Tx of Arduino using resistances to limit the voltage.
Finally, after simulating the circuit and uploading the code on Arduino, I used the power supply (5v - 2A) as power source.
The simulation of the circuit
Coding Process:
if serial reads 1 (that is mean I pressed the first button), play tone and light the led with colour.
if serial reads 2 (that is mean I pressed the second button), play another tone and light the led with another colour.
repeat these instructions with the other buttons ( from 1 to 6)
finally, if the serial reads another number than 1 to 6, turn of the leds, and don't play any tone.
the code of the circuit (part 1)
the code of the circuit (part 2)
the code of the circuit (part 3)
I connected the action components and bluetooth module with arduino using breadboard as shown in tinkercad simulation:
I connected the buzzer with pin 9 and the GND of Arduino, connected the RGB with pins 6, 7, 8 and the GND of arduino using resistance, and connected the bleutooth module with the GND, VCC, connected the Tx of bluetooth module with the Rx of Arduino, and connected the Rx of bluetooth module with the Tx of Arduino using resistances to limit the voltage. then I uploaded the code using the cable.
I used arduino bluecontrol app as graphical user interface to send data to arduino to control the action components
Demo of the circuit
During simulation, I couldn't find the Bluetooth module in the Tinkercad library. When I asked my peers, they informed me that I needed to access the examples in the circuits and search for it by name. They told me I would find multiple pre-made circuits, and I could take one, copy it, and work on it. I followed their advice, and it worked. I'd like to share this tip with anyone who reads this: if you can't find a component in the library, try searching for it in the pre-made examples.
One of the issues I faced while uploading the Arduino code was that it couldn't read the port. To resolve this, I switched ports and selected it multiple times from the Tools tab until it was recognized. During circuit operation, I noticed that the buzzer sound was low. Upon investigating, I found that it was connected to a 330-ohm resistor, which I removed. As a result, the buzzer sound improved significantly. (The buzzer can operate on 5V normally, so the resistor wasn't necessary in the first place.)
This week, I learned how to control components by phone or pc using Bluetooth module.
I encountered some problems and learned from them, so I think I will use them effectively in my final project because I want to develop my project and make it more smart as people will be able to control the machine using their phones.
Besides the hands-on learning experience, I thoroughly enjoyed the journey, absorbing valuable tricks and gaining in this week. The team spirit with fellow colleagues – sharing advice, capturing moments, laughter, and encouragement – created unforgettable memories.
We made this robot arm for end of week session 😍🤩