Forum Software Ferduino code Inverted function chiller Heather pumps

Inverted function chiller Heather pumps  [SOLVED]


Post Number:#1 Post Tue Jan 10, 2017 6:52 pm
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
Hello, I'm having a problem... When the heater is activated, I have signal on chiller pin and the opposite too...
When the chiller is activated I have signal on heater pin.
When the temperature is OK.. Activated both of then meanwhile deactivated.
I'm using a 16 relay board.
This problem occurs with some pumps too.. TPA system pumps

Post Number:#2 Post Tue Jan 10, 2017 7:57 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!

Welcome Marcelo!

1 - How the relay board is connected to Arduino?

2 - Have you tested your circuit using a simple code like this?

const byte relayPin = 42;

void setup()
{
  Serial.begin(9600);
  pinMode(relayPin, OUTPUT);
}

void loop()
{
  Serial.print("Pin ");
  Serial.print(relayPin);
  Serial.println(": ON");

  digitalWrite(relayPin, HIGH);

  delay(5000);

  Serial.print("Pin ");
  Serial.print(relayPin);
  Serial.println(": OFF");

  digitalWrite(relayPin, LOW);

  delay(5000);
}


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 Wed Jan 11, 2017 12:22 am
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
hi, in other topic i told you that i have a problem......


Hello, I'm having a problem... When the heater is activated, I have signal on chiller pin and the opposite too...
When the chiller is activated I have signal on heater pin.
When the temperature is OK.. Activated both of then meanwhile deactivated.
I'm using a 16 relay board.
This problem occurs with some pumps too.. TPA system pumps


and you give me a code for test.. but how i do it?

put it in a new scketchbook and do upload??

sorry about the simples questions, but i´m beginner of beginner

Post Number:#4 Post Wed Jan 11, 2017 8:41 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!

Yes, copy the code to a new sketch then upload.

Open serial monitor and set the baud rate to 9600 to see debug message.

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 Wed Jan 11, 2017 9:37 am
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
Ok.. It's done.
LCD screen is completely white
On the serial monitor 9600 shows me the msg
...
Pin 42: on
Pin 42: off
...

Post Number:#6 Post Wed Jan 11, 2017 9:39 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

And what happens with relay connected on pin 42 when the serial monitor says "pin 42 ON"?
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 Wed Jan 11, 2017 1:55 pm
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
5 seconds active
5 seconds off

Post Number:#8 Post Wed Jan 11, 2017 2:24 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

So if you didn't any change in this values on Ferduino code it should work. There no errors on code to make it work as you are talking.

const byte aquecedorPin = 42;   // Pino que liga o aquecedor
const byte chillerPin = 43; // Pino que liga o chiller


Moreover this function at "Parametros" tab prevent chiller and heater activated simultaneously.

    if ((bitRead(status_parametros, 0) == true)  &&  (bitRead(status_parametros, 1) == true))
    {
      bitWrite(status_parametros, 0, 0);
      bitWrite(status_parametros, 1, 0);
      digitalWrite(aquecedorPin, LOW);
      digitalWrite(chillerPin, LOW);
}
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 Wed Jan 11, 2017 2:35 pm
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
This configuration is already running, but still inverted the functions.
the code is ok
On relay code i have.. chiller pin 43 powered, Heather pin 42 powered, and pumps pin...A6, A7, A8, powered too
i make a test with ledpinmoon pin 44 - nedd to be not powered because its 15pm... and it´s on... :ymsigh: :ymsigh:
another test with pin 8 led violet.. when the power needs to be on maximun its on minimum ....and when needs to be on minimum its maximum power...

Post Number:#10 Post Wed Jan 11, 2017 2:48 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

This problem doesn't exists in latest version of Ferduino code.

1 - Check the changes that you did on code;

2 - Don't change the temperature very fast while making tests;

3 - Show me images of your circuit;

4 - Post a video to show the problem including the message on TFT when heater and chiller is activated simultaneously.
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 Thu Jan 12, 2017 12:26 am
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
I have reinstaled de ferduino code... only change the ethernet shield to true and the code of MyGLCD
Boolean_Stamps=false (i do not change this value)
just this changes

i´m waiting 2 minutes to view the result, but in 10 seconds its shows the new one if i had changed

1 conected gnd of relay to gnd of arduino
5v relay to 5v arduino
and the pin 42 to pin 1 of relay
pin 43 to pin 2 of relay

I will post the pictures of the boards and how i conect... maybe there´s something wrong



plug the ethernet making conecting pin 10 to pin 53
disconected pin 10, 11, 12 ,13

Image


Image



disconect pin 50, 51, 52, 53 of tft shield

Image


make a bridge pin 4 to resistor R 16 and disconect one side of it

Image


on this Picture you can see Heather and chiller turned off on the screen and on the relay board ... both of then ...on

Image

Post Number:#12 Post Thu Jan 12, 2017 8:25 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!

The question seems very simple, this relay board works with inverted logic.

In others words needs of signal LOW to turn on and HIGH to turn off.

Connect the relay board according to this schematic and don't need change the code:

Image


Notice the TFT says "heater: OFF" and "chiller: OFF" so the code is not turning on any relay.

Best regards.

-------------------------------- Last edited Thu Jan 12, 2017 10:09 am --------------------------------

And what happens with relay connected on pin 42 when the serial monitor says "pin 42 ON"?


With an adequate answer to this question, the problem could have been resolved before.

Q: what happens with relay connected on pin 42 when the serial monitor says "pin 42 ON"?

A: The relay is OFF

Q: what happens with relay connected on pin 42 when the serial monitor says "pin 42 OFF"?

A: The relay is ON

Solution: The relay board have inverted logic.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#13 Post Thu Jan 12, 2017 10:01 am
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
Now... It seems to be OK.. I put one uln2003a before the connections to the relay board... Doing as you told.
Thanks for the patience. :D




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron