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.