I wanted to design a clock based system that would do a task at a certain time, but I do not possess a microcontroller like Arduino due to lockdown(Corona pandemic). My task involves making a motor run at 6 am in the morning. I know that USB can give 5V supply to the motor(I have a motor that can handle 5V and actually needs 5V). Now what I am asking is, is it possible to manipulate or write a program and load it in phone that would turn on the motor connected to the phone via USB(the USB portion of the micro USB cable has been cut off to expose the 5V line). The motor would turn on when clock in phone strikes 6 am. So how can I achieve this control mechanism?
Don't use USB. Anything you do with USB will require a processor of some kind, and complicated software on the phone - if it can be done at all
Do it the easy way.
Your phone certainly has an alarm clock.
Plug an earphone plug into the phone, and use an analog circuit on the earphone output to turn on the motor.
Something like this circuit:
Leave off U2, the microphone, and the associated parts.
Connect the earphone output of your phone to C6 and ground.
When the alarm clock on the phone rings, the alarm tone will activate the circuit and turn on the motor. A second alarm tone will turn the motor off.
You'll probably have to try out various alarm tones to find one that triggers reliably. You may also have to try it with different volume settings.
There are simpler circuits. That's one I found by searching for "sound activated switch."
You'll probably want to use a relay to switch the motor.
You can leave out