3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

A credit card sized Ethernet Arduino compatable controller board

A credit card sized Ethernet Arduino compatable controller board
I love the Arduino as a simple and accessible controller platform for many varied projects.  A few months ago, a purchased an Ethernet shield for my Arduino controller to work on some projects with a mate of mine - it was a massive hit - for the first time, I could control my projects remotely using simple software.

That got me thinking - The Arduino costs about $30AUD, and the Ethernet board cost about $30AUD as well.  That is a lot of money - Could I make a simple, dedicated remote controller for much cheaper?   Why Yes I could.   Could I make it the size of a credit card?  Why Yes - I could!!

This project is my simple Arduino compatible controller that has embedded Ethernet, and the capacity to drive some extra I/O lines for projects, such as a Remote thermometer, a Remotely accessible Fridge controller, and a Remote Humidity sensor.  I have to say from the start that I didn't write all of the software, my mate Mikal did that - but this instructable is about making your own controller board!

Lets start!
 
Remove these adsRemove these ads by Signing Up
 

Step 1Here is the Schematic Diagram

Here is the Schematic Diagram
For the curious, this is the schematic diagram of my simple Ethernet board.

As you can see, there are a number of exposed header connectors that can be used to connect peripheral devices to.

The board is powered with a supply of between 7 and 12v.  It contains voltage regulators to provide +5v and +3.3v for the Ethernet controller.

There is also a 4 position DIP switch that can be used to allow programmed functions to be modified.  A failing of the standard Arduino Ethernet library is that the IP address for the board has to be set in code.   Using the DIP switch, a block of addresses can be selected from as required.  You can make 16 boards, and have each board automatically select a different address  based on the switch setting.  This is *really* handy when you have deployed 10 sensors around the house.  All you need to do is set a switch and then they are configured.

The pinouts of the I/O connectors are;

I/O1 - 1 - PD5  (Arduino Pin 5)
I/O1 - 2 - PD6  (Arduino Pin 6 +pullup to +5v) - Used to connect a DS1820 Temperature sensor.
I/O1 - 3 - PD7  (Arduino Pin 7)
I/O1 - 4 - PD8  (Arduino Pin 8)
I/O1 - 5 - GND
 
I/O2 - 1 - +5v
I/O2 - 2 - GND
I/O2 - 3 - PD4 (Arduino Pin 4)
I/O2 - 4 - PC0 (Arduino Analog 0)
I/O2 - 5 - PD3 (Arduino Pin 5)
I/O2 - 6 - PC1 (Arduino Analog 1)
I/O2 - 7 - PC2 (Arduino Analog 2)
I/O2 - 8 - PC3 (Arduino Analog 3)
I/O2 - 9 - PC4 (Arduino Analog 4)
I/O2 - 10 - PC5 (Arduino Analog 5)



« Previous StepDownload PDFView All StepsNext Step »
258 comments
1-40 of 258next »
May 21, 2012. 8:29 PMChinasaur says:
Another question; does anyone know whether any/all of the suggested libraries will fit on a Tiny?
May 20, 2012. 11:11 PMChinasaur says:
I prefer to do a surface mount board; can you recommend a chip to replace the ferrite bead?
May 21, 2012. 10:22 AMChinasaur says:
I usually use 0805 size SMD. The ENC20J60 datasheet says 80mA required. I have no idea what kind of filtering profile is ideal but I saw the number ~500 Ohm @ 100 MHz tossed around on other forums. Would this be okay?
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=114871490&uq=634731994935675812

DC resistance 100mOhm sounded okay.

Cheers!
May 21, 2012. 11:44 AMChinasaur says:
Okay, this doc seems to confirm that 100-2000 Ohm @ 100 MHz is roughly right? http://www.ti.com/lit/an/snla107/snla107.pdf
May 21, 2012. 8:28 PMChinasaur says:
I think without some EMI testing it'll be hard to know, so ballpark is plenty good for now :). Thanks for the great instructions.
Nov 24, 2011. 12:30 PMikaros45 says:
Hi,

Very nice project, very nice.

I see it's based on the ENC28J60 chip, and unfortunately I haven't managed to do what I want to do: just an GET request.

Is it possible with this one? I guess not.

Thanks in advance!
May 8, 2012. 4:02 AMmattadamsnet says:
there is software on the web for this, so far I've found 3 sources...

http://www.nuelectronics.com/download/projects/etherShield.zip is one.

