Exploding Robots

So I fancied having a go at building one of these Sainsmart balancing robots. But I wasn't sure how hard they would be to build. So I hatched a cunning plot. Get one for each for myself and number one son as Christmas presents and then, once he had built his and got it working, carefully copy it. 

The plan was working very well until a wire came off my robot and rather than providing a nice friendly 5 volts to the robot controller it delivered a much more unpleasant 11.3 volts. This did not end well. The voltage surge took out the Arduino board, the radio receiver and the gyroscope. Around ten pounds worth of damage. Wah. 

The good news is that the spares arrived today and my robot is now back on his wheels, lurching around the kitchen under sort of remote control. Getting the robot to balance was a bit of a challenge, my top tip is to just use the values given at the end of this video

I'm looking forward to adding a few more features.  Ideally I'd like to make him self tuning, or at least be able to tune the PID loop using the remote control rather than the fiddly trimmers that are supplied.

The kit is good value, the components are good quality and you get a lot of them. This would serve as the basis of a lot of interesting projects. 

Flashing Lights and Drones at C4DI

DSC_0036.JPG

Today we had another of our hardware meetups at c4di. Great fun was had by all who attended. We had two activities, playing with coloured leds or creating a Larson Scanner. Ross had brought along a little quadcopter with a video camera and much fun was had with that too. I'm not saying you should get one, but if you fancy making an investment you can find it here.

I Want a Microsoft Band

Microsoft have just released their Band, a smartwatch/fitness device that looks really nice. They are selling very well apparently, which means that I might have problems getting one when I head out to Seattle for the MVP Summit. And I really want one.

Now, I fully realise that the pursuit of gadgets is ultimately fruitless as they lead an ephemeral life, doomed to be superseded by the next iteration and driven by a marketing beat. You could argue that people who try to validate their existence by surrounding themselves with the latest technology are perhaps only proving their ultimate shallowness. And in the end the accumulation of material goods is ultimately futile (for a full discourse on this matter listen to the wonderful "Mountains'O''Things" by Tracy Chapman).  

But I still want one. 

