Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Hardware Hacking Build Hardware

Web Server On a Business Card 169

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."
This discussion has been archived. No new comments can be posted.

Web Server On a Business Card

Comments Filter:
  • by JohnHegarty ( 453016 ) on Friday September 26, 2008 @10:04AM (#25165381) Homepage

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

  • by bestinshow ( 985111 ) on Friday September 26, 2008 @10:05AM (#25165397)

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

    • by BadAnalogyGuy ( 945258 ) <BadAnalogyGuy@gmail.com> on Friday September 26, 2008 @10:10AM (#25165463)

      I don't have any 1cm thick business cards

      Loser. I have hundreds!

    • by Anonymous Coward on Friday September 26, 2008 @10:24AM (#25165677)

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

    • by gstoddart ( 321705 ) on Friday September 26, 2008 @10:32AM (#25165823) Homepage

      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

      • by Mister Whirly ( 964219 ) on Friday September 26, 2008 @10:45AM (#25166037) Homepage
        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...
        • 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.

        • by gstoddart ( 321705 ) on Friday September 26, 2008 @10:57AM (#25166223) Homepage

          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

          • I didn't ask why he did it. That answer is obvious. I asked what would the need be for actually using the device. I was hoping for something more creative, like running a web hosting business out of one of those Japanese "drawer-style" hotels.
            • by Amouth ( 879122 )

              if i had some of these that where POE then i know places at locations i could hide them.. rather than be a webserver i would use it to run other services. could be useful to have a device which you plug in that would run and map the network connected to it.. then phone home and deliver results..

              not that i would use it without permission - but rather something small and cheap i could put some place and let it monitor things and report back

              • why don't you build some then, afaict he has made the complete design available.

                You may want to get the board made commercially if you don't fancy nasty chemical stuff but the build should be pretty easy.

            • I didn't ask why he did it. That answer is obvious. I asked what would the need be for actually using the device.

              Ah, I see your problem. You're assuming utility.

              There is none. The need for using the device is zero. It's not a toaster or a TV, it's a work of art. It exists merely to have people admire it.

              A large percentage of elegant hacks and beautiful bits of mathematics exist for the same reason. Not because they fill some immediate need. Simply for the beauty of it.

              Granted, someone somewhere down the line will usually figure out some practical application of some beautiful piece of abstract thought or a

          • There isn't really anything that difficult here, the TCP/IP stack and basic webserver code is afaict provided by microchip, I think they also provide some stuff for working with SD cards. The components are all in nice big packages.

        • Re: (Score:3, Insightful)

          by Smidge204 ( 605297 )

          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

          • For a car you could have one 10 times the size of a business card, and build it cheaper because of that fact. There are already plenty of processors in cars. Cars are big and have lots of room for electronics.
            • by Smidge204 ( 605297 ) on Friday September 26, 2008 @11:59AM (#25167135) Journal

              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=

              • 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.

                You just might find it more economical, and better for your bottom line, to buy a car that's been built at some point in the last 30 years, then. Browse the classifieds in your local paper. It's almost certain that you'll find something which has a computer already, which does what you're looking to have it do, for under $10

                • Re: (Score:2, Interesting)

                  by Smidge204 ( 605297 )

                  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

        • Re: (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.
        • by ToadMan8 ( 521480 ) on Friday September 26, 2008 @12:00PM (#25167163)
          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've seen a couple of automated industrial systems and applications that make use of a webserver to operate, interfacing via Ethernet with the robot/crane/etc. These, of course, need a full workstation, OS and all, in which to install the application.

          A pocket webserver, with replacable code thanks to the SDcard, would be ideal to get rid of the workstation, making the system easier to mantain (no dealings with OS errors) and repair (just switch a malfunctioning "web-card" with a new one, using the same SDm

      • by KGIII ( 973947 ) * <uninvolved@outlook.com> on Friday September 26, 2008 @10:46AM (#25166049) Journal

        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.

      • by arth1 ( 260657 )

        Does it run on an hearing aid batteries?
        If not, what's the size of the power brick?

        • Re: (Score:3, Informative)

          by petermgreen ( 876956 )

          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.

        • Does it run on an hearing aid batteries?

          The version posted in TFA doesn't. It's got a DC power connector in the picture. That said, according to TFA, it runs on 3.3V and there's some empty space on the PCB. You could use some of that dead space and solder on a cell connector for a CR2032 or CR2450 if you wanted. Using a CR2032 wouldn't give as much life as a 2450, but wouldn't change the outside dimensions of the device much, either (the 1cm thick is for the ethernet connector). The real question is how lon

      • by HTH NE1 ( 675604 )

        Let me know when we can make a computer with a holographic interface the size of an American Express card.

        We already have projectile weapons the size of key-fob garage door remotes.

    • The footprint of a business card, not the thickness of one. RTFS
  • by Anonymous Coward

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

    • by Flipao ( 903929 ) on Friday September 26, 2008 @10:22AM (#25165651)
      That's the thing isn't it.... what's the point of so much portability if you still need to plug wires into it.
      • by Alioth ( 221270 )

        There's plenty of use for wired embedded devices, such as for sensors, where you may have many of them and don't want to be continously changing batteries. Add power-over-ethernet and this class of device is very useful for all sorts of embedded things where you don't want to have the device battery powered.

      • by Fumus ( 1258966 ) on Friday September 26, 2008 @12:05PM (#25167269)
        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.
    • I'm sure any smartphone could work well as a web server, and it would have wireless :) The only thing stopping this kind of future for the last few years (okay so mobile webservers are utterly pointless, but mobile browsing is extremely useful) seems to be greedy telcos.

      • by KGIII ( 973947 ) *

        Just a stab in the dark but it would seem likely to me that the very first uses of a mobile server this small would be phishing and malware dispensing. Human nature and all that...

        • Re: (Score:3, Interesting)

          by somersault ( 912633 )

          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 proba

          • by KGIII ( 973947 ) *

            Making more zombies as you walk down the street being a fake access point or the likes. (That's what I was thinking at any rate when I typed the post.)

  • by iamwhoiamtoday ( 1177507 ) on Friday September 26, 2008 @10:10AM (#25165465)
    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"
    • by Alioth ( 221270 ) <no@spam> on Friday September 26, 2008 @10:16AM (#25165545) Journal

      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.

      • Re: (Score:2, Informative)

        by Anonymous Coward

        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 [avnet.com] (and it is smaller). Instead of a PIC, it's a Virtex 4 FPGA with integrated PowerPC core. Obviously it runs Linux [jwhitham.org.uk], 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 embe

        • Re: (Score:3, Insightful)

          by torkus ( 1133985 )

          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.

        • by JesseL ( 107722 )

          And then if you don't need to add tat much capability, the Lantronix X-port [lantronix.com] modules are nice. Very handy when you want to add web functionality to something with a simple serial interface or simple i/o.

        • by Locutus ( 9039 ) on Friday September 26, 2008 @12:55PM (#25167951)

          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

      • Re: (Score:3, Interesting)

        by hey! ( 33014 )
        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 da
    • by 0100010001010011 ( 652467 ) on Friday September 26, 2008 @10:29AM (#25165763)

      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.

      • by knewter ( 62953 )

        w/r/t smart home software, hope you've seen http://www.linuxmce.org./ [www.linuxmce.org] I've got a weak linuxmce setup in my home, and it's very nice. Someone with any money at all could have a badass system orders of magnitude cheaper than any other way.

      • by Ostracus ( 1354233 ) on Friday September 26, 2008 @10:44AM (#25166019) Journal

        "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.

        • A commercial device is nowhere near as flexible as a DIY. And it's not as fun.

        • Re: (Score:3, 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 spec

          • Does it even do proper PID control? I have only ever seen on/off thermostats, but I haven't looked that much.

            • Re: (Score:3, 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? :)

          • I wouldn't have thought they would use anything as fancy as a PID controller. Just a simple on-off switching control with a reasonablly wide hystersis band so the heater isn't switching on and off all the time.

    • There's lots of applications for little http servers that have nothing to do with "websites".

      Stick this server as the "upstream" of a wireless access point, and you've got a cheap throwdown local information server for a business without opening yourself up to wardrivers.

      If you have a phone with a SD card and a camera, you can take some pictures then use this to post them on a LAN.

      YOu can plug this in when your regular server is down for some reason.

      If you're concerned about theft, something like this is ea

      • Stick this server as the "upstream" of a wireless access point, and you've got a cheap throwdown local information server for a business without opening yourself up to wardrivers.
        Wouldn't a linksys WRTSL54GS (basically a wrt54g with a USB port) running openwrt and serving files off a USB stick be an easier and neater soloution?

        • Wouldn't a linksys WRTSL54GS (basically a wrt54g with a USB port) running openwrt and serving files off a USB stick be an easier and neater soloution?

          It's a different solution, certainly. In a lot of circumstances it's superior, and if you have static files you wouldn't even need the USB port. On the other hand, if you already have the WAP (or WAPs), particularly if you've got multiple locations already set up and an existing inventory of devices...?

          There are also existing mini-servers like the Gumstix devi

      • by torkus ( 1133985 )

        What i want to see is a webcam that snaps pictures (or video but probably getting too heavy for the PIC and t-flash card and this can host them. Would make a handy, cheap, and pseudo-throwaway security setup.

        • I'm not sure that a PIC could handle that(most critically, I don't think that PICs with USB host controllers are all that common). Somewhat more expensive, but a lot more practical for your proposed purpose, would be an NSLU2:

          http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam [nslu2-linux.org]
        • by argent ( 18001 )

          That one would probably not be useful here, since it wouldn't have shared access to the flash card, but web cameras are definitely another application for this general type of webserver.

    • I wouldn't stick this in a server cage, but I most certainly would stick it in a small device or home-automation project where a full-sized computer is either not practical, or not feasible.

      This kit is a very cheap, extensible platform that one can build upon. I could see these being used as front-ends for other PIC devices.

    • by Locutus ( 9039 )

      using that logic, why would you want a stove in your house when there's a professional cook and good food down the street at the restaurant? Believe it or not, there are many cases where only one or a couple of dozen users would hit a web server.

      There might be a serial port device in a medical lab which would be much easier to check on if there was a small web server attached to the port. A school robotics class or even a home garage door position indicator. Would you want to slap and Alien box on any of th

  • 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...

  • There's quite a bit of small scale ethernet stuff available - my favorite chip at the moment for handling ethernet is Wiznet's tiny W5100 (or its bigger brother the W5300). These contain not only an ethernet MAC/PHY but a TCP offload engine, so your microcontroller can get on with whatever job it needs to and only deal with the higher levels of the protocol - meaning the software on your microcontroller can be simpler and spend more of its time dealing with whatever task you're using it for. The W5100 is in

    • The W5100 is in a 0.4mm pitch LQFP-80
      If you like that chip you are either much better at soldering than me or can afford the cost and time of getting boards made commercially.

  • by compumike ( 454538 ) on Friday September 26, 2008 @10:39AM (#25165921) Homepage

    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 [nerdkits.com] (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. [nerdkits.com]

    • Well, seems like your projects are aimed more for the 12-year old kids than this. The project they're talking about in the article is obviously not meant for people who don't really know what a MCU is, and I doubt that anyone would mistake it as such.
    • Re: (Score:3, Informative)

      by Alioth ( 221270 )

      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

      • by Nethead ( 1563 )

        Nice project! Two books to recommend for the beginner are:

        Don Lancaster, "TTL Cookbook", Howard W. Sams and Co., Indianapolis, 1975, ISBN 0-672-21035-5
        and his CMOS cookbook (also by Sams). They are old but will give one an excellent feel for how logic 'legos' can be glommed together.

        Also his "Active Filter Cookbook" is great if you want to play with analog signals.

        I started out with a perfboard, 9v battery, 7805, a pile of 74xx chips and actually learned enough to put a 6502 based computer board into prod

    • I wouldn't call the 1.27mm pitch of SOIC fine pitch. Getting the first couple of pads done can be a bit of a pain but after that it's pretty much as easy as DIP (yes dip is a wider pitch but the very large pads needed for a through hole pin mean the gaps aren't much wider)

      But yeah in general I agree, this is a reasonablly high level project, especially if you want to make the PCB yourself.

  • You should have IPv6 address and connectivity on them. China already is running out of IPv4 addresses for gods sake.

  • This sounds like a really good reason to remember to take my wallet out of my pants before I run them through the washer.
  • About 8 years ago I was running a webservers on a smartcard CPU's (both Javacard and Microsoft's discontinued .Net card). It's the size of the chip on that SIM card you use in your GSM phone (which is also a smartcard). Smaller and thinner than a US dime. These don't typically have ethernet ports but they do have USB.

  • I used a similar PIC chip and the little I2C ethernet controller for a similar design to control my outside xmas lights.

    It was a little bigger than a business card - but was able to dim 32 channels of AC power for my lighting strands. I Used 2 of these board to control all the lights.

    All the lighting commands were pumpted to via. UDP packets from my Linux server - it was a pretty impressive display!

    Check it out at: http://www.bradgoodman.com/dimwatt [bradgoodman.com]

    • by Locutus ( 9039 )

      looks pretty promising but without schematics, firmware and other things to build it, the average geek isn't going to put all that effort into it. Maybe posting enough data for others to build might result in updates back to you where mods or improvements can be made.

      again, nice work and it looks like a promising project people could try to build with more info.

      LoB

      • Am going to put it up (have only had one request).

        Haven't only because my my initial rev. had a couple bugs (which required wires) and those changes haven't been made into the schematic.

    • nice, do you think your design would have any trouble running at 240V?

      • No - in fact, I'd probably run better.

        By that, I mean everything is rated at 240V (even the wires I happened to use). Since the current is the limiting factor in the components, going to 240 vs 120 would let you run with twice at power.

  • by LaminatorX ( 410794 ) <sabotage@@@praecantator...com> on Friday September 26, 2008 @01:30PM (#25168423) Homepage

    ...a Rolidex Cluster of these?

The shortest distance between two points is under construction. -- Noelie Alito

Working...