What’s this about?
This is the UK website for Peter and Maureen Scargill. We live in the Northeast of England and also Andalucia in Spain.

Read through the blog entries, menu-accessible pages and archives if you're interested! Welcome to Peter and Maureen's website.

Get in touch via Facebook My Facebook Page
You should follow me on Twitter Follow me on Twitter
Join my LinkedIn network Join my network

Pete's Online CV
Archives

The Richmond Event (#ITDF)

Several of you have asked where I’ve been this week and what I’ve been doing – so here it is..

West Quays Shopping CentreOn Wednesday I flew down to Southampton (from Newcastle) in the morning to embark on what is now the second Richmond event I’ve attended… the annual IT Director’s Forum.  The journey consisted of the flight and a train ride to Southampton Central station.

Thanks to flight times etc., I ended up with some time to burn and went for a short visit to the West Quays Shopping Centre, nothing to write home about but a pleasant and modern centre with a decent mix of the usual imagination-less chair restaurants, the only exception in my view being Pizza Express who do a pretty good imitation of a real pizza – and that’s where I had lunch.

Aurora ShipLooking at the street signs the docks didn’t look that far away so rather than taking the planned shuttle bus as per the previous year, I walked down to the docks. Won’t do that again,the weather was nice but it was quite a hike and I arrived at Dock 10 late afternoon in time to board the Aurora with utterly flattened feet.

Aurora entranceOnce safely on-board the Aurora (a P&O ship able to handle 1200 passengers – the smallest of the fleet) I attended the opening talk by the proprietor of Richmond events who broke the bad news that the broadband was going to be crap throughout the event.

This was swiftly followed by a keynote speech by Mary Portas who described her experiences and views on everything from the smallest stores struggling to come into the 21st century through to the largest supermarket chains.

Considering that Mary’s website describes her as “the UK’s foremost authority on retail and brand communication, I must say I didn’t entirely agree with everything she said, especially on supermarkets  and didn’t consider her that inspirational but Mary Portasnon-the-less she managed to entertain everyone. With all on-board, mid-evening we set off on our journey to the channel Islands which was to take most of the night. Dinner was a casual affair and our hosts were pleasantly un-commercial – we all had a nice time.

Shortly after arriving on the board, I’d met up briefly with Elle who is one of the organisers and it’s really nice that she’s been reading my blog since last year and keeping up with what I’ve been doing so I hope she likes this.

With the ship under way to our destination just a few miles docked off the channel islands, dinner was fine if a little pretentious (“Braised Pave of beef” and other strange titles such as “Baked Tartiflette Potatoes littered the menu) but the important point of course was that the hopeful suppliers paid for the drinks. The night was interesting – I’ve no gripes about my room, balcony view of the sea and sizeable area for a ship, the room was comfortable, the movement in the face of considerable sea-power was not. Everyone commented next morning that the night was “rough”.

Around Guernsey and the IslandsSo the way this works is simple enough – 3-night cruise, sponsored by sales organisations – IT directors and professionals get the decent rooms around the outside of the ship, the sales people get the inner rooms – they pay, we don’t – simple enough. In return we agree to meet them in short matchmaking sessions in between insightful seminars – obviously they hope we’ll do business and in many cases that works.

All in all though it takes a bit of stamina, a worthwhile two whole days of which I’ve just finished the first. Saturday morning we disembark – I’ll be taking the coach this time to the central train station which is then just one stop to the airport. Should be back by lunchtime Saturday which is great as I’ve some R&D to do before we have friends over for the evening.

John AmaechiThursday morning we started bright and early, breakfast sponsored in my case by a company called Capita. Breakfast was ok but it’s the one meal of the day I’d rather  have a buffet.  I went on to participate in a discussion on BIG DATA which was more than useful followed by another REALLY interesting discussion on mobile access and security. In each case a facilitator enabled maybe a dozen of us to collaborate and share ideas. 

tmp60A1I facilitated a couple of these discussions the previous year and it was gratifying that some folk remembered me! I then listened to a talk by John Amaechi MBE, a psychologist who is notable by his basketball background and the fact that he stands 6ft 9 inches and 23 stones in weight (and has size 15 shoes) – very interesting as he described the difference between good and bad management.

Lunch was great – I met a couple of people I’m sure to keep in touch with as we have similar interests. After a couple of business meetings in the afternoon, I attended a talk by David Smith – economic editor of the Sunday times who made some predictions for the future and described the on-going effects of the recession – interesting that China is now the leading economy and the entire wealth of the world is steadily moving in that direction.

We had a great session with Clive Panto who put us through some intelligence tests which I have to say my group failed miserably but had a REALLY good laugh in the process (If I tell you that one of the tests was to drop an egg from the ceiling to the ground without breaking it – within 5 minutes we’d broken our first egg and when it came to the presentation of results, which I did – we had the perfect solution, sadly as I was just about to climb the ladders to the ceiling (yes, on a moving ship) the egg fell out of my hands and smashed on the floor which resulted in lots of laughter..

PoolThat evening after celebration drinks (as these events have now been going on for 25 years) we had the first of two Black-tie dinners – interesting as I didn’t bring a black tie.

Well, it’s an IT director’s event – I figured open neck might be more the norm – that’s what I get for thinking. I was not however alone by any means.

Friday and more business “dating” meetings, some talks including one about the automation of life and work in the age of smart machines (in which I’m particularly interested of course as someone deeply entrenched in the “Internet of Things”) and the question in one talk was asked “are we innovating ourselves out of the door. The last session of the day was a wine and cheese tasting event, I found time to go soak in the pool, visit a short cheese and wine testing and then the second formal dinner.

tmp74E9Meanwhile I’ve been asked whether I will chair and present at a major Intranet event next year which gives me something to ponder over the next few days.

And that, in a nutshell, is that. Hope you found the blog interesting. And just for that… here’s a picture of some cows I took on the way home and a map showing where the ship was docked for the duration.

Cows

The cruise

Home Control September 2014 Update

Streuth.. I’ve just realised I’ve been running this blog since 2005! Doesn’t time fly. My interest in using Atmel technology for home control started with an article I wrote back in 2012 simply called “Home Thermostat”. At that time I was just playing – but messing with prototypes really isn’t much fun so shortly thereafter I design the “UberBareBoard”. That article was followed up by my first attempt at home control over the Internet and part 2 by which time I was starting to see some real potential for not only my home but our holiday cottage business and for our place in Spain.  Then came more updates as I got to grips with the more powerful Atmega1284p chip and started to develop my own PC-based test tools. By July I had it all figured out – or so I thought – using RF24NETWORK software providing a mesh-type network of radios still using the NRF24L01 radio.

Amazing how things change. The NRF24L01 boards which – I’ll grant you are cheap, continue to function poorly –they do not like stone walls and the RF24NETWORK is not a true mesh – you have to specify every node in the mesh which makes replacing boards a lot of fun.. and it really cannot handle one of the boards going offline. Finally, no-one has yet made effective use of interrupts when using these radio boards in a network – which puts further limitations on what you can do – as you spend your time constantly polling the radio network.

Over the summer, my pal Aidan and I have been working hard – we now have a decent Atmega 1284-based board to work with – you’ll see it below. Late July I discovered the Radiohead library – the nearest our little processors have come to seeing a proper mesh network.. but that now pushes the 328 chips out of the window – as the library takes them near the limit of their available program memory and as for the tiny 2K of RAM – just not enough. For boards at the end of the chain, perhaps – and I have 3 working installations using these – but for the master board, the 328 is no longer an option.

In August while enjoying the sun, it hit me – the NRF24L01 chips don’t have the ability to know how strong the incoming radio signal is – so how the hell can a network possibly know which is the best unit to route the signal through – and that started me on the hunt for alternatives – which brings us neatly into this post.

If you’ve been following my blogs you’ll know about my on-going work on home control but firstly you’ll see the phrase “Arduino” bandied around. I use this merely for convenience as I use a lot of the Arduino libraries out there – but my boards are home-grown. I’m particularly fond of the Atmega1284p chip because, unlike the standard Arduinos you see our there, this has 4* the RAM – which means it’s less likely to run out. It also has 4* the FLASH memory – so just when Arduino sketches are running out of room, the 1284p is just getting started.

AiduinoI used to use hand-made boards and there are plenty of those lying around, but these days I’m using a design we put together called the “Aiduino” – so-called because my pal Aidan did the board layout. This particular design has stood the test of time and I use these on everything. It has space for both 3v3 and 5v regulators, the chip, the usual support components and that’s about it.

You’ll see a typical Aiduino above with edge connectors for all the port pins and an SPI connector near the middle. I don’t bother putting the programming interface on the board as the low-cost FDDI interfaces do that all for you – why waste valuable board space. I simply allocate a 6-way connector on the edge of the board for programming.

Armed with these boards, I have LCD display controllers (for wall mount displays), a master controller with Ethernet card and “slave” units to control lighting etc. All of these units talk to each other using NRF24L01 radios which are very cheap 2,4Ghz popular radio modules. There are two problems with these radios – firstly they are very low power and secondly they are on the same radio broadcast range as just about everything else including WIFI – and they DON’T like stone walls.

I’ve looked at the cheap FSK units as used in radio remotes – no-where near powerful enough.

Aidan and I are investigating some Atmel chips with on-board radio – these look promising but getting all of that running in the Arduino IDE and hence keeping access to the Arduino libraries – is proving a challenge but watch this space as he’s working on this right this minute. We’d like to produce (where others have failed) a tiny radio module which runs on SPI and which internally handles all the mesh coding and massive buffering – as well as offering other functions to take the load off the main boards.. Meanwhile…

tmpB859I’ve looked at the RF22 modules – but these come from the USA and hence are a little expensive (inc. postage).. but only in the last few weeks have I discovered even cheaper Si4332-based radio boards from China which are compatible with the RF22 modules and hence can work with the likes of the Radiohead library for Arduino – a simple but fully functional “mesh radio” library. Not only that but these radios and library combined, unlike the slightly less expensive (but only just) NRF24L01 units, make good use of interrupts to ensure you can actually do something else while the radios are working!!

See the radio on the right – that’s one of them. They are tiny which poses a problem for prototyping as the edge connector is 0.05” pitch – but it’s do-able with care.

Below you’ll see one of my bodged Aiduinos which has the radio board mounted on top of the 1284P chip. If this all pans out I’ll make a board that incorporates the radio… and in the process of research I’ve found out some interesting things about these little radios.

tmpCF15I can say that I’ve had 3 of these running in mesh mode and the range covered by 3 equally spaced units (the centre one acting merely as a message relay in this case) covers from my garage, to my greenhouse – through 4 stone walls and an intermediate lightweight wall – which is WAY better than the NRF24L01 chips can manage.

At first I managing a couple of message round trips a second – I needed to get the speed up to dozens of round trips a second in order to allow me to, for example round-robin poll several units to update the mobile phone.

Well that worked too thanks to some help from the designer of the Radiohead library – a change from the library defaults brought me to 100 package round trips a second – when I say package – we’re talking about, say a 20 byte package going there and back – and with additional maintenance bytes (from, to, ID etc.)

The chip used in these radios, the Si4332 is supposed to handle a maximum +20db output  – I managed +17db – but I’m convinced the little spring aerials are now the limiting factor – with full power I can now get through 2 stone walls but not right across the house.. but WAY better than the NRF24L01 chips even when the latter have stub aerials.

To run these radio boards, they need 3v3 power. Our Aiduinos run on 5v but have 3v3 out. You can feed the one output from the radio directly but the inputs to the chip might be damaged by direct connection to 5v logic – one option is a level convertor, another is a resistive divider. I found that for the 3 inputs that need it, 470r series resistors do the job just fine (The NRF chips work off 3v3 but will accept 5v signals directly). Why don’t I just run everything off 3v3? Speed and driving other devices, that’s why.

I’ve now modified the Radiohead library so that I can also get a flag when data is passed THROUGH the unit so it’s now possible to indicate the success of not only incoming packets but those passed on elsewhere – very handy for debugging and there’s nothing wrong with pretty lights anyway.

So there it is – what looks like a reasonably inexpensive radio solution for home control and with a tiny mod, the standard Ethernet library handles the Atmega 1284 chips no problem – it’s detailed in here somewhere but boils down to adding the chip to one of the library conditionals for the Mega boards. I did notice when these radios are running constantly, a slight decrease in range of my plug-in-the-wall mains controller handsets as they are on the same frequency range – but in my application, such all-out non-stop transmission would only occur when say the mobile phone is actually polling the units – otherwise it’s just about occasional updates and checks. As for the handsets interfering with the network – they don’t – maybe thanks to the frequency-hopping technology embedded in the boards. Incredible technology for such a low price.

Far more to come in the future. I plan to add moisture detection for our plants, gas monitoring for the home, I already have lighting and heating control working in 2 of the properties. I also have IR remote control and radio mains control underway. Do look in.

This is the latest to date in my series of articles on home control which started with my original article on a cottage thermostat in which I envisaged a very simple controller. Then came the UberBareBoard article about an Atmega328-based Arduino clone, initial attempts to master the NRF24L01 radio. The next article was the first item entitled home control and after this – then part 2 and then the winter update – then the April 2014 update and then things really started to move as I discovered better networks – then came the full mesh article – by this time I had everything starting to run the way I wanted things but for the radio network – as you’ll realise by now, that issue is starting to disappear.

USB Charging Perils

Why should you read this? Are you interested in reducing your USB gadget charging time by up to SIX TIMES? Do you want to fast-charge your phone or tablet as never before?

For some time now the subject of USB power supplies has been in the back of my mind.

How many times do you hear "this is taking AGES to charge"? How many people wonder about their tablet chargers or the leads? Why do some chargers and leads work well and others not?

Well, it’s simple enough really – the more current you put into a device (within limits) the faster it charges – but what’s the bottleneck? Why do car chargers sometimes take ages where a plug in the wall charger might do better?

To start with – the original specification for USB meant that chargers need deliver no more than 500ma (half an amp) and that’s pretty useless for modern tablets with their large batteries. So, there are endless chargers out there which deliver 500ma or much LESS. But unless stated, how are you supposed to know – and in any case, it could be that they’re just not putting enough VOLTAGE out (the specification is 5v but there are tolerances – the cheaper the charger the further off mark it could be – at one end that is dangerous – at the other end you just get less charge).

Then there are the LEADS – some modern leads look pretty (flat coloured ribbon) – but thin leads can mean lost voltage along the length. I’ve seen some leads so thin there is NO chance of them delivering high current.

There is ONE way to test this – simply look to see how much CURRENT is being delivered – then you can check all combinations of your LEADs and your CHARGERS to see what’s best for your phone.

And how do you do that?

If you don’t want to do any messing with meters and razors – simply go to the section called TESTING – you may still learn a lot – I did! But there’s nothing really like first hand experience and results are so variable you really do need to do some testing yourself – but read to the end – HELP IS AT HAND… I’ve already placed my order!

Hardware

Take a SHORT extension lead which has a full size MALE USB at one end and a full size FEMALE USB at the other (and if it isn’t short, MAKE it short but only if you know what you are doing). The chances are if you open up a USB extension lead with a razor (be careful and only do this when it’s NOT connected) you should see 4 wires inside – red, black, green and white. The latter two are data, the black is ground and the red is 5v. CUT the RED wire – and simply stick a multimeter in the path – set to high DC current.

I did this work for my own needs but you might as well reap the benefit!

tmp8ADETo start the ball rolling simply take a short USB extension (see the image to the left-  note both MALE and FEMALE connectors) and a razor. It is VITAL that this lead is short, say no more than 250mm or so. You don’t want this lead contributing to the problem!!

CAREFULLY cut the lead along it’s length for around 75mm or so, somewhere near the middle – not important where. The idea is to remove the plastic – WITHOUT cutting the leads inside – if you mess them up – bin the lead – get another  – start again.

tmp9230You MAY find a braid inside – or just 4 wires. If the former, fiddle with it until you can get to the wires inside. If you end up breaking the odd strand of the BRAID, it doesn’t really matter but do as little damage as you can. Just make sure you don’t break or damage the 4 wires (red, black, green, white) inside. If the wires are not coloured as stated – BIN it and get another – no point in taking chances – these are dirt cheap on Ebay.

tmpFEE7So now you have exposed 4 wires one of which is RED. Cut it and carefully strip back the wire. Best bet is to shove both ends into a choc-block.

tmpB57AMake absolutely sure you don’t take any strands of braid in there with you – no, really because if you do you’ll destroy the first power supply you experiment on.

So to recap – what we’re doing is BREAKING the +5v lead so we can insert a meter in series with it – and test how much current is flowing with different combinations of leads and chargers.

tmp456

At this point you’re ready to go. Put the two meter leads into the choc block and make sure you set your meter on AMPS and not milliamps! Mine here is set to 20amps – NO WAY any charger is giving that much out so I’m safe. I can’t advise further here as all meters are different – typically you might have a COMMON connector then one marked AMPS but you’ll need to figure that out.

Testing

Here’s the fun and possibly enlightening bit. HONESTLY at this point I had no idea what to expect and was beginning to wonder if this was all worth doing.

I took a typical USB mains charger and typical short black lead – and plugged it into my wife’s Samsung tablet. 550ma.  I then took a fancy thin Chinese green lead – 600ma.  I was expecting the opposite – that’s what I get for thinking – but we’re really not talking much difference.

Sticking with the green lead I then tried different plug-in-the-wall chargers. The second one I tried offered only 380ma – that means not far off TWICE the charging time (obviously – less current – longer to charge) – the Samsung charger my wife had been griping about – ZERO. That’s in the bin.

I then went on to try different chargers…

White Samsung Charger – ZERO

Black Samsung Charger – 500ma.

Black (small) ASUS charger = 600ma.

All-singing Sandstrom dual charger supposed to put out up to 2.1 amps – 350ma.

PC High Power USB 2.0 hub – 450ma.

As you can see – no apparent sense – why would the largest charger not put out the most charge? The little ASUS put out the most. Quite simply voltage – the nominal 5v of these devices has tolerance (variation) and the voltage will vary from unit to unit, manufacturer to manufacturer. So while there are limits to how much current a unit can deliver, if the voltage is too low – you are simply not going to get the current – results will vary from device to device.

So armed with the best charger (for this machine) – the ASUS – I went back to lead testing.

BOY that was an eye-opener – 600ma from my fancy green flat lead from China which I EXPECTED to perform poorly)– but a much shorter, white, very thin Apple-looking lead – 280ma – that’s well under HALF the charge rate and so TWICE the charging time for the white lead.  How does this happen? Well, very THIN wires tend to drop voltage along their length. Some day I’ll make a super testing station with voltmeters all over the place – but suffice it to say that building this rig and testing combinations of your various USB chargers and leads WILL produce results!

I substituted the high power Samsung tablet for my smaller Nexus 7. Green lead 440ma, white lead 380ma – less marked as the current requirement for the Nexus is lower – but still quite significant in terms of charge time.

My Samsung S4 with extended battery – 550ma for the green lead, 270ma for the white lead – again – choosing the latter would potentially DOUBLE charging time.

Sticking with the S4 – I found an old HTC lead – looked a little thicker than normal – WOW – 720ma.  The difference between the worst lead and the best – THREE TIMES.

Now there are lots of things that come into play here and I’ve not had time to do full tests but at least in theory you are talking the difference between a (say) 4-hour charge – and a 12-hour charge – which would you prefer?

So – what if you’re not a dab hand with a meter and razor blade. Well I can’t make any promises but there ARE amazing USB testers out there – some beauties – some with indicators – some with proper displays…

Cheap – so cheap don’t even think about it – just get it.. but it’s not all-singing and dancing…

http://www.ebay.co.uk/itm/USB-Charger-Doctor-Mobile-Power-Detector-Battery-Tester-Voltage-Current-Meter-/111392024283?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item19ef7b66db

Intermediate

http://www.ebay.co.uk/itm/LED-Digital-USB-Voltage-Current-Detector-Power-Supply-Amp-Tester-for-Mobile-Dual-/301259479998?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item462476dbbe

Or if you want the all-singing impressive type even showing power (which is of course only current times voltage so you could get that from the cheaper ones)…

http://www.ebay.co.uk/itm/Hot-OLED-mini-USB-Charger-Capacity-power-Current-Voltage-Detector-Tester-Meter-/191228344870?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item2c8618fa26

A tester that shows the voltage at the charger end – and the current running throughout – can tell you a lot about the charger ultimate capacity and the lead.

For my final test – on the Samsung tablet – I tested a VERY short USB lead – around 100mm long – don’t even know why I have it – guess what.. 1.3 AMPS – the difference between charging the Samsung with the WORST lead and the BEST – OVER FIVE TIMES.

Armed with my new short lead – I went back through the power supplies – sure enough – more current than before but still pretty awful – but for one black Samsung charger which now delivered to Maureen’s tablet over 1.7 AMPS – let’s have that in perspective – that is SIX times more charge than the worse case. Pretty damned worthwhile research if you ask me !! 

Here’s my advice – buy a tester  – get short, fat leads – pick the best charger. Simples. 

Have fun.

I’m off to put some leads and chargers in the bin!

A Trip to Jodrell Bank

jodrellJodrell Bank was opened in 1945, a mere 11 years before I was born. Today I’d been at a long meeting which had finished earlier than expected and so I headed off in search of the radio telescope.

For the scientifically uninitiated, radio waves are like light but at a much longer wavelength, well beyond our ability to see as is infra-red and ultraviolet light – but all of these are used when surveying the heavens as they each have their benefits.

signJodrell Bank was in it’s time a world leader by some way – so much so that both the Americans and amazingly the Russians requested use of it during the space race! As you’ll recall the Russians were first up with Sputnik and then a dog – all of this was monitored by Jodrell Bank.

jodrell[7]Ignoring for a second the sheer size of the dish and supporting framework (which turns in any direction) there’s a great visitor’s centre with old Pathe film about the space race right from the beginning and there are a host of things for kids to play with.

It’s a kind of strange mix –on the one hand you have harmless experiments and on the other you’re exposing them to mind-blowing information on Black Holes (it’s not that long ago there was no proof they existed – just a theoretical concept – now it’s all over the place).

Anyway, assuming the weather is half decent it’s worth the £7 entrance fee – there are some gardens there as well and a cafe.

Well worth a trip.

jodrell[9]

The Return to Rain

Lake in AndaluciaAfter several weeks of flawless weather in Spain, it’s been a struggle getting back into the swing here in the UK where it is raining more often than not. Still I can always look over there using my cameras to remind me of the sun.

Meanwhile, after months off due to a death in the family and then a broken foot (you can’t make this stuff up) Maureen is now back to work and meanwhile I’m about to embark on a series of meetings taking me from Blackpool to Crewe and onto London. It’s going to be a busy week.

Over the weekend I’ve been catching up with emails, finding out what’s going on at work – and doing a little more research into my home controls as well as catching up on episodes of “Cosmos” – which I intend to continue this week as I’ve loaded up the tablet with remaining episodes to catch late at night in my hotel (well, it beats hotel TV). Got the Bluetooth headphones all charged up and ready.

While we were in Spain I ordered a pair of cheap SI 4432-based 4.33Mhz transceivers and I had high hopes for these after the abysmal results I’ve been having with 2.4Ghz radios thanks to interference from WIFI, cordless phones and a thousand other sources of radio crap.

This weekend I tried the PA-enhanced version of the NRF24L01 radio to help me expand my home control setup – one worked – the others failed as they often seem to do – I can’t get to the bottom of it other than to suspect there is an issue with SPI (communication) speed and these radios – as the cheap ones work every time. Others have said similar. Having abandoned the more expensive types, I used my air gun to remove the aerial from one and grafted it onto one of the cheap versions. As you can see in the image below, it looks ok – simply a matter of cutting the original aerial track – 5 mounting holes and a couple of VERY short wires.

NRF24L01 Peter Scargill modification

I can say for sure that the aerial-enhancement modification is robust and improves range – but I doubt it it even doubles the range which still remains pitifully short in a stone building – and of course the cost to buy these adaptors and aerials individually far exceeds the cost of them as part of a radio!

SI4432 radio moduleI then tried the 433Mhz units which came complete with a coiled spring aerial.  I carefully put two of these units together using our Arduino look-alike boards. These are not easy to use as the edge connector is 0.05” centres – you really need a fine soldering iron which I just so happen to have. Despite all that, I ended up with one board (apparently) working – it the code was working – but the other remained defiantly dead. So many things could be wrong – the code, the wiring, the interfacing… these are 3v3 boards and my Arduino clones are 5v. I fed the boards with 3v3 and ran the inputs to the radio via resistors. I’m pretty sure that part is correct.

tmp7FADIn the process I found a bug in the Radiohead library I’ve been using and the authors fixed it almost immediately which is nice.

The end result looked a little messy due to wiring and resistors – but actually I was quite pleased with the overall fit for a first attempt – not so pleased with one unit apparently dead.

When I checked, the other board had 2 pins shorted – no matter what I did I could not find the short – I can only imagine it was under the 0.05” connector – even a magnifying glass showed no issues – and attempting to remove the connector with the air gun resulted in the board’s destruction. I now have a 2 week wait before I can progress this one (not that it matters as I’m in meetings for over a week). The hope is that these 433Mhz units will have a better chance of going through thick stone walls – I’ll have to wait and see. Next time I’ll nix the connector.  I’m also interested in the new cheap WIFI embedded units which can be bought from Ebay as low as £8 – for now however both the embedded software and the instructions are in Mandarin so that will have to wait a while.

In a couple of weeks I’m going to spent time with a friend as we examine the powerful Atmel radios, not in the same price class but it’s worth exploring all avenues.

Enjoying the Summer of 2014

Lots of info on Facebook and the blog over at www.bedrock.es – right now, Maureen is off with her bad foot to Pilates down in Galera village – we managed a nice trip to Lake Negratin yesterday and last night I did the usual G8 thing, meeting the Brits down at the bar in the village – we had a very nice evening.

panorama

Today I’m sitting here catching up with emails, organising websites (I have them all over the place and I’m consolidating to eventually get to one provider) and working on my home control system so it is reliable over the winter.

I’ve had more than my fair share of problems with the home controller kit here…

1. The heat is generally far more than you’d see in the UK so it’s no unusual to see my office here at 28c – way higher than the UK – this and less than perfect mains power has taken out a number of cheap power supplies. Now I’m using higher rated supplies with success.

2. It seemed like a good idea at the time – as we have wireless Internet here (by which I mean a dish pointing down to the town centre) and the cave is not well suited to drilling holes for wires – I put in an over-the-mains setup with little TPLink units plugged into the mains. Turns out they are not AT ALL reliable and the quality varies for numerous reasons including the amount and type of data you send over them. So – I’m putting everything back onto either WIFI where sensible or hardwired. Thankfully network cable and connectors are dirt cheap here in Spain. Just a matter of drilling holes.

3. My home control coding took a leap forward a little while ago with proper wireless networking – unfortunately like many others I’d not realised quite how sensitive my little NRF radios are to interference, especially from cheap Chinese switched power supplies. That is now resolved and the radio network is working a treat.

I now have the control unit sending me TWEETS reliably when certain events occur – and that’s great. Just need now to get a whole boatload of supplies from the UK

Galera

stars at night

Beardless

beardlessRight now we’re in Spain (pop over and have a look at our Spanish blog or follow us on Facebook)  and as such I recently, reluctantly agreed to shave off the beard (it’s grown back since). In the picture on the left you will see Simon – who convinced me after a few beers that we should shave the lot off.

I got up the next morning and the first thing Maureen said, after months of pestering me to modify the beard, was… she doesn’t like this new look!!!!

You just can’t win. Anyway, right now we’re with friends in Galera – by all means go take a look.

The “Internet of Things”

As this is now abuzz-phrase you’ll see littering the press, I thought I’d put in my two-pence worth on this “new” subject.

The “Internet of Things” is a phrase used to describe things that can be controlled or monitored (or both) over the Internet.

In 1962  I was too young to be aware of what was happening outside of my own house! but at this time, a fellow called Licklider from MIT was describing what he called a “galactic network” concept in which computers all over the world would talk to each other. By 1969 4 machines were talking to each other in what was called “Arpanet” and the rest is well known… today, billions of machines are connected worldwide… but most folk think of everything from large computers down to mobile phones – what is slightly less well known is the massive spread late last century of “microcontrollers” which are now found in most everyday electronic gadgets (washing machines, industrial controllers etc. and which are often connected together by what is currently called “The Internet of Things”. Checkout Cloudwash if you’re interested in what might be done with domestic appliances. Here is another link to a Samsung phone controlled washing machine, the WW9000.

In 1963 my interest in electronics started with a “Philips E10” kit which started me on the path of building radio receivers, controlling lights and motors.. and I’ve been involved with electronics since then, writing articles, building machines and eventually turning my interest into a business in the 80’s and beyond.

In 1974, the X10 protocol was developed in Scotland (but strangely found much favour in America where, amongst others,  Steve Ciarcia made it popular with hobbyists -Steve Ciarcias Circuit Cellar magazine). This was a means of connecting gadgets around the home/office/factory for the purpose of remote control. In this case the signals were/are in fact sent over the mains electricity supply. Other solutions involve WIFI, Bluetooth, general radio, Infra-red and other mechanisms.

That takes care of the local connectivity while the Internet allows that remote control to extend worldwide.

In 1982, students at Carnegie Mellon University created the first ever “Internet connected soda vending machine”. I remember being fascinated at the possibilities this would bring, thousands, perhaps millions of machines of all shapes and sizes being controlled and monitored via the Internet from anywhere in the world. Of course at that time there was not even the concept of an Internet-connected mobile phone so that limited possibilities at the time – but this was enough to start me off and by May 1994 our company had developed a home control system called Appcon which basically let anyone control lights, alarms, heating and more from a PC – and by implication, by remotely controlling the PC, from anywhere. 

We used wire control and the mobile infrastructure was simply not ready for this. Today it is and we’re already starting to see simple light and heating control via mobile phones appearing on the market. We’re also seeing what I believe is only the tip of the iceberg in dire warnings in the press about security.  While Windows and the Internet in general have had a long time to get used to nasty people trying to break in and destroy – to the extent that virtually all of the public are aware of viruses, trojans and other means of destroying PCs, certainly the home control market has to date not been sufficiently important to attract large scale attempts at disruption – but it will happen – it’s just a matter of time.

Part of the problem is that the sophisticated anti-virus and other techniques used to protect PCs are simply not available to the simplest of controllers you might see in for example a remote light switch. Even HTTPS: which is a simple mechanism to encrypt data over the Intranet is mostly not available to the simplest of controllers.

Gartner reckon that by 2020, 30 BILLION devices will be connected to the Internet and bear in mind that the current IP4 system of Internet addressing allows for only 4.3 billion individual device addresses and that includes PCs and phones etc.!! Newer technologies such as IP6 which allow for a FAR greater number of devices are again not really available to the simplest of devices at this time so there are lots of changes and improvements to be made in the coming years.

In the meanwhile, much fun and entertainment is still to be had in this emerging field – enthusiasts using the likes of the Raspberry Pi, Arduino and other technologies are having a great time coming up with new ideas and new applications. The combination of local networking and remote control via the Internet has chance to dramatically change how we interact with the world in the coming years, offering massive possibilities for saving energy and doing things in completely new ways. Expect to hear a LOT more of this in the coming months.

For my own efforts I’m now controlling my own gadgets in 3 properties including modern lighting technologies and heating and already making savings on heating bills.

Home Control – The Full Mesh

Danger sign - Peter ScargillI’ve been working on home control now for many years on and off both professionally and today as a hobby (for now). This blog documents the latest state of play.

My first attempt at home control years ago took the form of a bunch of boards talking to each other around a building by cheap telephone cable. Simple as that may be it can be a deal-breaker when it comes to wives who don’t like wires! Today this needs to be handled as far as possible, wirelessly.

Home Control App - Peter ScargillTalking to a home controller via mobile phone is a no-brainer – simply fit Ethernet capability to an microprocessor board and there are solutions out there for talking to mobile phones, one which takes some work but which yields one of the best visual interfaces to date is NETIO. I’ve developed my own Android software and that works well, but for now, visually, NETIO remains my tool of choice – though lack of updates from the designers is starting to grind a little – such is the way of Apps.

To get instructions delivered around the building, for the last year I have been struggling with a low-cost radio called the NRF24L01 – these are readily available on Ebay and are small and cheap – however they do not suffer stone walls gladly and have somewhat restrictive range, due mainly to their choice of operating frequency – 2.4Ghz which just happens to be the same range as everything from WIFI routers to cordless phones and more. Their advantage – cheap.

Within that restriction they are quite reliable – I’ve sent hundreds of thousands of data packages in a row without error. In order to get past the stone wall issue, it’s no good having a controller simply talking to radio units (which is how you avoid wires all over the house), you need some kind of network so that units can pass message from one to another. Because the Atmel Atmega328 processors I use (custom variations on the basic “Arduino” theme) are limited in capacity, as is the NRF24L01 radio, up to now it has been impossible to to manage anything more than a limited form of hopping network where certain “nodes” or slave units act not only independently but also as “relay” nodes, passing messages on to others and hence increasing the range of the system.

Full MESH Home ControlWhat has always been needed was some kind of full mesh where all units can act as gateways to others and where the failure of one unit results in the mesh re-adjusting itself automatically to handle that. Up to now that’s been a dream but the software now exists to do this – called RadioMesh.  The nearest anyone has come up with until now was RF24NETWORK, a simple network but not a mesh – in this network up to 6 units could each talk to 6 others and so on – the limitations included the need to specify exactly who would talk to who – so if one unit went down it could bring the whole network down. Accordingly I’ve been spending my evenings and weekends gutting my software to try to accommodate some new software which forms a “mesh”… and the work has paid off – I now have a rig up and running.

Mesh Radio Home Control - Peter ScargillAs you can see from the above, I’ve used the Atmel 1284p for the “master” unit – I long since gave up on the 328s for this – just not enough RAM or storage memory  – and I’m now about 2/3rds through the 128K memory that comes with the 1284.  On the other hand, “slave” boards which have no Ethernet can JUST about handle a range of functions and the mesh at the same time.

Each “slave” board has an output to control serial LED strip (which needs a separate 5v supply), 1 Infrared output, 3 normal digital outputs, 3 PWM outputs (again handy for LEDS), 2 general purpose analog (or digital) inputs and 2 temperature sensors. I’ve also incorporated an inexpensive 433Mhz transmitter to replace wireless remote controls – but that’s not 100% yet. The main board has an Ethernet Connection and also an optional output to an LCD display – the slaves also have similar outputs to an LCD display and in each case I made the decision to give the display it’s own intelligence – i.e. it’s own processor – so that I end up using the serial out on the slave boards and the SECOND serial out on the master for this purpose – hence the displays are optional without any software changes.

PC-Based Controller Tester - Peter ScargillThe master board is able to update Google Docs spreadsheets, send emails and Tweet – I’m currently still experimenting with the above as the email tools have a tendency to take too long to operate (but still work).

If you look up “Scargill home control” on Google you’ll find a host of earlier articles including some in-depth stuff and on YouTube I’ve detailed my experiences with the NRF24L01 radio units. Amazingly this has had well over 20,000 views! https://www.youtube.com/watch?v=VgmVYdSCNLs

Next steps – I’m working with a pal and we’re going to take a look at Atmel’s own mesh software for a chip they do with radio built in – we’ve a very tiny PCB on the way from China to test this out  – also I’m pondering putting the radio part on it’s own 328 chip with a slave SPI interface in order to allow it to concentrate on radio reliability while taking a whole load away from the main board. It sounds over the top but given the very low potential cost of a 328 chip and crystal, such a solution would leave more memory and MUCH more program space in the main board for improvements and new features. Watch this space.

This all sprang up from my original article on a cottage thermostat in which I envisaged a very simple controller. Then came the UberBareBoard article about an Atmega328-based Arduino clone, initial attempts to master the NRF24L01 radio. The next article was the first item entitled home control and after this – then part 2 and then the winter update – then the April 2014 update and then things really started to move as I discovered better networks – and better radios in the the September update where I discovered Radiohead, the Si4332 and RF22 radios.

Road Repairs and Northumberland County Council

I’ve put this together to make it easy to ship a link to various people – the entire world if need be until I get a road near our property fixed. Initially I was told the road was owned by Alnwick Estates, they then absolutely insisted that they’d sold it to Northumberland County Council NCC – and so it goes on – meanwhile the holes get bigger and bigger.

tmp8C6A

Here’s the location – just off the main street in Bellingham – see the pink circles… and here’s a couple of the more dangerous holes – they are by no means the only ones.

tmp7E76

Filled up with water at night these are a danger to life and limb – not to mention car suspensions.  I’ve been writing now since the winter and such is the lack of energy of the departments I’ve dealt with – the holes are still there – despite pointing out that they are DANGEROUS.

Well, I’ve just found the email address for the highways agency – of course they probably don’t do ordinary roads, julst the likes of the A69 etc, but I can but try – I’m not getting anywhere with other people so far.   (‘ha_info@highways.gsi.gov.uk’) – here’s their website. http://www.northumberland.gov.uk/default.aspx?page=702

There are similarly dangerous holes on the road from Bellingham to West Woodburn, maybe 100 metres or more on the left just before you get to West Woodburn – we nearly took out our suspension one night in the wet – I reported the problem – nothing…..

I guess next stop the local newspapers?