If anyone finds themselves in a position to get me one (medium size should fit I reckon as I'm, half way up the strap on my Pebble) I will do the following for them, in addition to paying for the device:

  • supply them with a printed, autographed copy of the latest C# Yellow Book
  • write a poem for them (I am a published poet) on any subject they nominate
  • provide them with a unique Windows Phone Controlled Wedding Light,  in case they have a daughter getting married in the near future who needs table decorations. I'll custom build it with a choice of base colour and ship it to you anywhere in the world. 

Like I said, I may be shallow and gadget obsessed, but I really want one of those bands.

Program Arduino in Visual Studio with Visual Micro

Anyone who has heard me wax lyrical about programming will know my opinion of Visual Studio. If we ever get invaded by an alien race from beyond the stars I reckon that they will be here for our advanced technology and Visual Studio will be on their shopping list. It is the best development environment ever. And anyone can get a free version

You might think that it is only used for Microsoft technology, but you'd be wrong. You can use it for all kinds of language and platforms because it has been built to support plug-ins. You can even use it to create Arduino solutions with the Visual Micro plugin.

The free IDE from Arduino is nice enough, but Visual Micro is wonderful. I used it extensively when I was creating the Wedding Lights.  I had two Arduinos hooked up to my PC, master and slave, and I was able to deploy and debug programs in both of them at the same time using Visual Studio for everything. 

There are a few issues that I've noticed. It supports a kind of debugging mode that I don't find terribly useful (I add lots of code instrumentation) but once you figure out how to turn it off it works fine. The system also doesn't have quite all the refactoring goodies that you have in "pure" Visual Studio, but Intellisense is present and correct, and that is really what you want, plus the lovely editor.

Visual Micro needs a "paid for" version of Visual Studio because the free Express versions of Visual Studio don't support plugins, but you can download and use Visual Micro for free. The way the licence works you can keep renewing it with out paying the company anything. But I've bought a licensed copy because I think people who produce systems as good as this deserve my money. 

If you are serious about Arduino development you should get Visual Micro. Absolutely.

Arduino Rather Useful Seminar

I always take a picture of the audience. For tax reasons....

I always take a picture of the audience. For tax reasons....

We had our first Rather Useful Seminar today. It was all about hardware, made slightly more interesting by the way that hardware, in the form of my Bluetooth keyboard and mouse failed me right at the start. 

But thanks to the loan of spare keyboard we managed to get going and play around with Arduinos. I showed how easy it is to write programs for the platform and how many amazingly cheap components you can find on eBay. (In fact I ended up spending around 5 quid doing "research" for the presentation when I bought a 1.8 inch colour screen and an SD card interface)

Anyhoo, it went well enough and folks seemed to have a good time. If we have enough interest we might start a Hardware Fiddlers club of some kind in the department. You can find my slide deck and details of future seminars here

Hacking Electronics

I like Simon Monk. He writes the kind of books that I wish I'd written. They are sensible, instructive and above all practical. I've read some of his Arduino texts and found them very useful. He's also written the a book that you'll find useful if you want to get into electronics. 

Hacking Electronics is a great guide to getting started with components and computers. It gives you a good grounding in the basics, teaches you how to solder and then gets you making genuinely useful/fun things. Some of them have computers in (usually the Arduino). Others are just circuits. This is very nice to see. I think of electronics as "programming with hardware". You can write a program to make a light flash, or you can make a circuit that does it.

In software you change what happens by adjusting the value of variables inside the program. In hardware you change what happens by altering things like the resistance or capacitance of the components themselves. 

If you are looking for a book to give an inquisitive 11 year old (and then have fun together burning your fingers and "letting the smoke out" of devices) then I reckon this would be a very good one to go for.

Ultra Cheap Arduino WiFi

Embedded devices get really interesting once you connect them together. There are a few ways to do this, you can use the same kind of modules that I used for my Wedding Lights, or you can use Bluetooth. Or you can use WiFi. WiFi is by far the best way to link an embedded device to a surrounding network, but up until now the cheapest WiFi  hardware for a device like the Arduino would cost around 25 pounds.

But now we have the ESP8266 chip. This is tiny (as you can see) , costs less than five pounds, and puts your Arduino on the local WiFi network. 

A few health warnings: The device needs a high speed serial connection to the host computer, and so you must use the proper hardware serial port on your Arduino, not a software one. Also they are not very good at address discovery and so you will probably have to hard-wire the IP address. This is fine if you are using them at home but might make them a bit tricky to deploy on a corporate network. They will let a program connect to a TCP socket on a remote machine and send packets backwards and forwards, but that is about it for the moment. Fortunately that is just about what you want from such a device. 

Peter has been playing with them and getting then to work I've bought some (and put them in envelopes in my little boxes) and I'm looking forward to having a play with them.

Organising Components

While I was up town recently I noticed these rather stylish boxes in Tesco that you can get for a reasonable price. 

I'd been looking for some way of storing my increasing collection of electrical components. I have this worrying (but, fortunately not very expensive) habit of searching ebay for the word Arduino and then being completely unable to resist buying things I find at amazing prices, post free from China.

My plan was to fill each box with envelopes containing particular components.  I stole the idea from the excellent Arachnid Labs blog

It works really well. When I want something I just have to flick through the envelopes to find it. The Computer Scientist in me will probably sort the envelopes into alphabetic order at some point, but for now I've not got enough devices to really make it necessary.I don't have any anti-static envelopes, so I just used ordinary stationary ones. 

Our New Robots have Arrived

It is with a heavy heart that I've had to retire the .NET Micro Framework robots that we've been using for teaching our embedded module for the last few years. They served us very well but wear and tear on the mechanical bits has meant that they are having to be put out to pasture....

The good news is that the replacements devices have arrived (or at least some of them). We are using the Arduino bot which has one or two useful attributes, including a dual processor design, a spiffy LCD panel and a bunch of line following leds. 

Now all I have to do is update all the courseware.....

Whelmed by the Galileo

A Galileo with a very distant relative

A Galileo with a very distant relative

There is a wonderful exchange in the film "Ten Things I Hate About You"* where one of the characters poses the question "You can be overwhelmed. And underwhelmed. But can you ever be just 'whelmed'?". I think you can be. And I've just found the thing that does it. I've been playing with an Intel Galileo board. And I must admit that I'm totally whelmed by it. 

It looks like an Arduino that has been eating all the pies. It has all the connections that an Arduino has, but they are subtly less useful (more of that in a minute). It is based on the Intel Quark architecture which is a complete system on a chip. The Quark is the tiny thing right in the middle of the Galileo device. The Quark chip provides serious amounts of processing grunt, and it is coupled to 512 megabytes of memory. It runs a flavour of Linux and you can put bigger versions of that operating system, plus a lot of data, on the micro-sd card.

Flip the board over and you can find a PCI Express socket which could take all kinds of high speed devices.  You can also connect the Galileo to a wired network and it will work a treat, and you can run Python and lots of other stuff. And you can plug Arduino shields into the board and directly interface to hardware. That cat-flap that sends you an email each time the cat goes in or out is well within your grasp.

So far, so neat. But it is expensive, at over fifty pounds it is around five times the price of a single Arduino clone. And the Arduino hardware ports are limited. While they are electrically the same as the ones on your trusty Uno they can't be updated at more than 230 or so Hz. This rules out driving things like NeoPixels from the Galileo. It supports USB hosting, but you have to have an extra connector, and you need a really funky cable if you want to do serial communication with it. 

If you really want to have Arduino compatibility and some unix power round the back you should probably get a Yun device. This is cheaper, smaller, lower power and you get WiFi thrown in. If you want to do proper unix with a bit of interfacing then the Raspberry Pi might be more up your street. And you can plug a monitor directly into that. 

The Galileo is not a bad device. It is just not anything other than whelming at the moment. That could change though, remember that Quark computer on a chip. It really is tiny. If Intel release a slew of properly small and properly cheap Quark based platforms, then the Galileo would be a fantastic place to prototype the next generation of "internet of things" gizmos.

Update: The review above is all about the Galileo that I paid money for, arrived in a box last week, and I've just had a play with. It is not about the Galileo that Microsoft have been giving away as part of their Internet of Things effort. I signed up for that, but nothing has come through yet. Thanks to leonellive for pointing that out.

As far as I can tell the IOT device is the same, but it comes with an SD card containing a different operating system that is Windows based and you can write programs using Visual Studio. Now that might be a lot more than just whelming. (Does anyone know where I can get an SD card image?). 

* If you've not seen the film, or you have and you want to relive the magic, head over to this fantastic essay all about it from Bim.

Playing with TinyDuino

One of the things I love about the Arduino platform is the huge number of different form factors that are available. This has got to be the smallest I've seen so far. It is TinyDuino.

The picture above shows some of the boards and a Starburst to give an idea of scale. The devices are, clockwise from the Starburst, processor, Bluetooth BLE, Accelerometer and programmer. The boards stack on top of each other using the tiny connectors.

When you want to program your device you put the programmer board into the stack and plug it into a USB port in your PC. It appears as an Arduino Pro-Mini clocked at 8Mhz (use the 3.3 volt option). It has all the pins of a standard Arduino uno and you can stack a tiny prototyping board onto the end of the stack if you want to directly access the signals. Once you've programmed your processor you can remove the programmer board to make your device even tinier.

There's a lovely little 16 LED array you can put on the end of the stack, and also a circular row of leds you can program up for a super-tiny cylon effect. There are also wifi, Bluetooth and even motor control boards you can add. The BLE device is a bit longer than the other ones, but you can still create really tiny devices with this platform. One version of the processor board has a clip for a lithium battery so you can easily create self-powered devices. 

They work a treat and I strongly recommend them. However I would mention one word of warning. The manufacturer has recently changed their website and so all their documentation for the devices has moved around and is now very hard to find. If you need any help with the platform you are mostly on your own.  Having said that though, most of the boards are based on very standard technology and so once you install the appropriate Arduino libraries they will work just fine.

I've been trying to get the Bluetooth BLE device to work with Windows 8.1 and not having a lot of success so far. I think this is down to my not understanding the way Bluetooth BLE works. The idea is to make a "ring of power" that I can wear so that I can send commands to my devices just by waving my hands. We shall see....

Getting a Galileo

I've been a great fan of embedded computers for ages. I love the .NET Micro Framework, Gadgeteer and Arduino. And now there is another device to play with, the Intel Galileo. It looks a bit like an Ardunino and it has pins in all the right places to be an Arduino. But actually it is a rather powerful computer based on the new Intel Quark chip.

You can program it in the same way as you would an Arduino device, but what I'm really interested in doing is harnessing all that full on programming power on the device. I've ordered one, and I'm looking forward to playing with it when it gets here. 

C4DI Hardware Hacking

Last night we had our monthly Arduino hardware hacking session at C4DI. Lots of the regulars were there and one person even brought her long-bow along. Which was a highly impressive piece of wood. 

The theme of the evening was Sci-Fi movie effects, using programs to make whooshes beeps and all kinds of space age noises. You can find out what we got up to (and even have a go yourself) by grabbing the lab sheet from here).  Great fun was had.

I brought along my latest purchase, an Arduino powered pen pushing robot that you can pick up from RoboSavvy for the amazing sum of 18 pounds. Peter and I had enormous fun building it, particularly when we (or more accurate I) wired the motors the wrong way round and had the robot printing perfectly - but from right to left). However, with a bit of adjustment we got it out of "arabic mode" and managed to get it printing properly.

Windows Phone, Wedding Lights and Bluetooth

Windows Phone connected Wedding Lights. Eight synchronized lights which can be controlled over Bluetooth. Each light contains an Arduino processor and a 16 NeoPixel ring.

I've finally finished it. I was going to write an article about my Windows Phone Controlled Wedding Lights. But instead I thought I'd do something different. So I fired up Adobe Premier and I made a video about them instead. It only lasts a couple of minutes, but boy was it complicated to make. Anyhoo, feel free to take a look and let me know what you think.

I've done something else I've not done before (and I feel a bit guilty about this one). I've put the Bluetooth code for Windows Phone 8.1 and Windows 8.1 up on Codeplex. I'm ashamed to admit that this is the first code that I've ever posted there. I really should have been posting stuff up there earlier. I'm determined to post more stuff as I come up with it.  

You can find a sample project (my Bluetooth Printer) and the BluetoothManager class that I used to communicate with the embedded Bluetooth controller. There are also details of how to configure the Bluetooth device and send and receive data. 

C4DI and Bald Secret Agents. And wedding lights.

We had our third hardware group meetup at C4DI this week. A bunch of plucky souls turned up to develop some software to help secret agents who have no hair. No, really. You can find the notes here if you want to have a go yourself. 

I took along a few of my wedding lights to show folk how they work. You can see them under construction above. The next meetup will be in a month or so.  I'm presently writing up a document that covers exactly how they work, which you might find useful if you ever want to create remote controlled stuff.