A credit card sized Ethernet Arduino compatable controller board by drj113
Featured
DSC_9138.JPG
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 1: Here is the Schematic Diagram

Arduino-Ethernet-sch.png
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)



1-40 of 299Next »
nwo1 says: Apr 15, 2013. 1:13 AM
Hello! I'm super excited at this project, however is it possible for you to distribute the eagle file for this project? It would be great if you can kindly release it =]
prismspecs says: Feb 13, 2013. 12:22 PM
great guide. what was the total build cost for the ethernet board?
drj113 (author) says: Feb 13, 2013. 1:44 PM
When I wriote it, the board was cost effective to make, now I would just get a Raspberry PI.
Ilruz says: Feb 24, 2013. 2:38 AM
If you are lucky enough to get one. I've ordered mine more than one month ago ... they said it was "in stock". Sigh.
drj113 (author) says: Feb 25, 2013. 12:05 PM
Yea, Shipping is a bit tricky, I have been waiting for two more for a while now. But the Pi is an amazing board.
jennitha says: Feb 6, 2013. 2:39 PM
Hi I have a question about how to program the arduino ethernet.
What software is needed and how to place the cable ftdi
ROADTECK says: Jan 8, 2013. 6:56 PM
Never mind, once I got on my mac it worked. thanx for the info!!
ROADTECK says: Jan 6, 2013. 3:59 PM
when i download this PDE file it turns out to be a tmp file that i cant read. Where is the code?im having trouble posting sensor data with my sketch and wanna see how u did it. Thanx so much for this instructable. ur the man
troyka_4484 says: Oct 21, 2012. 12:10 PM
I did the project, and it works fine for about 1 min, and then it disconnects, I think the ferrite bead is the problem, could it be?
Great project btw! many thx!!
drj113 (author) says: Oct 21, 2012. 3:27 PM
Hi,

Thats cool - but frustrating that your project isn't working well.

The ferrite bead is used for suppression, so it is unlikely to be the problem.

The most likely issue is either (1) something else on the network with the same IP or MAC, or (2) the regulators overheating because the supply voltage is too high.

What supply are you using - I tested mine with a 9v power supply.

troyka_4484 says: Oct 21, 2012. 10:54 PM
thx for the quick reply!

I have no problem with IP or MAC address.

I think the supply voltage is the problem, I am using a 12v battery for supply, and the 5v regulator is overheating, so this might be the problem.
I'll give it a try later today by using a 5v supply.

as for the ferrite, will the project work with-out it?or are there any replacement for it? because i can't find ferrite in the local electronic store.

regards!
drj113 (author) says: Oct 22, 2012. 6:30 PM
Excelent that you solved it - in reflection, 150mA was a bit of a stretch for a component that was designed for 100.....I have learnt so much since then.. ;-) Take care, Doug
troyka_4484 says: Oct 22, 2012. 11:15 AM
Ok, I fixed the problem, it was the 5v voltage regulator, I replaced it with an LM7805 voltage regulator, and I did a : ping 192.168.1.15 -t

Reply from 192.168.1.15: bytes=32 time=1ms TTL=64

I am getting reply since 1h 30 min!

btw I replaced the ferrite with a wire.

great project! many thx!!
bing90 says: Oct 11, 2012. 3:44 PM
???
22.jpg
drj113 (author) says: Oct 11, 2012. 9:07 PM
This board looks like an Dumaelove with an AtMega328

The project was last used with the Arduino 0022 IDE version - I have not tested it with the latest - It probably needs a refresh to work, as it is over 12 months old.
bing90 says: Oct 12, 2012. 3:49 AM
Is there Rx and Tx pins???
Can I use some pins as Rx and Tx???
I need to transmit signal from Serial port.
gentry says: Oct 15, 2012. 1:14 PM
Rx and Tx

Yes. Rx and Tx are brought out for the FTDI cable (connector P1, pins 2 and 3). Note that they are labelled the opposite of the names on the ATMega (which, coincidentally, are on pins 2 and 3 of the ATMega).

Rx and Tx have handy indicator LEDs D3 and D4, but you should raise the values for R13 and R14, especially if you need reliable serial communications.

I found that the ATMega chip was not programmable in situ with either of the FTDI cables I have (i.e., without removing the chip, programming it in an Arduino, and putting it back). Swapping the 270 Ω resistors (R13 and R14) for at least 330 Ω made it work, so I just went ahead with 470 Ω to be a little safer. The barely noticeable loss of brightness is well worth the increased programming reliability.

Choice of board type with Arduino 1.0.1 IDE
The kind of board you should tell Arduino you have depends on the ATMega chip and bootloader you choose.  This board is similar to a Duemilanove, or a boarduino.  I found http://www.ladyada.net/make/boarduino/use.html to be helpful in understanding this, and one way to burn a bootloader is this:  http://www.ladyada.net/library/arduino/arduinoisp.html.

In order to get the most space for the '168 chips I have lying around, I went a different route, burned an optiboot bootloader onto my ATMega 168s, and then added an entry for a fake "Uno168" to "boards.txt" within the Arduino hardware directory (on the Mac, it's at /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt).  If you're using a '328, you can just choose "Uno".  Anyway, here's my addition to boards.txt for a '168 with optiboot: 

uno168.name=Arduino Uno w/ ATmega168
uno168.upload.protocol=arduino
uno168.upload.maximum_size=14336
uno168.upload.speed=115200
uno168.bootloader.low_fuses=0xff
uno168.bootloader.high_fuses=0xdd
uno168.bootloader.extended_fuses=0x00
uno168.bootloader.path=optiboot
uno168.bootloader.file=optiboot_atmega168.hex
uno168.bootloader.unlock_bits=0x3F
uno168.bootloader.lock_bits=0x0F
uno168.build.mcu=atmega168
uno168.build.f_cpu=16000000L
uno168.build.core=arduino
uno168.build.variant=standard

BTW, I just completely copied the upload maximum size from another entry -- it's probably too conservative but I haven't needed to bump it up yet.

Good Luck!


drj113 (author) says: Oct 15, 2012. 2:51 PM
Hi Gentry,

Thanks for the heads up with the resistor size on the TX/RX LEDs - I was confused about why the board would program fine with my Cable, but not with Mikals :-)

Doug
gentry says: Oct 15, 2012. 3:36 PM
It was fun to figure out!  I've had this instructable "favorited" just about since you published it. Thanks!

Another thing I figured out was that the silkscreen lettering for the 74HC08 is "upside down" relative to the Philips 74HC08s I had. (I "cheated" and had Laen/OSH Park make me three cool purple boards.) I couldn't figure out which was pin 1 on my HC08, so I just put it in with the lettering the same way as the silkscreen, and was sad when my board didn't work. I figured out what was wrong when I nearly burned myself on the backwards chip. :)  I had bought a roll of a hundred for $0.09 each, so I didn't feel bad about blasting off the burned up one with a heat gun and trying again.

The other couple of glitches I found will also only affect fabbed boards (and I'm only guessing that these problems are in the gerbers, not fab errors).  
1) The holes for the header pins and the polarity protection diode are a bit too small. It was easy to drill them out larger.  Most hobbyist fabs drill a little oversize (and off-center) anyway, so this might not affect everyone.
2) And finally, the soldermask covers the pads for the LEDs on the bottom of the board.  On different instances of the board, I did both of a) grind/scrape off the soldermask, and b) just solder the LEDs from the top (which only works if your fab plates the through-holes).

Oddly, the SMT soldering that I had the hardest time with was the 10uF caps, especially between the DIP switches and uC pins.  Maybe the caps I got are on the fat side, plus I think I failed to install them before the through-hole parts.

If I get really ambitious, I'll do either a (nearly) all-SMT or all-through-hole or combo version, maybe with an SD card and some kind of PoE.

Again, totally great instructable -- I've learned a lot and am really happy with my results.  

