Multiple drop controller

Forums General Questions and Comments Multiple drop controller

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1925 Reply
    Kasper Hansen
    Guest

    Hi,
    I am interested in controlling multiple continues drops individually. Ideally between 9 and 25 water drops. They should be able to create the same and changing rhythms with the drop speed.

    Is this something that the dropController can be modified to do and would you be able to help? It does not need to be linked to a camera.

    Thank you for your help, Kasper

    #1929 Reply
    Martyn
    Keymaster

    The code could be modified to allow more drops and this is something you would need to experiment with. Unfortunately I don’t have time to help much.

    The dropContrroller can control up to 6 valves. You don’t say have many you need so I presume it is 6 or less.

    The maximum number of drops the dropController can create is hard coded to 9. The code can be modified to have 25 (or even more) and you would need to change the relevant variable initialisations and the loops that deal with the drops. For example:

    at the beginning of the sketch, the arrays that hold the drop times would need to be extended to hold more drops
    // Arrays to hold the drop times
    // I don’t use element [0]. This means drop 1 is at position [1]
    byte sol[10] = {0,1,1,1,1,1,1,1,1,1}; // the solenoid to use for the drop; 1 to 6
    unsigned int dropStartTime[10] = {0,0,0,0,0,0,0,0,0,0}; // start time in millisecond
    unsigned int dropStopTime[10] = {0,0,0,0,0,0,0,0,0,0}; // stop time in millisecond

    and the array used to receive the commands would also need extending

    char dropCommand[10][16] = {“0-1234567890”, “1-1234567890”, “2-1234567890” , “3-1234567890” , “4-1234567890” , “5-1234567890” , “6-1234567890” , “7-1234567890” , “8-1234567890” , “9-1234567890” };

    in the makeDrops function

    boolean dropped[10] = { false, false, false, false, false, false, false, false, false, false} ;
    boolean solOpen[10] = { false, false, false, false, false, false, false, false, false, false} ;

    Then all the loops that deal with drops would need the loop size changing (this is one example only, there are more):

    // set the drops as not dropped
    // set the solenoid valve for each drop as not open
    for (int i=1; i<9; i++) { dropped[i] = false; solOpen[i] = false; }

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Multiple drop controller
Your information: