Angry wasp in a box

The project I should be working on instead of messing around with radios involves a Raspberry Pi and Arduino Nano stuck in this old joystick base and working together.

The Pi could almost certainly do all the work but the Arduino is a very robust way to connect to stuff that is 5V friendly, can source a passable amount of current and it's cheap.

It's quite tight in there and the Pi is overclocked running flat out so gets very hot. Hot enough I think to affect stability as the thing tends to hang, which similar code didn't cause before I crammed it all in there.

This evening I hot glued a small fan to the composite socket just above a CPU heatsink I fitted thinking it would help with this. It does a fantastic job but sounds like there's an angry wasp in there. A VERY angry VERY large wasp, so loud I could hear it downstairs. I was expecting it to be a little noisy but it's so horrendous I've just ripped it out again.

Obviously a larger fan would be less noisy but there's really not much space.

Dangly bits

Today I have been connecting dangly bits to things. First up simple whip aerials to the Ciseco Explorer and Slice of radio. Range indoors isn't as good as I'd hoped, walls really do kill the signal.

Then I added the Pi Noir camera my brother bought me for Christmas to one of my Raspberry Pis. This works beautifully and produces a great image but seems to need a bit of faff to make it work with v4l.

The whole thing, especially the ribbon cable, feels like it won't stand rattling around exposed very well. So I've removed it again and packed it away until I can come up with something to hold it secure and have a bit more time to mess with it.

RFu rescue

If you're thinking of playing with the Ciseco RFu radios I would recommend getting one of these from them at the same time.

Having painted myself into a corner by uploading an stupid sketch that saturates the radio, it was just a case of changing a couple of jumpers, popping the RFu into the socket inside and reprogramming it.

It's only a couple of quid more than their straight USB stick radios but you get yourself a more versatile device. This is doubly so if like me you don't already have a USB FTDI interface.

While the lid's open I may fit an external whip antenna, it seems rude not to.

Pirate radio

A while back I started thinking it would be really good to have a way to make an 'internet of props' for games. Some way that things could communicate so for example a motion sensor could trigger and tell players or GMs it had happened. The radio kit would need to be small, power efficient and affordable.
As mentioned in my looking at the solar lights I think the SRF radios by Ciseco fit the bill and I finally got to have a play with them this weekend.

The first photo is of the RFu-328, which is the tiny board occupying the socket on the top left of the prototyping board. This is an Arduino Uno compatible device with built in radio and you can program it over the radio too (OTAMP), which is frankly wonderful.

Although I can see it being a worry once you've built a load, you're going to have to make sure that you only have the one you want to program powered up when you do. There are clever things can be done with using a different channel for programming but I think that could be a pain to administer as you'd need to keep reconfiguring the radios.

You get these for about the price of a decent Uno clone, although it's designed for embedded use so you need to add a 3.3v PSU and it's in an odd Xbee compatible form factor. I can see me soldering wires straight to them.

The second phot shows their 'Slice of radio', which is a plug and play SRF radio for the Raspberry Pi. It just plugs into the GPIO connector and works, although you need to disable the serial console on the Pi so it can be used effectively for anything else.

I also bought their USB radio, which doubles as an FTDI serial device for programming things with. No photo as it's an anonymous black box.

When I first started I got very frustrated at my inability to program the RFu over the air. By default the USB device is not configured to send the 'remote reset' needed for this to work. Sadly the Ciseco documentation is at the same time both great on detail but unhelpful and a bit disorganised so it took me a while to realise this.

If you download their configuration manager it helps with the AT commands necessary and gives you an easy way to change them. Nothing you couldn't change with AT commands manually but when you start out there's the usual problem of not knowing what you don't know.

With that minor niggle sorted, programming the RFu-328 was a doddle. I put the standard blink sketch on, just printing On/Off to the serial port and it immediately worked. The only thing to bear in mind is that 'pin 8', which doesn't appear on the RFu for normal use, enables and disables the radio so the sketch needs to bring it high during the setup function and the serial port has to run at 115,200 baud.

Now, however I have made the RFu-328 unusable for OTAMP as in a moment of idiocy I uploaded a sketch which blasts characters out of the serial port as fast it can manage. Which ties up the radio and stops over the air programming from working. So I'm going to have to pull it from the development board and use FTDI to program it directly.

I also had a play with the Slice of Pi, running one of my existing Python sketches that does serial output and simply pointing it at the radio instead. It is, as they advertise, just as simple as that.