julianiii says: Aug 22, 2012. 7:49 AM
Hello everybody . i'm trying to do the project but no sucess , can u help me ? i connected everything like in the schematic , i dont know how to trace where is my problem ,help me thnx.
drj113 (author) says: Aug 22, 2012. 9:41 PM
What software are you using?
julianiii says: Aug 24, 2012. 9:00 AM
enc28j60 library . Should i conn the 74ls08 vcc and gnd. maybe is my rj45 problem ?
IMG_0065.JPG
drj113 (author) says: Aug 24, 2012. 6:23 PM
The VCC and Ground should be connected.

The Rj45 needs to have magnetics as well. Does yours?

julianiii says: Aug 24, 2012. 10:55 AM
thnx for the help i had problem with rj45 and ferrite bead thnx i love this project thnx :):):):)
drj113 (author) says: Aug 24, 2012. 6:24 PM
The ferite is not super important - it just reduces noise on the supply rail
julianiii says: Aug 25, 2012. 5:42 AM
Yes i cute a rj45 from an old ethershield and it works fine THNX
drj113 (author) says: Aug 26, 2012. 7:30 PM
Aweesome!
craigxau says: Aug 15, 2012. 1:23 PM
I am currently attempting this as my first Arduino project ever. I am going whole hog as they say. Attempting to mod the board design to incorporate the silvertel AG8012s POE module so the device can be powered by a switch as an IEEE802.3af compliant device powered at 47vdc nominal. Wish me luck. will get back with results if anyone is interested.

I love this project, it has inspired me. 8-)
drj113 (author) says: Aug 15, 2012. 2:51 PM
Awesome - Thta will be a useful addition :-)

Feel free to let me know how you went.

Doug
seoliver says: Jul 15, 2012. 9:34 AM
I can't figure out the function of the 74xx08. What is it doing? To the uninitiated, it looks like I can hook pin-4 of the ethernet chip to pin-4 of the u-controller, and pin-6 to pin-18. Is this some sort of timing or voltage issue?
drj113 (author) says: Jul 15, 2012. 2:25 PM
Yep - it is voltage conversion - The ENC28J60 is a 3.3v part, while the AtMega is a 5v part.
seoliver says: Jul 15, 2012. 8:38 PM
V_IH on the AtMega datasheet shows 0.6Vcc which would have a maximum of 0.6*5.5 = 3.3V
V_OH on the ethernet chip looks like 3.1V
That is so close it's tempting.
drj113 (author) says: Jul 15, 2012. 9:16 PM
It is really tempting, and would probably work 99.9% of the time. It is that 0.1% that causes grief!
seoliver says: Jul 15, 2012. 5:11 PM
Thank you. Such a fast response! At the risk of testing your patience: is R1 necessary, or will R3 do the job?
drj113 (author) says: Jul 15, 2012. 6:16 PM
You just made me laugh - This is a design I have been using for ages, and never realised that I had a superfulous component...

R1 (or R3) is not necessary!
seoliver says: Jul 15, 2012. 6:36 PM
Zounds! I saved a resistor! The economics have changed and we can now go into mass production...
Sure98 says: Jul 4, 2012. 2:40 PM
I'm new to arduino, and i was wondering if i can use the port to program the ATmega chip, and use it as if it was a UNO board?
janisalnis says: Jul 3, 2012. 11:23 PM
Wanted to share link to a similar design for home automation. Unfortunately in Russian, but can use google translate.
http://ab-log.ru/smart-house/ethernet
I built it and am very happy.

Uses EEPROM for storing IP address and pin configurations. Sends commands to server and listens, but if server is not responding can take actions itself.

There is commercial open source module too switching triacs.
http://ab-log.ru/smart-house/ethernet/megad-328
1.jpg2.jpg3.jpg4.jpg
francisroan says: Jun 19, 2012. 4:04 AM
could ya make an instrutable....How to make an diy arduino ethernet shield?? coz this project has a diy ethernet right so pls ???just the ethernet part!?
DarthCaniac says: Jun 12, 2012. 12:53 PM
This looks like an amazing project, I think I am going to have a go at it! Do you know if it is possible to use this to host a very simple HTTP server with some PHP and interface with that code? I would like to try to read and control a few I/Os from a webpage, but I also want to be able to program some I/O features to be automatic.
1-40 of 299Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!