Friday, 3 March 2017

Our Nissan Leaf: experience so far

It's getting on for a year now since we bought our first electric car, an ex-demo Nissan Leaf. So far it's done exactly what we wanted and expected. First and foremost, "it's just a car". It's not some weird experience to get into and drive, you just get in press the button and drive it like any other automatic car. We have had no technical issues with it yet, and it still seems to behave exactly the same way it did when we bought it. I'm not sure how many miles we've done, but it must be around 8,000 I think.

Pros:

1) It's just a car
2) It gets you to where you want to go
3) It's comfy and quiet
4) It's cheaper to run than our diesel burner (quite a bit cheaper, but sorry no I don't have exact figures)
5) The traction control is pretty good in the snow
6) There is almost nothing to service/worry about servicing
7) It has good ground clearance (which matters where we live)
8) It does 0-60mph in just over 9 seconds (we timed it very precisely using an Android phone stopwatch and the speedometer)

Cons:

1) People assume that you believe that you are saving the world by driving an electric car
2) People feel the need to point out that the electricity that you use generates carbon dioxide
3) People feel the need to point out that electric cars are crap (even though they've never owned one)
4) It is only capable of doing about 95% of the trips that we do (we drive our other car for the longer trips)
5) There are no fast chargers around Aberystwyth
6) I don't get to drive it much (I usually drive the diesel burner)

Conclusions:

I like it. It's cheap to run, and hopefully will be cheap to maintain due to all the complicated bits that are missing (like the engine, clutch and transmission). It's irritating that everyone assumes that you are a naive tree-hugger who doesn't have a clue about anything technical because you own an electric car. It's pretty much the ideal second car as far as I can see: the range limit (about 85 miles if you drive conservatively on hilly Welsh roads) is a bit limiting and precludes it from being our only car, although if there were one or two more public fast chargers around it would be a lot more viable. If it had a range of (say) 200 miles then I think I would be happy to have it as an only car. Nissan say here that this is going to happen soon, but we'll wait for an ex-demo/secondhand one I expect. Please don't bother telling me that I'm an idiot for buying this car, there are many other better reasons for calling me an idiot.

Tuesday, 9 February 2016

Teaching and learning

I've been doing some mulling and wanted to post something, partly to get ideas straight in my head, and partly to try to let people know how I (and at least some of my colleagues) feel about some of the issues around delivering modules to students in university. So here goes...