I believe works put of the box with this and includes a simple web server. In the example etherShield_web_switch it uses GET to change the status of an LED.
May 8, 2012. 10:15 AMikaros45 says:
Hi,

I tried with that library some time ago, and with no results.

It is possible (and not very complicated) to make it work and receive get http requests, but to make the arduino work as a client was impossible to me.

However, nowadays the WIZ based shield is pretty cheap, so I don't need to fight with the ENC anymore.

Thanks anyway!
Oct 31, 2011. 12:08 PMljian says:
just to tell that i successfully make 1. Thnx drj113.
i didnt use the customized PCB, i used a perfboard instead so followed ur schematics. The only thing that is missing in ur schematic is 74HC08 not connected to gnd and 5v.

I had a faulty 25mhz crystal which makes the ethernet connection fail and took me a long time to find out the problem. so for guys who cant connect the LAN please try to check ur crystal.... Hope this help

Thanks anyway...
May 8, 2012. 4:08 AMmattadamsnet says:
I also breadboarded it first. My only hang was the ground and power for the 74HC08, as soon as I looked at the 74HC08 datasheet it was running like a champ. Thanks drj113.
Oct 2, 2010. 2:50 PMmmbb says:
I'm trying to get it work. I build it on a breadboard, because I wanted to test it before I'll make the PCB. However I have a problem with Ethernet connection. When I connect a power, the LEDs blink twice and then stay off. I have the ethernet cable connected straight to the board without the magjack, because I couldn't find it in my country. Could it be caused by it? Because liodel said he got it work without the magjack. I also tried to measure the voltages on input and output pins of the enc28j60 and it says 0V, which seems weird to me. Is it normal?
Could you please help me with it?

BTW, thank you very much for this great project.
May 8, 2012. 6:34 AMmattadamsnet says:
I disagree. When I didn't have power and ground connected to the AND gate, the ethernet chip received the initalization from the mega and blinked the MagJack LEDs twice, but the board was not working.

I inseterd a serial.println(plen) I Think, and determined the mega was not receiving the ethernet chip.

After powering the AND gate, the board started to work and plen did not equal 0 anymore.

Sorry is the variable name is wrong and for the spelling, I'm at work with no spell check.

The leds blinking twice only indicate the ethernet chip is receiving the mega, not the other way around.
Oct 2, 2010. 3:50 PMmmbb says:
Thanks for answer.

I connected it to my switch so it will swap the pairs automatically. I have my LAN subnet set to 192.168.0.0/24, so I set the IP to 192.168.0.50. I think that one LED should stay on (and also LED on the switch) to indicate that the cable is connected, so there is most likely problem with connection.
So I'm considering buying the magjack abroad. Will this one work? http://cgi.ebay.com/5-pcs-RJ45-connector-magnetics-LED-/280549645136?pt=BI_Electrical_Equipment_Tools&hash=item41520fdb50
Dec 27, 2011. 10:06 AManupa89 says:
I'm doing a project on building a remote monitoring system. Actually i wanna create an embedded HTTP web server to achieve my target.
That's when I saw you project and it seems really useful to me because I really don't need to use any ready-made boards.
So what I wanna know is that what are the changes i should do in this board transform it into a HTTP web-server, or should I use a separate MCU with this board?
Can I do this by using ATMega644( which has enough Flash to hold webpage) instead of ATMEGA168?
Im really new in this...
Its a great help.. I was to do this with a PIC 18F4620 and enc28j60 with TCPIP stack... But its too difficult for me.
May 8, 2012. 3:57 AMmattadamsnet says:
there is software on the web for this, so far I've found 3 sources...

http://www.nuelectronics.com/download/projects/etherShield.zip

I believe works put of the box with this and includes a simple web server.

I
Apr 28, 2012. 10:46 AM02.anand.m says:
Cool project.Can you please share KiCad file with as.
Apr 18, 2012. 10:50 AMdiy_bloke says:
Great project. Just a question though:
Yoy wrote below that L1 is just piece of wire with a ferite bead on it.
So do i ubderstand that the piece of wire just goes through the bead? No turns at all?
Found local shop that sells the enc chip, if I can find a shop that sells the RJ45 adapter there is no reason to postpone building it. :-)
Apr 18, 2012. 11:14 PMdiy_bloke says:
Thanks.
By the way, seems some company has dipped into yr design:
http://www.nuelectronics.com/download/projects/Ethernet_v1_0.pdf
or accidentally came upp with almost the same. Still not a bad deal at 12.50 (pounds)
Mar 26, 2012. 3:57 AMmharizanov says:
drj113, this project has been an inspiration to me, thanks for posting it!

