Category Archives: Build-It (Projects)

DIY Book Scanning

As regular readers will know I’m quite interested in the sharing of information. This includes support for projects such as the Internet Archive. One such example of their fantastic work is the sharing of public domain books which have been scanned, many by the ill-fated Microsoft book scanning project. Unfortunately, the Google Books project is (ironically perhaps) much more restrictive on licensing. My own feeling is that these books should be shared as much as possible and attaching new licensing restrictions to public domain books just because you have scanned them is ludicrous.

One potential solution to this is to scan books yourself but those that have done even more than a few pages of a book on a flatbed scanner know that this is a long a tedious process. The commercial scanners used by Microsoft, Google and the like are much more efficient but also much more expensive. Luckily the do-it-yourselfers have come along with their own book scanning solution. It’s not as elegant as the commercial scanners but it’s definitely inexpensive. Personally, I’m hoping someone comes along with something in the middle. A pre-built book scanning frame and platen which you can add cameras and accessories to and use with the open source software which has been developed.

You can watch the original Instructables video on building a DIY book scanner or visit the new DIY Book Scanning site with news and forums.

Making Relational Databases Hierarchical

I’m not one who really enjoys writing code. In fact, I tend to avoid it whenever possible as it’s just not that interesting to me. That said from time to time I have projects to complete where no existing software quite meets my needs and writing my own makes the most sense. This summer I was in the midst of collecting information and publishing a large extended family directory.

Clearly, the best way to do this is to store the data in a database. Because relational databases are most prevalent, I already have quite a bit of experience with MySQL and I knew I wanted to eventually make the data available via a PHP web application I decided to go with a MySQL backend. The trick here is that families aren’t as relational as you might originally think. Families are really hierarchical data (parents, children, grandchildren, etc.) and relational databases have a hard time storing and recalling things based on these types of relationships. For example, a typical family query might be one for a list of all descendants of someone. As it turns out families aren’t the only hierarchical data people might try to store in a relational database. Any business database which shows managers and reporting personnel is also a hierarchical data set albeit usually with fewer levels and much less complication (no need to track divorces, remarriages, spouses, etc.)

I was able to find and read up on several methods for storing the relational information but the one I ended up using is that proposed by Rob Volk of SQLTeam where the expensive (computationally) hierarchical relationships are stored in two additional fields for each record (depth and lineage) with parseable separators between generations. The database is initially loaded through a series of several (expensive) recursive queries but then can be maintained through triggers when information is added or updated.

Handy tool for sheetmetal cutting

Yesterday I was introduced to the TurboShear by Malco which is one of the greatest innovations I’ve seen in sheetmetal work. Instead of using a hand or electric shear for cutting the metal this devices chucks into your cordless drill and allows much more precise cutting (such as square corners) than electric shears and is much faster than hand shears. Shears also work well for cutting vinyl, steel mesh and other similar materials. Malco also makes a heavy duty and fiber cement board version of the product though for basic sheetmetal work such as HVAC ducting the standard TS1 seems to do the trick just fine.

Protecting your Dallas 1-wire network

I’ve written before about the various interesting applications for the Dallas 1-wire network such as HVAC control, access control, weather stations, etc. A few weeks ago I finally got around to ordering some 1-wire sensors to play with myself. I must say that I’ve had nothing but a good time with them. I’m currently running outdoor temperature and rainfall logging which you can see for yourself as the data is uploaded to a number of servers including Weather Underground and the National Weather Service (through the Citizen Weather Observer Program). In future postings I hope to discuss a bit more about how simple this was to get going and show off my own weather homepage (still in development).

For now I wanted to share the design for a 1-wire surge suppressor. As it turns out some people have had a problem, specifically with 1-wire weather equipment, with lightning inducting large currents into their 1-wire network and damaging the sensors and/or serial adapter. To combat this problem Philip Gladstone has posted some easy to build protection circuits for both 1-wire devices and the serial port adapter. While I haven’t built them myself yet I hope to have some time to do so before storm season gets into full swing.

DIY Rapid Prototyper

Those familiar with rapid prototyping (essentially 3D printers for computers) know that both machines and supplies can be extremely expensive. Now a group known as Fab@Home has published instructions and software for building your own rapid prototyping machine. The machine they propose is certainly not as durable or precise as the commercial offerings, but at a fraction of the cost it may serve your needs just fine. If all you’re looking to do is a bit fo experimentation or introducing students to what a rapid prototyper can do a less expensive system such as this might be all you need. NewScientistTech also has a story on the Fab@Home project.

Samba as PDC for a small domain

One of the changes in my recent server upgrade was moving from using Samba on Linux as a workgroup server to making it a primary domain controller and implementing a small domain. I’m still waiting for O’Reilly to publish their updated Samba book which comes out this month so in the meantime I turned to the internet for answers.

What I found was a jumble of things using a variety of different methods of configuration to accomplish this. Needless to say I spent quite a bit of time untangling all this different (and sometimes conflicting) information. Although my server runs Debian the singlemost useful resource was this howto from the Gentoo wiki. The domain is up and running but the jury is still out on whether this is actually useful enough to justify the extra setup time and headache for such a small (six client PCs) installation.

Cisco 7940/7960 SIP Firmware

October 2008 UPDATE: It seems that Cisco has re-arranged things on their website again and I can no longer find a free SIP image. If I find them on the Cisco site again I’ll post updated information, until then Google is your friend and Cisco SIP images are easier to find floating around the Internet than they were when this was originally written.

When I first started using Cisco 7960 phones with the open source Asterisk PBX I had to jump through a lot of hoops like getting SMARTNet contracts and CCO access to download SIP firmware (to replace the SCCP protocol based one) I could use on the phone. Since that time things have gotten much easier (much being a relative term). If you have a phone with very old SCCP or SIP firmware you may still need CCO access to download older SIP firmware and upgrade the firmware loader but if your phone has newer SCCP, MGCP or SIP firmware you can now download the SIP v8.2 firmware (without Cisco CallManager support) for free from the Cisco website. The two other catches are that the firmware isn’t quite the newest (at writing the newest is v8.6) and that the links are quite difficult to find on the Cisco site.

Lucky for you I’ve located this page on the Cisco website which allows you to download v8.2 and the relase notes that go along with it for free. Of course, like most Cisco products, the 7960s are not designed for consumer use but to be managed in large numbers by trained IT staff. I think this is one reason that Cisco has been slow to make firmware available for free. If you look on various message boards and websites you’ll see a lot of people who are unsuccessful in getting these phones to work. I hate to say it but most of the time this is because they have no idea what they’re doing. The phones themselves are not faulty and there are specific reasons why things like TFTP configurations are recommended (easy central management in a large company) and there is poor configuration through the phone itself and no web configuration interface (saves image space). On the other hand, if you take the time to learn “the Cisco way” you’ll find you have an excellnt phone that sounds and operates remarkably better than the consumer based options.

Collecting weather with one wire

I thought I’d written about this in the past, but it appears I have not so I’ll have to take a bit more time to explain this than I thought. To make a long story shorter my interest in weather and computers indicates that at some point I would like to have a computerized weather station at the house. In looking into this, and with my strong preference for inexpensive and open source solutions, I came across the Dallas Semiconductor 1-Wire protocol. As it turns out there are a lot of things you can do with the 1-wire protocol, including using their iButtons and readers as the basis for an access control system (another fun project). One of the early ways they popularized the 1-wire system was by developing an inexpensive weather station.

The station is now sold by Automatizacion Aplicada a Gasolineras (AAG) on their website. The sourceforge One Wire Weather (OWW) project is an open source solution to logging and displaying the data from just such a station. As an added benefit the OWW project has a page listing hardware suppliers, projects and scripting resources. If you’re interested in this sort of thing I encourage you to look at the 1-Wire products and the OWW project as a fun activity.

Shorten that URL

Several times in the past I’ve considered building an open source program similar to TinyURL (with some improvements) for my own use. I think it would be especially handy as a way for me to link to other sites from my blog while keeping strict anti-spam measures in place (which sometimes whine about my own off-site links).

I can’t believe this hasn’t been done before as the code shouldn’t be that difficult. I did spend some time recently looking for starter code but didn’t quite come up with what I was looking for. Instead I found lists of simialr sites which don’t appear to use open source code either the notlong service has links to some of their competitors and the Perl Shorten library gives another list of such services. The closest I have come is this short url php script but I haven’t looked at the code yet and I’m tempted not too because I’m not thrilled with the way the short urls appear to be handled and there is no information about how the code is licensed. The last thing I want is to get caught up in a licensing battle like the SCO/IBM case.

If you know of any open source PHP/mySQL URL shortening projects please add a coment and share the wealth.

Recycling Paper

If you’re like me you generate a lot of paper that is printed on one side. Of course, you could put the paper in the recycling when you’re finished with it but assuming it doesn’t have any confidential information you could give it a new life as a scratch pad first.

My personal preference is to cut 8.5×11 sheets into quarters, but some may prefer halfs. The real trick is knowing what you need to glue the sheets together into notepads. While some people use multiple coats of rubber cement my preference is to do it the real way and use what the priniting/binding industry calls “padding adhesive” or padding glue. The trick is to get the edge you’re going to glue lined up straight and either weight down the edge or put it in a clamp such as this which are easily built or bought. You’ll need to apply several coats of padding adhesive with a brush, letting things dry between coats. Once the final coat is dry you can slice apart the large pad into several smaller ones using a common table knife or a “pad knife”. If you want a more professional stiff backed pad be sure to insert thick cardstock in the stack before gluing where you’ll split the pads. You could even go a step futher and use something like cut up macaroni and cheese boxes for the cardstock backing.

You can usually find padding adhesive where printing supplies are sold. Online it is available from a number of vendors for around $10 a quart.