Go Down

Topic: RE: A new beginner with ideas (Read 645 times) previous topic - next topic

rossq

May 15, 2017, 11:39 pm Last Edit: May 15, 2017, 11:46 pm by rossq
Hello everyone.

I need some help with a project that I have in mind. I have some idea of what parts I will need for this project.

Here are the details for the project.

I like to add a power switch to a HDD which is controlled by an audino. As to what governs the switch, I am thinking that the arduino listens for a specific program that is running on my windows system. When that program is running it will switch the HDD on, and when the program is no longer running. The arduino will then power off.

Here are my questions

1. What arduino will be best suited for this application?
2. What parts and items will I need to accomplish this project?
3. Where can I find coding that can program the arduino to do this? (I have knowledge about logic gates already, but as for anything else I have little experience in programing)

I would also like to be able to turn a drive on/off by time and day,

Thanks for your help and support in advance.


Grumpy_Mike

Quote
the arduino listens for a specific program that is running on my windows system.
Unless the program is designed to do something that specifically talks to the Arduino down a serial port then there is nothing the Arduino can "listen to".

Wawa

Are you sure you want to mess with that.
Is this to lower power usage or to try to make the drive last longer.
Windows has user configurable drive sleep settings. External drives also have programmed sleep settings.
Note that mechanical drives not only have a limited amount of running hours, but also a limited number of start/stops.
Maybe better to invest in a Solid State Drive.
Leo..

Robin2

When that program is running it will switch the HDD on, and when the program is no longer running. The arduino will then power off.
I suspect it would be hard to find a better way to cause the PC to crash. Leave it to the PC to manage its own disks.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

rossq

Unless the program is designed to do something that specifically talks to the Arduino down a serial port then there is nothing the Arduino can "listen to".
Oh ok I see thanks, I probably go by a timer instead.

Thanks for you help.

Are you sure you want to mess with that.
Is this to lower power usage or to try to make the drive last longer.
Windows has user configurable drive sleep settings. External drives also have programmed sleep settings.
Note that mechanical drives not only have a limited amount of running hours, but also a limited number of start/stops.
Maybe better to invest in a Solid State Drive.
Leo..
Well it's just an idea I had to prevent from ransomware, also it save me the hassle of switching the drive on and off via the hot swap bay button.

spending out on a SSD for a backup drive is not cost effective I have nearly 2TB worth of data.

I suspect it would be hard to find a better way to cause the PC to crash. Leave it to the PC to manage its own disks.

...R
Even tho the drive is in a hot swappable bay? I have not had any issues with windows when powering on an of the drive by the hot swap bay.

Robin2

Even tho the drive is in a hot swappable bay? I have not had any issues with windows when powering on an of the drive by the hot swap bay.
Maybe program the Arduino to drive a servo to push the switch on the hot-swap-bay?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

rossq

Maybe program the Arduino to drive a servo to push the switch on the hot-swap-bay?

...R
I could do that, but it would look untidy to me.

Robin2

#7
May 18, 2017, 11:16 pm Last Edit: May 18, 2017, 11:18 pm by Robin2
I could do that, but it would look untidy to me.
You seem to have inadvertently provided some information that is at variance with your Original Post which said "I like to add a power switch to a HDD". I think it was reasonable for me to assume that there was no existing switch.

But now it appears that there is in fact an existing switch that could be operated with a servo.

It is much easier to make sensible suggestions when you provide full information.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

rossq

You seem to have inadvertently provided some information that is at variance with your Original Post which said "I like to add a power switch to a HDD". I think it was reasonable for me to assume that there was no existing switch.

But now it appears that there is in fact an existing switch that could be operated with a servo.

It is much easier to make sensible suggestions when you provide full information.

...R
Apologies.

I did not include that information for a reason, because I don't want the arduino to control the drive by a physical button on a drive bay. As this would not meet the aesthetics.

Delta_G

So Wire into the button and simulate its pressing. Doing what @Robin2 suggested doesn't have to involve a literal servo. How does the switch in the bay work?  Does it just connect something to ground?  Could you just use a transistor as a parallel switch? 
If at first you don't succeed, up - home - sudo - enter.

Robin2

I did not include that information for a reason, because I don't want the arduino to control the drive by a physical button on a drive bay. As this would not meet the aesthetics.
I understand all that. But if you had told us up front that there is already a switch we could have suggested ways to do what you want without being concerned that turning off power to a HDD would cause a crash.

What @Delta_G has suggested seems sensible. You need to know how the existing switch interacts with the system. I suspect it sends a logic signal to other stuff that manages an orderly shutdown.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Frostedfocus

Research the switch you have now and find out what its switching logic is, does it terminate on ground pull up or does it terminate on 5V or 9V or 3,3V pullup or what, with that information you program your arduino to act as this switch from one of its i/o ports, you will need an arduino with a RTC or you will have to buy an RTC shield like the DS3231, with this you can program the arduino to switch the drive on or off acording to the time that you have set it to, and if you want it to activate acording to a specific program being launched by windows then that is just simple coding, the arduino will have to 'hunt' for a specific macro nbeing activated basicaly in the same way a canbus looks for a specific can bus id. then when the pc activates this specific macro and the arduino senses it then it can in turn switch on or off the HDD. if i can suggest a board to use then you can look at the Adafruit feather boards you can use maybe the adalogger with the rtc feather shield if you want something realy small and if you are not concerned about size then arduino uno with rtc shield or mega, you will need to connect to your pc aswel in order to get the response macro so you have to decide if you gonna use software or hardware serial or ethernet. with software serial you will use the normal usb connection and do specific programming or if you want the hard drive to be somewhere in a cupboard in another room then you can connect it to an ethernet shield like the wiznet w5100, this way you can switch it on or off over a LAN network line.

there are various options for hardware so you have to decide on the basics before you can go forward.

1 Is the size of the unit a problem ? how big or how small do you want it to be ?
2. How will it be powered ? battery powered or straight dc power supply ?
3. how will it connect to the PC ? software serial or ethernet  or some other way ?
4. how much do you want to spend?
5. what capabilities must it have ? - switch on/off in conjuction with a program.
                                               - switch on/off acording to day time/night time.
                                               - ect...

After you have awnsered and decided on those questions then we can look at your hardware setup.

Go Up