Jump to content

Internet-connected MSP430 Experimenter Board

Recommended Posts

I am working on building my own home automation system completely from scratch.


The first step is to have a MSP430 connected to the internet, and then from that MSP430, my plan is to have a bunch of devices communicating wirelessly. Essentially the MSP430 is to act as a "router" for other MSP430s which perform the actual automation tasks. I want to be able to control my home automation system from a remote location (like from sitting at my desk at work). This requires I have a TCP/IP connection to the router-MSP430, which in turn will have Bluetooth connections to all the other MSP430s.


Anyway, I started out with the Ethernet Boosterpack from this site. Mainly just for learning - I didn't expect that the G2553's 512 bytes of RAM were really enough for me to make a home automation controller. After that, I switched to the MSP430F5438 Experimenter Board, which has a massive 16KB of RAM (plus a lot of nice peripherals like LCD, buttons, speaker, microphone, and a joystick). I am now using the Wiz820io, which has the same W5200 chip as the Ethernet Boosterpack.


I have no idea how to do any of this stuff, so I am learning as I go. I also have my day job as an Linux Admin which takes up a lot of time when I'd prefer to be working on electronics instead. This makes my progress very slow. Nevertheless, this weekend I finally got my networking code working. Here is a video of the "operating system" I am making:



Here is my blog post with the source code to what I've done so far:

http://www.cashdollar.biz/2012/09/26/my ... he-msp430/

Link to post
Share on other sites
  • 3 weeks later...



I now have a working DHCP client I wrote on the MSP430, full UDP/TCP support, and some example code with a Daytime Client and Echo Server. I am using the MSP430F5438 Experimenter Board to develop this code.


Here is an detailed blog post on my progress with the BSD-licensed code you can download:

http://www.cashdollar.org/2012/10/17/dh ... completed/


This is using the Wiznet W5200 ethernet chip which is also used in the 43oh Ethernet Boosterpack, however my code uses too much RAM to work with the Launchpad. I probably could clean up my code and fit it on FRAM Fraunchpad Experimenter Board but it uses a different pinout than the Launchpad, so it isn't compatible with the Boosterpack.


I think I am going to take a break from this project for a while and play around with the Stellaris Launchpad which I just received.

Link to post
Share on other sites

The maximum size of a DHCP packet is 576 bytes per the RFC.


However, that is not really the problem. I made my code abstract so that the user just passes a pointer to some block of memory and my functions copy the data to the wiznet buffer and flush it out over the internet. I did it this way so that if I wanted to switch to wifi or a different ethernet chip in the future, I would not have to change the entire codebase. I would just add another driver function for the new device.


If you compare this to the Arduino W5100 ethernet and dhcp library, what they are doing is using the wiznet onboard memory buffers directly, to save memory. Of course then their code is littered with all sorts of wiznet-specific hackery. That is not really something I wanted since mine is supposed to be a more general "operating system" that I wouldn't have to keep rewriting. Their code does use less memory though.


In summary, my code works like this: 1) User allocates memory on stack or heap 2) user passes buffer pointer and size to networking functions 3) networking functions hide all the ugly wiznet details and push the data out.


Since I have written my own heap memory allocator, external memory chips should not be too difficult for me to add support for.


To actually answer your question: The amount of free memory should be at least the size of the data the user wants to send. (although there is nothing preventing them from calling send more than once if it is some graphic for a webserver or something like that)

Link to post
Share on other sites
  • 9 months later...
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...