close-circle
Close
0%
0%

Ethernet/Internet to Serial Adapter

Very simple way of adding internet connectivity to a project. Serial data going in gets relayed to a server and you get the response out

Similar projects worth following
close
This adapter interfaces with the common ENC28J60 ethernet module and abstracts away the work required to setup a network connection and send and receive data.
You send the device a message over the serial line, this then gets posted to a pre configured url and a short time later the response from the server comes out the serial port.

At its heart its just a basic arduino circuit but the code required to do this takes up over half of the program space on a ATMEGA328 so I seperated it into a second device. Using this method I could continue to use the cheap 328p rather than switch up to something more expensive.

This is currently an ongoing project and when I am finished I plan to release the code and design

https://arthurguy.co.uk/blog/2014/5/internet-of-things-serial-to-ethernet-adapter

Overview video
https://www.youtube.com/watch?v=m3dADXoqRv0

This video shows version one and two of the device.
https://www.youtube.com/watch?v=P4FO_3qoNZw

The current plan is to allow the adapter to be configured through a special serial string, this will set the target host and url and store them in the EEPROM. This should mean that the device can be used as is with no additional programming or changes.

In addition to the serial in and out the adapter has two status lines, busy and ready. These status lines can be used by the calling system to determine if its safe to send a message or not.

Some times web requests fail or the system will go wrong so in these cases the watchdog timer makes sure that any failure isn't permanent. As well as the watchdog there is a counter to track the number of failed requests in a row, if this exceeds a set limit the processor is reset to try and clear any potential problems with the adapter.

  • 1 × ATmega328p Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × 16Mhz Crystal
  • 1 × ENC28J60 Ethernet Module Development Kits, Boards and Systems / Adapters, Adapter Boards and Sockets
  • 1 × PCB Switch
  • 1 × 24AA02E48T EEPROM Hardware MAC address

  • New hardware and now available for sale

    Arthur Guy08/13/2014 at 09:24 0 comments

    Version 4 of the PCB came back last week and it works!

    The notable changes between v3 and v4 is the inclusion of a second LED connected to the ready output, and the breaking out of the reset pin.

    The ready light is great when starting up to see if its connected to the internet correctly, this should turn on 1 to 4 seconds after the main power light to show that it has an ip address and has made the dns lookup.

    The reset pin is a bit unnecessary now the watchdog timer is back up and running but it doesn't do any harm having it.

    I have also listed the adapter on TIndie at cost price with the aim of getting a few people to test them for me.

    https://www.tindie.com/products/ArthurGuy/beta-ethernetinternet-to-serial/

  • The code has been released

    Arthur Guy07/28/2014 at 18:17 0 comments

    I have released the code for the adapter, its nothing fancy but it does the job.

    https://github.com/ArthurGuy/Serial-to-Ethernet-Adapter

    If anyone has any helpful suggestions or comments please let me know.

  • The Watchdog Timer Returns

    Arthur Guy07/28/2014 at 18:14 0 comments

    After disabling the watchdog timer a few weeks ago for some long DHCP and DNS lookups I have carefully re added it.

    It is disabled for the DHCP and DNS setup process but for everything else it does its there making this a much more reliable device once again.

  • New Data Sending Option

    Arthur Guy07/26/2014 at 18:49 0 comments

    The adapter supports sending POST or GET requests and in the case of a post request the incoming string is passed through under the form parameter data.

    This has been fine but I have been working on a data collection system similar to Xively and data.sparkfun and I wanted a better way of encoding and sending data.

    I have now added the ability to send data in the POST body rather as a form style post, my current home automation project is using this feature to send a json payload directly to the server in the POST body

  • DNS Lookup Failures

    Arthur Guy07/19/2014 at 13:00 0 comments

    One downside of the ethercard library seems to be reliability or compatibility with some networks.
    The new firmware has been performing perfectly at home and at work but at Build Brighton (the local hackspace) it hasn't. The DHCP lookup is taking several seconds which means I need to disable the watchdog timer otherwise it resets before its setup.

    Once this completes it moves onto the DNS lookup, this was failing very regularly at Build Brighton so I am now overriding this with Googles DNS server which seems to have solved this problem.

  • Firmware Updates

    Arthur Guy07/18/2014 at 21:58 0 comments

    I have rewritten most of the software to use the ethercard library, this is a lot smaller and its also non blocking so the device is a lot more responsive.
    Its also allowed me to add a few extra features

View all 6 project logs

Enjoy this project?

Share

Discussions

Mark Sherman wrote 08/21/2014 at 05:22 point
Cool! I can't wait until this is done, because I want to ditch the wiznet module I'm usingin my project for a self-made network card. Then I will have a no-surface-mount completely hand soldered, self constructed internet-capable computer!

  Are you sure? yes | no

Adam Fabio wrote 07/22/2014 at 05:19 point
Thanks for entering The Hackaday Prize Arthur! I really can't wait to see this code! (non blocking? where do I sign up?)
Keep the updates rolling in, and don't forget about that first video - I'm sure you'll have an awesome demo setup for it!

  Are you sure? yes | no

Arthur Guy wrote 07/22/2014 at 10:05 point
Thanks, videos are already linked in the description but they aren't displaying properly. Not sure what else to do

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates