|OpenSprinkler on Mega 2560 + W5100 Ethernet Shield + relay board||Glen Hertz||10/8/12 9:18 PM|
I'm a newbie and bought a knock-off Mega 2560 ($22) + the W5100 ethernet shield ($12) + a 8x relay board ($16) for doing home automation and controlling my sprinklers. I then stumbled across this amazing project and wondered if I could get it to run on my hardware. Since I have an ethernet connection I don't care for a LCD or RTC as I plan to use a computer/cell phone as my display and ntp for time.
It is an ugly hack but I managed to get most the code ported over today. I added a #define SVC_HW_VERSION 2560 to conditionally change the code. The remaining part is to support the Ethernet Shield instead of the current ethernet hardware in the OpenSprinkler. Since these two APIs are quite different it seems like quite a bit of work....and some I don't understand yet.
My forked code is here:
Feel free to comment (I'm a newbie) and hopefully this will benefit others.
|Re: OpenSprinkler on Mega 2560 + W5100 Ethernet Shield + relay board||Ray||10/9/12 9:47 AM|
This is great. I've had users asking me whether I am planning to make an OpenSprinkler shield that works with Arduino. I don't have time to do it myself, and I personally prefer keeping the product self-contained. But it's great that you are working on it. I would encourage you to document the process and post some pictures on your blog. Or you can send them to me so I can post them on my blog.
Just out of curiosity: how and where did you get the knock-off Mega and W5100 shield? The prices you got seem to be significantly cheaper than the official price. I am interested. Let me know. Thanks.
|Re: OpenSprinkler on Mega 2560 + W5100 Ethernet Shield + relay board||Glen Hertz||10/9/12 11:32 AM|
Thanks for the encouragement. I'm not sure what the best way to modify the code. Should I use #ifdefs and use SVC_HW_VER as a compile time selector or should I delete the non-mega2560 code and not try to keep 1 source code for both projects. It sounds like you would rather have it a separate project in which case I will probably remove the #ifdefs. I think git is smart enough to help with porting over updates so I don't think it really matters from a software development point of view.... or does it?
For my parts I sourced them from ebay and dx.com. Being that Arduino is open source hardware I don't mind buying a knockoff (although I wish they wouldn't use the Arduino name as that is reserved for official boards).
Mega 2560 R2 (older version) from dx.com for $18:
W5100 R2? (older version) from Ebay:
Search: arduino w5100
For R3 ($15) search for: arduino w5100 r3
(For the price difference I think the older revisions of the 2560 and W5100 are a better deal. I can't say for sure but it seems the hardware updates were quite minimal.)
8 channel, 5V relay extension board ($12 to $16):
Jumper cables (male to female) 40 pieces ($3):
ebay search: dupont wire color jumper cable male female 2.54mm
For standoffs the regular 3mm threads are too large. I'm drilling into a metal case and hoping to stack plastic washers to the right standoff height and use 2.5mm screws:
I haven't received these yet but hopefully it will work.
As for pictures, etc I don't have a blog (if you have any recommendations for what blog software, I would appreciate it) but would be willing to send them to you once it is further along. Currently I just have the Mega 2560 with the ethernet shield and 10 wires going to the relay board. So there is not much to see....yet.
Thanks for this great project! I'm jumping in a bit over my head but hopefully something useful will come out of it.
|Re: OpenSprinkler on Mega 2560 + W5100 Ethernet Shield + relay board||Ray||10/10/12 9:40 AM|
On Tuesday, October 9, 2012 2:32:57 PM UTC-4, Glen Hertz wrote:Hi Ray,
My suggestion is to keep it as a separate project. The reason is that W5100 is quite different from ENC28J60. It will be easier for you to work on clean code rather than look at a bunch of #ifdefs.
This is quite impressive. I've bought stuff from dx.com, but I didn't know they carry Mega for such a cheap price. Sigh. Of course the downside is that you have to wait for shipping from China, which takes 2 to 3 weeks.
|Re: OpenSprinkler on Mega 2560 + W5100 Ethernet Shield + relay board||Dave||8/11/13 3:07 PM|
Hi Glen and Ray
Am interested in picking up this up as I've an old mega 2560 with regular W5100 shield that would be nice to recycle....
The link to the forked code in the first post is now dead - grateful if you're able to re-post please?
Thanks for all your hard work on this great project!
|unk...@googlegroups.com||4/19/14 8:49 AM||<This message has been deleted.>|
|unk...@googlegroups.com||4/19/14 8:50 AM||<This message has been deleted.>|
|unk...@googlegroups.com||4/19/14 8:51 AM||<This message has been deleted.>|
|unk...@googlegroups.com||4/19/14 8:52 AM||<This message has been deleted.>|
|unk...@googlegroups.com||4/19/14 9:04 AM||<This message has been deleted.>|