+ Post New Thread
Results 1 to 12 of 12
  1. #1
    Newbie level 4
    Points: 54, Level: 1

    Join Date
    Jan 2020
    Posts
    6
    Helped
    1 / 1
    Points
    54
    Level
    1

    Inflatable Hard Drive - transferal of data between three devices via USB

    Hello Everyone,

    Small caveat to begin, I'm a product design student with very basic knowledge regarding electronics and coding, which is worth keeping in mind if i use some technical terms out of place.

    For context, I'm proposing to build an inflatable hard drive. I have code* which reads the amount of data on the hard drive, and outputs this number as serial data which can be read by the arduino. The arduino would then, in theory, power one of two pumps for x amount of time, either inflating or deflating a balloon. Ideally, you would use the device in the same way you do an external hard drive e.g. plug your computer in via USB and transfer data. With the exception that this one inflates or deflates a certain amount depending on the amount of data you either add or remove

    Both the code that serially outputs the hard drives capacity and the arduino code shouldn't be an issue. However, I don't know how to transfer the 'information' between devices with a single USB port

    Click image for larger version. 

Name:	IHD inputs.jpg 
Views:	8 
Size:	336.6 KB 
ID:	157188

    Thinking it through in steps gives me this flow of information.

    1. Computer is connected to hard drive via USB port
    2. File is uploaded to hard drive
    3. Code ascertains change in hard drive capacity and converts this to serial data
    4. Computer sends serial data to arduino via USB port


    I'm under the impression that the flow of electricity can be thought of in basic terms as similar to that of water. In which case i'm looking for a hub like component that redirects the flow of information from the hard drive to the arduino when that information is transmitted serially. Does this exist?

    *The code was written with the help of a technician in node.js, a language I have zero experience in. Here is the github of some of this code https://github.com/wisemanlove/IHD taken from this folder Click image for larger version. 

Name:	IHD code folders.jpg 
Views:	6 
Size:	53.9 KB 
ID:	157187
    please let me know if it would be helpful to see more code.

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 5
    Points: 24,863, Level: 38
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,763
    Helped
    1055 / 1055
    Points
    24,863
    Level
    38

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    Maybe I'm missing something, but you seem to have an enormous misunderstanding of, well, everything. The way you describe it, your system inflates a balloon proportional to the AMOUNT with no regard to WHAT the actual data is? Hard drives dont change size. They dont get smaller when you read data. You need to either rethink your idea, or explain it better.



  3. #3
    Newbie level 4
    Points: 54, Level: 1

    Join Date
    Jan 2020
    Posts
    6
    Helped
    1 / 1
    Points
    54
    Level
    1

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    My apologies. It is not the hard drive itself which inflates, but rather an external component e.g. a balloon, which inflates or deflates in proportion to the amount of data on the device. In theory the volume of the balloon will be mapped to the capacity of the drive such that at the drives full capacity the balloon is also full. The balloon is representative of the drives capacity, and the information i'm transferring between devices relates to the amount of time that pumps are powered to inflate that balloon relatively.

    Click image for larger version. 

