Ferduino Aquarium Controller • View topic (2025)

Forum Members section DIY Ferduino controller Problem with ethernet module W5100

Problem with ethernet module W5100 [SOLVED]

Topic locked

42 posts • Page 1 of 31, 2, 3


Problem with ethernet module W5100

Post Number:#1 Thu Aug 06, 2015 2:25 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (3)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (4)
National Flag:
Ferduino Aquarium Controller • View topic (5)

Hi,

I uploaded a code ferduino and tested ping but in screen "Please insert a sd card", i have a tft display with sd card and i make a bridge of R16 to pin4, after i uploaded a code test W5100 "Ethernet module with W5100" from

and tested ping and have return.

with the test code works, but with the code ferduino appear "Please insert a sd card", can anyone give a hint?

In topic ethernet shield and module, the pins are
MODULE ARDUINO
SO50
SI51
SCK52
CS53
VCC3.3V
GNDGND

But in w5100 module the pins are name a little diferent and i conected the pins
MODULE ARDUINO
MISO 50
MOSI 51
CK 52
SS 53
VCC 5V
GND GND

is correct?

If i pin off a 5V the ferduino open normal.

In back of ethernet module w5100 all pins are, V5, GND, NSS, RST, MO, SCK, MI, POE- and POE+.
My module is

http://pt.aliexpress.com/item/TOP-Mini- ... 46986.html

man did a search found nothing, sorry if I let it go.

Thx


Re: Problem with ethernet module W5100

Post Number:#2 Thu Aug 06, 2015 3:07 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (8)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (9)
National Flag:
Ferduino Aquarium Controller • View topic (10)

  • Website

Hi!

Have you removed the side of the resistor that goes to pin 53?

Are you using this values?

Code: Select all

const byte ChipSelect_SD = 4;
const byte SelectSlave_ETH = 53;

Best regards.

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


Re: Problem with ethernet module W5100

Post Number:#3 Thu Aug 06, 2015 3:54 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (14)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (15)
National Flag:
Ferduino Aquarium Controller • View topic (16)

Fernando Garcia » 44 minutes ago wrote:

Hi!

Have you removed the side of the resistor that goes to pin 53?

Are you using this values?

Code: Select all

const byte ChipSelect_SD = 4;
const byte SelectSlave_ETH = 53;

Best regards.

Hi again Fernando,

Yes i removed the side of the resistor that goes to pin 53.

and my code is same:

Code: Select all

//*****************************************************************************************
//************************** Dispositivos SPI *********************************************
//*****************************************************************************************
const byte SD_CARD = 0;
const byte ETHER_CARD = 1;
const byte RFM = 2;
const byte ChipSelect_SD = 4; // Comente esta linha para usar o Ferduino Mega 2560
//const byte ChipSelect_SD = 5; // Descomente esta linha para usar o Ferduino Mega 2560
const byte SelectSlave_ETH = 53;
const byte ChipSelect_RFM = 69; // A15


Re: Problem with ethernet module W5100

Post Number:#4 Thu Aug 06, 2015 5:12 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (19)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (20)
National Flag:
Ferduino Aquarium Controller • View topic (21)

  • Website

Test the SD card with an example.

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


Re: Problem with ethernet module W5100

Post Number:#5 Thu Aug 06, 2015 5:42 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (25)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (26)
National Flag:
Ferduino Aquarium Controller • View topic (27)

Fernando Garcia » 23 minutes ago wrote:

Test the SD card with an example.

Hi Fernando,

Upload the code SD TESTE

Code: Select all

#include <SdFat.h>

//const byte SelectSlave_SD = 4; // For ethernet shield
const byte SelectSlave_SD = 5; // For Ferduino Mega 2560
const byte SelectSlave_RFM = 69; // For Ferduino Mega 2560
const byte SelectSlave_ETH = 53; // For Ferduino Mega 2560

Sd2Card card;
SdFile file;
SdFile root;
SdVolume volume;

float temp;
float tempe;