Once I've rescued the RFu I need to play with Ciseco's protocol for the 'internet of things', LLAP. Reading around the topic it sounds like it's a bit unfinished but then it is at least a start and means whatever I do will have a passing chance at fitting in with other uses of the radios. LLAP has very simple human readable 12 character packets designed for tiny low power, low CPU devices like these. Were I to write something myself that would be what I'd be aiming for anyway.

More on those garden lights

A very quick bit of desoldering this morning shows that the solar cells produce >1.6v even indoors, rising under direct artificial light and approaching 3v in the sunshine.

Hardly surprising given their original purpose but I wanted to be sure.

Looking at the circuit showed they have a little special purpose chip (YX8018) to control things. I did wonder how a 1.2v battery was going to turn on an LED with a 2v forward voltage.


It seems I'm not the first person to think these lights will make a good housing for a microcontroller based project. They've also looked at using the solar cell and YX8018 for power and decided it really doesn't cut the mustard.

No matter, I'm mostly interested in the housing for the RFu and was thinking of replacing the single AAA with 2-3 AAs in the pole anyway. Three fit almost perfectly and cutting away the battery housing inside the top would make a load more space.

Before I get too excited by this though I need to see how long the RFu runs on the AAA that came with the light. The specs suggest it will run quite happily for 8 hours or
more. Not enough for what I want and that will be worse when I add sensors but it's enough to mess around with.

Update: Connecting it up to the battery and taking it outside shows a charging rate of 15-20mA is perfectly possible in the sun.

This sounds to me like the panel can be used to give a useful boost charge but not enough to do much with on its own. It also seems to have a blocking diode built in as the battery doesn't discharge through it if you cover it.



What to do with these...

A vaguely decent looking enclosure suitable for use outdoors with a solar cell, battery and charging circuit for £1 each. Seemed rude not to.

My vague plan is to fit an RFu microcontroller in these and 'do stuff' with them. Probably involving a PIR sensor, RGB LED and maybe a piezo sounder for basic sound generation.

This doesn't sound that interesting unless you realise the RFu shown in the second picture has an SRF radio which can be used to do 'mesh' type radio communications over hundreds of meters soldered to the board.


So the vague plan is these will be remotely controllable in software and also report home if the sensor is activated.

This means having working sensors that could become a perimeter alarm in a modern or sci-fi LARP is a realistic possibility. As are all manner of pretty light patterns at night, but that's not actually something I'm too bothered about.

There are obviously hurdles to be overcome. I've bought a starter kit of SRF radio stuff that needs playing with, I've no idea how good it is in practice. The AAA battery will need a step-up PSU to run the gubbins, that battery may not last long at all and squeezing it all in tidily may get impractical. If I run out of battery life or space, stuffing some AAs in the pole is the obvious answer but I really like the idea of these charging in the sun.

Still if the SRF stuff works well I can see it having loads of applications. As well as these I have vague plans to use it in making Spookytron 2.0 wireless.

I was at a sci-fi LARP over the weekend where they used a car stereo to play sound effects in the woods. This worked absolutely great but stringing the wire up in the trees was a right pain.

At MCM last summer we used wireless speakers to do ambient sounds but having the sensors triggering sounds like with Spookytron is what I'm aiming for.

First though I've a couple of other projects I ought to finish.

Upgrades and bodgery

It's been a while since I posted about work on the Time Machine as I've been busy working on my house and just writing the Arduino sketch that will make it respond.

It's now about six weeks until it has to be ready and this is one of the few free weekends so I'm keeping my head down working on it.
First up I've put battery holders in the 'power unit' at the bottom so it can run without mains if necessary. I've also created a new display to go inside the 'viewer' using a 5x7 LED matrix and a MAX7219 driver chip. This is a pretty standard way to have an Arduino driving one of these matrix displays.
Finally I have bodged up a rotary encoder so that the sash handle on the left hand side can be read. It needs to be a rotary encoder as it will turn 360 degrees.

I could have spent ages making this solid but decided it kind of needs to be a loose fit that can move about. So holding the encoder on the end of a bit of garden hose isn't really a bodge. It's to enable it to move slightly as the handle will have to take rough handling. Honest.

Please send shark

I have decided my next project needs a laser attached. Having bought a small laser pointer to butcher I then decided I really ought to just buy some laser modules as they can be had cheaply on eBay.

I can foresee these getting used a fair bit because even when they're just 5mW cheapies, lasers are still cool.