The E-Net Module is an open source project which uses Microchip's ENC28J60 giving the Propeller Platform the ability to become an embedded webserver, IRC client, or even help you determine if you need to take an umbrella with you today.
The magic behind the E-Net Module is Harrison Pham's PropTCP which is an MIT licensed object.
This Instructable will take you through the assembly of the E-Net Module as well as a couple projects which can be done with it.
Step 1: Frequently Asked Questions
What is the E-Net Module?
It's an expansion module for the Propeller Platform, it lets you connect networks to your Propeller.
What does it work with?
It's set up to work the Parallax Propeller, it will fit on top of the Propeller platform, or you can drop it on a breadboard.
How many pins does it take?
The E-Net module takes four pins. There's space on the board to add two LED's, which will take two more pins, for a total of six. This leaves 25 pins open on the Propeller for the rest of your project.
Is it a webserver or a web client?
Either, depending on how you want to use it. It can serve web pages or data stored on an SD card, or query remote servers, parsing the response. I'll show you two demos, one parsing a web page for a weather report, and a second of a TV based IRC client
How much does it cost?
We make a kit for $33, or you can make your own - the expensive parts are the ENC28J60 chip ($4) and the pulsejack ($6), and the PCB (about $10, depending on how you get it made) We have included a schematic for those who want to assemble their own E-Net on a breadboard or PCB. Parts required for assembling your own E-Net Module can be sourced easily from here.
We have also provided the gerber files on the E-Net Module project page.
Step 2: Example Project 1: Umbrella Alarm
Here's how to use it to grab a weather forecast off the Internet and remind you when to grab an umbrella;
1. Find the web page that has the data you want
Small pages work best. For weather forecasts, I surfed around the NOAA site and found this page. This is what I entered;
Start the networking with:
startnetworking(@servername, @uri, @IP, port)
2. Identify the data you want to use
On that page, the data element <pop> is the probability of precipitation for my area. For my Umbrella Alarm, I don't need the whole page - just the value stored in the pair of <pop> tags. The
addfieldmethod is how you identify what parts of the page you want to use in your project. Grab the data between the first pair of <pop> tags with the line;
The first argument,
string("pop"), tells the program that we're looking for data within the <pop> tag. The second argument, @rain, tells the program where the data it finds should be stored. The search always stops when it finds the first tag that matches the criteria.
3. Grab the web page!
Now we know what web page our data is stored on, what data we want to retrieve, and where to store the result. serverrefresh grabs the page and updates the values. Each time we call it, a request is sent to the remote server and the local values are updated with whatever the server returns.
Keep in mind the result is always returned as a text string. If the result should be a number (like the probability of rain), the str2dec method will convert it to a number for you.
This umbrella alarm grabs a web page that includes a weather forecast, parses it and returns the probability of rain. If the probability of rain is greater than 30%, our red LED turns on. Here's the complete program;
Step 3: Example Project 2: TvIRC Client
Another project you can build with this combination is the tvIRC client:
You'll need to add a keyboard interface to the ProtoPlus. In my example I've added a small stick-on breadboard and some female connectors to the top of the board. This turns the ProtoPlus into a Propeller "experimenters board", handy for other projects when you are finished.
The keyboard breadboard circuit is created around the Parallax PS2 breakout: (see image 1)
Once you have a working ProtoPlus w/Keyboard interface download the tvIRC source and open tvirc.spin.
You'll need to edit lines 42,44, and 45. This information can be obtained from your computer's Command Prompt, typing ipconfig. Change the 192.168.1.X to match your network.
The ircserver and channel lines are currently set to log into the #propeller channel at irc.freenode.net.
Jump on the channel and join us!
Step 4: Building the E-Net Module
When you dump out the kit on your desk, don't be overwhelmed by the number of parts. The most commonly used part are simple resistors and I'll take you step-by-step through the entire process.
Start by mount the blank PCB in a work-vise as shown.
Step 5: 4x 47ohm Resistors
Step 6: Insert 47ohm Resistors
Step 7: Soldering & Trimming Resistors
1) Spread the leads apart and flip the board over.
2) Heat up the hole and lead with your soldering iron for a second or two, then add a bit of solder..
3) Trim off the excess lead with your dikes.
Step 8: 2x 220ohm Resistors
Step 9: 1x 2.2k Ohm Resistor
Step 10: 2x 10k Ohm Resistors
Step 11: 6x 1uf Ceramic Caps
There are 6x .1uF ceramic caps, they go at C1, C2, C3, C4, C5, and C6.
Because these are ceramic caps, it doesn't matter which way they go.
Step 12: 2x 33pF Ceramic Caps
Again, it doesn't matter which way they go.
Step 13: 47uF Electrolytic Cap.
Important Note: The Electrolytic cap is polarized, the stripe on the can marks the negative lead, and the lead on
the opposite side is positive. The positive lead goes through the hole marked with a '+' on the PCB
Step 14: Adding the Inductor
Step 15: 25Mhz Crystal
Step 16: Adding the 28pin DIP Socket
Putting the socket in the right way will help to make sure you put the IC in the right way, too.
Step 17: Adding the PulseJack
Flip over the board and solder each pin in, and fold out the metal tabs.
Step 18: Adding the Indicator LEDs
Note polarity very clearly - on the LED; "The shorter lead goes through the square hole."
Step 19: Installing the ENC28J60 Chip
Step 20: Finishing the E-net Module
An easy way to do that is to insert them into the Propeller Platform, then place the E-Net Module on top, and solder as shown.