void setup()
{
int16_t n;
char buf[8];

pinMode(SelectSlave_RFM, OUTPUT);
pinMode(SelectSlave_ETH, OUTPUT);
digitalWrite(SelectSlave_RFM, HIGH);
digitalWrite(SelectSlave_ETH, HIGH);

Serial.begin(9600);

card.init(SPI_QUARTER_SPEED, SelectSlave_SD);
volume.init(&card);
root.openRoot(&volume);

while(!Serial)
{
; // wait for serial.
}

if(file.open(&root, "LOGTDIA.TXT", O_CREAT | O_APPEND | O_WRITE))
{
Serial.println("Writing...");
Serial.println();

for(temp = 27.5; temp > 22.0; temp -= 0.15)
{
file.print(temp);
file.write((uint8_t*)"\0", 1);
file.write((uint8_t*)"\r\n", 2);
}

for(tempe = 22.5; tempe < 28.0; tempe += 0.15)
{
file.print(tempe);
file.write((uint8_t*)"\0", 1);
file.write((uint8_t*)"\r\n", 2);
}
file.close();
Serial.println("Done!");
Serial.println();
}
else
{
Serial.println("Can't open.");
}

if(file.open(&root, "LOGTDIA.TXT", O_READ))
{
Serial.println("Reading...");
Serial.println();
delay(5000);
while ((n = file.read(buf, sizeof(buf))) > 0)
{
Serial.println(buf);
}
file.close();
Serial.println();
Serial.print("Finished!");
}
}
void loop()
{
}

its works only i pin off a 5v from ethernet module, if turn on a pin 5v from module dont writing.
My sd only works if i change from SPI_HALF_SPEED to SPI_QUARTER_SPEED, and tested with const byte SelectSlave_SD = 5; and const byte SelectSlave_SD = 4; and both works too.

The PINs of the wiring diagram I did this right?
MODULE | ARDUINO
MISO | 50
MOSI | 51
CK | 52
SS | 53
VCC | 5V
GND | GND

Thx


Re: Problem with ethernet module W5100

Post Number:#6 Thu Aug 06, 2015 6:40 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (30)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (31)
National Flag:
Ferduino Aquarium Controller • View topic (32)

  • Website

The pinout is ok.

You can't use this value, the comment is very CLEAR.

Code: Select all

const byte SelectSlave_SD = 5; // For Ferduino Mega 2560

Are you using 2 power supplies? 1 to W5100 and another to Arduino?

Have you connected the GND of this power supplies?

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


Re: Problem with ethernet module W5100

Post Number:#7 Thu Aug 06, 2015 6:54 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (36)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (37)
National Flag:
Ferduino Aquarium Controller • View topic (38)

Fernando Garcia » 9 minutes ago wrote:

The pinout is ok.

You can't use this value, the comment is very CLEAR.

Code: Select all

const byte SelectSlave_SD = 5; // For Ferduino Mega 2560

Are you using 2 power supplies? 1 to W5100 and another to Arduino?

Have you connected the GND of this power supplies?

Ok, thx.

all test using a power on USB plug, and Vout 5v or 3v and GND from arduino to module.
This module works on 3v and 5v and tested with both.


Re: Problem with ethernet module W5100

Post Number:#8 Thu Aug 06, 2015 7:13 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (41)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (42)
National Flag:
Ferduino Aquarium Controller • View topic (43)

  • Website

Are you using a SD card of 1 or 2 GB?

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


Re: Problem with ethernet module W5100

Post Number:#9 Fri Aug 07, 2015 8:05 am

Marcos Junior
Ferduino Aquarium Controller • View topic (47)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (48)
National Flag:
Ferduino Aquarium Controller • View topic (49)

Fernando Garcia » Yesterday 7:13 pm wrote:

Are you using a SD card of 1 or 2 GB?

Hi, using a 1GB scandisk SD.

follow screens of module and bridge:

Shiel with bridge:
Ferduino Aquarium Controller • View topic (50)

