Archive for the ‘Uncategorized’ Category

Wireless sensor networks revisted

November 9, 2009

Comms

Just over a year ago I was briefly involved with the final stages in the deployment of a wireless sensor network. During the project I had many thoughts about how the radio system could have been different. The key problem was that requirements for the comms channel were somewhat unknown. At the time I had recently finished a Software defined Radio project based around the TMS320. Since then, my thoughts have often drifted back to the quandary of just how flexible can you make a radio module for a sensor network. For now I am really considering the physical layer, the network topology is an entirely different kettle of fish.

Not only are there unknowns pre-deployment but things change with time. For example, the channel may change with weather – more water, frozen water, snow cover. Or perhaps physical environment – Increase in (wet?) foliage, change in physical location – node attached to a rock in a landslide? Or a moving animal?? So what if the nodes/data sink could change system variables on the fly to negotiate for optimal communications at minimum power usage? This would of course lead into developing algorithms for choosing what actually is the best at any one time, how much overhead should one invest to optimise the channel….

The requirements initially appear quite simple (Of course not the case when you get into things). The key requirement is low power consumption. This off course relates to output power and data rate. For example, a high power, high data-rate burst may be more cost (power) effective than a longer lower power transmission. Most of the radio systems one sees deployed in commercially available WSN’s are fixed frequency, occasionally offering a choice of output power and modulation. So what are the variables that on might be interested in tinkering with?

  • Frequency/Bandwidth – Pretty straightforward, generally lower frequencies are attenuated less per distance through substances – rock, ice, water etc. Higher frequency – greater data rate, smaller antennas
  • Modulation – More complex modulation schemes verses resilience to noise.
  • Data-rate – maximum a result of other variable choices, although features in Bit error rate somewhat.
  • Transmit power – self explanatory really.
  • Antenna type/direction/matching – how about a choice of an omni antenna then being able to select one from a choice of increased gain (Directional) antennas? Clearly this is linked to frequency and physical node size

What other physical layers are there? Particularly thinking of non free-space situations. Light, Acoustic wave and Inductive for starters.
Induction has two particularly exciting properties. Unlike EM Waves, its attenuation through water containing media (Eg soil/Ice) remains relatively constant Irrespective of the water/particle size. Secondly, the inductive load of the receiver can be detected, providing the transmitting station some indication of a presence of a receiver.
Even more promising for non-free-space environments is acoustic transmission. Commonly used underwater already, there is already a wealth of research. Unfortunately, little appears to show concern for power consumption. Some numbers plucked from a random paper: 500Kbps over 60m and 4Kbps over 4Km, again this is with unknown power usage. My instinct is that its probably massively too high. More investigation needed.

As a brief aside, one area that remains relatively unexplored to me is that of Wide Band Pulse, It looks quite exciting for this application. Apparently good transmissive properties through walls etc More research needed.

4 Hours of my life in pictures

August 26, 2009
I saw this about 4 times

I saw this about 4 times

I saw this about 30 times

I saw this about 30 times

Exhibit 3

Metacity Segfaults after login

August 6, 2009

This evening I booted my desktop PC and it appeared to hang after logging in. I got black screens (My desktop background is black) and a cursor showing that the computer was busy. Restarting X didn’t help.
I shelled in from my laptop and dmesg was showing some signs of illness:

metacity[3728]: segfault at 0 ip 080aa093 sp bf9af060 error 4 in metacity[8048000+82000]
im-info-daemon[3938]: segfault at 0 ip 0804a325 sp bf98e0b0 error 4 in im-info-daemon[8048000+6000]
im-info-daemon[4062]: segfault at 0 ip 0804a325 sp bfa898f0 error 4 in im-info-daemon[8048000+6000]
im-info-daemon[4146]: segfault at 0 ip 0804a325 sp bf965fc0 error 4 in im-info-daemon[8048000+6000]

I recently updated so thought maybe it was some sort of NVidia incompatibility horror. I tried updating in the hope it may have been fixed already, this highlighted the problem…… My root partition was full.

Simple fix: Delete some stuff. All happy again!

Top Gear meets Green Wing

July 29, 2009

Did anyone else notice a chunk of the Green Wing soundtrack in this weeks Top Gear? Its rather distinctive. I wander if its an doff of the proverbial?

I thought I was a geek

July 15, 2009

I regularly get told that I am a “geek”, I generally try to take this as a compliment as anything else would hurt too much. But for the first time ever ive thought it of someone else. Im sat in a bar in a very very nice part of oxford and on the table next to me is a bunch of Flow cytometrists (I guess thats what people at a flow cytometry conference are called) getting very excited about a debate that started with Islam and religion but quickly diverted to protein bonding, physiology chairs, fourescines and a whole load of words Ive never heard before Love it!

Standard hat,

May 10, 2009

