Arduino Forum

Using Arduino => Motors, Mechanics, Power and CNC => Topic started by: joeinbend on Jan 26, 2011, 09:08 pm

Title: Arduino Solar Tracker -- (cont'd)
Post by: joeinbend on Jan 26, 2011, 09:08 pm
This is a continuation of the now-read only thread from the old forum:,22670.0.html

To answer the last poster's question about Ethernet shields, I use an ENC28J60 based shield from Nu Electronics ( This can be picked up from them, or on eBay, for 1/2 the cost of the official ethernet shield.  I think if I were to do it again, I would get the official one, as I spent 3 weeks hacking together the poorly documented example code to get something usable for me. It doesnt use the same library as the official shield.

As for what I use it for: I use it to log data from my tracker to a MySQL database, via PHP scripts. This lets me log data very easily, and once you have it pushing to a database, you can do anything you want with it.  My demo (as I am learning PHP and MySQL very recently) is at

The trouble I am up against is the Ethernet shield and the AdaFruit motor shield I am using, are running on conflicting pins. I will start another thread to discuss this, as to not derail this topic. If I cannot resolve the conflict I may have to run the two shields on different ATMega328's, and have them talk on the I2C bus (which I'll be using in this project anyway, so not a problem I suppose).
Title: Re: Arduino Solar Tracker -- (cont'd)
Post by: simon.monk on Jan 27, 2011, 04:10 pm
To anyone else having problems with a ENC28J60 shield.

I ended up wrapping the library with a simplified interface of my own. Details and download here:
Title: Re: Arduino Solar Tracker -- (cont'd)
Post by: joeinbend on Jan 27, 2011, 05:31 pm
Thank you Sr Monk! I read through your code a few weeks ago, and you have certainly simplified the original library. In the context of this project, I am only using the Ethernet shield to send data to a SQL database, via php "GET" command. From reading through your blog, it looks like at least in the original stages of the library, this functionality was not built in. Has that been added? I would certainly love to use an easier library if at all possible!
Title: Re: Arduino Solar Tracker -- (cont'd)
Post by: simon.monk on Jan 27, 2011, 05:38 pm
Alas, no its server only I'm afraid.

I have a Wiznet shield on the way, once I have had a play with that, I think I might try and make an interface to the ENC28J60 that mirrors that 'standard' interface.

The ENC28J60 shield I got was actually really good, with a nice little prototyping area (big enough for a couple of MOSFETs). It just needs a software update.

I'll post it up when I get round to it.