Module:
Ferduino Aquarium Controller • View topic (51)
Ferduino Aquarium Controller • View topic (52)


Re: Problem with ethernet module W5100

Post Number:#10 Fri Aug 07, 2015 1:27 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (55)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (56)
National Flag:
Ferduino Aquarium Controller • View topic (57)

  • Website

Hi!

Look for this:

Ferduino Aquarium Controller • View topic (59)

Apparently you have a short circuit between pin 4 and 53.

Best regards.

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


Re: Problem with ethernet module W5100

Post Number:#11 Fri Aug 07, 2015 2:12 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (62)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (63)
National Flag:
Ferduino Aquarium Controller • View topic (64)

I verified now, and dont have a short circuit but however climbed over the resistor as you can see in the picture, but still not worked.

Ferduino Aquarium Controller • View topic (65)
Ferduino Aquarium Controller • View topic (66)

Ferduino Aquarium Controller • View topic (67)


Re: Problem with ethernet module W5100

Post Number:#12 Fri Aug 07, 2015 6:29 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (70)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (71)
National Flag:
Ferduino Aquarium Controller • View topic (72)

The bridge on p53 is in a resistor or In a hole after resistor ?


Re: Problem with ethernet module W5100

Post Number:#13 Fri Aug 07, 2015 7:10 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (75)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (76)
National Flag:
Ferduino Aquarium Controller • View topic (77)

  • Website

Connect the pin 53 only on W5100.
The bridge is between pin 4 and R16 only.

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


Re: Problem with ethernet module W5100

Post Number:#14 Fri Aug 07, 2015 7:27 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (81)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (82)
National Flag:
Ferduino Aquarium Controller • View topic (83)

I do not understand, do a test with p53 in module and without the bridge?


Re: Problem with ethernet module W5100

Post Number:#15 Fri Aug 07, 2015 7:36 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (86)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (87)
National Flag:
Ferduino Aquarium Controller • View topic (88)

  • Website

The bridge is the "chip select" for SD card no more.

Keep the bridge otherwise will have conflict between SD and W5100 because by default this two devices use the pin 53 to "chip select".

Make sure that haven't short circuit between pin 53 and R16.

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


Re: Problem with ethernet module W5100

Post Number:#16 Mon Aug 10, 2015 1:24 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (92)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (93)
National Flag:
Ferduino Aquarium Controller • View topic (94)

Fernando Garcia » Fri Aug 07, 2015 7:36 pm wrote:

The bridge is the "chip select" for SD card no more.

Keep the bridge otherwise will have conflict between SD and W5100 because by default this two devices use the pin 53 to "chip select".

Make sure that haven't short circuit between pin 53 and R16.

Hi Fernando,
I get a multimeter for find short circuit between pin 53 and R16 and no have.

Tested tested with only 5v, gnd and Pin53 and ferduino go up normal.
I was testing pin to pin...
and when I called the pin50 in MI connector module the ferduino not started and reappeared on the screen warning SD, if remove pin50 from module a ferduino go up normal.

The pin50 in connector MI in module cause this...

Any idea?


Re: Problem with ethernet module W5100

Post Number:#17 Mon Aug 10, 2015 2:13 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (97)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (98)
National Flag:
Ferduino Aquarium Controller • View topic (99)

  • Website

Hi!

The example "Simple webserver running on SD card" works for you?

Best regards.

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


Re: Problem with ethernet module W5100

Post Number:#18 Mon Aug 10, 2015 3:46 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (103)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (104)
National Flag:
Ferduino Aquarium Controller • View topic (105)

Fernando Garcia » Today 2:13 pm wrote:

Hi!

The example "Simple webserver running on SD card" works for you?

Best regards.

Hi Fernando,

Tested a code:

Code: Select all

#include <SPI.h>
#include <Ethernet.h>
#include <SdFat.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 0, 177); // IP address, may need to change depending on network
EthernetServer server(80);

