Forum Software Ferduino code Problem with skimmer and dosing pumps.

Problem with skimmer and dosing pumps.  [SOLVED]


Post Number:#1 Post Wed Apr 29, 2015 6:30 pm
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 45
Gender: None specified
National Flag:
Italy
hi

some products that would add to the dosing pumps create interference with the skimmer, which begins to foam in an abundant and overflowing glass.

controller for turning the skimmer I used the code change as from this link

viewtopic.php?f=8&t=63&p=617&hilit=skimmer#p617

it is possible to stop the skimmer for a time when the dosing pumps fit products?

thanks a lot

Danilo Casteller

Post Number:#2 Post Thu Apr 30, 2015 11:54 am
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Welcome Danilo!

Here you can add a flag (boolean) as:

if(i == 5) // i = 5 is dosing pump 6.
{
  flag = true;
}


On loop you can use the function millis to control the time as:
if(millis() - PreviousMillis) > 60000) // 60 seconds
{
 flag = false;
}

In check_level_skimmer() you can use:

 if((analogRead(sensor_skimmer) > 400) || (flag == true))


The code is incomplete, you need try learn a bit. :)

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#3 Post Sat May 02, 2015 12:21 pm
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 45
Gender: None specified
National Flag:
Italy
hi fernando

I have a question to ask
when dosing pumps are not working the variable "I" that I have difficulty in understanding it takes on value

it is possible to do a similar check

if ((dosadora1==higt) or (dosadora2==higt) or (dosadora3==higt)or(dosadora4==higt)or(dosadora5==higt)or(dosadora6==higt))

             flag= true
else
             flag=false




thank you very much for your patience

Post Number:#4 Post Sat May 02, 2015 1:41 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

"i" is a variable local the value is between 0 and 5.

See on code:

for(byte i = 0; i < 6; i++)


i = 0 is pump 1;
i = 1 is pump 2;
And so on.

Check it: http://www.arduino.cc/en/Reference/For

If you want make the pause with all pumps this condition isn't needed.

if(i == 5) // i = 5 is dosing pump 6.
{
  flag = true;
}


Only add:

flag = true;


Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#5 Post Sat May 02, 2015 5:19 pm
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 45
Gender: None specified
National Flag:
Italy
hi



if I understand the code, so that interrupts the flow of the skimmer when the pump dosing work in automatic mode.
if instead act in manual, the flow of the skimmer is not interrupted right ??

Best regards

Post Number:#6 Post Sat May 02, 2015 6:06 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

For manual dosage you need work with this part: https://github.com/FernandoGarcia/Fedui ... .ino#L2393
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#7 Post Sun May 03, 2015 4:45 am
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 45
Gender: None specified
National Flag:
Italy
hello Fernando

I tried to make these changes but I can not run this change :(( :(( :(( :(( .

for the manual so I modified the code:

in processmytouch

 digitalWrite(dosadora[dosadora_selecionada], HIGH);
          verifica_dosometriche = false;
          delay(60000);
          digitalWrite(dosadora[dosadora_selecionada], LOW);
          verifica_dosometriche = true;






for automatic mode:


in dosadoras


tempo_dosagem = map (((dose_dosadora_personalizada_e[i] / quantidade_dose_dosadora_personalizada_e[i])*2), 0, fator_calib_dosadora_e[i], 0, 60000);
              tempo_dosagem /= 2;   
              verifica_dosometriche =false;
              digitalWrite(dosadora[i], HIGH);
              delay(tempo_dosagem);
              digitalWrite(dosadora[i], LOW);
              verifica_dosometriche = true ;



the main page I added

boolean verifica_dosometriche= true;


the page loop

if (millis() - previousMillis > 60000) // 60 seconds
{
 verifica_dosometriche = false;


and finally the page Parámetros

void check_level_skimmer () // verifica livello skimmer

{
  if((analogRead(sensor3) < 400)||(verifica_dosometriche==false)   )
  {
    digitalWrite(skimmerPin,LOW);
   
  }
  else
  {
    digitalWrite(skimmerPin,HIGH);
    }
 



~x( ~x( ~x( ~x( I can not understand if I'm wrong the point of insertion of commands or if they are just incorrect instructions :-\ :-\ :-\ :-\

thanks for the help ;) ;) ;)

Post Number:#8 Post Sun May 03, 2015 2:16 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

This part is related with calibration so, this changes are useless.

 
         digitalWrite(dosadora[dosadora_selecionada], HIGH);
          verifica_dosometriche = false;
          delay(60000);
          digitalWrite(dosadora[dosadora_selecionada], LOW);
          verifica_dosometriche = true;


This part is wrong!

             tempo_dosagem = map (((dose_dosadora_personalizada_e[i] / quantidade_dose_dosadora_personalizada_e[i])*2), 0, fator_calib_dosadora_e[i], 0, 60000);
              tempo_dosagem /= 2;   
              verifica_dosometriche =false;
              digitalWrite(dosadora[i], HIGH);
              delay(tempo_dosagem);
              digitalWrite(dosadora[i], LOW);
              verifica_dosometriche = true ;


Delete this line:

 verifica_dosometriche = true ;


After change the flag to false you need reset the time like this:

PreviousMillis = millis();


The variable "previousMillis" is used to others function you need create a new.

The logic here is wrong!

if (millis() - previousMillis > 60000) // 60 seconds
{
 verifica_dosometriche = false;


To turn on the skimmer again the variable "verifica_dosometriche" need be true.

See what you did here:

  if((analogRead(sensor3) < 400)||(verifica_dosometriche==false))
  {
    digitalWrite(skimmerPin,LOW);
  }


Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#9 Post Thu May 28, 2015 5:24 pm
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 45
Gender: None specified
National Flag:
Italy
hello fernando

I tried and tried several times to change the code; but I can not understand where exactly do I have to change. can you help me understand where action


thank you very much and sorry for disturbing

Post Number:#10 Post Sat May 30, 2015 1:09 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Try this:

In the tab Ferduino add:

const byte sensor_skimmer = analog pin free; // No  need add it if you will use pins already declared on code
const byte skimmerPin = free pin; // No  need add it if you will use pins already declared on code

boolean dosage_done = false;
unsigned long wait_millis = 0;
const int wait = 10; // Time in minutes


On setup add:

// No  need add it if you will use pins already declared on code

pinMode(sensor_skimmer, INPUT);
pinMode(skimmerPin, OUTPUT);


In the tab "parametros" add:

void check_level_skimmer()
{
  if((analogRead(sensor_skimmer) > 400) || (dosage_done == true))
  {
    digitalWrite(skimmerPin, LOW);
  }
  else
  {
    digitalWrite(skimmerPin, HIGH);
  }
}


On loop add:

if(dosage_done == true)
{
  if((millis() - wait_millis) > (wait * 60000))
  {
    dosage_done = false;
  }
}
check_level_skimmer();


In the tab "Dosadoras" add:

dosage_done = true;
wait_millis = millis();


After:

tempo_dosagem /= 2;


In the tab "ProcessMyTouch" add:

dosage_done = true;
wait_millis = millis();


After:

tempo_dosagem /= 2;


In the tab "Webserver" add:

dosage_done = true;
wait_millis = millis();


After:

tempo_dosagem /= 2;


Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#11 Post Tue Jun 02, 2015 7:37 pm
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 45
Gender: None specified
National Flag:
Italy
hello fernando

thanks so much for your invaluable help.
changes to the code you entered work perfectly controlling the pumps in manual and through joyreef. but just now I noticed that in custom mode the pumps dosing. I tried to dose inserting either one as the number of doses that a number of higher doses over a period of 10 minutes but in no case the pumps are activated. You have no idea what it could be?

again thanks for the indispensable help from all of us

danilo casteller

-------------------------------- Last edited Wed Jun 03, 2015 12:13 am --------------------------------

hello fernando

I found the problem :D :D of default in the code that I downloaded the value dosadoras boolean = false; after changing into true works everything perfectly !!! :) :) :) :)




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest