Introduction: 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!
Step 1: 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)
Attachments
Step 2: The PCB Layout
Here is the PCB layout.
As with all of my projects, I make the circuit boards using press-n-peel blue as a toner transfer, and cuperic chloride as the etchant.
This layout can be printed onto a laser printer directly and used as artwork.
I wrote detailed instructions in my Arduino Wordclock writeup that you can follow to etch your own board. Check out https://www.instructables.com/id/The-Word-Clock-Arduino-version/step2/The-hardware-Make-the-controller-board/ for details.
One thing with this layout - I had to use a surface mount IC (a 74HC08) - Please do not be too scared by the surface mount technology - it is extremely simple to solder - as we will see in the next step.
Anyway - Go on - make a PCB, and check out the next step for how to assemble the board.
Remember - download the PDF file as the master - not the PNG picture - the PNG is just there so that you can see what it will look like - it is almost certainly not to scale! If you print the PDF full size (without scaling) then it is the exact correct size for Toner Transfer.
You will also find the .zip file for the project - that contains all of the project files that can be used with KiCad.
I use KiCad over Eagle because it is actually open. Some of the designs that I make I can use in my own business, and are actually commercial. If I had used Eagle originally, then I would have to go and pay $$$ to the PCB software company - Instead, I use KiCad, and everything is truly free. Go and give it a go!
Step 3: Soldering the Components
Now that we have a PCB, it is time to solder the components onto the board.
Download the attached top and bottom pictures of the board to let you know where the various parts are placed.
Also download the file to let you know where the 3 jumpers have to be installed on the top side of the PCB.
Lets start by getting the surface mount 74HC08 onto the board. I promise that it is not as hard as it looks.
Firstly - clean your work surface - there is nothing more frustrating that working in a mound of junk, when you have to do something carefully.
Continue by tinning the pads where the IC will be mounted - just apply a little bit of solder, not a great mound. Once the pads of the PCB have been tinned, get the part, place it onto the tinned pads, double check it is oriented correctly - The PCB has a dot where pin 1 should be - make sure that the part is facing that direction.
Then using a fine tipped soldering iron, touch one pad on a corner of the chip to heat it. Let the solder melt, and then let it cool. Look closely at the part to verify that it is still oriented correctly, and aligned with all the pads. Then solder the opposite corner.
Now, under a decent light, using a magnifying lamp, spend a minute double checking that the device is sitting correctly on the pads - if it isn't, just re-heat a pin, and fix it up.
Once you are happy that the alignment is correct, heat the rest of the pads to melt the solder and connect the device. If necessary, add just a tiny bit of solder. Again - double check that your work is neat and clean - If you end up shorting pins together, don't panic - just use a little bit of Solder Wick to remove the excess solder.
Once you have the 74HC08 soldered, pat yourself on the back, and go and show your fine work to a significant person in your life!! - You did it! You can now solder Surface Mount parts! A whole new world awaits you!
Next solder down the surface mount capacitors on the back of the board - they are *simple*, just use a similar process to what youhave already used - and do not be afraid to add a little bit of solder to keep the joints neat.
Next, turn the board over and install the jumpers on the top side.
Continue assembly by mounting all of the resistors, capacitors, the ferrite bead, IC sockets, LEDs and connectors.
Finish off by plugging the Micro controller into the socket, and the Ethernet controller into its socket.
Finally - spend a couple of minutes under a strong light double checking your work - If I had a dollar for every stupid time I forgot to solder a pin, and spent a night debugging something silly - I would be able to spend the rest of my life writing Instructables projects.... Sadly..... Anyway, where was I? Ahhh.
There - You have done it - you now own your first Ethernet micro board!
Now we just have to load up some software.
Step 4: Programming the Firmware
Now - we can load up the firmware.
Attached is a sample project - in this case, it is the trivial web server example from the Arduino library - it uses a DS1820 chip connected to Pin 2 of I/O 1.
I have to say that I did not write the web temperature project - it is the sample one from the Ethernet library - It works beautifully on this board!
Use a FTDI-TTL cable to download the code - you can get one of the cables from http://evilmadscience.com/partsmenu/130-usbttl They only cost $20, and I can guarantee that every project you make in the future will have that magic 6 pin interface....
Attachments
Step 5: But What Does It Do????
Ahhh - I was wondering when you would ask this question.
I have these boards strewn all around Mikals house - they are doing things ranging from measuring temperature, to measuring humidity, to controlling the temperature of the beer fridge.
Here is a photo of one of them in situ - in this case it is measuring the humidity near Mikal's books. This is an old version of the board - but it has been doing sterling service.
If you want a copy of Mikals code from any of his systems, check out Mikals blog at http://www.stillhq.com
The old version of the Beer controller is at: http://www.stillhq.com/arduino/000003.html
and the Hygrometer is at: http://www.stillhq.com/arduino/000007.html
Step 6: Parts LIst
Here is the parts list:
Semiconductors:
Micro - ATMega168 or ATMega328 - DIP (the 328 provides extra code space)
Ethernet - Microchip ENC 28J60 - DIP
74HC08 - Surface Mount
3mm LED X2
5mm LED
1N4004 Diode
78L05 Regulator
78L33 Regulator
16 Mhz Crystal
25 Mhz Crystal
Resistors
50R x 4
270R x 5
2k7 x 2
10K x 3
Caps:
18pF x4 - Surface Mount
100nF x 4 - Surface Mount
10uF x 3 - Surface Mount
Hardware:
28 pin socket x 2
4 pin dip switch
RJ45 MAGJACK - Has to be a MagJack, as that has the ethernet isolation transformer inside it http://www.sparkfun.com/commerce/product_info.php?products_id=8534
10 pin header
6 pin header
5 pin header
2 pin header
Small Pushbutton switch
Arduino Ethernet PCB
Step 7: KiCad Files
Many people have been asking for the source files for this project.
Here they are. They are in KiCad format. KiCad is Open Source, Free, Accessible, and does not apply arbitrary license restrictions. As a community, I feel that we should be supporting open source software.
I appreciate that some people would like to see Eagle versions, but I simply can not condone Eagle's licensing model. I am a private user, but the size limitation of the boards in Eagle means that I can not use that product to make trivial 150mm x 150mm PCBs for my clocks. So I simply do not support their product.
Anyway - here is an archive of the project tree from my system - I hope you find it useful! Please keep in mind the CC attribution license for my projects.
*update* I had received some feedback that the custom libraries that I made for the MagJack and the enc28J60 were missing - I have added them to the download - it *should* work - but these things are always hit ans miss if you haven't tried them on another machine... (You do build up a collection of useful libraries that you don't even realise you use...) I also removed the LCD module library reference, as there is no LCD module installed.... It was just the default, as manu of the projects that I make have LCD screens on them.
348 Comments
Question 4 years ago on Step 2
I need your help to design my NETWORK card so please help me my ID is jaysinghpy@gmail.com
Question 4 years ago on Introduction
Do you have the specifications of the inductor L1?
10 years ago on Introduction
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-)
Reply 5 years ago
Sorry for replying to a 6 year old comment :) But this is so niche.. You're a person after my own heart. I have been thinking about designing the board for a "Arduino Nano" equivalent with W5100 / W5500, ditching the USB interface thus saving space, and using QFP packages where possible. I've been looking at the Silvertel for a few years but never bought one or tested it. I found them a while ago around £7 each. This, to me, would be the ultimate little board, a good number of IO pins, and PoE networking. Great for embedded sensors / actuators around the home.
Did you get anywhere with your project?
Reply 10 years ago on Introduction
Awesome - Thta will be a useful addition :-)
Feel free to let me know how you went.
Doug
5 years ago
Sorry I had a question why you used the and gate.
7 years ago on Introduction
I have completed the fabrication, but when I verify the code the IDE says 'class EtherShield' has no member named 'ES_make_arp_answer_from_request' please help
7 years ago on Step 3
hello sir, could you please tell me the exact package of the 74HC08? so14, ssop14 ??
7 years ago on Introduction
Hello! First of all congratulations for the great tutorial. I'm sure you've provided great help to many people. keep up! :)
I'm embracing a look alike project and I have some questions regarding the programming part. I found some answers in the comments but I still have some doubts. Here they go:
- By using the USB-TTL cable you do NOT need a typical programming cable?
- You are using the Arduino IDE to program the Atmega? (All the chips come with the bootloader from factory right?)
I'm sure I'm making newbie questions but well...I'm a newbie :D
Thank you for your help!
Reply 7 years ago on Introduction
Wonderful - This project is very old, and there are lots of better technologies now, such as the Spark Photon that are much more capable. But you still can't beat the simplicity of the Arduino :-)
The FTDI cable lets you program an Atmega as long as it has the boot loader installed. essentially, the boot loader looks for code down the serial interface on startup.
If you don't have a bootloader in the chip, then you need to use a real programmer - such as a USBTiny - that lets you get the bootloader into the chip from scratch (and allows you to purchase *much* less expensive chips)
In my clock business (DougsWordClocks - which grew out of my Instructables projects :-) ), I program, all of the AtMega chips myself using a USBTiny, as I use surface mounted parts now, and they don't come with a bootloader.
Doug
Reply 7 years ago on Introduction
Hi Doug,
First things first: Awesome clocks!
I didn't know about the Spark Photon. (Unfortunately) that was more or less my project...Guess I won't become rich this time :P Anyway I'll keep going with the project since it's a good way of learning a bit more about lots of stuff.
About your reply: How do I know which Atmegas come with bootloader? I'm struggling in finding the info in the datasheets. Is there any rule of thumb?
Another question. The atmega you used only has 1 Tx and 1 Rx. Since I want to connect another serial device (only has tx,rx communication...no SPI from what I understand) how can I do it? Can I just connect everything (having the atmegs Tx connected to 2 rx) and control ir via software? Do you think there is a better way to do this?
Once again thank you very much for your help!
JM
8 years ago on Step 7
hi i can't open the schematics in egale. can someone help me please ?
Reply 8 years ago on Step 7
which program didyou use for this ?
Reply 8 years ago on Introduction
KiCad...
Reply 8 years ago on Step 7
The schematic was developed in KiCad - not Eagle.
I do not use Eagle, as it is closed commercial software that is unable to be used for commercial use without paying a licence.
KiCad is open source.
8 years ago on Introduction
Will programming this work with the Ethernet and SPI libraries in the Arduino software? I was looking for a way to program my Arduino to use Ethernet without the need of an SD card slot since the Ethernet Shield includes an SD card slot.
Great project, there. I'm hoping this will be useful on my end.
8 years ago on Introduction
Hi
Thanks for this instructable, can you tell me wath is the value of L (inductor) near the R5 and R6 resistors.
Keep the good work
Thanks
Reply 8 years ago on Introduction
It is simply a ferrite bead - Just one length of wire placed through a bead. It is tr remove switching noise.
8 years ago on Introduction
Really nice work drj113.
8 years ago on Introduction
Can you please explain the purpose of this board a bit better?
Can multiple of these boards be connected to a network switch, and then "controller from a mater controller"?
i.e. can I open / close doors remotely, from a single Arduino MEGA? If so, does it work on the I2C bus, or would I need an ethernet controller (which I don't currently own) on the Arduino MEGA 2560 first?