Forum Hardware Main board Ferduino Mega Problem

Ferduino Mega Problem  [SOLVED]


Post Number:#1 Post Thu Apr 25, 2019 1:55 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
Hi Everybody

I am new to this and was able to buy a used ferduino board with help from Fernando(Thank You).

This is quite a project especially for someone that has never used arduino before.
I have researched extensively on the forum but some bases are missing for me.

I have started a new Subject in hopes that you would help me getting the build done (please)

So here goes.

Issue # 1
With the battery installed the screen has an odd last line and freezes (no response).
If i take the battery out all seems Fine.
I have tried with 12 V power Supply and it is the same.
Last edited by Fernando Garcia on Thu Apr 25, 2019 2:25 pm, edited 1 time in total.
Reason: Fix subject

Post Number:#2 Post Thu Apr 25, 2019 2:34 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 Marco!

Glad to know that I have helped you.

I think you are talking about RTC battery.

On MQTT broker I can see that your RTC is not working fine.

Have you placed the jumpers in right position as explained here?

This is a new battery?

Also to use 12V power supply you should install a fan to cool down 5 V regulator. For now I recommend you start tests with 9 V.

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 Thu Apr 25, 2019 2:42 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
Yes RTC Battery
Yes new battery and pins in positio 2-3
Mqtt probably shows error because board only works properly without battery connected

Post Number:#4 Post Thu Apr 25, 2019 2:50 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

Try fix the time using monitor serial with this example:


#include <Wire.h>

#define Binary 0
#define Hex 1

/*******************************************************************************
                      Function Prototype
*******************************************************************************/ 
unsigned int SerialNumRead (byte);
void SetTime();
void DisplayTime();

/*******************************************************************************
                    Global variables
*******************************************************************************/
const int I2C_address = 0x68;  // I2C write address
byte    Second;     // Store second value
byte    Minute;     // Store minute value
byte    Hour;       // Store hour value
byte    Day;        // Store day value
byte    Date;       // Store date value
byte    Month;      // Store month value
byte    Year;       // Store year value

/*******************************************************************************
                      Setup
*******************************************************************************/
void setup()
{
  Serial.begin(9600);
  Wire.begin();        // join i2c bus (address optional for master)
  delay(1000);
}
 
/*******************************************************************************
                      Main Loop
*******************************************************************************/ 
void loop()
{
  boolean Readtime;       // Set/Read time flag
  unsigned int Incoming;  // Incoming serial data

  // Display prompt
  Serial.println("What would you like to do?");
  Serial.println("(0) To set the current time.");
  Serial.println("(1) To display the current time.");
  Serial.print("Enter 0 or 1: ");
   
  Incoming = SerialNumRead (Binary);  // Get input command
  Serial.println(Incoming, DEC);      // Echo the value
  Serial.println();
 
  if (Incoming == 0)                  // Process input command
    SetTime();
  else if (Incoming == 1)
    DisplayTime();
 
  delay (1000);
}

/*******************************************************************************
       Read a input number from the Serial Monitor ASCII string
       Return: A binary number or hex number
*******************************************************************************/
unsigned int SerialNumRead (byte Type)
{
  unsigned int Number = 0;       // Serial receive number
  unsigned int digit = 1;        // Digit
  byte  i = 0, j, k=0, n;        // Counter
  byte  ReceiveBuf [5];          // for incoming serial data
 
  while (Serial.available() <= 0);
 
  while (Serial.available() > 0)  // Get serial input
  {
    // read the incoming byte:
    ReceiveBuf[i] = Serial.read();
    i++;
    delay(10);
  }
 
  for (j=i; j>0; j--)
  {
    digit = 1;
   
    for (n=0; n < k; n++)          // This act as pow() with base = 10
    {
      if (Type == Binary)
        digit = 10 * digit;
      else if (Type == Hex)
        digit = 16 * digit;
    }
       
    ReceiveBuf[j-1] = ReceiveBuf[j-1] - 0x30;    // Change ASCII to BIN
    Number = Number + (ReceiveBuf[j-1] * digit); // Calcluate the number
    k++;
  }
  return (Number);   
}

/*******************************************************************************
                   Set time function
*******************************************************************************/
void SetTime()
{
  Serial.print("Enter hours (00-23): ");
  Hour = (byte) SerialNumRead (Hex);
  Serial.println(Hour, HEX);        // Echo the value
  Hour = Hour & 0x3F;               // Disable century
  Serial.print("Enter minutes (00-59): ");
  Minute = (byte) SerialNumRead (Hex);
  Serial.println(Minute, HEX);      // Echo the value
  Serial.print("Enter seconds (00-59): ");
  Second = (byte) SerialNumRead (Hex);
  Serial.println(Second, HEX);      // Echo the value
  Second = Second & 0x7F;           // Enable oscillator
  Serial.print("Enter day (01-07): ");
  Day = (byte) SerialNumRead (Hex);
  Serial.println(Day, HEX);         // Echo the value
  Serial.print("Enter date (01-31): ");
  Date = (byte) SerialNumRead (Hex);
  Serial.println(Date, HEX);        // Echo the value
  Serial.print("Enter month (01-12): ");
  Month = (byte) SerialNumRead (Hex);
  Serial.println(Month, HEX);       // Echo the value
  Serial.print("Enter year (00-99): ");
  Year = (byte) SerialNumRead (Hex);
  Serial.println(Year, HEX);        // Echo the value

  Wire.beginTransmission(I2C_address);
  Wire.write(0);
  Wire.write(Second);
  Wire.write(Minute);
  Wire.write(Hour);
  Wire.write(Day);
  Wire.write(Date);
  Wire.write(Month);
  Wire.write(Year);
  Wire.endTransmission();
  //I2COUT SDA, I2C_WR, [0,Second,Minute,Hour,Day,Date,Month,Year]
  Serial.println();
  Serial.println ("The current time has been successfully set!");
}

