PDA

View Full Version : Serial over Ethernet - Webserver



malc-c
- 24th April 2010, 17:01
I've been searching through the forum for means of connecting a PIC based project (the 4ch thermostat posted in the code section) via Ethernet and an embedded webserver. I came across this this thread (http://www.picbasic.co.uk/forum/showthread.php?t=11883&highlight=ethernet+pic) which show several devices costing around £30 - £40.

One shows a diagram (see below) that seems to suggest you simply connect the two lines (rx & tx) from the PIC to the device and then RJ45 from it to the router and then enter the default IP / MAC address (much the same as accessing a router or adsl modem) to set up the comms and upload the "web page" for the device / data you want to display.

http://www.connectone.com/media/upload/LANReach_overview.jpg

Is it that simple, or have I missed something ?

mackrackit
- 24th April 2010, 20:20
I have used the wifi version of that part some and it is almost that easy.

I did not use it as a web server because it will only do port 80 and the systems I work with have port 80 used by Apache.

It can be used to send and receive serial data via Ethernet. Jeremy and I tested this by sending "text" messages to each others terminal.

I have used it mostly as a remote data logger. Information is collected by a PIC®, sent to the module with the appropriate commands to and/or FTP the data to a server and send out an email.

This is no longer running, it was just a test. The web page lived on the server and would pull the temperature data from the file the iChip FTPed. That was how I got around the port 80 problem. The PIC® code is also on the web page.
http://mackrackit.com/mac/ichip/ichip.html

malc-c
- 24th April 2010, 20:38
Dave, looks fairly simple :confused: :D

I might order one of these to try at some point. DT wrote the routines to display each channel of the thermostat via serial, and I was hoping that this device would do the same in HTML (I read that it can store web pages).

It's not critical yet, I want to get some headway with the PCB design for the thermostat project first

mackrackit
- 24th April 2010, 21:14
Yes it will serve web pages. This is from memory so I may be off a bit...

The web page memory is something around 128kb. You create the HTML with whatever you use for that, then the iChip has software you can download to convert you HTML into an image file that lives on the iChip. You can have "parameters" in the HTML that become dynamic via serial input.

Like I said, from memory. Only played with that part a little.

lester
- 25th April 2010, 10:39
If You are in the UK / Eu you might want to look at these parts

EM100 (http://www.crownhill.co.uk/product.php?prod=2153) Serial-to-Ethernet Module

EM1202 (http://www.crownhill.co.uk/product.php?prod=1795) Programmable (BASIC) Serial to Ethernet module

The full range is listed here (http://www.crownhill.co.uk/level3.php?cat=24&sec=9)

And the Manufacturers web (http://www.tibbo.com/) site carries a mass of information and a very good tech support forum.

malc-c
- 25th April 2010, 12:18
Thanks Lester,

This gives me more scope, and price wise £26 is not a huge outlay.

malc-c
- 25th April 2010, 12:36
Lester, looking at your site and Tibo's there seems a lot to choose from.

Any idea of price and availability of http://www.crownhill.co.uk/tibbo/EM202.php - EM202 unit and is this a suitable unit for converting the TX / RX TTL lines from a PIC to Ethernet ?

lester
- 26th April 2010, 09:21
http://www.crownhill.co.uk/product.php?prod=1794

http://www.crownhill.co.uk/product.php?prod=1795

The EM202 is an older part, the above links show suitable replacements.

malc-c
- 28th April 2010, 23:05
Doing a bit of homework and it seems most apart from one of these devices are designed for 3.3v operation and don't run in an 5v environment. I was also bragging that the 4ch thermostat project that I've been working on maintains a st temperature to within 0.5 of a degree (+/- 0.25C) which I can live with (Thanks DT and Henrik), when my boss asked if it's possible to network the device and with modification, come up with something that could monitor temperatures in the server room. Would the following work (is it simple too)

http://www.picbasic.co.uk/forum/attachment.php?attachmentid=4356&d=1272488594

Note the diagram is just for illustration :)

lester
- 29th April 2010, 09:03
In principle, YES