First demo of motor control for #RaspberryPi camera platform / @Raspberry_Pi

I decided this morning to shoot a video of my progress so far on the SpacePi, which is intended to be a motorised platform for taking astronomical photographs using the Raspberry Pi with the official camera module.

Here are the details again for those who didn’t catch them from the video.

Bill of materials:

The servos control the pan/tilt mechanism. They are powered by 4xAA batteries and controlled using 2 GPIO pins. They share a common ground connection (this is where the servo ground connection and the Pi ground connection are connected to each other). The camera module is held onto the pan/tilt by blu-tack (because I don’t have appropriate screws and nuts) and the whole thing is sat on a LEGO/Megablocks monstrosity.

The front end is a set of PHP pages. I’m using Nginx as a web server, but if you’re reproducing it, you don’t have to. The index page contains 4 controls: tilt up and down, pan left and right. These are watched using jQuery for ‘click events’. When the controls are clicked on, an Ajax request to one of two PHP pages is sent. These secondary pages use the PHP command shell_exec() to run a Python script that drives the PWM pulses going to the servos. The jQuery on the index page keeps track of the current position of the servos and resets them when the page is reloaded.

Eventually, I will be taking this rig outside to get clear pictures. Then, it will be powered by my USB battery pack.

Next steps

Make the UI a little more attractive (even if it’s just using arrow icons) and hook up the ‘take photograph’ functionality. I’ve already done the latter but I need to be sure that there is some kind of concurrency check as the camera doesn’t like it if you try and take two pictures at the same time.

#RaspberryPi in the Sky – Where is it now?

PIE5, Dave Akerman’s latest high altitude balloon with a Raspberry Pi Model A payload, was launched on Saturday morning in rural Cambridgeshire with the aid of his usual team and special guests Eben and Liz Upton from the Raspberry Pi Foundation. Dozens of viewers watched the launch live via streaming video (available here, courtesy of RasPi.TV) and then tracked it using Spacenear’s map. The balloon headed East, crossed the English Channel and took in The Netherlands and Germany. It was last tracked over Switzerland just South of Berne. Apart from the distance, the other big news is that PIE5 broke the record for the highest amateur balloon broadcasting live images. The live images (including some joke pics at the end) are available here and were taken using an official Raspberry Pi camera module given to Dave by the Foundation.

It’s maximum altitude was 40,350m. This was slightly unexpected as it was supposed to “float” significantly lower than that. It is unknown where the balloon currently is but given it was over 20,000m at the time, it could have travelled significantly further and made it to France somewhere between Lyon and Dijon. (This is just speculation on my part given it’s course when contact was lost).

Dave Akerman has done his own write-up of the mission here.

PIE5 was accompanied on its travels by another balloon called AVA. They diverged over The Netherlands and AVA headed in a more Easterly direction over Germany before flying over the Czech Republic. It eventually crashed into the side of an Austrian mountain where it was recovered by some hardy enthusiasts who skied out to it.

I really enjoyed watching the launch and tracking it – keep an eye on Dave Akerman’s blog (or this one!) for the next launch.