thinking out loud…

Projects

Post navigation

I have recently started toying witth the idea of creating stuff using timber. Previously, due to lack of space and for the shake of my marriage, I refrained from working with timber. No matter how I tried to spin it, there is not enough space in an one-bed flat for wood-working… Now I have a workshop, so I was finally able to experiment with wood.

My first creation was a simple shoe rack. Nothing really fancy, but functional. The aim was to simply take the necessary measurements and come up with a decent design that we could use for the shoes that pile up on the door by the conservatory.

(Design photos)

The actual construction was simple. I used screws to hold everything together, instead of proper joints, but for the purpose it will fit, it does the job.

(Photo of shoerack, no paint)

After I finished putting the pieces together, I started thinking about the colour. I bought a few products and tried them on small pieces. I don't think I used all products properly (i.e. I did not do multiple coats and proper application) and I found that the easiest product to handle as a beginner was the varnish:

(Photos of samples)

In the end, I got a beech colour varnish to finish off the job. This allowed me to have a great finish:

(Final result)

As an add-on, I put together a simple umbrella stand, which can be added to the side and create a simple, custom-made solution to the problem we had in our conservatory.

(Umbrella stand picture)

With the umbrella stand, I only used glue to put the pieces together.

I only used an electric jigsaw to cut the pieces to size. Te cuts were not as clean and straight as I would have liked. I have now ordered a circular saw, which will hopefully help me get better results in my next project.

In my next project, I intend to create proper joints to keep the construction together. Baby steps…

RaspberryPi is a great budget computer. To keep the cost of the unit down, there is no real time clock. This is usually taken care of by the software: the operating system gets the accurate date-time automatically from one of the time servers.

When a RaspberryPi is kept offline but accurate time keeping is needed, an RTC is required. I needed one for Theodora's music box, as I wanted it to play a Happy Birthday tune on her birthday. To do this, I added an RTC module from Adafruit.

I got this unit from Oomlout.co.uk. It's a simple kit, which only takes a few minutes to solder together. Read the adafruit instructions carefully. Note that the resistors are not required for the RPi.

Using the unit in linux is surprisingly straight forward. You can basically read and write the time to this unit from the command line.

Also as promised, here is the Python code which, when run on a Raspberry Pi, it receives OSC signals from my iPad, interprets them and gets the Arduino board to perform the required action.

This is very rough, and doesn’t not include the code for clockwise and anticlockwise rotation (as I made the addition directly on the raspberry and it’s now out of battery). Clearly, this requires the simpleOSC and pyFirmata libraries to be installed. Most of the code you see here is just a quick mashup, based on examples from the SimpleOSC and pyFirmata libraries. For me the key is that it works!

Lines 150-173 are linked to my touchOSC template. For instance “nn” stands for North, “ne” for North East etc…
The TouchOSC editor allows you to give your buttons friendly names. The created template itself, while suffixed with a “.touchosc”, is simply a zipped xml file (in case you want to really fine-tune it!). The editor does a great job – pity it doesn’t work with Android…

Lines 116-124 control the wheels. Basically, 1 is clockwise, -1 is acti-clockwise and 0 is break. The list in motor(1,0,-1,0) includes a value for each one of my four motors. The two rotation functions missing here, simply have motor(1,1,1,1) and motor(-1,-1,-1,-1).

The engine function (line 28) will be playing an mp3 with the sound of a car engine starting, when the virtual engine key is turned. It works fine on Windows and it should be quite easy to get it to work on RPi too.

I had a productive couple of days. Arkadian AV-1 is now operational as a remote control vehicle.

Arduino
I’m using the StandardFirmata library on the Arduino Mega 2560, with no modifications whatsoever. It was by far the easiest way to get RaspberryPi to control the 4 motors, receive feedback from the 4 sensors (on order from Sparkfun, should be here soon) and have the ability to switch on and off the lights on the robot.

RaspberryPi
The RaspberryPi is loaded with Ladyada’s RPi distro, as it had the latest python library and a few other things that I’m planning on using later on. I have added the PyFirmata library (to control the Arduino) and the OSC library (as described previously) to receive instructions from the OSC pad.

TouchOSC
I have been using TouchOSC to create the remote control interface. My original plan was to use the Nexus tablet to control the robot. The problem is that TouchOSC is a bit behind when it comes to Android. The app is available to buy, but you cannot upload your own templates, which makes it pretty useless. I’ll be using an iPad for now, but I hope they get the android version sorted soon.

Here is my latest layout (first page):

The two buttons under the “Quest”, are for clockwise and anti-clockwise rotation.

Vehicle is very responsive and drives really well. Orientation gets a bit tricky for the human brain if the rotation buttons are not used, but for the “Quest Mode” this will really be ideal.

I’ll post the code, photos and a video tomorrow.

Next week, I’ll finish off the sensors (proximity and compass), tidy up the cables and put everything in a more permanent position. My code needs a bit of tidying up too; it’s really a mess right now (but, hey, it works!).

Not as productive as I hoped this weekend. I managed to complete the cable harness of the motors and blue leds (which was rather boring but important for the project) and tried out a new look (as I’m moving away from the use of reel cans as my chassis).

Here is the cable harness, before the insulation tape got applied:.

The advantage of this harness is that all the motor cables are neatly hidden away and only 4 cables appear on the top surface (one for each motor), plus one for the blue LEDs and the ground cable.

Regarding the new look – I got a few patterns printed on photographic paper and converted them to the side motor panels with a bit of cutting and scoring:

Here is how Arkadian-AV1 looks like at the moment (this is still a temporary look):

The image shows an old Freeduino I have for testing. The final robot will be using an Arduino Mega for controlling the motors, reading the sensors and lighting the lights, but all the “thinking” will be done by the Raspberry Pi.

Here is a little video, where each motor goes forward for a sec, backwards for a sec, then all the leds are turned on and then the same sequence is repeated on another motor.

In this example, all wheels get the same movement instructions, but, as the weight of the battery is falling mostly on one wheel, the rotation is not perfect.

In any case, this will be fixed when I have the final balanced chassis and of course the compass module connected and the Raspberry Pi module correcting the movement.

Next week, I’ll focus on the second part of the chassis. I will use film reels from PEC:

I’ll have one for the motor section at the bottom reel, a battery section, a brain (RPi & Arduino) section and a sensor reel at the top. The logitech sphere camera will be sitting at the top, giving it a “Cyclop” look.

I’m also planning on adding a few blue LEDs at the bottom reel, which should give the robot a nice under-body glow.