Name:	IHD concept.jpg 
Views:	0 
Size:	28.2 KB 
ID:	157194



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 5
    Points: 24,863, Level: 38
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,763
    Helped
    1055 / 1055
    Points
    24,863
    Level
    38

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    In your original post you said: "I'm proposing to build an inflatable hard drive". Then you said: " Ideally, you would use the device in the same way you do an external hard drive".

    You are, in fact, using it NOTHING like a hard drive.

    I think you are on a fool's errand.

    First of all, what is even the point of having a balloon proportional to the utilization of a hard drive's utilization?
    Secondly, what do you really mean "The balloon is representative of the drives capacity"? You would have to measure pressure, volume and temperature in order to relate it HD utilization. (PV=nRT)
    Thirdly, the amount of time the pump runs is NOT linearly related to the PV (pressure and volume) of the HD. As the balloon fills the back pressure increases and the pump adds less air to the balloon for a given run time.



    •   AltAdvertisement

        
       

  5. #5
    Newbie level 4
    Points: 54, Level: 1

    Join Date
    Jan 2020
    Posts
    6
    Helped
    1 / 1
    Points
    54
    Level
    1

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    I’m struggling to understand
    what is even the point
    of your replies as they continually ignore the question I actually posed regarding
    the flow of information
    between devices. The only
    fool's errand
    currently being undertaken is by the muppet who seems intent on misunderstanding quite a simple proposal and giving an opinion where it isn’t wanted and hasn’t been asked for.

    Your seniority on this forum, and textbook knowledge of equations i have no use for, implies that you do in fact know whether devices can be read, and written to, over a hub that takes one USB input and 'splits' it between two devices. If this falls within your purview please let me know.



  6. #6
    Super Moderator
    Points: 264,377, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    46,193
    Helped
    14049 / 14049
    Points
    264,377
    Level
    100

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    Parts of your post are violating forum rules about Insulting posts, personal attacks or purposeless inflammatory posts.

    It might be deleted by moderators if users complain about it.

    In terms of data transfer, it makes no difference how the Arduino device visualizes information, hence we can abstract from the balloon inflation topic for the time being and don't need to worry about the involved physics now.

    i'm looking for a hub like component that redirects the flow of information from the hard drive to the arduino when that information is transmitted serially. Does this exist?
    Yes and no. It could be designed but doesn't make much sense. PC is communicating with hard drive in high speed (480 MBPS) or even USB 3.0 superspeed (several GBPS), using the dedicated USB mass storage device protocol. PC to Arduino interface is through a virtual COM port with full speed (12 MBPS), net data amount limited by the Arduino serial interface to e.g. 115 KBPS. Arduino USB interface neither talks MSD protocol nor handles the speed. So redirect doesn't work. Fortunately you don't want to redirect the data, only the information about transmitted data. Furthermore the data transfer doesn't directly reflect the storage utilization. You can read a file once or hundred times, but it's still stored on the hard drive. In contrast, deleting files doesn't involve much data transfer.

    More generally speaking, flow of information is rather different from flow of electricity or water.

    A straightforward solution would be to run an application on the PC that continuously monitors the hard drive storage utilization and sends the information to Arduino.



  7. #7
    Advanced Member level 5
    Points: 18,454, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,269
    Helped
    816 / 816
    Points
    18,454
    Level
    32

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    Computer is connected to hard drive via USB port
    File is uploaded to hard drive
    Code ascertains change in hard drive capacity and converts this to serial data
    Computer sends serial data to arduino via USB port
    Computer is connected to the hard disk via the USB cable; the filesystem reports the amount of hard disk used.

    How this information comes to the arduino? You need to have a connection to the arduino so that it knows the file size.

    It is wrong to say that the hard disk capacity changes; the only thing that changes is the number of blocks (or sectors) being used at a given time.

    Hard disk is a block device; the files are written or deleted by software called device driver in units of blocks or sectors.

    The device shown is a SATA device but it cannot communicate directly with arduino and a PC at the same time.

    Your arduino need to be connected to the PC and the PC can ask the space occupied on the hard disk and send that information to the arduino. That can be performed periodically.

    The The arduino can be asked to inflate and deflate a balloon in direct proportion of the % of disk filled with data.



  8. #8
    Newbie level 4
    Points: 54, Level: 1

    Join Date
    Jan 2020
    Posts
    6
    Helped
    1 / 1
    Points
    54
    Level
    1

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    Click image for larger version. 

Name:	Untitled-2.jpg 
Views:	3 
Size:	16.7 KB 
ID:	157207

    Your arduino need to be connected to the PC and the PC can ask the space occupied on the hard disk and send that information to the arduino. That can be performed periodically.
    Can this not be done over a single usb port? Surely the computer does not need a separate connection directly to the COM port of the arduino. Can the data lines of the usb be used to send the serial data to the arduino via the digital input connections on the arduino?



  9. #9
    Super Moderator
    Points: 264,377, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    46,193
    Helped
    14049 / 14049
    Points
    264,377
    Level
    100

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    Can this not be done over a single usb port?
    Yes.
    Can the data lines of the usb be used to send the serial data to the arduino via the digital input connections on the arduino?
    No, you need to connect the Arduino USB port.

    You can use a standard USB (mini) hub with at least two downstream ports.



  10. #10
    Newbie level 4
    Points: 54, Level: 1

    Join Date
    Jan 2020
    Posts
    6
    Helped
    1 / 1
    Points
    54
    Level
    1

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    https://amzn.to/37t9X0i

    I've ordered this. Will let you know how it goes. Many thanks for your help everyone.



    •   AltAdvertisement

        
       

  11. #11
    Advanced Member level 5
    Points: 18,454, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,269
    Helped
    816 / 816
    Points
    18,454
    Level
    32

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    I've ordered this. Will let you know how it goes. Many thanks for your help everyone.
    It may be wise to think in advance how you are going to connect it. The SATA hard disk can be connected to a PC and the arduino can be connected to the PC. Where you are going to connect the USB hub?

    What kind of files are going to be written on the hard disk (and I presume that is being done by the PC) and the OS being used.

    You need to write a TSR on the PC that will send the file size information periodically to the arduino.

    You need to write a program that will inflate or deflate the balloon depending on the file size on the hard disk.

    I admit that I am not an expert on the USB hardware or software.



  12. #12
    Newbie level 4
    Points: 54, Level: 1

    Join Date
    Jan 2020
    Posts
    6
    Helped
    1 / 1
    Points
    54
    Level
    1

    Re: Inflatable Hard Drive - transferal of data between three devices via USB

    Here is a video of a working prototype!
    Thanks everyone for your help.



    1 members found this post helpful.

--[[ ]]--