The Register Home Page

back to article Yes, you can serve a website from a $1 microcontroller

UPDATED Web hosting bills getting too expensive? Maybe you ought to consider serving your site from a one-dollar 8-bit microcontroller. Okay, you won’t exactly be serving up a high-performance, graphic-rich website using this project from European developer and blogger Maurycy Zalewski. The setup is limited to one URL, but hey, …

  1. retiredFool Silver badge

    Pico?

    I thought the pico chip was less than a buck. I expect you could easily do a web server on it. And if you spring for the W board at I think 5 USD, you have all the fixin's for a board that can connect to your internet. Soldering the chip would be a challenge for me I know. I buy the boards myself.

    1. werdsmith Silver badge

      Re: Pico?

      I guess Brandon thinks he’s discovered something special to report on, when in fact this is quite an ordinary regular thing for maker folk.

  2. Jason Bloomberg Silver badge
    Pint

    You can have a full Wi-Fi server with file storage for under $10. HTTP, HTTPS, MQTT, NTP, Telnet servers and whatever takes your fancy. You can program it in C, Rust, or on-chip using a credible clone of Python.

    I'll raise a glass to anyone who does it any way they can.

  3. This post has been deleted by its author

    1. Jason Bloomberg Silver badge

      Still $5 USD I believe. If you can find one.

      But the best choice would likely be a Pi Zero 2W at $15 USD. If you can find one.

      1. Yet Another Anonymous coward Silver badge

        ESP32-C3 are about $1.50 and include wifi

        1. Missing Semicolon Silver badge

          I ran one on an ESP-8266 module. It had one page, with a button on it. It switched the outside Christmas lights on and off.

          It was LAN-only, but I could then control the lights from my phone.

    2. frankvw Silver badge

      Anyone can run a HTTP server on a Pi Zero. Running it on an 8 bit microcontroller, a discarded vape or a defunct toaster is what separates boys from Real MenTM.

      1. This post has been deleted by its author

        1. BartyFartsLast Silver badge

          You're missing the point, it's not because it's practical, it's because it's fun, it's kinda cool and it's a really useful way to learn the low level guts of web serving and networking.

          It's not meant to be a practical alternative to the kind of web server you'd use on the 'net but it is potentially useful for adding a web interface to control some very simple hardware

      2. BartyFartsLast Silver badge

        Pretty sure it was a PIC16F84 I used to serve up a web page over a Realtek ISA card from an external I2C EEPROM back in the day but it has to be at least 15 years ago, it could have been a larger 16F877...

        ISTR there were also projects to use some 3Com ISA cards too.

        1. Caver_Dave Silver badge

          I will raise you a whole network of PIC and SMT (I think) micro's networked to control a whole office (actually a converted house) back in the last century. Some of the nodes had additional radio comms to control curtains, etc. and some had links to control lights (incandescent and fluorescent) and one had 1-wire links to flash LEDs in the floor to show the way out in a fire. We were trying to sell the controller software running on the then very new Windows NT.

          It was quite cool to open the outside door with a key fob, walk in to have a voice say "Good morning [Caver_Dave]", have the lights on the route to my office light up, have the coffee machine turn on, have my PC turn on so it was booted by the time I sat down, have the curtains open, etc.

          I was quite annoying when someone was demonstrating remote access by mobile from say Kuala Lumpur, opening and shutting my curtains or turning my light on and off, and taking a still photograph each time to show that feature (my reaction had to be obvious but kind, or what had been requested).

          1. BartyFartsLast Silver badge

            Nice, I did think of doing all that and even had my heating controlled by SMS at one point but the then other half was an absolute technoramus and refused to even try to use it.

            Which is amusing as I believe she now lives by Alexa

      3. frankyunderwood123 Silver badge

        Nah, it's the red stone circuits that do this.

  4. MachDiamond Silver badge

    How low can you go

    Sure, you can get a tiny processor that you could make into a web server, but the cost in time might be massive. What's an extra $5-$10 to have something that's even better suited and has all the hardware required, ready to go?

    I used to try and save money by doing some projects from the ground up and found that too many of those don't get completed or wind up taking so much time that if there is some sort of payback when the thing is done, I can be better off spending a couple of extra bucks. I was going to build a valve amp for my bass from scratch and it turns out to be far less expensive to buy something broken and fix it up. Just the transformers are a mint, but a non-functioning amp can be less than half the price and already have most of the bits ready to go. Getting one chassis punched was going to be a fortune. I could spend all day drilling, filing and bending one, but I can make more in a day doing other things than the punched chassis would cost.

    1. that one in the corner Silver badge

      Re: How low can you go

      > it turns out to be far less expensive to buy something broken and fix it up.

      It often is and that is where building up your skills comes in handy; as well as reducing your outgoings on the project there is pride to be had if you are able to fix something up (or pull it apart to get the parts for something entirely different - hack the world!).

      > I could spend all day drilling, filing and bending one, but I can make more in a day doing other things than the punched chassis would cost.

      I guess, if you are happy working all 12 to 18 hours a day, seven days a week, 52 weeks a year to avoid lost earning opportunity, then pay someone who is doing the same thing with their job to do the metalwork for you, or putting up the shelves, or papering the living room or preparing the meals or taking the dogs for a walk or...

      But isn't it worth anything to yourself to spend that day doing something different than your normal job, using different skills and getting a break from the same old same old daily tasks?

      1. Neil Barnes Silver badge

        Re: How low can you go

        Exactly. One does not do something like this to save money, or perhaps for any practical use. One does it to see if one can.

        There is no serious practical reason for me to be writing a FAT32 driver in 65c02 assembly, yet here we are...

      2. MachDiamond Silver badge

        Re: How low can you go

        "But isn't it worth anything to yourself to spend that day doing something different than your normal job, using different skills and getting a break from the same old same old daily tasks?

        It is and I love tinkering in the shop. The difference is the motivation behind a project. If I'm trying to save money, drilling and grinding all day with hand tools instead of listing more of the crap I have on eBay is a losing spend of time. There's a video I watched of somebody that built some steampunk inspired water-cooled PC's that were awesome. The amount of time spent and the cost of materials for something that was likely obsolete by the time it was completed didn't make sense, but the finished product was a work of art and I applaud them. I've got a box of scrap copper tubing and fittings I've been adding to from estate sales that I hope to find a project like that to use on at some point in the future. Maybe a water-cooled solid state guitar amp. It's ideas for a form looking for the right function.

    2. SCP

      Re: How low can you go

      There was a saying "An engineer can build for $10 what anyone can build for $100" - which alludes to the engineering discipline of minimizing costs.

      Obviously for a one-off project the easiest (and cheapest) route is to use something where most of the work is already done. If you are going to build 20 million units then reducing recurring costs from $5 to $1 is a big saving and $80 million can pay for quite a bit of engineering time to achieve that.

      Some people enjoy the challenge and see it as part (typically an engineer will be balancing a number of factors - development cost, production cost, reliability, maintainability, risk, time to market, etc) of the engineering ethos.

    3. Anonymous Coward
      Anonymous Coward

      Re: How low can you go

      If you value money over knowledge, experience and the satisfaction of doing stuff then yeah, your approach is valid, personally I quite like buying broken stuff, making it as good as or better than new, but I get far more satisfaction spending my time creating new and learning new to me things.

      Right now I've got a few projects on the go, one of which is a great big middle finger to a few self proclaimed "experts" who reckon what I've done is impossible. It's niche, so damn niche but it's amusing and satisfying to me.

      Which is far better than wasting my life vegetating to some crappy streaming service

  5. cyberdemon Silver badge
    Mushroom

    Even cheaper than an 8-bit AVR

    Is the Chinese ESP32.

    Which has full WiFi and Bluetooth on chip, as well as 32bit timers, hardware floating-point, octal SPI RAM/flash expansion, and enough computing power to run video processing, even facial recognition..

    Just don't worry your pretty little gwailo head about the 2MB of encrypted ROM, which definitely doesn't contain a self-propagating killswitch command for when the war comes

    1. BartyFartsLast Silver badge

      Re: Even cheaper than an 8-bit AVR

      Did you know AliExpress sell tinfoil as well?

  6. that one in the corner Silver badge

    Does your server come with real wood?

    No, because at today's prices that lump of wood is probably more costly than the microcontroller, especially with a nice finish like that!

    Do you remember the days when the offcuts bin ("just donate a bob for the charity box") actually contained solid wood, even at (the equivalent of) B&Q?

    1. BartyFartsLast Silver badge

      Re: Does your server come with real wood?

      Still do at my local timber yard, they've been in business 60+ years and have seen out a B&Q and a homebase literally in line of sight of their front door.

    2. MachDiamond Silver badge

      Re: Does your server come with real wood?

      "No, because at today's prices that lump of wood is probably more costly than the microcontroller, especially with a nice finish like that!"

      Don't get into making wooden instruments, the wood for those can get really stupid really fast. Book-matched exotic wood that was from a tree sitting at the bottom of a swamp for a few centuries, stuff like that.

  7. John Doe 6

    24 MHz??

    IBM PC from 1981 was running just fine with 4.7 MHz

    We couldn't run a webserver (mostly because it wasn't invented) but a BBS with 2 modems was running fine.

    1. Uncle Slacky Silver badge
      Windows

      Re: 24 MHz??

      Someone got a web server running on a ZX81 a few years ago:

      https://web.archive.org/web/20200205123951/http://zx81-siggi.endoftheinternet.org/index.html

  8. Ken G Silver badge

    Why is pricing in Yankee Thalers?

    It explicitly describes the person doing this as European and so I'd expect his costs to have been incurred in Euro.

  9. Red Ted
    WTF?

    uIP

    Perhaps they could have just done a port of Adman Dunkels uIP, which I recall using at least 20 years ago on 8 and 16bit micros.

  10. Bebu sa Ware Silver badge
    Facepalm

    "root through dumpsters to find an old one [vape]. "

    Around these parts fairly common street litter, unfortunately.

    If this curse cannot be banned outright, at least some type of deposit·return system like the arrangements for softdrink aluminium can and glass bottle returns, might help keep this noxious garbage off the streets.

    1. Ken G Silver badge

      Re: "root through dumpsters to find an old one [vape]. "

      and open a new business model of grabbing them from people's lips and running

      1. breakfast Silver badge

        Re: "root through dumpsters to find an old one [vape]. "

        This would be a pretty funny new crime.

      2. MachDiamond Silver badge

        Re: "root through dumpsters to find an old one [vape]. "

        "and open a new business model of grabbing them from people's lips and running"

        Running? No way. You mount the pavements with an electric scooter and speed away after.

    2. MachDiamond Silver badge

      Re: "root through dumpsters to find an old one [vape]. "

      I've never found any. It must be a big city thing. I've seen plenty of people on YouTube that have stacks of them they pick up while walking and harvest the Li cells from them. I don't even find duff laptop battery packs anymore to get the 18650 cells from as the batteries are glued in for life (about 2 years) in most modern laptops. Maybe we'll start seeing those in gutters before too long. The people working at the local tip are pretty good with letting weirdos like me harvest stuff from the e-waste bins. The last run I picked up some off-brand DJ gear that worked perfectly fine. It wasn't worth enough to make listing it worth the effort, but I'm sure I'll find a good home for it directly or I'll take it over to the second hand shop and trade it for some kitchen gadget I want. I've got a big credit there already as I often bring them DVD's/CD's I get in bulk from estate sales. What I'm hoping for is somebody to bring in some vintage camera lenses to go with my technical camera.

  11. agurney

    That's nothing new, I've been using using Espressif microcontrollers (ESP32 and ESP8266 (less than a quid)) for years to create 'websites'; they have more than one page and interact with other ESP* controllers using ESP-NOW to publish live updates (fencing scoring display and control system). OK, currently only for local (192.168....) users over wifi but that's simply because there's no need to expose it to the WWW.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon