Pages: [1]   Go Down
Author Topic: Simplest/Cheapest Microcontroller with Native IP (Internet Protocol)  (Read 1194 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
FOSS Hack
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

*Warning: Author is a noob.* I'm trying to design a distributed system of sensors and simple electromechanical controls. Though there are obviously plenty of communications protocols, both free-and-open and proprietary, commonly used in industrial systems and sensor nets, I would prefer to use the more complex but common UDP and/or TCP over IP.

My issue is that while there are numerous shields, breakout boards and a few semi-integrated Arduino boards that have IP over 802.2/11 capability, these are relatively expensive. I'm trying to find microcontrollers that have integrated IP IO that are cheap enough to buy by the dozen. I am certainly open to other Layer1/2 implementations besides Ethernet over UTP; however, Ethernet is ideal because of the ready availability of everything from Cat5E to cheap unmanaged PoE switches.

- Manage 1 Analog Sensor
- Manage 1 Relay/Motor Control
- Prefer integrated PoE (802.3af)

Basically, I'm looking for an Ethernet transciever with limited microcontroller-like capabilities. Any guidance on what is available and how to narrow my search?
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 249
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Enc28j60 modules are < $4 in small quantities:
http://www.aliexpress.com/item/5PCS-ENC28J60-Ethernet-LAN-Network-Module-ENC28J60-For-51-AVR-STM32-ForArduino-LPC-learning-tool-Network/1028067803.html
Logged

Unthinking respect for authority is the greatest enemy of truth - Einstein.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6747
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
- Prefer integrated PoE (802.3af)
Right now, the cost of PoE is much higher than the cost of ethernet chips themselves. (!$7-10 for a PoE module, ~$5 for an Enc28j60 module or wiznet chip.)

There are relatively few "microcontrollers" with ethernet completely built-in, but I gather that you'd accept a board-level solution?
The only micros I know of with "built-in" IP are a couple from Wiznet, essentially incorporating their intelligent controller and a cpu on the same chip (they have an 8051 version, and an ARM CM3 version.)

Most microcontrollers have serial interfaces, and could run IP over SLIP or async PPP to a suitable router.

The 32k of program memory on an Uno-class processor is pretty tight for implementing a reasonable TCP/IP implementation AND a user program that uses it (that's why the official ethernet shield uses a smart ethernet chip.)  Typical internet applications tend to be pretty large as well, if only in the amount of data that they expect to deal with.

It's pretty sad.  :-(

At a systems level, the cheapest solution is probably to put custom software on one of the cheap mass-produced routers.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
FOSS Hack
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Thanks. These are a great price, but they require a microcontroller and in IP stack. I was hoping to find something with an integrated CPU, MAC, PHY and a few IO pins.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
FOSS Hack
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Right now, the cost of PoE is much higher than the cost of ethernet chips themselves. (!$7-10 for a PoE module, ~$5 for an Enc28j60 module or wiznet chip.)
I did not know that, but since PoE seems to be almost entirely marketed at the "enterprise" (aka cost-insensitive) market, it makes sense.

Quote
There are relatively few "microcontrollers" with ethernet completely built-in, but I gather that you'd accept a board-level solution?
The only micros I know of with "built-in" IP are a couple from Wiznet, essentially incorporating their intelligent controller and a cpu on the same chip (they have an 8051 version, and an ARM CM3 version.)
That is the solution I had been leaning towards. It just seems excessively expensive at the consumer level. For $20-25 for a controller board and $25 for the WizNet board and $5-15 for sensor/relay/controller and other bits, that is $50-75 per node. I can find hundreds of used Android phones/tablets with backlit LCDs, cameras, USB, 2-3 separate radios (wifi, bluetooth, cell), huge flash, integrated batteries and charging, etc. for the same price. Obviously, these are not for customization or prototyping, but the disparity is painful.

Quote
Most microcontrollers have serial interfaces, and could run IP over SLIP or async PPP to a suitable router.
I had though of that. The router side should be easy enough, but I'm unsure about the node IP stack. For me the major attraction of IP is that it is extremely widely implemented and very easy to develop for. Any sort of non-IP physical layer introduces translation layers that seem to make development and maintenence more challenging. Expecially since I am tremendously more familiar with IP communications than anything else.

Quote
The 32k of program memory on an Uno-class processor is pretty tight for implementing a reasonable TCP/IP implementation AND a user program that uses it (that's why the official ethernet shield uses a smart ethernet chip.)  Typical internet applications tend to be pretty large as well, if only in the amount of data that they expect to deal with.

All I care about is getting simple data out and commands in. At most a couple of thousand SLOC. No UI to speak of, more along the lines of a really basic SNMPv1 implementation. Even encryption is a low priority and I have no minimum bitrate requirements beyond that necessary to prevent timeouts by upstream devices. Info vaguely related here: http://tools.ietf.org/html/draft-hamid-6lowpan-snmp-optimizations-03#page-15. It won't fit in 32k, but I just built tinysnmp https://github.com/segfault87/tinysnmp/blob/master/INSTALL using `clang -0s` on an x86-64 box and it ended up being 53325 bytes. And that is will all security functionality enabled. Stripping the openssl and gcrypto related code and it will be quite tiny. Expecially compiled for a microcontroller not a Core i3. smiley

Quote
It's pretty sad.  :-(
I wholly second that sentiment.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1848
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are talking wired ethernet, there is always the Rasberry Pi model B for $35.  It has a wired ethernet port, runs Linux which comes with a full network stack, and can access the GPIO pins to run sensors.  It is programmed completely differently than an Arduino, and you would probably get more information from http://www.raspberrypi.org about the capabilities, and such.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6747
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
For $20-25 for a controller board and $25 for the WizNet board and $5-15 for sensor/relay/controller and other bits, that is $50-75 per node.
I had in mind the all-in-one module/chips like the W7100 and W7200.  I don't know of any low-cost boards, though.

Quote
The [SLIP/PPP] router side should be easy enough
Don't forget about the added cost.  Serial-equipped routers tend to be more expensive per port than ethernet :-(

Quote
but I'm unsure about the node IP stack.   Any sort of non-IP physical layer introduces translation layers...
IP is a network layer, not a physical layer.  SLIP or PPP is a link-level protocol that runs underneath IP, so you'd still have all of the IP (and up) layers; SLIP/PPP essentially replaces the ethernet drivers.

Quote
more along the lines of a really basic SNMPv1 implementation.
I have never seen a "small" snmp.  The 32k has to support your app, PLUS all the tcp/ip/link/physical drivers.   The 76-line "UDPSendReceiveString" example for Arduino is about 10k bytes of code, even though it's using a chip that does the IP/UDP for you.  If you use a lower-level chip that needs to implement arp/dhcp/ip/udp/etc, 32k is pretty much gone before you start.

Quote
I just built tinysnmp https://github.com/segfault87/tinysnmp/blob/master/INSTALL using `clang -0s` on an x86-64 box and it ended up being 53325 bytes.
Statically linked with all the necessary default libraries?

I think the most promising thing I've seen was the Stellaris Ethernet/Serial "eval module" ( http://www.ti.com/tool/rdk-s2e )
Reasonably powerful and tiny CM3 CPU with built-in ethernet (incuding PHY)  But TI deprecated the whole Stellaris product line, and has not yet introduced a replacement ethernet-capable part :-(

There are a bunch of processor chips with built-in radio transceivers of various sorts, which is sort-of interesting, but they tend not to implement IP stacks (BT, BTLE, Zigbee, ANT, etc, etc, etc.  All of which have in common that they don't directly gateway to IP infrastructure :-( )  Note that these are typically chips with 128k to 256k of flash, and IT'S ALL USED UP by the network stacks that are frequently packaged with them.  And/or they don't let them be used programmed.  The TI CC3000 module is attractive, and does WIFI/IP/TCP (!), but ...  Radio is also a nightmare from a regulation point of view :-(
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1790
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My issue is that while there are numerous shields, breakout boards and a few semi-integrated Arduino boards that have IP over 802.2/11 capability, these are relatively expensive. I'm trying to find microcontrollers that have integrated IP IO that are cheap enough to buy by the dozen.

So, NXP has an offering in the AN11053 and freescale has the MFC52233.  The freescale appeals to me, but the demo board is still $99.  Both NXP and freescale identify their offering listed above as microcontrollers, but freescale also has a line of microprocessors for systems.
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=M52233DEMO

It would appear that if you are going for dozens of nodes that you will probably need a development environment that is well supported by the manufacturer.  So, you are going to have to "eat" this cost.  The bigger concern is production costs and that is going to translate to parts since board costs will generally be the same for the same complexity - that is, the board is a common cost or a cost of doing business!  Only you know the end production requirements and number of production runs you forecast, so the research is going to have to be something you (or a colleague) is intimately involved.   IMO


Ray
Logged

Alamos, Sonora, Mexico
Offline Offline
Full Member
***
Karma: 5
Posts: 133
learning never stops.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps you could look at the BeagleBoard Black? Completely different than  Arduino (runs Linus, uses Java for programming). However, it uses the same Ti chip (Sitara) that the TRE has adopted.
Logged

Quiero una vida simple en Mexico...nada mas.

Offline Offline
Full Member
***
Karma: 3
Posts: 249
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps you could look at the BeagleBoard Black? Completely different than  Arduino (runs Linus, uses Java for programming). However, it uses the same Ti chip (Sitara) that the TRE has adopted.
You can easily write programs in C/C++ under Linux; the Linux kernel is written in C.

Logged

Unthinking respect for authority is the greatest enemy of truth - Einstein.

Pages: [1]   Go Up
Jump to: