Slashdot Mirror


Web Server On a Business Card

mollyhackit writes "We've seen tiny Web servers in the past, but rarely ones that are home-built. Here's a guide to building your own tiny web server with a footprint no larger than a business card. The design uses two major chips. One handles the SPI to MAC/PHY translation for the ethernet jack. The other chip is a PIC24F, which hosts a simple web server and reads files stored on a microSD card. All components run at a low 3.3 volts. Part of the compactness of the design comes from the PIC24F having programmable pins; only four jumper wires were needed. The single-sided SMD design is easy to manufacture at home. Part 1 covered many of the 24F's features and both posts have full code available."

46 of 169 comments (clear)

  1. If every a server was going to be slashdotted.... by JohnHegarty · · Score: 4, Funny

    If every a server was going to be slashdotted....

  2. As big as a business card eh? by bestinshow · · Score: 3, Insightful

    I'm glad I don't have any 1cm thick business cards in my wallet.

    1. Re:As big as a business card eh? by BadAnalogyGuy · · Score: 4, Funny

      I don't have any 1cm thick business cards

      Loser. I have hundreds!

    2. Re:As big as a business card eh? by Anonymous Coward · · Score: 5, Funny

      Is that a web server in your pocket sir, or are you just happy to see me?

    3. Re:As big as a business card eh? by gstoddart · · Score: 4, Informative

      I'm glad I don't have any 1cm thick business cards in my wallet.

      In fairness, he did say in the footprint of a business card.

      Yes, it's not the overall dimensions of a business card, but it's a pretty damned tiny thing for a web server.

      Cheers

      --
      Lost at C:>. Found at C.
    4. Re:As big as a business card eh? by Mister+Whirly · · Score: 3, Insightful

      Which makes one wonder - what would I ever need a web server the size of a business card? I appreciate efficiency and all, but honestly...

      --
      "But this one goes to 11!"
    5. Re:As big as a business card eh? by KGIII · · Score: 3, Insightful

      You know... I realize we're a bunch of geeks here but, really...

      This is the reason that I enjoy being geeky and, well, is why I am considered geeky. I hadn't seen that before and when I just read about it I was pretty much smiling like a little kid on Christmas morning. I have absolutely no need for something like that at this time. I probably don't have the patience to build it unless I had a need.

      That doesn't matter to me.

      It still made me smile, read the article, and imagine a small email gateway or something trivial for home use.

      I suppose it is like that for most of us here on /. though so anything more and I'd be preaching to the choir which would be even sillier considering the percentage of people here who are even geekier than I and probably will build one.

      --
      "So long and thanks for all the fish."
    6. Re:As big as a business card eh? by Profane+MuthaFucka · · Score: 5, Funny

      When I see a really good looking woman, I might want her. But, if the woman is really really good looking, I might say to myself "that's some really expensive pussy. Can I afford it?"

      Having a web server built right into my wallet is very convenient. I can check the balance without taking my wallet out of my pants. Smoothness counts in such situations.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    7. Re:As big as a business card eh? by gstoddart · · Score: 4, Insightful

      Which makes one wonder - what would I ever need a web server the size of a business card? I appreciate efficiency and all, but honestly...

      Why? Because he could, obviously. He really needs no better reason than that.

      Projects like this don't get done because the world is clamoring for a web server that has a foot print which is comparable to a business card. They get done because someone with the necessary skillset (or, who is developing the skillset) did it for practice/experience/fun. This is no different that the vast majority of open source projects -- someone did it because they wanted to.

      Sure, it's not something which is likely sale-able. But, if you were interviewing someone to do work in a related area, and their "resume" included a little wee web server like this, you'd have no doubt but that he knows what the hell he's doing. In some ways (likely that you and I can't quite imagine) he likely has advanced the state of the art.

      I know for a fact that I (and likely 90% or more of all Slashdotters) couldn't ever hope to do this. This isn't cool because of its utility, it's cool because it's novel, and, well, it's just plain old cool. That's the point.

      Cheers

      --
      Lost at C:>. Found at C.
    8. Re:As big as a business card eh? by Smidge204 · · Score: 2, Insightful

      How about embedded or remote applications? HTTP is a very simple and widely implemented data exchange protocol that would be useful for a variety of tasks.

      For example, the microcontroller could do other things such as data logging, save them to the SD card, and cough up the data on HTTP request. Many network attached devices (especially routers, printers and plotters) contain embedded web servers... why not something of your own creation?

      I've considered installing a microcontroller in my car (which predates real onboard computers) to monitor things like speeds, pressures and temperatures. An HTTP interface would be a handy way to display the data on nearly any device and/or download raw data files without putting my own data protocol together.
      =Smidge=

    9. Re:As big as a business card eh? by FiveDozenWhales · · Score: 2, Insightful

      I can imagine lots of situations in which I'd like to be able to take a web server in my pocket. Making a variety of files quickly available on a LAN without having to muck around with whatever file sharing is on the machines there, for one.

    10. Re:As big as a business card eh? by Smidge204 · · Score: 3, Interesting

      My car was exactly 0 processors in it. It has an AM-only radio which doesn't work, making the fuel gauge the most advanced piece of functional electronic equipment in the entire vehicle.

      For minimal impact, I would want it as small as possible with no moving parts. Using very little power is also a plus, since it would have to endure some pretty extreme environments (High humidity, High/Low temperatures) so it would go into a weatherproof enclosure - and heat becomes a concern.

      Something like this project would cost me under $50 to build, be small enough to mount inside the engine compartment (shortens and simplifies sensor wiring, no modification to the interior) and use very little power (no dead battery).

      I don't need a full PC to do the job, and such a thing would cost me at least $250 or so.
      =Smidge=

    11. Re:As big as a business card eh? by ToadMan8 · · Score: 3, Funny

      I can't understand why I'd want a daily-driver that can go 225 mph, but I value the technological pursuits of Formula 1 teams to come up with things that make normal cars lighter, faster, more efficient in a scale I can actually appreciate on a day-to-day basis.

      Ah! A car metaphor! I didn't even plan that.

      --
      I haven't posted in so long, my sig is out of date.
    12. Re:As big as a business card eh? by petermgreen · · Score: 2, Informative

      Does it run on an hearing aid batteries?
      I doubt it would run on hearing aid batteries. AA's would probablly work though. (this is just gut feeling though, check datasheets for more detailed info)

      If not, what's the size of the power brick?
      That probablly depends on what the person who built it had hanging arround.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    13. Re:As big as a business card eh? by Smidge204 · · Score: 2, Interesting

      You ------------------>

            The Point

      Even if interfacing with a manufacturer's computer was simple (doubtful), and even if said computer did everything I wanted (highly unlikely, then again I never actually said what I'd be doing so how would you know?) I think I'd still come out ahead financially by rolling my own. Considering the car ('64 Rambler) was recently restored and insured as a classic it's not something I'd be driving enough to worry about gas prices.

      Thanks for playing, though.
      =Smidge=

  3. Wireless Connectivity by Anonymous Coward · · Score: 2, Insightful

    Now if this could serve up pages wirelessly: hello future!

    1. Re:Wireless Connectivity by Flipao · · Score: 4, Interesting

      That's the thing isn't it.... what's the point of so much portability if you still need to plug wires into it.

    2. Re:Wireless Connectivity by somersault · · Score: 2, Interesting

      I haven't RTFA, but last time I saw an article like this it was for an extremely low power server, which only served a page once every 5 seconds or something crazy like that. Perhaps this server has a decent response time, but I'm assuming it will still be pathetic compared to a fully fledged server, or even just a mobile phone.

      As for the malware angle, what do you mean? I don't see the benefit in carrying around a microserver when you have a legion of zombies at your disposal (as most malware authors probably do) - zombies are harder to trace back to you than something that you are carrying around with you or have physically planted somewhere!

      --
      which is totally what she said
    3. Re:Wireless Connectivity by Fumus · · Score: 3, Funny

      You can use it as a ninja-camouflaged webserver hidden in your flower pot so that the police raiding your hideout will never find it?
      Dunno.

  4. Sure it sounds cool.... by iamwhoiamtoday · · Score: 3, Insightful

    but what's the real point? Anyone with a website that has any real traffic to it is going to need a more powerful server then that... this device is more of a "hey look guys, this is so cool" instead of a "hey boss, I found a way to cut spending on our new web server"

    1. Re:Sure it sounds cool.... by Alioth · · Score: 4, Insightful

      The real point is an embedded webserver can be used to provide easy, simple access to some embedded device using software that is shipped as standard on any PC or any smart phone. There are other uses for things that can speak HTTP than serving huge content-rich web pages. This particular device might not be terribly useful on its own but that's not to say similar devices aren't. There are lots and lots of applications for embedded devices that can host a tiny server of some kind.

    2. Re:Sure it sounds cool.... by 0100010001010011 · · Score: 4, Informative

      Add an RS-232 line or some Digital IO and you can now control your thermostat on your iPhone. Everything in your house could have a webserver. Setup a central polling computer using cURL and a MySQL database and track temperatures in every room of the house, or your refrigerator or ... anything in your house.

      Get a digital or serial water meter and monitor water usage from the road. Toss in a valve and be able to remotely shut off the water to your house if you know you're going to be out of town for business longer than expected.

      Smart Home devices are quite expensive and not very "open". A tinkerer could create their own smart home at the fraction of the cost.

      As a controls engineer I can just imagine tracking the temp in every room of my house with respect to outside temp and setting up a sweet PID controller on my thermostat to control temps much better than a single temp sensor in a central location in the house. Toss some flappers into the air ducts and you could probably set up a house to keep a temp +-5 degrees throughout the entire house.

    3. Re:Sure it sounds cool.... by Anonymous Coward · · Score: 2, Informative

      Indeed, that is exactly the point. Use this device to embed a web server in a larger device.

      Here is another device that can serve web pages but is arguably even more useful (and it is smaller). Instead of a PIC, it's a Virtex 4 FPGA with integrated PowerPC core. Obviously it runs Linux, but more importantly, you can put extra hardware in the FPGA, connecting Linux software to whatever other hardware you wish to use. This is very flexible, since you probably won't need any other electronics to make your embedded system.

    4. Re:Sure it sounds cool.... by torkus · · Score: 2, Insightful

      It's also $700 for the whole package. Even just the mini-module is $250.

      The board in the article is small and cheap enough that you could put them in out-of-the-way places and abandon them.

      --
      You can get rich if you own a politician, but you have to be rich to buy one in the first place.
    5. Re:Sure it sounds cool.... by Locutus · · Score: 3, Informative

      that's ~$200 bucks and unless you need it to be pretty small, there are other Linux capable boards which can do more/easier. Think Gumstix for small or even eBox for larger but x86 based.

      I think this /. thread is mostly about DIY, small, inexpensive, etc.

      LoB

      --
      "Anyone who stands out in the middle of a road looks like roadkill to me." --Linus
    6. Re:Sure it sounds cool.... by hey! · · Score: 2, Interesting

      Well, I think telemetry is much more interesting than control. Instead of just HTML, you could have various values stored in NV RAM accessed through something like RSS.

      For example, instead of developing some kind of special hardware, wiring and protocols to connect all the devices in your factory, you just run ethernet everywhere and slap one of these things on to all your machines. You then write a simple PERL script to fetch certain URIs from all the machines in the address range, storing performance data and relaying exception conditions (mill #5 can't change its cutting tool) to a pager.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  5. Might be actually useful... by Sasayaki · · Score: 2, Interesting

    I wonder. If these are cheap, small, low power and low heat, could one simply create a vast array of these then use one central server to direct each connection to one "server", with a traditional (LAMP etc) server taking up the excess if the number of units runs out?

    Sounds like a holiday project for me...

    --
    Check out my sci-fi book "Lacuna" at http://goo.gl/MVxX8
    1. Re:Might be actually useful... by SkunkPussy · · Score: 4, Funny

      This webserver would fit inside a medium sized LAMP...

      --
      SURELY NOT!!!!!
  6. Re:If every a server was going to be slashdotted.. by Flipao · · Score: 4, Funny

    I think he accidentally the whole server....

  7. Re:And this is news why? by Dr_Barnowl · · Score: 4, Informative

    So what does this one make it so special?

    You can etch the board yourself and make it at home from parts.

  8. Re:And this is news why? by basicio · · Score: 4, Funny

    "We've seen tiny Web servers in the past, but rarely ones that are home-built."

    You couldn't even bother to read the first sentence of the summary?

  9. Complicated project for beginners... by compumike · · Score: 2, Informative

    There's a lot going on here and it sounds like a neat project, but I just hope that beginners aren't misled. This is a complicated project and there's a lot of separate skills which would all have to be learned at once: masking/etching PCBs, fine-pitch SMT soldering, lots of pieces of code that all have to play together right.

    Just hoping that newbies will realize that there are simpler electronics projects (relevant shameless plug) with much more instructional guidance they should start with before taking on something like this.

    --
    Hey code monkey... learn electronics! Powerful microcontroller kits for the digital generation.

    1. Re:Complicated project for beginners... by Alioth · · Score: 2, Informative

      I would say start out simpler than you did. I started a self-directed Learn Electronics course - i.e what I did is get a pile of components and some breadboard, and do stuff with them to learn.

      I started with transistors, resistors, diodes etc. - building logic gates and latches with bipolar transistors, building LED flashers from discrete components rather than a uC and code, then building simple switch mode power supplies to investigate inductors. I then started doing things with 74 series and 4000 series logic. I then combined this knowledge to design and build a 7 tube nixie display of my own design, that took its data via RS232 - all implemented in 'little logic' with not a microcontroller in sight. I didn't do it because it was the BEST way to do it, but because it would provide lots of learning. I had to build an SMPS to make the 170 volts. I had to, with 4000 series logic and a 555, make a UART (it's bidirectional), with all that implies. The nixie display has buttons I can push to send stuff back. (My second nixie project did use a microcontroller, an Atmel ATtiny2313).

      I found doing it this way (not jumping straight in with microcontrollers) extremely valuable. The nixie project in particular taught me about all sorts of things, including glitches, timing issues, fan out and all the rest, as well as resulting in a really cool looking piece of strip board encrusted in chips. (The display now happily sits showing NTP synchronized time on top of my computer desk and has been in continuous use for about 18 months). The trouble with jumping straight in with microcontrollers is (from what I've seen on electronics forums) is quite a few hobbyists get into quite a complex software design and get confused by the electronics issues, and end up spending ages debugging the software when it was a hardware problem all along - a hardware problem that would have been more obvious if they'd played around a bit with discrete MOSFETs and 74 series logic.

      My extensive experimentation with making stuff from 74-series and 4000-series also helped me a lot when I got into using programmable logic.

  10. best first every! by Anonymous Coward · · Score: 5, Funny

    best first every!

  11. Sure it sounds cool/hot. by Ostracus · · Score: 4, Funny

    "As a controls engineer I can just imagine tracking the temp in every room of my house with respect to outside temp and setting up a sweet PID controller on my thermostat to control temps much better than a single temp sensor in a central location in the house. Toss some flappers into the air ducts and you could probably set up a house to keep a temp +-5 degrees throughout the entire house."

    Or I could buy a programmable thermostat that does all that.

    --
    Shai Schticks:"You don't make peace with friends, you make peace with enemies"
    1. Re:Sure it sounds cool/hot. by 0100010001010011 · · Score: 2, Insightful

      I have a programmable thermostat. It has 1 temp sensor located in the main hallway. This is no way indicative of temperature in my back bedroom or in the basement. There is no controls output for commercial HVAC duct flaps to direct flow.

      The PID controller in it is on the 'safe' side. I'm sure the gain and phase margins are huge because you never know where it's going to be installed. They probably have quite a large hysteresis band to keep from always burning fuel. I could design a controller that was specific to my house. That kept the wife's study +5 degrees warmer than other rooms without burning too much extra fuel.

      Again, I have a controls concentration BSME. I do this for my job (although on much much different types of systems, with response times in the milliseconds not minutes range).

    2. Re:Sure it sounds cool/hot. by 0100010001010011 · · Score: 2, Funny

      Probably not in the least. Probably just a on off with some built in hysteresis. Exactly the reason to do something like this.

      Now... where did I put that Matlab 2008b CD. Simulink and XPC to control a 1700 sq.ft. house a bit over kill? :)

  12. Re:If every a server was going to be slashdotted.. by Big+Nothing · · Score: 3, Funny

    I don't understand this obsession with making things smaller and smaller - I want my stuff to be bigger and bigger. For example, I have my web server inside an old Cray Y-MP shell (not with original hardware, mind you). Then again, I live in an old church and have plenty of room to spare...

    --
    SIG: TAKE OFF EVERY 'CAPTAIN'!!
  13. Re:And this is news why? by sryx · · Score: 3, Insightful

    The web servers you linked to all require an intervening computer to actual connect them to a network (the first one seems to be WAMP on a USB drive, as it requires a copy of Windows to run). They are "web servers" in the same way that Apache is a "web server". This device is totally self contained, requiring only power and a Ethernet cable. And damn impressive. It might be clearer to refer to this as a really small "web serving computer", the Sun article would still take the cake as the smallest web server in my book, but then this one wins because of it's ease of implementation. As a side scary note, image a tiny bit more power and a second Ethernet jack on this thing. Yo cold set it up to sit as a proxy for a real production web server adding a few lines of malicious JavaScript to any outgoing HTML page. A device that small, with that purpose, would likely go undetected by most competent server administrators. Kinda makes those keyboard loggers seem tame.
    -Jason

  14. Re:If every a server was going to be slashdotted.. by fahrbot-bot · · Score: 2, Funny

    I have my web server inside an old Cray Y-MP shell...

    Or a Cray-2 with little plastic fish floating around, but the Fluorinert would probably bankrupt you :-)

    --
    It must have been something you assimilated. . . .
  15. Re:If every a server was going to be slashdotted.. by Deagol · · Score: 3, Funny

    Did you take out the pews to make room for the garbage?

  16. Debate by Nerdposeur · · Score: 3, Funny

    Geek 1: "I won't be satisfied until I need an electron microscope to see my web server!"

    Geek 2: "I won't be satisfied until I need a crane to plug in my web server!"

  17. Re:If every a server was going to be slashdotted.. by Amarok.Org · · Score: 5, Funny

    Or a Cray-2 with little plastic fish

    Would that make them Cray-fish?

    --
    -- "Other than that, how was the play Mrs. Lincoln?"
  18. Re:If every a server was going to be slashdotted.. by MillionthMonkey · · Score: 2, Funny

    Can you fit an ENIAC in that church?

  19. Could you imagine... by LaminatorX · · Score: 3, Funny

    ...a Rolidex Cluster of these?

  20. that explains it by commodoresloat · · Score: 2, Informative

    That explains why I never get laid. I guess I need to get me one of these web servers right away!