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....

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. 

Tricopter Flying

What happens when you strap three motors, a battery and some bits of electronics to some lumps of wood? You get something that flies, that's what. After overcoming our initial nerves from a while back we managed to get some quality flying time in on Sunday morning. The amazing thing is that it all worked.

Number one son now has a fully working tri-copter. It seems to be happy to hover on around a third power, which means that it should be up for camera lifting duties quite soon.  

Tricopter Nerves

Number one son was around over Easter and spent quite a chunk of time building a tri-copter. This is like a quad copter, but operating in reduced circumstances as far as rotor count is concerned. However, in some ways it is more interesting to fly, because the third rotor is pivoted so that you can use it to vector the thrust in a way that quad copters can't. 

Anyhoo, he started with just three bits of wood and a bag of motors and controllers and stuff, and I printed some parts to help hold it all together. By this evening he was ready to take it out into the field and see what happens. 

The answer, on this occasion, is not much unfortunately. Although the good news is that everything is plumbed together fine and it all worked as expected, the bad news is that a different kind of propeller will be required. I'm a bit sad that I won't be able to see the maiden flight of the device (it goes back down south tomorrow), but I think there is a good chance that it will come back to Hull in one piece at some point in the future. And I'm seriously tempted to have a go at building one myself. 

Wireless works better with Wires

There is apparently a difference between seems to work, and actually working. I spent a good chunk of today finding this out. The devices you can see here are used to send wireless signals from one place to another. You put a signal into the input pin on the transmitter (the one at the top) and it emerges from the receiver.  People say they seem to work. So I thought I'd have a go with them.

The first thing I did needed to do was prove that the devices work so I wired up a couple of Arduino controllers and used the lovely VirtualWire library to waggle the wireless signals up and down and transfer data. It worked first time. Yay for me. 

I really wanted to use these devices to transmit signals to control some lights, so the next thing to do was write some code that turned the lights on when it received the appropriate commands. So I wrote that and ran it and it worked. But only once. Not so much yay.

So I built a theory that light software and the VirtualWire library were fighting over Arduino hardware and losing data as a result. And I spent a while trying isolate the usage of the signal pins that they use. And getting nowhere. 

And then I had a brainwave. I took out the wireless devices and replaced them with a piece of wire between the two Arduinos. And the program worked perfectly. Flickering lights and everything. 

Most confusing. After a bit of thought I reckon I've figured out what is happening. The receiver likes being given a nice healthy 5 volt supply. And when the program starts running it gets exactly that. But when I send the command to turn some lights on this causes the voltage to drop (taking current out of a system often causes this) and so the receiver stops working. I'm now working finding a few volts from somewhere to beef up performance.

Working with hardware devices is like this. You don't just have to get the software to behave, you also have to consider the electrical environment too. But I'm still having fun.

Get a Multimeter. Preferably with a needle...

If you are at all serious about electronics you probably need to get a multimeter. This is a thing that lets you measure electrical items of various kinds, voltage, current and resistance. I got my first one a very long time ago. In fact, they were quite expensive and I actually ended up buying the bits and putting my own box around the thing. 

Nowadays you can get them very cheaply, and they tend to be digital. They show their readings as numbers. This is fine, but I much prefer one with a needle, like the one above. With a needle it is easy to see if something has just gone up or down. With digits you have to start comparing numbers. Most of the time when I'm testing a circuit I'm really checking to see if something is there or not and I don't really need an accurate value.

I thought you couldn't get cheap multimeters with needles on them, but it turns out I was wrong. You can get the above for less than five pounds from here. So I did. It works well enough and I'm already finding it useful to have around the office.

One important note though. As you can see above the dial has settings that indicate that the meter can read up to 1,000 volts. This is true enough, but you really, and I mean really should not be poking those kinds of probes into signals at that level, on account of a mistake making you suddenly, and electrically, not alive any more. For battery voltages and things like embedded controllers its fine, and it can also measure resistance.  But for high voltages I'd suggest you look at much higher specification tools that will have better insulated cables and probes.

Mastering the Crimp Tool

crimptool.PNG

I spent some (oh, alright, quite a lot) of today fiddling with hardware, as is my wont. I've been buying cables with ready fitted pins and sockets on them, but last week I thought that it might be useful if I could crimp my own pins, so to speak. So I bought a crimp tool like this one.

The theory is/was that I could make up custom cables of just the right length and with just the right arrangement of plugs and sockets on each end to fit in what ever I was building. And it sort of works. There's a very useful howto on the Hobbytronics web site and by the end of the day I was able to make pretty good connections, which is nice.

Having said that, you can get ready made cables of ebay for around 3 pounds each, which give you forty connections, and so I think I'll just get this out for special occasions. It's one thing to be able to use it, but another to have to do it a lot.