const byte SelectSlave_ETH = 53;
//const byte SelectSlave_SD = 4; // For ethernet shield
const byte SelectSlave_SD = 5; // For Ferduino Mega 2560
const byte SelectSlave_RFM = 69; // For Ferduino Mega 2560

Sd2Card card;
SdFile file;
SdFile root;
SdVolume volume;

void setup()
{
pinMode(SelectSlave_RFM, OUTPUT);
digitalWrite(SelectSlave_RFM, HIGH);

Serial.begin(9600);
while (!Serial)
{
; // wait for serial port to connect. Needed for Leonardo only
}
Ethernet.begin(mac, ip, SelectSlave_ETH);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());

Serial.println("Initializing SD card...");

if (!card.init(SPI_QUARTER_SPEED, SelectSlave_SD))
{
Serial.println("ERROR - SD card initialization failed!");
return;
}
volume.init(&card);
root.openRoot(&volume);

Serial.println("SUCCESS - SD card initialized.");

if (!file.open(&root, "index.htm", O_READ))
{
Serial.println("ERROR - Can't open index.htm file!");
return;
}
file.close();
Serial.println("SUCCESS - Found index.htm file.");
}

void loop()
{
EthernetClient client = server.available();

if (client)
{
boolean currentLineIsBlank = true;
while (client.connected())
{
if (client.available())
{
char c = client.read();

if (c == '\n' && currentLineIsBlank)
{
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close");
client.println();

if (file.open(&root, "index.htm", O_READ))
{
while(file.available())
{
client.write(file.read());
}
file.close();
}
break;
}
if (c == '\n')
{
currentLineIsBlank = true;
}
else if (c != '\r')
{
currentLineIsBlank = false;
}
}
}
delay(1);
client.stop();
}
}

And save in SD card index.htm this code

Code: Select all

// Save this file on SD card as index.htm
<!DOCTYPE html>
<html>
<head>
<title>Arduino SD Card Web Page</title>
</head>
<body>
<h1>Hello world! </h1>
<h2>This page is stored in a SD card plugged on Arduino</h2>
<p><strong>Visit my website: </strong><a href="http://www.ferduino.com" target="_blank">www.ferduino.com</a> </p>
<p>Code adapted by Fernando Garcia</p>
</body>
</html>

Serial monitor

Code: Select all

server is at 192.168.0.177
Initializing SD card...
SUCCESS - SD card initialized.
SUCCESS - Found index.htm file.

Have too success in ping, but dont can access by browser.


Re: Problem with ethernet module W5100

Post Number:#19 Mon Aug 10, 2015 4:20 pm

Fernando Garcia
Ferduino Aquarium Controller • View topic (108)

Posts: 1699

Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm

Topics: 38

Age: 40
Location: São Paulo
Gender: Ferduino Aquarium Controller • View topic (109)
National Flag:
Ferduino Aquarium Controller • View topic (110)

  • Website

The ping test isn't important.

You need make it work with browser using some example.

What's the IP of your router?

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


Re: Problem with ethernet module W5100

Post Number:#20 Mon Aug 10, 2015 4:21 pm

Marcos Junior
Ferduino Aquarium Controller • View topic (114)

Posts: 45

Topics: 9
Solve rating: 0
Joined: Thu Apr 10, 2014 12:21 pm

Topics: 9

Age: 39
Gender: Ferduino Aquarium Controller • View topic (115)
National Flag:
Ferduino Aquarium Controller • View topic (116)

Fernando Garcia » 1 minute ago wrote:

The ping test isn't important.

You need make it work with browser using some example.

What's the IP of your router?

My ip is 192.168.0.187/24
My router is 192.168.0.46/24

Last edited by Marcos Junior on Mon Aug 10, 2015 4:43 pm, edited 1 time in total.


Topic locked

42 posts • Page 1 of 31, 2, 3


Return to DIY Ferduino controller

Who is online

Users viewing this topic: No registered users and 1 guest

Ferduino Aquarium Controller • View topic (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Aron Pacocha

Last Updated:

Views: 5972

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.