Forum ‹ Members section ‹ DIY Ferduino controller ‹ Problem with ethernet module W5100
Problem with ethernet module W5100 [SOLVED]
Topic locked
42 posts • Page 1 of 3 • 1, 2, 3
Problem with ethernet module W5100
Post Number:#1 Thu Aug 06, 2015 2:25 pm
Marcos Junior
Posts: 45
Topics: 9


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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


Fernando Garcia » 23 minutes ago wrote:
Test the SD card with an example.
Hi Fernando,
Upload the code SD TESTE
Code: Select all
//const byte SelectSlave_SD = 4; // For ethernet shield Sd2Card card; float temp; void setup() pinMode(SelectSlave_RFM, OUTPUT); card.init(SPI_QUARTER_SPEED, SelectSlave_SD); while(!Serial) if(file.open(&root, "LOGTDIA.TXT", O_CREAT | O_APPEND | O_WRITE)) for(temp = 27.5; temp > 22.0; temp -= 0.15) for(tempe = 22.5; tempe < 28.0; tempe += 0.15) if(file.open(&root, "LOGTDIA.TXT", O_READ))#include <SdFat.h>
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
SdFile file;
SdFile root;
SdVolume volume;
float tempe;
{
int16_t n;
char buf[8];
pinMode(SelectSlave_ETH, OUTPUT);
digitalWrite(SelectSlave_RFM, HIGH);
digitalWrite(SelectSlave_ETH, HIGH);
Serial.begin(9600);
volume.init(&card);
root.openRoot(&volume);
{
; // wait for serial.
}
{
Serial.println("Writing...");
Serial.println();
{
file.print(temp);
file.write((uint8_t*)"\0", 1);
file.write((uint8_t*)"\r\n", 2);
}
{
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.");
}
{
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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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:
Module:
Re: Problem with ethernet module W5100
Post Number:#10 Fri Aug 07, 2015 1:27 pm
Fernando Garcia
Posts: 1699
Topics: 38


- Website
Hi!
Look for this:
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
Posts: 45
Topics: 9


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.
Re: Problem with ethernet module W5100
Post Number:#12 Fri Aug 07, 2015 6:29 pm
Marcos Junior
Posts: 45
Topics: 9


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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; const byte SelectSlave_ETH = 53; Sd2Card card; void setup() Serial.println("Initializing SD card..."); if (!card.init(SPI_QUARTER_SPEED, SelectSlave_SD)) Serial.println("SUCCESS - SD card initialized."); if (!file.open(&root, "index.htm", O_READ)) void loop() if (client) if (c == '\n' && currentLineIsBlank) if (file.open(&root, "index.htm", O_READ))#include <SPI.h>
#include <Ethernet.h>
#include <SdFat.h>
IPAddress ip(192, 168, 0, 177); // IP address, may need to change depending on network
EthernetServer server(80);
//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
SdFile file;
SdFile root;
SdVolume volume;
{
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("ERROR - SD card initialization failed!");
return;
}
volume.init(&card);
root.openRoot(&volume);
{
Serial.println("ERROR - Can't open index.htm file!");
return;
}
file.close();
Serial.println("SUCCESS - Found index.htm file.");
}
{
EthernetClient client = server.available();
{
boolean currentLineIsBlank = true;
while (client.connected())
{
if (client.available())
{
char c = client.read();
{
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close");
client.println();
{
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
Posts: 1699
Topics: 38


- 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
Posts: 45
Topics: 9


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 3 • 1, 2, 3
Return to DIY Ferduino controller
Who is online
Users viewing this topic: No registered users and 1 guest