Teaching is mainly quite fun and hard work, but is not quite as simple as it may seem. Learning should also be mainly quite fun and hard work, but it is also not quite as simple as it seems. Particularly in a university context. Teaching my kids to ride a bike is an example of a kind of teaching that is very easy for both the teacher and the learner to appreciate: you know when you've got it wrong (it hurts) and you know when you've got it right (because it doesn't hurt). Riding a bike is a difficult to master but simple skill. You will often encounter very similar conditions in which you ride a bike. You may choose to ride your bike around Nant-yr-Arian or up and down steep hills, but you will be deploying the same basic principles many times over. You may need a few new ones to deal with new situations, but you are essentially building on a core principle and honing your abilities.

Unfortunately teaching and learning at university is nothing like that. Writing computer programs to implement software systems uses a set of skills that you could choose to view in this way. You will use variables, parameters, functions, loops, if statements etc... each time you write a program (assuming you're using Java or C or something similar), and you could argue that this is analagous to riding a bike. However when you build a significant piece of software this is a tiny part of the problem. You also need to understand the domain of the problem, any other systems or libraries that you need to use, how to structure a sensible solution, the time and space constraints and characteristics of your system and a whole load of other things. If you get any of these conceptually unrelated things wrong then your system is likely to fail completely. It's very difficult to "go slowly" or "get off and walk" as you would on a bike.

But it's more different than that.

The idea of studying computer science at university is not to teach you to write good programs in Java or C++ (or whatever). This should not be a surprise, but I fear that it will be for many students. The idea of studying computer science at university is to develop a sufficiently good understanding of the fundamental issues of computer science that you can understand, analyse, predict the behaviour of and create computer systems in a wide variety of settings and applications. The idea is to equip you with the intellectual tools to allow you to tackle a wide range of problems in computing. The precise set of intellectual tools that we aim to provide depends on what degree scheme you are on. A happy outcome of acquiring this set of intellectual tools happens to be that it will make it possible for you to relatively easily learn any of the huge variety of programming languages that are out there and to write good programs in them.

The process of trying to help students to acquire a set of intellectual tools appropriate for any discipline, whether it be history, French, philosophy or whatever, is fraught with many dangers and difficulties. Computer science is particularly fraught because it is such a young university subject: no-one can really agree on much about how it should be taught or even what the essential intellectual skills are. Whilst philosophers are an argumentative bunch, I suspect that most of them would be able to agree that there are some really fundamental ideas at the heart of their topic and some really well rehearsed arguments about them that any philosophy student should study, maybe something like the nature of knowledge (epistemology) would be considered to be one of these fundamentals. Computer scientists can't even agree on whether or not, and certainly not how, we should teach programming (yes there have been very good computer science courses that didn't teach programming).

So whether you like it or not, computer science students are guinea pigs. Philosophers have had a few thousand years to figure out where some of their priorities lie, maybe in a few hundred years we'll have some better understanding of what computer science is all about.

In the meantime we are trying to teach people using whatever ideas and tricks that we can. For example in my ubiquitous computing module I regularly set an impossible problem in order to get people to think through possible technical solutions to parts of the problem. Not because I expect them to solve it, but because I want them to think through a difficult problem in a scenario with which they are not familiar. I want them to got through the process of assessing which parts of it they think they can tackle, and to use the intellectual tools they have acquired in this module and all the other modules that they may have sat to create potential solutions to parts of the problem. For me this process of understanding an application area outside computer science and developing sufficient understanding of it such that you can create solutions in that area is at the heart of ubiquitous computing. That is one of the "tools" (probably the most generic one) that I would like people to take away from this module: the idea that you have to study and think about the scenario which you are tackling in order to produce effective solutions. I don't really care about what the particular scenario is, but I do care that people go through the process of understanding it, thinking about it and finding technical solutions that fit into it. Because that is the kind of skill that will be useful for them in this area in future.

This is where the difficult learning bit comes in. Unfortunately you have to trust us when we tell you that this stuff is "good for you". Even if you don't believe the rationale that we give you for trying to solve an impossible task. It really does seem to work. Honestly it does. But it does involve some seriously hard work to do this sort of thing, both in terms of reading, thinking and investigating, but also in looking beyond your immediate boundaries. Having said that, we have only had a few decades to try to get computer science teaching to work, and in the case of something like ubiquitous computing even less. We (at least I) do get things wrong, but I really do believe that we need to concentrate on things that are more fundamental than just how to write good Java or C++. I think teaching you to write good Java or C++ can be a useful exercise, but trying to help you keep your eye on the bigger issues is also very important, and I for one will keep trying to help students to think beyond the obvious and immediate. I also think that that is what good employers want. If they want you to write Java or C++ then so be it, but they will also want you to be well-informed enough to understand the pros and cons of various approaches and to be able to understand and work with experts in other fields.

In short, I think that you do need to "get your head down" and tackle the tasks you are set, but that the really useful learning is in the time after you have done the assignment or sat the exam when you sit back and think "Ah, so that was what that was all about!".

Saturday, 22 November 2014

Cello...

So after a lot of talking about it and a lot of time making sawdust and wood-shavings in the shed, I finally feel as if I've made enough progress on this to bother to put some pictures up about it.

The original idea was just to have a go at making a cello, but it has drifted into the idea of making a cello out of wood from as close to home as possible. This mainly happened because there was a fairly big Sycamore in our back garden that was shading everything out and when I felled it it was pretty sound inside and big enough to get a one-piece cello back from. I'm hoping to get a piece of willow that blew down in last year's storms on campus, but I'm still waiting for it to get sliced up (and it's not as close to home as the Sycamore).

So here are some of the lumps that came from the tree:

          

Not very subtle slices were hacked out with Ieuan's chainsaw and then planed down to make a slab suitable for a back:

       

I marked out a (fairly over-size) cello-shape from the plan that Mick-the-real-luthier-De-Hoog sent me (thanks Mick!). Then spent a few hours whittling away at it to get a feel for the quality of the wood and how it would shape up. It was quite fun getting the basic shape and profile:

    

Having done all this (good fun) whittling I realised that actually I should have been making the ribs and middle bit first and that I was just putting it off because it looked hard. So I started out by making a former:

 

I made it from a sandwich of plywood and spacers held together with screws so that hopefully when it comes to time to get it out it will be easier than doing it in one piece. Then I asked Matt-the-man-with-proper-tools to slice up one of the bits of Sycamore that I had crudely slabbed and he provided me with a nice pile of rib material around 2.3mm thick. I then spent a jolly day in the shed with a plane, belt-sander and set of cabinet scrapers to get them down to the recommended 1.5mm. After lashing-up a bending iron from an old piece of boiler pipe and a hot-air gun:


 I was ready to bend the ribs. The boiler pipe is about 3mm wall thickness and started out as ~5in diameter. I crushed it in the vice to get curves that looked about right for a cello and then almost blocked the end with wire-wool to keep the heat in and it worked surprisingly well for bending the ribs with the hot-air gun running whilst I worked. Had to be a bit careful to avoid burning too many bits of skin, but no trips to casualty yet and just a gentle aroma of singed hair.

