Site Network: freakymousemats | portal | smashingbloke | regenology

the weblog

Occasional musings that fall out of my brain and on to the site. Occasionally more occasional than I'd like. But will try to fix that.

Developments

Posted by stephen on Tuesday, 27th March, 2007 @ 21:22

My NSLU arrived at the weekend, and I promptly flashed it with the official Debian port (using a freshly purchased £11, 2Gb USB memory stick in one of the ports) and it's all ready to be tested with a camera or given some other interesting purpose. I'm tempted to make it the flight computer for the balloon as it's cheaper and easier to replace than the OSD is, while still being quite a capable little computer.

I also visited Maplin in Milton Keynes and picked myself up a USB Experiment Interface Board. I'd intended to buy the pre-assembled version for the £5 premium, but they didn't have it in stock. So I thought I'd try my luck at assembling it myself...

K8055 USB Interface

So lots and lots of soldering later and it works! And thanks to libk8055 which handily features a Python library, I can control all sorts of electronics from a computer via 5 inputs and 8 outputs of the digital variety and 2 ins and 2 outs of the analogue variety. And said computer could be the NSLU. A plan comes together... Using this board I'll be able to activate the cutdown device for the balloon, and probably make my recently created camera shutter control circuit redundant.

And another potential use... to control servos to make our timelapse cameras pan and tilt. Technology is so much fun :-)

Stuff's been happening with the site too. I upgraded Django to version 0.96, which includes some handy new features I plan to explore soon. I've also changed the photo gallery somewhat, creating a tiny and large image size for all photos, and have begun creating nestable photo albums, mostly so that Richard can eventually migrate his site to Django too so we can save about 1Gb of RAM on the server for Plone/Zope. Not to mentioning speeding his site up a couple of notches.

And finally I've been in London today to begin handover of a couple of new clients' systems, all Windows and ASP based. We're now looking for our first non-founding employee to look after them and some other stuff. In the mean time I'll be brushing up on my Windows and ASP skills. Amazingly I think it's coming back pretty easily.

Argh! It was so obvious

Posted by stephen on Wednesday, 21st March, 2007 @ 23:23

In lieu of a proper follow-up to my entry about the time lapse camera project I've been working on, I thought I'd share a little revelation I had tonight. The project's been a complete nightmare, and that mostly because of the awful Silex USB Device Servers we've been using. In wireless mode they're ridiculously flakey and even wired they're a pain to work with.

