Maintaining the stack

Questions specifically related to the TCP/IP stack that interfaces with the driver.

Maintaining the stack

Postby tekinay004 » Mon Mar 29, 2010 11:28 am

Hey guys,

I am working on a project where I need to have 2 interrupts. The first one which I have already done using the digital pin 3 is just a LOW to HIGH trigger. I am using the 328 by the way. The second one I need should be using the Wishield. I am able to talk back and forth between the PC and Wishield using a socket. However, the project requires Arduino to sleep almost all the time. When I put the Arduino to sleep, the Wishield does not reply to my connection request or in other words I can not talk to him while the Arduino is sleeping. Do you guys have any ideas how can I have it listen on a port while the Arduino is sleeping or attach an Interrupt so that the wireless connection request on that port would wake Arduino up enabling me do stuff according to what I receive through the socket.

Any help would be appreciated.

Mustafa
tekinay004
 
Posts: 6
Joined: Sun Jan 31, 2010 6:19 pm

Re: Maintaining the stack

Postby GregEigsti » Mon Mar 29, 2010 12:15 pm

When I put the Arduino to sleep, the Wishield does not reply to my connection request

That is normal and expected - the Arduino/Atmel processor needs to service the WiShield (e.g. run the driver code) so if you put the Arduino to sleep you are effectively killing the WiShield. This is not WiShield specific - any "add-on" that requires Arduino processor time to continue to operate will fall over if you take the processor away.

You may be able to achieve a kind of sleep by delaying in your loop for 500 to 1000 milliseconds; not sure if delay() is effectively "powering down" and if you delay too long the WiShield won't work for you (e.g. it is not be serviced enough).

Sounds like some fun research is coming your way :D Please share your results as you are not the only one interested in power savings.

Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Re: Maintaining the stack

Postby tekinay004 » Mon Mar 29, 2010 2:47 pm

Okay...I see.
Then what is the interrupt pin on the Wishield? What is that pin2 interrupt ?

Mustafa
tekinay004
 
Posts: 6
Joined: Sun Jan 31, 2010 6:19 pm

Re: Maintaining the stack

Postby GregEigsti » Mon Mar 29, 2010 3:50 pm

Don't rightly know; never needed to know. The answer is only as far away as the WiShield/uIP source though. I imagine that it is to signal incoming data is ready. The point of my earlier post is that the WiShield has no processor of it's own so it's driver code must run on the Atmel processor; if that processor is asleep then so is the WiShield so you won't rx data and you will never get an interrupt from the WiShield. Not saying some level of power savings cannot be achieved - but it will likely need to be a hybrid of what you want and what is possible.

I'd like to run an outdoor solution off of battery/solar at some point but it's not the highest priority for me at this point. My WiShield thoughts are currently centered around a WiShield adhoc mesh network - which could require power savings at some point.

Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Re: Maintaining the stack

Postby tekinay004 » Mon Mar 29, 2010 4:09 pm

I understand you completely. Even the Wishield listens on the port, since the board (processor) is sleeping it can not do anything. I guess the whole problem comes down to like you said how can the processor know whenever there is data ready thru the socket.

My project is required to be an outdoor one supplied with batteries for a long time. That is the big challenge for me. If not, I have got everything almost working.

Mustafa
tekinay004
 
Posts: 6
Joined: Sun Jan 31, 2010 6:19 pm

Re: Maintaining the stack

Postby GregEigsti » Mon Mar 29, 2010 5:48 pm

Have you looked into solar charging for the battery?

Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Re: Maintaining the stack

Postby John_Ryan » Thu Apr 01, 2010 6:09 pm

GregEigsti wrote:Don't rightly know; never needed to know. The answer is only as far away as the WiShield/uIP source though. I imagine that it is to signal incoming data is ready. The point of my earlier post is that the WiShield has no processor of it's own so it's driver code must run on the Atmel processor; if that processor is asleep then so is the WiShield so you won't rx data and you will never get an interrupt from the WiShield. Not saying some level of power savings cannot be achieved - but it will likely need to be a hybrid of what you want and what is possible.

I'd like to run an outdoor solution off of battery/solar at some point but it's not the highest priority for me at this point. My WiShield thoughts are currently centered around a WiShield adhoc mesh network - which could require power savings at some point.

Greg


Here's an inexpensive solar shield for Arduino, it should fit the blackwidow quite nicely, and only 10 bucks for th shield plus the cost of whatever panel and battery you decide to use.

http://www.seeedstudio.com/depot/solar- ... l?cPath=73
John_Ryan
 
Posts: 155
Joined: Thu Jun 04, 2009 11:24 pm

Re: Maintaining the stack

Postby GregEigsti » Thu Apr 01, 2010 7:54 pm

Excellent find - thanks! I check Seeedstudio every once in a while because they have some neat and unique stuff. May have to order one of these up!

Thanks!
Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website


Return to TCP/IP Stack

Who is online

Users browsing this forum: No registered users and 1 guest