So after chiseling and gouging out the blocks and bending the ribs, this is what it looks like at the moment:


 

Close-up of one of the C's:


Not a perfect fit, but close enough to pull in gently with clamps. That's the next step, think I'll do the pieces one at a time over a few days. The blocks are glued to only the top layer of the former with deliberately bad joints to try to make it easy to chisel them out when the time comes.

In the mean time, I stole one of Ieuan and Elizabeth's Sitka Spruces to use for the sound board. I took one from the edge of a bog which had stunted its growth a fair bit, so the rings are fairly close together. Not big enough to do a single piece, or even two piece soundboard though, so may end up being three pieces glued edge-to-edge. The Sitka logs:

 

 The Sitka was the furthest from home that we have had to go (about 400m).

Hoping to get a fingerboard and pegs out of some pieces of hawthorn that I cut down earlier in the year. Not sure how it'll be to work with, looks pretty dense and hard, but we'll have to wait and see:


The Sitka has been sitting in the shed for a couple of weeks now, so I need to get it sawn up (properly this time) and then give it a good few months to dry out before trying to do anything much with it, so don't hold your breath on an update!

Tuesday, 13 May 2014

Ysgol Gymraeg Prosiect Gofod (High Altitude Balloon)

I won't even try to do this in Welsh, sorry! If anyone feels like translating it that would be great...

So we're trying a High Altitude Balloon launch from Ysgol Gymraeg Aberystwyth sometime soon, and I've been tasked with getting the bits and pieces together for the launch. I started off with a "keep it simple" attitude, and I've avoided having any electronics in there that are home-grown. I've opted for a GoPro looking sideways, a simple GPS/GSM tracker and a smartphone looking down (and providing back-up tracking). I went for a Hwoyee 1000 balloon (which is almost certainly overkill) to let the kids have some payload left for a cardboard construction around the main payload capsule which is going to be a hollow polystyrene sphere.

So far I have most of the bits together:

Payload capsule halves

And the two halves slotted together

GPS/GSM tracker

Parachute
The polystyrene sphere is 250mm diameter and came from Ebay for a few pounds (I bought two because they looked so useful!). The tracker was also from Ebay and is basically a cut down mobile phone. If you send it an SMS or call it it is supposed to send you an SMS back with its latitude and longitude and a link to its position in Google maps. I haven't yet installed a SIM and tested it... soon now. The balloon and parachute came from randomsolutions.co.uk who have a good range of stuff on their site.

I knocked up a spreadsheet of weights (click to view):


The long and the short of it is that with the 1000g balloon we are going to have bucket loads of lift to spare which should mean a good fast ascent and hopefully the balloon will land within a sensible distance of the launch site.

This site has a nice calculator for ascent rate etc...

http://habhub.org/calc/

