Ethernet challenge
Dr_Acula
Posts: 5,484
How low can the cost be for a propeller ethernet server?
Wired connection (not wifi) and we want to detect a switch being on or off. Upload to a web server. No complex web page needed so no SD card required.
Ok, start with some industrial controllers - there are quite a few that are perfect for the job... and cost $500-$600 each.
We can do this with a PC. Or a laptop/netbook. But this takes power/space and it would be silly to keep a PC running to detect if the fridge light stays on *grin*
Arduino? Can we mention it here? Super simple setup with a one page tutorial http://arduino.cc/en/Tutorial/WebServer If we buy this on the arduino site it is maybe $60-$70. Shop around on ebay and you can get the board plus the ethernet shield including shipping for as low as $32. So lets set this as the price to beat.
Ethernet has got cheaper. Wiznet seems to be $10-$20. ENC28J60 boards have come down more - $3.90 for a board including shipping http://www.ebay.com.au/itm/Mini-ENC28J60-Ethernet-LAN-Network-Module-For-51-AVR-STM32-LPC-2014-/281282799394?pt=AU_B_I_Electrical_Test_Equipment&hash=item417dc2e722&_uhb=1
Gadget Gangster have a board with the DIP version of the chip http://gadgetgangster.com/find-a-project/56?projectnum=349
So... propeller $8, sundry xtal caps etc maybe say $16 and a $3.90 board, and with 10+PCBs low as $5 or less, it should be possible to get the price under $32.
Software - there is a driver on the obex but the link to Harrison Pham's site appears to be broken http://obex.parallax.com/object/222
Could the propeller be the cheapest web server? Are there other options?
Wired connection (not wifi) and we want to detect a switch being on or off. Upload to a web server. No complex web page needed so no SD card required.
Ok, start with some industrial controllers - there are quite a few that are perfect for the job... and cost $500-$600 each.
We can do this with a PC. Or a laptop/netbook. But this takes power/space and it would be silly to keep a PC running to detect if the fridge light stays on *grin*
Arduino? Can we mention it here? Super simple setup with a one page tutorial http://arduino.cc/en/Tutorial/WebServer If we buy this on the arduino site it is maybe $60-$70. Shop around on ebay and you can get the board plus the ethernet shield including shipping for as low as $32. So lets set this as the price to beat.
Ethernet has got cheaper. Wiznet seems to be $10-$20. ENC28J60 boards have come down more - $3.90 for a board including shipping http://www.ebay.com.au/itm/Mini-ENC28J60-Ethernet-LAN-Network-Module-For-51-AVR-STM32-LPC-2014-/281282799394?pt=AU_B_I_Electrical_Test_Equipment&hash=item417dc2e722&_uhb=1
Gadget Gangster have a board with the DIP version of the chip http://gadgetgangster.com/find-a-project/56?projectnum=349
So... propeller $8, sundry xtal caps etc maybe say $16 and a $3.90 board, and with 10+PCBs low as $5 or less, it should be possible to get the price under $32.
Software - there is a driver on the obex but the link to Harrison Pham's site appears to be broken http://obex.parallax.com/object/222
Could the propeller be the cheapest web server? Are there other options?
Comments
Get a spinnertte, load Tachyon and Extend.fth: FTP, HTTP, Telnet included. Plus you get all the source
Job done, next
The Spinneret uses the older W5100 chip but I am using the W5200 with the Prop and am running a very nice WEB/FTP/TELNET serve along with multiple FAT32 file and virtual memory. I will be upgrading to the W5500 and WIZnet have an inexpensive module for this but I will be making up a minimal PCB to show off the Wiznet and Parallax chips. When P2 is available then I will also have that too.
I am looking at using the serial and an I/O pin for reset to interface to the prop. Has Ethernet, WiFi and USB.
I forgot too that I had already designed an Ethernet node pcb to fit in a small case with 8 inputs or outputs when basically mostly just needs to read smoke alarms etc. I will take another look at that project and see about some PCBs. The W5500 costs around $4, add a magjack and a Prop etc and there you go.
Spinneret has quite a few real world pins. The $32 arduino combo also has quite a few pins, and has an advantage to the propeller in that those can be A to D pins (I see on another thread the new prop chip will have these too).
@Peter, I like that. Once the cost comes down to tens of dollars or less, it becomes possible to automate all sorts of things.
One technical question - some of the sites I looked at mention MAC addresses. They say that if you have one device just use a generic address. But with multiple devices, they say you have to pay someone. How does that work? If you built two boards and they had the same MAC address but different IP addresses would there be problems?
Controlling and monitoring stuff over the internet with a propeller has been done many times over. See the Spinneret forum or Peter's work.
As for component costs, just do a little internet surfing.
P8X32A $4.67
ENC28J60 $2.11
Magjack $2.42
24AA02E48 $0.21
I buy them in 1000 quantities so I get a good discount and the BOM for the whole PCB is ~$10
The EEPROM from microchip has a preprogrammed unique MAC address. It is much easier to handle than to program a different file to each EEPROM manually. The "thumper" internet radio project comes with a full TCP/IP stack and HTML server source code plus driver for the ENC28J60.
As mentioned there is the 24AA02E48 EEPROM with MAC address solution (in addition to the Prop's EEPROM) but I am using an MCP79411 RTC with MAC address or simply generating a 32-bit random number on the first cold start and then appending an unused OUI of $02FFxx to complete the MAC address. These parameters and others currently assume you are using a 64KB EEPROM and uses the top of that to maintain this. I will make my pcb available as soon as I prototype it but the server and file software work really well. I can even talk to Forth over Telnet and write code etc.
http://www.ti.com/tool/ek-tm4c1294xl
I got one recently. It was very easy to get it on-line with the demo software.
This is all you need http://tibbo.com/products/modules/minimo/em500.html
They are very easy to program and reliable.
... for a switch detection ... when I say all it means all, no propeller needed at all.
For higher requirements I found them to be a nice complement to the prop.
http://www.mouser.com/ProductDetail/Micrel/KSZ8081RNDCA-TR/?qs=sGAEpiMZZMuXKgZRMPEonetHRE70qVWI%252buOhwc2oVl4%3d
SPI version if Prop1 can not handling doing the mac:
http://www.mouser.com/ProductDetail/Micrel/KSZ8851SNLI-TR/?qs=sGAEpiMZZMuXKgZRMPEonetHRE70qVWIQXQkVWA38WQ%3d
DIR505L is like RPI in that its a full blown linux system, but adds ethernet AND wifi, and cost $25 - $35 US, in a nice plastic case.
We can pop off the power board (the part with the wall plugs) and I THINK we can hook it up to those cheap USB power bank and run all afternoon. But I did n't get that far yet.
If one talks sysnchronous serial from DIR505L (or any linux) communication os about clock speed on the prop. Bonus is that since we have to write the serial driver on both sides anyway, we can ensure that the comms are done right (whatever we decide at the time).
If wifi in not mandatory it might not be the cheapest solution.
HC05 allows communication to the command line via bluetooth using a smart phone.
My plan it to run off the USB powerbank, but plug into a wall outlet for recharging. Code is not posted yet.