Aether Tap (Component Identification)

The second step in any project is to identify the main components that are needed to make your goals play out. In this case I have chosen a Microchip PIC24F series Microcontroller as the core of my project supplemented with a Microchip ENC28J60 Ethernet controller to handle the MAC and Physical layers of the Ethernet interface .

The PIC24F series has many advantages over its 10, 12, 16, and 18 series cousins, First and foremost the 16 bit architecture allows the chip to have a far expanded instruction set which makes it much more viable to program the chip in a higher level language such as C or even BASIC. I myself will be using Microchip’s student version of its C30 Compiler which comes fully loaded with individual header files for each chip in the 24 series and even libraries to help out with the on chip hardware peripherals like USART, I2C, SPI, Etc. The 24 series also has one advantage that most people tend to overlook, its hardware peripheral pins can be remapped to almost any pin on the device, meaning much less time working on routing a PCB. Its also interesting to notice the distinction between the 24F and 24H series controllers, while the 24H controllers can typically run at much higher speeds achieving in the range of 64mips, it typically lacks the expanded peripherals of the 24F series which on average has about double the hardware peripherals of the 24H series but performs at only around 16Mips

The exact model I’ll be using in this case is the PIC24Fj64GA002 with 64K of flash memory, 2 hardware SPI interfaces, and a max speed of 32Mhz (16Mips).

I wont be writing a guide for using the pic24 however I was able to find an excellent tutorial for any interested.

The ENC28J60 Ethernet controller handles everything below the network layer of the standard OSI Model, it handles the media access control layer and the physical reception and transmission of packets. The ENC28J60 interfaces to a main controller via SPI and receives and transmits information via an internal 8k buffer operating in a FIFO fashion. the ENC28J60 supports full and half duplex modes as well as unicast, multicast, and broadcast packets. It is also fully compatible with all 10/100/1000 Base-T networks making it a very plug and play device. The only qualm I have about it is that it it doesn’t support auto-negotiation which means its not safe to use full-duplex mode unless you can manually change your switch port to full-duplex.

During the course of this project I will be entering a lot of new territory, I have never before used a 16 bit uC, I have never before coded a Microcontroller in C, (until now I have only used the 8bit 12 and 16 series microchips and coded them in Assembly or PIC Basic), I have also never used the SPI hardware peripheral which many PIC’s provide and I have absolutely zero experience with the ENC28J60 module. So this project will without a doubt put me in a position to learn some new things.

Below I have included a schematic and board layout for a pic24 28Pin SOIC breakout board with an ICSP header for programming, A useful tool for familiarizing yourself with the PIC24 Series

PIC24BrkOutwICSP

Aether Tap (Requirements Definition)

When you begin a project its important to identify what you hope to accomplish or learn in the process, This project will have plenty of both for me. First and foremost I would like to produce an inexpensive Ethernet enabled controller which I can interact with via the Internet. The device will be a product of its programming however, meaning that depending on what I need it to do it should also be able to…

1) Host web content and display real time data via the web

2) Send emails or alerts when necessary

3) Monitor and interact with external devices, sensors, and appliances

4) Allow control of the above mentioned devices via email or web based interface.

5) Log Network activity to the SD Card.

Its important to note that I don’t plan to incorporate relays or other direct appliance control hardware directly into my design, I’ll probably just end up making a bank of I/O pins available for external connections from sensors or relays.

As a rule of thumb its always a good idea to do some research and find out if anyone has done some of your work for you, in this case it happens I was able to find an excellent project to draw from, several years ago Ian from HackaDay posted an excellent How-To on building an embedded web-server which has a lot of the same functionality as my project. Its notable to mention that Ian is also the main developer of the very popular Bus Pirate module. There are also several other good sources of information about the ENC28J60 such as this article on Electronicfr.com or either one of these articles from tuxgraphics.org

So in the footsteps of giants I will lay out my project in the next several posts from Component Identification through Design, Prototyping, Building, Programming, and Testing.

As a final note, because I’m borrowing from other open source work and projects it seems only fair that I reciprocate and deliver my project documents and code as open source, and so it shall be.

Next Offical Meeting Date: October 1, 2010 Time: 6:00 pm Click for more info