/*******************************************************************************
                   Display time function
*******************************************************************************/
void DisplayTime()
{
  char tempchar [7];
  byte i = 0;
  Wire.beginTransmission(I2C_address);
  Wire.write(0);
  Wire.endTransmission();
 
  Wire.requestFrom(I2C_address, 7);
 
  while(Wire.available())          // Checkf for data from slave
  {
    tempchar [i] = Wire.read(); // receive a byte as character
    i++;
  }
  Second = tempchar [0];
  Minute = tempchar [1];
  Hour   = tempchar [2];
  Day    = tempchar [3];
  Date   = tempchar [4];
  Month  = tempchar [5];
  Year   = tempchar [6];
 
  // Display time
  Serial.print("The current time is ");
  Serial.print(Month, HEX);
  Serial.print("/");
  Serial.print(Date, HEX);
  Serial.print("/20");
  if (Year<10)
    Serial.print("0");
  Serial.print(Year, HEX);
  Serial.print("    ");
  Serial.print(Hour, HEX);
  Serial.print(":");
  Serial.print(Minute, HEX);
  Serial.print(":");
  Serial.println(Second, HEX);
}
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 Thu Apr 25, 2019 3:07 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
With your test code..

If i have rtc battery installed it gives me strange characters when i set date.

With no battery it works fine ? :(

Post Number:#6 Post Thu Apr 25, 2019 3:26 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

Always check the baud rate on setup.

Serial.begin(9600);


Set the baud rate on serial monitor to 9600.

Anyway I think your RTC it working fine because it sent right data days ago.

I think the problem is related to overheat. When the regulator heat up the voltage drop and RTC stops working.

What's the behaviour when using only USB to power the board?
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 Thu Apr 25, 2019 3:38 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
Behaviour with USB power is exactly the same.

Possible i may have damaged the board when trying to hook up relay board.
I mistakenly hooked 12v from relay board do 5v in db25 connector :(.

This could be the problem?

Post Number:#8 Post Thu Apr 25, 2019 3:42 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

Can be but first check with a new battery and test code.
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 Apr 25, 2019 3:57 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
New Battery.

Exactly the same no change:(

Post Number:#10 Post Thu Apr 25, 2019 4:00 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

Can you show me how this relay board is connected?

Are you using separated 12 V power supply for relay board?

-------------------------------- Last edited Thu Apr 25, 2019 4:02 pm --------------------------------

Check if RTC can be found at 0x68 when the battery is connected.

#include <Wire.h>


void setup()
{
  Wire.begin();

  Serial.begin(9600);
  Serial.println("\nI2C Scanner");
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 0; address <= 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println(" !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknow error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }   
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(500);           // wait 8 seconds for next scan
}
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 Apr 25, 2019 4:07 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
Relay Board is disconnected

With i2c scan
with battery doesn´t find 0x68
without battery it finds it

Post Number:#12 Post Thu Apr 25, 2019 4: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

So you can replace the IC DS1307 or buy a separated RTC module and connect to the board after remove jumpers.

-------------------------------- Last edited Thu Apr 25, 2019 4:21 pm --------------------------------

To avoid problems with relay board wiring I recommend buy my relay board. It's expensive but will save time and prevent problems.
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 Apr 25, 2019 4:24 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
DS3231 is this one OK?

Do you think i could have damaged more components ?

Post Number:#14 Post Thu Apr 25, 2019 4:28 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

DS3231 is this one OK?


Yes, it's suitable.

Do you think i could have damaged more components?


You should test every part using test codes.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#15 Post Thu Apr 25, 2019 4:37 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
Ok Will do

Thank You Very Much for your help and patience

Um Abraço

Marco

Post Number:#16 Post Tue May 07, 2019 4:33 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
Hi Fernando

The RTC has arrived (ds3232)
Where do i connect it?

Thank You

Post Number:#17 Post Tue May 07, 2019 4:50 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!

The connection should be:

+ to 5V
- to GND
D (SDA) to 20
C (SCL) to 21

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:#18 Post Tue May 07, 2019 7:15 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
OK
RTC done
Thank You

Another problem
One uln2083APG chip is also damaged.

Can i buy i replacement of ebay or does it have to be programmed?

Sorry for all questions.

How can i PAy for the webpanel?

Thank You Marco

Post Number:#19 Post Tue May 07, 2019 7:51 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

RTC done


Glad to hear!

One uln2083APG chip is also damaged.


It's strange because the IC is not connected to 5 or 12 V. But you can just buy and replace there's no firmware. It's a transistor array.

Sorry for all questions.

No problem friend.

How can i PAy for the webpanel?


Via Paypal the address is available in the web interface.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#20 Post Sat May 11, 2019 10:20 pm
Posts: 15
Topics: 2
Solve rating: 0
Joined: Sun Mar 24, 2019 10:46 am
Topics: 2
Age: 46
Gender: None specified
National Flag:
Portugal
HI

Back again

ULN arrived have replaced it and relay´s now seem to be OK. :)

Now onto Ezo Stamp.

I cannot get Ezp Ph Stamp to Work.
1- I only have One
2- Temperature probe is connected
3- In Test it works Fine
4- it is activated in configuration.h (all other stamps are commented)
5- Baud rate is set to 38400

I have researched the forum and tried the suggestions i have found but no luck. I think it was working on a previous version of Ferduino.
The Stamp is a 2015 Version still with some different commands than the newer versions.

Any Suggestions ?

Next



Return to Main board





Who is online

Users viewing this topic: No registered users and 1 guest

cron