Pages: [1]   Go Down
Author Topic: w5100 reset idea  (Read 1378 times)
0 Members and 1 Guest are viewing this topic.
Vancouver BC
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I'm running a home theater pc that handles all my entertainment needs/media for my TV.  I am part way through integrating some RGB LED lighting controls in this system, and I have the system sending commands to my ProMini328 which i've got connected to a w5100 shield. 

In the breadboarding phase I thought I solved my "requires reset press" problem by using a better power supply and adding a 250ms delay in the code before initializing the shield.  It tested fantastic, with many boots, never failing to initialize properly.

Now I've built the thing onto a pcb, along with some FETs and control circuity (all powered from the htpc's internal 450W psu), but the ethernet keeps failing to start unless i go press the reset button.  Now, before I get the "google is your friend" hate, I have been googling and looking at spec sheets for a couple of hours, trying to find a solution.  I found the resistor/capacitor trick, but some people are reporting that doesn't work...

I'm wondering if I can tie a digital output line from the Arduino (say pin 6) to the reset line of the shield, and force the output low for 50ms in my setup() function, to force reboot the shield.  then initialize it.

I can't find anything about anyone trying this method, so that has me thinking it won't work, but thought I'd ask.   The thing is installed in a closet in another room now and its a pain in the butt to go open the case and hit reset every time.
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9709
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might check the below concerning a possible reset race between the arduino and the Ethernet shield.

http://marco.guardigli.it/2010/11/arduino-wiznet-ethernet-shield-proper.html
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Vancouver BC
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply, but that was one of the sites i'd found when googling.
Some more searching led me to discover that solution may not work for every board, and since i'd like to make this a repeatable project, i'd like a sure-fire way to make it work.

The race, I hope, would be solved by powering up the arduino and e-net shield, then waiting 250ms and resetting the shield by pulling an output low...  Just looking for input on whether that's a decent idea or if there's a reason I shouldn't do that.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 150
Posts: 6144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like it may be power related. Have you tried waiting longer than 250ms? Maybe the ht power supply is not powering up fast enough?
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3744
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume that the mini and the shield are now permenantly connected to your pcb; if not though, can you go back & retest them standalone? It rather sounds as though the cause is elsewhere in your system.

Quote
I'm wondering if I can tie a digital output line from the Arduino (say pin 6) to the reset line of the shield, and force the output low for 50ms in my setup() function, to force reboot the shield.  then initialize it.

Sounds very plausible - try it?
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I did this with several boards a few years ago (previous version of the board).  My problem was that it would take several minutes, yes minutes, for the board to properly join the in-house network.  I searched for software solutions, but finding none, I wired up the board reset to an arduino pin.  I also took a wire to one of the lights and counted pulses in a short period of time to decide if I needed to do the reset since, once in a while, the board would actually work the first time.

You have to isolate the board reset from the arduino first though which will require a magnifying glass and a good exacto knife.  If you want to see pics and a description, it's on my thermostat page on my blog at:

http://www.desert-home.com/p/super-thermostat.html

This little kludge has been in place for years working its little heart out without problems.

Have fun.
Logged

Trying to keep my house under control http://www.desert-home.com/

Vancouver BC
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume that the mini and the shield are now permenantly connected to your pcb; if not though, can you go back & retest them standalone? It rather sounds as though the cause is elsewhere in your system.


Yes, sorta... the ProMini is soldered to a pcb, but the shield is flipped upside down and connected via jumpers inside the abs case.   So I can sort of seperate the two if I needed to.

Do you guys think the htpc psu is not getting up to voltage quick enough and that's my problem?  Would it be better for me to use a 7805 off the 12V rail and create my own 5V rail to work with? 

I'll try the digital I/O line reset trick tonight and see if I can get it to work, but I'd still like to explore the problem and understand it better.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 150
Posts: 6144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do you guys think the htpc psu is not getting up to voltage quick enough and that's my problem?  Would it be better for me to use a 7805 off the 12V rail and create my own 5V rail to work with? 
If that is basically the only thing that changed as far as connections go, I suspect that may be part of it. It sounds like the rest of your circuit is the same except the new power supply, so I suspect the new power supply. Try using a different power supply.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4093
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I like the WIZnet modules, which have the reset brought out to a pin which I connect to an MCU pin. I've used the WIZ811MJ (W5100 chip) and WIZ820io (W5200 chip) with good results.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Vancouver BC
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the delay (in case anyone was following my plight).

I got sidetracked with other projects and once you install something in a closet behind some stuff, its just a pain to make yourself go uninstall it.. even if I used terminal strips to speed up the connections..

Anyway - I clipped the wire that connected the w5100 board's reset and the arduino, and instead connected it to digital pin 7 on the Pro Mini.  Added the code below at the top of my setup() function and now it seems to be working like a champ on the bench.

Code:
  delay(50);             //wait for voltage to stabilize
  pinMode(7, OUTPUT);   //pin connected to w5100 shield's reset
  digitalWrite(7, LOW);  //pull line low for 100ms to reset ethernet shield
  delay(100);
  digitalWrite(7, HIGH);  //set line high and now ignore pin the rest of the time
 

Thanks for the help and guidance guys!
Logged

Pages: [1]   Go Up
Jump to: