This week assignment is to build a simple smart circuit that contains at least TWO action components that you can control wirelessly then use the Android GUI to control the action components. One of the main problems in my room is who the one that will turn either the light or fan ON and OFF me or my brother as we are together in the room. Also ,we sometimes forget the bulb and the fan ON ,So as we are always hold our phones so I decided to make this task to control the situation of the Fan and the Bulb and use RGD led to indicate the status of them.
Fan 5 volt
Bluetooth HC-05 Sensor
Arduino IDE Program
Breadboard
3 Resistor 220 ohm
1Resistor 1Kohm
1Resistor 2Kohm
Relay 9V and 5 V
Bulb
Smart Phone
Arduino Cable
Ticker Cad
RGB LED
Jumpers
Circuit Design
TinckerCad Circuit
First, I started designing my circuit using TinkerCed but the connection of the Bluetooth module is missing as the component is not inside the TinckerCad library.
Bluetooth HC-05 Sensor connection
I downloaded this photo from the internet to know the right connection taking into consideration making voltage divider to the input voltage of the Bluetooth module as it needs 3.3 Volt.
Design Simulation with explanation
This simulation shows the behavior of the Fan ,RGB, and Bulb when they receive the order number from the Bluetooth module. Each operation in represented with one color from the RGB LED, For example Bulb ON mode the Blue light can appear and for Bulb OFF no light can be represented by no light . Regarding Fan ,the Green light can represent ON mode and the Red light can represent OFF. this simulation is not represent the function of the Bluetooth module through the Graphical user interface on the smart phone ,but this will be represented very well in the implementation section.
NOTE : Select the light color is random as it is for the clear representation (you can select your own ,I tried here different colors with the ON/OFF modes )
Circuit Connections
I connected the circuit as in the simulation by adding the Bluetooth module connections.
STEPS
I started my connection with the Bluetooth module and I used a voltage divider across Rx pin the resistors value were 0.5k ohm and 1 k ohm ( you can use any two resistors have 1:2 ratio )
I connected the Bulb by 9 V adaptor and a Relay.
I connected the Fan by 5 V adaptor and a Relay.
I connected the RGB led.
Note : while uploading the code remove Rx and Tx pins from Arduino then put them when the uploading ends.
Circuit Wiring
Arduino code
Declaring pins number
select INPUT and OUTPUT PINS
Bulb ON case and Blue light will be generated , Fan ON case and Green light will be generated ,Fan OFF case and red light will be generated
Bulb off Case and No light will be generated
Circuit Recorded Video
Operating the ON/OFF mode of a Fan and a Bulb wirelessly through a Bluetooth module and representing each operation with a different light using RGB LED
The problem that I encountered was that I could not find the Bluetooth HC-05 Sensor inside the TinkerCad.
Another problem appeared while the wiring process as the Bluetooth model was not visible to be connected through the Graphical User Interface ,So I searched for this issue and this article helps me a lot https://www.instructables.com/Configuring-and-Testing-Bluetooth-Modules/. I tried more until it appears in my search.
Filament dryer machine
I thought about the possibility of controlling the required temperature and humidity of the filament through a mobile application remotely.