Ive just had a few jobs in over the summer that require me to wear a hard hat (Or “Safety Helmet” in PPE Geek parlance) so I finally decided to buy my own rather than borrowing one as I do at the moment. I really dislike wearing the normal builder style hats because they are heavy (Neck ache) and fall off all the time. Many riggers wear the Petzl Ecrin Roc (a climbing helmet) This is allegedly because they are the only IRATA (Think window cleaning by abseiling) certified helmet. This seemed like a good purchase (lightweight, comfortable, has a chinstrap and I can use it climbing), even with the painful price tag of £55, but its a tool and it will get good use. Unfortunately, none of the climbing helmets including the Ecrin roc are BSEN397:1995 certified which google tells me is the British standard. In most situations if I know anything about the regulations, it will be more than the person enforcing them so I can apply a little verbal lubricant and all will be good. So what exactly is BSENblah…blah…blah. More googleing and you end up at what looks like the official place for standards documents The British standars instituteand StandardsUK But hang on a minute, they seem to want about £120 to read it. I dont think so! Surely If i have to conform to something, at least tell me what it is before I spend any money. Presumably they burn your village and confiscate your second eldest goat in payment for testing, so why charge for the specs. I bet it doesn’t even say how big the average head is.

So I went to snow and rock and shelled out for an ecrin roc, despite the know it all in the shop who didn’t seem to like me referring to it as a hat (red rag to a bull ?) It is clearly a better hat than the £2.95 screwfix (BS…certified) one that I have used previously. I am however safe in the knowledge that I just have to spout a load of acronyms and standards numbers to anyone who questions me about it since they too will never have read the correct document.

Does this remind you of anything else anyone?

Some other useful standards numbers for use in self approving by confusion:
BS EN 12283:2002 – Printing and business paper. Determination of toner adhesion
DD CEN ISO/TS 11133-1:2009 Microbiology of food and animal feeding stuffs. Guidelines on preparation and production of culture media…
BS 3237:1960 Specification for light and medium rolling stock for mineral haulage in mines
BS AU 258:1995 Specification for elasticated straps
BS 5577:1999 Specification for table cutlery with non-metallic handles
BS ISO 4161:1999 Hexagon nuts with flange. Coarse thread
BS 6817:1991 Specification for porcelain denture teeth
BS EN 60774-5:2004 Helical-scan video tape cassette system using 12,65 mm (0,5 in) magnetic tape on type VHS. D-VHS
BS EN 4109:2006 Aerospace series. Wrenches, face spanner – (no joke) A bargain at £68!

Is that “Helmet” legal, well yes it conforms to BS 5577:1999 and BS EN 12283:2002 so its well over spec for THIS job ;)

Long time no blog!

May 8, 2009

Well its official, about 2 months ago I finally decided to go it alone and put all of my efforts into freelancing. This has thankfully co-insided with quite a few job offers in the events industry and a few in the electronics world. Whilst I feel comfortable in the events world, it is often not very cerebral and can be physically taxing. So it was a welcome surprise when a small electronics job fell right on my lap, winner! It is a little frustrating that I am not allowed to publicly talk about it, quite an odd situation really. In short, it was a some electronics in a box with a bit of embedded development and some power electronics. Quite pleasant really.

Student Robotics:
The second annual Student robotic competition was held a few weekends back. We’ve been developing the hardware for this for nearly three years so it was pleasing to see that it is generally coming together. On the whole there were far fewer occurrences of hardware failing due to user misconfiguration (Previous failures were mainly due to powerful things getting plugged into/wiped over weedy signal related stuff.) The drive for next years hardware development is already in earnest. We are attempting to migrate to the Beagleboard from the slug and have re-spec’ed the power board to support this and remove some of the legacy cruft.

Student robotics brings me neatly onto some “software”(a pile of scripts) that I have been “developing” (banged together as I went along with little regard for a plan). We are migrating student robotics to gEDA. In the past I have complained allot about the usability of these tools for PCB design, but I am now searching for an epiphany. To help the miracle along, I wrote some scripts to make symbol libraries for commonly shaped parts. See gedashield.

Update:
Last night apparently student robotics won “About 1kg of engraved glass” at the Southampton EVA’s – apparently some sort of awards ceremony.

Gedashield

May 8, 2009

For a few months now, in between other jobs, I have been designing a piece of test equipment. I hope that it will be on sale around early August, depending on how much other work comes along in the meantime. For this I need to use PCB design software. Whilst there are many packages available, I require one that is linux friendly and ideally free, like beer and speech.

Until recently I have been using Eagle for my PCB designs, whilst this has been fine until now. My work-flow is slowly being crippled by its proprietary nature. It appears that really the only package available is gEDA and PCB.

One of the main “Features” of eagle is its (binary) libraries. I seem to spend most of my time drawing footprints and symbols so one of the biggest selling points for gEDA/PCB is text based libraries. Like so many others, after a brief (probably too brief) search of the Internet I decided to write my own tools for making pcb parts. Although it is quite possible to draw and write parts by hand, who wants to place hundreds of pads on a grid manually. I find the system used to notate the pads rather un-intuitive so at its least these tools act as an abstraction layer between the way I think and the way PCB thinks. For example PCB draws a SMD pad by specifying a line and a width where the line is shorter than the pad by the pads width. I just want to think about the pads dimensions x/y and position X/Y/A(angle) or any other co-ordinate system that suits my situation.

Another gripe is that Tragesym (also a Python script) takes tab separated CSV which whilst exportable from openoffice with little hardship, is not very compatible with a make based situation. It would also be nice to use one ods file for each component with a separate tab for each part of the symbol. ods2trag attempts to provide this functionality by converting each table of an ods spreadsheet into individual csv files that are compatible with tragesym.

I have written these tools as I needed them. They have already served me well, I hope they may be of some use to others too. Suggestions and contributions are welcome. I hope to clean up/comment/re-write some of the filthy bits but I guess the structure will stay the same.

Dictation pedals

February 16, 2009

At about 1930 on Tuesday I decided to go and see Jeff’s jewellery at the Southampton artsoc’s exhibition. The timing is important  because it was that evening. To make any use of the evening, I had to be in Southampton by 2100. The hours journey time gave me 30 minutes to pack, ablute and generate the necessary black tie for the evening. Needless to say, it was somewhat neglected after its last outing. The restricted spin up time meant I packed minimum of clothes and more crucially, didn’t take the hacking box.

After Southampton, I headed down to Exeter to see Rob and Anne. Anne is a PHD student, as part of her research she has conducted a bunch of interviews, which need transcribing. She borrowed some dictation pedals from the secretaries in her department but could not get them to work with her mac….. need I say more. The idea of these pedals is that one can pause, play and rewind the playback of dictated recordings. This sounded like a hack in the making. Whilst wondering around the town centre, I picked up some seeds of an idea, a £12 game controller and some bits of hardware. Having left the hacking box at home the only tools available to me were my leatherman and any kitchen implements found in a well stocked student kitchen. Later that night, after an evening in the real world, the hack was on. Some major bodgery combined pygame and vlc through the medium of python into some very sketchy dictation software. Its seriously unpleasant due to limited development time but can be found here.

After a bit of flailing, I managed to attach a footplate (angle bracket) to one of the thumb pads. The screws I bought from the hardware store in town were too long so I needed a spacer. As the pictures show, the best thing I could find was the handle of my disposable razor, cut with some scissors – yuk!

After a few hours debugging, the system was put to the test. I transcribed 16min of recording in about 3 hours. I was amazed it takes so long!

The basic usage is to start the program, listen and transcribe simultaneously until ones mental buffer reaches capacity, then hit the foot pedal – whilst continuing to type from ones mental FIFO. The first pedal press pauses playback and rewinds five seconds. After transcribing as far as memory permits, the pedal is pressed again, restarting playback. The five second rewind permits error checking and allows you to re-sync with the data-stream. Further, consecutive stop-start cycles rewind further in blocks of approximately five seconds.

Using the vlc RC interface in addition to the standard gui permits more advanced functions to be performed in the “normal way” eg slowing playback by clicking a button.

joy-pedal

joy-pedal-use

I intend to leave the “pedal” with Anne in actual deployment so hopefully there will be more feedback soon.

Ps, using the vlc RC interface in the manner I have is a really bad idea, its massively un-resilient to change because it is not possible to flush the pipes. Hence it is easy to get in an unexpected state – see all the debug statements left in!

Pps: This is a sample of the interview I transcribed:

” But I mean there are, you, you, you could actually, there are places which ive tried to do something with temporarily. But its not warm, its cold. It lets all the cold air in so therefore its not efficient. It lets all my heat out as-well, if it lets the cold in, the heat must go out.”

I dont envie Anna, its really very hard dealing with what is being said on the recordings, mainly because people often tend to mumble total drivel! Good luck to her.

Ppps: Thanks to Mr Steve who gave me a quick pointer on the tkinter being included in python.

PCB Specs – The hole-ey grail

January 27, 2009

It always seems impossible to get any information When dealing with PCB houses. When asked for specs, they usually reply “If you send us some plans we can advise you”. This is epically dumb, then I have to find out by trial and error, where a whole iteration potentially takes a whole pcb design/route procedure. If I knew what made things easier/what the limits are then it would make both my life and theirs easier.

Whilst writing a library for generating pcb footprints(more soon), I stumbled on this document. It appears to be some sort of spec and appears to be superseded by IPC-7351 but it does at least provide some information about things to consider like fiducials, pick and place, solder mask clearances. Even if these things are wrong/old, the presence of these considerations is more than anyone seems to be willing to tell.

Why didn’t they teach this kind of stuff at university…..that might have been useful!