I have a question while reviewing the diagrams, you interface the INT pin of the ENC28J60, but the interrupt is not used in the software library anyway. Am I wrong that you can omit connecting that pin whatsoever? I also cross-checked with similar projects like NaNode and Open Sprinkler and they too leave INT unconnected.

Thanks

Martin
Feb 15, 2012. 2:34 PMkbates666 says:
Are the AND Gates really necessary? Doesn't the Arduino just interpret the 3.3V coming from the ENC24J60 as high?
Feb 22, 2012. 12:02 AMkbates666 says:
According to Microchip the operating current of the ENC28J60 is 250mA. You list as using a 78L33 when it can only provide 100mA. Why is that?
Jan 13, 2012. 1:36 PMpadiazg says:
After a couple of fails, finally managed to make work your schema on a breadboard with a Ardiuno UNO, next step is to build your PCB, this was just for try and experiment. The library works fine with the IDE v0022, a few days ago I posted here the modifications to make it work on IDE v1.0, but today I found this: https://github.com/jcw/ethercard, and it works just fine. Have a lot more functionality, like DHCP and DNS clients, and it's v0022 and v1.0 aware.

The only thing you have to worry about is to use the 3th parameter in the begin function. The library defaults CS to pin 8, meanwhile this project has that connected to pin 10. So, if you add the 10 to the begin function, it works like a charm.

Ej:
in the examples:
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
   Serial.println( "Failed to access Ethernet controller");

change to:
if (ether.begin(sizeof Ethernet::buffer, mymac, 10) == 0)
   Serial.println( "Failed to access Ethernet controller");
Feb 17, 2012. 9:21 AMpadiazg says:
Another advantage of using this library (https://github.com/jcw/ethercard) is that you don't need anymore to code the ip address on the code, just use DHCP, so the DIP is unnecessary, you can have more than 16 boards, and those 4 I/O ports back.
Feb 6, 2012. 10:55 AMjeff-o says:
This could be exactly what I'm looking for. One quick question: would it be possible to send emails based on sensor input triggers, without the need for a server in between?
Feb 6, 2012. 8:30 PMjeff-o says:
Cool. I've found one project that uses a regular arduino and an Ethernet shield that is apparently able to send emails, though this would be much cheaper. Perhaps the code from each could be mashed together to run on this platform...
Nov 27, 2011. 5:58 PMkInstructor says:
Hey,
how much does the materials cost?
Jan 26, 2012. 9:36 PMSpaceman Spiff says:
I made the following parts list for this project. It includes the price for all of the materials. Where a part is missing a price it's because I likely already have that component. It shouldn't cost you more than $30 in parts.
Jan 26, 2012. 9:40 PMSpaceman Spiff says:
You'll also find I listed a sources column for the parts. I noticed that the prices have changed a bit since I purchased the parts so you may need to do a little more digging to find a cheaper price than the vendor I source in the file.
Jan 3, 2012. 10:49 PMfireman_sam6986 says:
Hi,

Awesome project, I am really keen to build one of these. My only issue is I need access to the SPI bus to control an SD card reader however from the look of the schematic these lines are tied to the ethernet controller and aren't available?

Also, I read the other comments and you talk about the power supply not having much room but having enough to power a few sensors. I want to run a few WS2801 -channel constant current LED drivers chips for controlling a few LED strips. Or course the LEDs will be powered externally but I wanted to power the chip from the board.

Thanks,
Sam
Jan 5, 2012. 6:23 AMfireman_sam6986 says:
Hi Doug,

Thanks for the swift reply.
I had a look a the datasheet for the Microchip ENC 28J60 - DIP and they all say it has an SPI interface. But thats not to much of an issue, i'll have a go at reworking the layout so pins PB5, PB4 and PB3 have header pins.

I dont suppose you have a recommendation on what regulator to use? I'm much more of a software guy who has recently become fascinated by hardware.

I think for what I want I should implement this as a shield. If that were the case would the following work? Excuse the hack job edit :-) I'll need to change the PCB layout unless of course you have one handy?


Thanks again,
Sam
1-40 of 258next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
362
Followers
11
Author:drj113
I have a background in digital electronics, and am very interested in computers. I love things that blink, and am in awe of the physics associated with making blue LEDs.