And this one does trajectory estimation using the ascent rate from above (I'm working on ~6m/s):

http://predict.habhub.org/#!/uuid=e9dc794115cc0c3d5b94ecf4d6d40dcdfcb442b8

Aberystwyth's latitude and longitude is around 52.4N 4.1W (remember that West is negative for longitude).

I need to do a little engineering to mount the GoPro and phone and I think we're supposed to be doing a parachute test with a realistic payload so a nice exercise for the kids might be to weigh and measure the internal components and make models of the correct size and weight to put in the dummy launch which will stop us from breaking the real ones in the test (and might even be a little bit educational).

9th June 2014 update:

So I've been a bit slow updating this, but there has been lots of progress!

I have now tested the GSM tracker above and it seems to work a treat. It ran for just over a week on the dashboard of one of our cars and had an accidental trip to the Eisteddfod in the meantime. I can call it from my mobile and it sends a text message with the latitude and longitude and a link to the location in Google maps. I have also put a SPOT tracker inside the polystyrene sphere and checked that it can transmit in tracking mode and it seems to work fine.

We are aiming for launch this Thursday, and it looks pretty good at the moment with light Westerly winds meaning a fairly short drive for the recovery team.

The capsule looks like this with the GoPro and phone (cheap Orange Stockholm):


And like this in the inside:


(I may use something other than sticky tape for the final release, although I might just upgrade to gaffer). The whole assembly will look like this, but hopefully with a cool cardboard and paint rocket built around the sphere:


I started the project with a "no home-brew electronics" rule, but I may have broken that now... I'm thinking about putting a moteino (very cool!) with an accelerometer, gyro, magnetometer, thermometer and altitude sensor in there. The moteino has a built-in 433MHz radio transceiver, so that would allow me to have a down-link during the early part of the flight. I may be up late on Wednesday night.

Launch conditions for Thursday look pretty good, and the trajectory prediction says it will come down somewhere near Llanidloes:


Fingers crossed!

10th June update:

So after a little high quality engineering from blwyddyn pedwar and Mr Jones (see http://www.ysgolgymraeg.ceredigion.sch.uk/staff.html for mug-shots of those concerned) the capsule has been converted into a full-on inter-planetary spacecraft:


... which is proudly displaying the logo that the children designed along with one or two of the school's sponsors:


So all the cameras are fully-charged, the trackers are set-up and ready to go and the helium is ready and waiting. What have I forgotten? I don't know... if I knew then it wouldn't be forgotten would it?! 

Weather still looks good for a touchdown somewhere around the Llangurig, Llanidloes, Rhayader triangle. I expect the flight to last a little less than 3 hours with around 1.5 hours of communications black-out when the balloon is too high for the GSM network to allow communication and when the satellite tracker is also above its rated communication altitude. It'll be a bit scary not knowing where it is for that long.

The last little frill I'm hoping to add is this:



... which is a moteino from http://lowpowerlab.com with a GPS module and a "10 DOF" inertial measurement unit. Moteino's have a 433MHz radio module built-in and I'm hoping to find time tomorrow to write the code to relay live the position, temperature and altitude to a ground station. I have a nice big 433MHz Yagi antenna which should mean that we can receive data for the first few thousand metres of the ascent, but with no time to test beforehand it's a bit of a gamble, but adds a bit more fun to the whole thing. It works on my living-room floor, so it's bound to work at 10,000m isn't it?

11th June update:

So it's 11pm and I just finished the code for the moteino. It now logs the temperature, altitude and position in the on-board flash (in a format that I can recover sensibly) and transmits it as well. The ground station is a nice high gain (11dB) Yagi antenna with a second moteino wired in to it. No time for any software for the laptop, so it's just logging through minicom to a file for eyeball analysis. Despite it being a bit of a lash-up I'm quite pleased with how the receiver looks and works:


The black blob at the end is a heat-shrink covered moteino soldered directly to the antenna connection cable.


Looks a bit odd to have a USB cable coming straight off the antenna, but it seems to work quite nicely. It'll be interesting to see how much range we get from this arrangement.



And last but not least my very high-tech checklist (every project needs one). All ready and nearly 12 hours to spare!

12th June update:

We went down to the school this morning around 8am for radio interviews and set-up, all went well apart from it taking a long time to fill the balloon (around an hour!). I think I need to invest in a better filling mechanism... the payload was attached and the balloon was released (after the obligatory countdown) at around 10.45am. The moteino radio relay worked beautifully up to around 3,000m, and then we watched it for a further 15 mins or so as it disappeared into a clear blue sky. Then it was all very quiet... for a while... until around 1.30pm when we got a position back from the GSM tracker (don't ask about the SPOT!). So the recovery team are en-route to pick it up from a field a bit North of Llandrindod Wells. Hopefully some of the images will be worth having and I will try to post some tonight when I get the memory cards back. I'll also post the data from the moteino if it's worked properly. Watch this space!


Picture I stole from Hannah taken just before launch.



And away she goes...

13th June update:

So after a bit of a drive and some wandering around Emma and Nic and the children found the almost completely undamaged capsule (pic to follow sometime). I then spent about 10 minutes trying to open the GoPro case (it was "full" of vacuum), which involved prodding the sealing rubber with a knife to allow air to re-enter the case. Then I took the images off... Wow! Some really amazing ones. Please feel free to use the images, but I would appreciate it if you make sure to credit them to Dr. Mark Neal, Aberystwyth University, and ideally to mention Ysgol Gymraeg Aberystwyth too:

First image after lift-off


Looking South


Aberystwyth University campus and Waun Fawr


Mid-altitude looking South


Aberystwyth


Looking North (Aberdyfi)



Higher altitude with nice black sky




The moment the balloon burst... we were amazingly lucky to get this shot! The parachute is still folded, and I suspect deployed fairly rapidly after this shot. Estimated altitude of 31,000 metres. This is based on data from the on-board monitors and the time elapsed after they failed (future post will describe the (badly corrupted) data that was stored on the moteino flash.


The whole of Cardigan Bay and hints of Eire in the background.


Looking South over the Severn estuary to Devon

I will post again when I've extracted all the good data that I can from the altitude and temperature log.

Wednesday, 11 February 2009

Well Here I Am...

So I thought I'd try to get going on the blogging scene... watch this space!