Last month we posted a tutorial from Hub City Labs on making your own PCBs at home. At the time, Hub City was hosting their hackerspace web site on a tiny vps graciously provided by a member. As you might expect, the throngs of Hackaday readers turned Hub City Labs’ server into a pile of molten slag and made their admin’s hair a little more gray. Their web site is up again, and Hub City provided a tutorial on protecting your server from the ravages of being Slashdotted, Farked, Reddited, and even Hackaday’d.
The solution for the first few hours was to transfer Hub City Labs’ site to an Amazon EC2 instance. Since then, they’ve moved over to a Debian EC2 instance that is able to handle half a million pageviews an hour for a WordPress site.
This amazing capability required a good bit of optimizations. A WordPress installation is set to run cron tasks on every page load; not good if you’re going to see thousands of hits every minute. The guys added define(‘DISABLE_WP_CRON’, true) to their wp-config.php file and set all the background tasks – checking to see if a page should be updated – to a fixed schedule every minute or so. Along with an increase in the WordPress cache, these optimizations increased the number of pageviews an hour from 1500 to 60000.
To get up to half a million pageviews an hour, the EC2 instance was loaded up with Varnish, a front-end cache that really speeds things up.
The result – 375 million pageviews for $15 a month – is more than Hub City Labs will probably ever need. The nature of hackerspace web sites, though – light load until Hackaday, Slashdot, or Reddit figure out you did something cool – means hosting on an expandable EC2 instance is probably the way to go.
Need a tiny web server? [Rob] over on the 43oh forums made an Ethernet booster pack for the very popular TI MSP430 microcontroller. If that’s not enough, [Rob] also put together an all-in-one solution with a MSP430 and Ethernet controller that can be powered by a battery. Along with the web server that fits in just 5k of flash, we’re going to say [Rob] has a very good solution for remote sensing and data logging.
For his Ethernet-enabled 430, [Rob] chose to use the WIZnet W5200 Ethernet controller. This chip communicates with the 430 via and SPI interface and has a hardware TCP/IP stack that supports TCP, UDP, and PPPoE, offloading all the low-level stuff off of the 430 and onto the Ethernet controller.
After the break there are a pair of videos of [Rob] showing off his tiny web server. A few neat features include a full memory dump of the 430, as well as a reading the states of all the pins via an HTML page. If you’re looking for a way to collect data over Ethernet, we don’t think you could do better than [Rob]’s tiny 430-based web server. Also, if you’d like to control a few devices over the Internet, [Rob] included a few optoisolators for lights or appliances.
The code is available on the 43oh forum page, but [Rob] says he’ll clean that up and put it in a Git.
Continue reading “Lightweight web server using the MSP430”
Behold the Rascal Micro. It’s running embedded Linux and has a dual-row of pin headers which probably seem pretty familiar. The idea here is to bring Arduino hardware (ie: shields) to a party with a powerful web server.
The image above is the beta version of the hardware. What’s being shown off in a recent Engadget demo is a version that slides two USB ports in between the barrel jack and the NIC. This makes it easy to jump over to wireless with the use of a USB dongle, or you can figure out what other peripherals you want to include in your project.
The novelty here is that the web server included a built-in editor. So not only can it serve you a webpage to control hardware or display sensor status, but it will let you edit the interface without needing to reflash anything.
The price rings in somewhere around $100-150, and like the popular Raspberry Pi board, you can’t get your hands on it right now.
[Adam] and [Jeremy] took on the challenge of designing a system that would make it easy to control appliances from the Internet. We’ve seen the concept many times before; it involves some method of switching mains power and connecting that mechanism to the Internet. This design is both well planned and nicely executed.
We’re always very interested in the power switching for a project like this. It’s good that an approved electrical box houses all of the high-voltage parts in the project. Here a GA8-2B02 solid state relay switches power between the incoming cord and the two outlets. We didn’t get a look in the box, but hopefully there’s a partition between those wires and the low-voltage control wiring which uses a standard 3.5 mm audio jack as an interconnect.
An ATmega644 drives the control signal for the relay. It’s connected via Ethernet cable to the Internet through the use of an ENC28J60 chip which takes care of LAN communications. This is essentially a light-weight web server that will be easy to adapt to receive commands from just about any web-connected sender.
[Old bit collector] is giving up control of his radio dial to the Internet. He combined a couple of Parallax products which now allow him to tune, adjust volume, and toggle the power for an FM radio receiver.
The setup is pretty simple. An FM receiver module is mounted in the breadboard seen above which helps to break out its control pins. Those are connected to a Parallax Spinnarette web server board. It’s auxiliary I/O pins are controlled via a web interface that he set up and plans to operate with the browser on his Android phone. But as you can see after the break, any web browser works as long as you know the correct address.
This is pretty good if you’re on a quest to make everything controllable from your smart phone. But we would love to use the concept to make our own streaming radio. You’d be able to tune in to all of your local stations from anywhere in the world.
Continue reading “Over-the-air FM radio gains Internet control”
Inspired by a project featured here on Hack-a-Day, [arthurb] bought himself a PIC 24F and started experimenting once he learned the ins and outs of programming the chip. Using a breadboard and a nest of wires was fine for his first few projects, but as he advanced, he began to feel the need for a full-fledged development board. With a list of required features in mind he got to work, constructing a well thought out board as well as a handful of expansion boards that can be used for various other projects. His main development board includes Ethernet connectivity for use with his web server software, the ability to utilize an SD card for storage, and a USB port for programming. His expansion boards include a temperature sensor, a numeric touchpad, as well as a video output module. Overall it is a pretty impressive build, considering he had never programmed a PIC before starting this project. All of his boards are thoroughly documented, and he has included plenty of source code in hopes of helping other individuals just starting out in PIC programming.
You can see his web server in action here, but keep in mind that it is running off a PIC, so please be courteous in your usage.
The Chumby One has an internal SD card offering a fair amount of storage. [Kenneth Finnegan’s] came with a 1 GB card that had about 500 MB left over which he filled with a collection of MP3s. But he wanted to do more and so installed a pre-compiled version of lighttpd to act as a web server. The problem is that this binary requires a thumb drive to be plugged in because it maps the storage directory to the mounted USB folder. He wasn’t happy with that so he upgraded the internal SD card and rolled his own webserver to run from the internal SD card.
The upgrade involved going from a 1 GB to an 8 GB microSD card. In order to run the webserver internally he needed to recompile lighttpd to use a different root directory. This meant setting up an ARM cross-compiler and eventually finding a new place for the start up script. The location change for the ‘lighty’ directory leaves us wondering if a symlink couldn’t have solve the problem without recompilation. But we don’t have the hardware on hand to try this out ourselves.
But if you want to give it a shot, check out [Bunnie’s] post about Chumby-based hardware. Looks like you can head out to the big-box store and have one in hand without shelling out too many clams.