So one of the things learned for the future was not to use them again. So my plan became put a mini-ITX motherboard in an outdoor box (which we've now done for our Linksys central access point) and place one with each camera, so control of the camera is handled locally rather than centrally. That's a little complicated and expensive, but should be a pretty reliable solution.

But it seems like overkill, by quite a long way! I was playing with my old Buffalo wireless router last night, which has OpenWRT installed, to make a wireless bridge to replace that part of the dodgy USB servers. The thought occurred tonight that something like that would be ideal, if only it had a USB port! Then I remembered this. D'oh! I've even found mention of gphoto running on it to grab pictures from PTP cameras. I wish I'd remembered it this time last week or even better, two weeks ago. We'd have ended up with a much healthier profit!

Feed Tweaks

Posted by stephen on Tuesday, 20th March, 2007 @ 01:18

I noticed in Safari that whenever I've updated my blog lately that the RSS feed shows multiple new entries instead of just one. It seems to be because there's no date associated with each entry in the feed. I've changed the feed type from RSS 2.0 to ATOM now and added the publish date, so hopefully that'll have fixed it. Sorry if it's confused your reader.

Head in the Clouds

Posted by stephen on Monday, 19th March, 2007 @ 18:00

Conveniently coinciding with my recent discovery of the more practical side of myself with the camera project at work (soldering irons and power drills seem much more usable and useful than they did a week ago) I came across Balloon v1.0 and got rather excited by the notion of launching a weather balloon with a digital camera attached to take pictures of the journey. When you add the GPS, a small Linux x86-based motherboard and interactive control over packet radio you get a dream project for geeks like Chris and me.

And with my knowledge of Linux and his knowledge of radio stuff (usefully including actually having a radio license) and our combined mass of random stuff it turns out it's actually quite conceivable we could successfully undertake such a project. Lots more research about more recent UK launches at the UK High Altitude Society has given us plenty of inspiration.

So here's my current, approximate plan...

  • Purchase a weather balloon of sufficient size to carry the payload once we've determined how heavy it's going to be and what sort of lift we'll be needing. Add to that the helium to make it fly and a sufficient parachute to safely return the payload to earth, most likely one of the commonly sold model rocket parachutes will do.
  • Construct a 'cutdown device' from a small plastic tube and a model rocket ignitor. This would be attached on a cord from the balloon, and a cord to the parachute and payload would run from it. Needs some electronics to allow the flight computer to fire it.

  • Purchase a couple of digital cameras from ASDA or similar. Richard discovered they sell a small 3 megapixel camera that takes a pair of AAAs and an SD card. All that for £18, bargain! Being light will be important and we want two so we can take pictures of the horizon and of the ground. Extra things needed: some simply electronics to activate the shutter at set intervals. SD cards big enough to store the pictures for the duration of the flight. 512Mb or 1Gb will probably do and is ridiculously cheap at around £5 from ebuyer.com.
  • Use my Neuros OSD as the flight computer. It's small and light, runs Linux and has plenty of CPU and RAM while using limited power. Also provides a USB port for the USB GPS dongle I've already got, and an RS232 serial port for talking to a packet modem or controlling any GPIO electronics like the cutdown device. Has audio in and out for transmitting/receiving morse and packet radio at the software level. And one other potential advantage is the onboard hardware MPEG4 encoder. Using the AV output from a camera it's possible to created a video of the flight on a SD or compact flash card in the OSD.
  • Use a USB hub to also attach a spare Nokia phone with data cable. Use Gnokii software on the OSD to send the current GPS co-ordinates via text messages at given intervals. Good backup in case of radio failure or when it's hard to pick up the signal once the payload has landed.
  • Create a simple radio from readily available ICs producing a signal at license-free frequencies and use to transmit the current GPS co-ords and other data by morse or packet radio. Power of transmissions from mobile operator-free devices is legally restricted, so use of a larger antenna on the ground to pick up the signal will be necessary.
  • Build a Linux system for the OSD along with some scripting to log GPS data and transmit it as required via radio and SMS. Create conditions for cutdown, when the balloon gets too high or leaves a certain area that'll make it impractical to recover (e.g. the sea).

It doesn't seem too hard really, so stayed tuned for updates on our progress. I'll probably begin by assembling some of the components I've already got into working systems and go from there.

Work's got interesting again

Posted by stephen on Sunday, 18th March, 2007 @ 22:05

The Problem

Our client is building houses on three plots of land, and demolishing two existing buildings. As part of the project they want time-lapse photography of the process to be used in an exhibition later in the year. Ground works are already underway on the new builds and demolition is scheduled for a week after our initial contact with them. Multiple points of view will be needed to cover the whole construction area.

The Solution

Three cameras placed to cover approx. 270° of the site. There is no power or network reaching the three locations, all of which are on masts above existing buildings, two of which are very high up. To simplify the process we agree to provide equipment that can run from a DC power supply and that two of the cameras will connect wirelessly via the third to their network, and on to our server which will control the cameras and store the captured images.

We'd heard of a similar project using a digital still camera controllable via it's USB port, a USB device server that connects a remote USB device to a machine over IP, all stored in a standard CCTV camera housing. With a little bit of research we discovered that the company that makes the USB device server also makes a wireless variant with a standard antenna connector. So presumably it'd be possible to put these in the CCTV housing with two of the cameras along with an access point to receive the signal in the third.

With a tight deadline looming, orders for all the various parts were placed as soon as the purchase order was received, including a nice chunky PC with 1Tb of storage for lots of pictures. Annoyingly the cheapest digital camera that could be remote controlled and was currently available for sale was £200 as opposed to our intended £120 budget for it. As gphoto supports controlling the camera we were hopeful we could use Linux on the server and save on the cost of licenses for Windows and the camera control software, offsetting some of the increased costs of the cameras. The only unknown was the USB device servers.

Everything except the antennas and wireless access point was ordered on the Friday and the first stuff to arrive was the digital cameras on the Saturday. A quick play with gphoto and sure enough I could get the camera to take a picture and store it to the memory card, but gphoto dropped out with an error before downloading it. Some prior research had indicated that it might be necessary to use current development source code, so after a long and fiddly compile process I tried again, and sure enough everything worked. The camera took the picture and downloaded it immediately without writing to it's memory card. And even better gphoto has built in options to take a series of photos with a given time delay. Perfect!

The next problem to think about was power. In two of the cameras we need to power the CCTV housing's built-in heater (to avoid condensation of the lens), the camera itself and the USB device server. In the third we add a wireless access point. We've agreed to take a DC power source and that'll we'll specify the PSU and cabling they'll need to install for us. The heater is 12V @ 1.2A, the camera is 4.3V @ 1A, the USB device server is 5V @ 1.5A and a wireless access point (WAP) is 5V @ 2A. So we're looking at up to just under 40 watts in one of the units. A 60W 12V power supply is commonly available and seems like a sensible option.

So the next question becomes how do we get from 12V down to 5V for the USB server and WAP and 4.3V for the digital camera? Well, it's been years since I've done anything with electronics, I was probably in my mid-teens and was never any good at it anyway. I didn't get much further than lighting LEDs and opening up things, looking at the circuits and realising I didn't have a clue what was going on. Fortunately Chris's recent experience with the Modtronix stuff has introduced me to the concept of voltage regulators. These are wonderful little ICs that promise to give you a constant voltage output if you can provide anything from a little over the voltage you want up to something several times bigger. In this case a 5V regulator can take anything from 6V to 20V. Ideal!

So that gets me my 12V supply for the heater and a 5V supply for the USB device server and WAP. A little research with Maplin shows that 1A and 2A regulators are available, so the current demands won't be a problem. But how am I going to get down to 4.3V for the digital cameras? Maplin don't sell regulators to get to that voltage. Perhaps a resistor after a 5V regulator will do the trick?

To be continued...

Almost Finished

Posted by stephen on Sunday, 04th March, 2007 @ 23:31

For ages now I've been meaning to firstly redesign this site, and secondly move it from Plone to Django. About a week ago I was going through my old bookmarks and found Open Source Web Design and had a look through the many lovely templates made available there. I thought about why I'd previously felt like I shouldn't use one, and when I considered that I happily use open source software for everything else on this site it seemed silly that I wasn't willing to use an open source design too.

So I accepted my limited creativity for the visual aspects web design and decided upon this template, andreas02 by Andreas Viklund who's also produced some other rather fetching designs. So thanks to him and the many and various authors of Django, Python, Apache, MySQL, Linux and all the tools in between for providing such a great foundation to get creative in the bits I'm most interested in and leaving the rest to them.

So now I've moved the blog, the photos, the (limited) links, docs and software sections and all that's left is videos and some general tidy ups. As much as possible I've managed to include support for old URLs to keep links and search results working. I'll write later the process of moving the site from Plone to my own Django creation.

It's a new freakymousemats.com!

Posted by stephen on Thursday, 01st March, 2007 @ 00:13

Well, I've tried it once before and no one liked it, but I've given it a better go this time, admitted I have limited design skills and used an Open Source web template, to go with the open source web framework (Django) I'm now using to power the site.

It's not done yet, so most of the stuff other than the blog links over to the old Plone site. I'll write more about what I've been doing later.

The RSS feed will now redirect to a new URL. I'm not sure if standard RSS clients cope with this. If they don't let me know and I'll bung in a fix.

Made with Django.