Sep 232012
 

Now we come to the motor controller testing for the Gertboard. This is my favourite part so far. The LEDs were cool, the relays, ADCs and DACs are bloomin’ useful and versatile (not videoed those yet), but the motor controller is just downright good fun. Smile

I found a motor to use in a fairly weedy battery powered barbecue blaster I made a few years ago. It was the motor from an old hairdryer with the rectifier stripped out, glued to a contact lens solution bottle to make an electric ducted fan jet.

This part of the Gertboard definitely lights my fire. I now want to use it to have a remote controlled fan that I can control with my phone. By next summer, I’ll be ready. We have the technology…

Sep 232012
 

This is a video of the Gertboard being put through its paces in the Darlington array relay switching tests. There is a Darlington array on the Gertboard that can drive up to six relays. Each can switch 50V and 0.5A. This video shows the program Gert provided to test this functionality (and train us how to use them too).

On the video I talk about relays. In fact I mean Darlington array open collector relay drivers. My bad. Wink

Sep 222012
 

I was setting up my Gertboard this morning to shoot some video and noticed that when I put my hand near it, some of the LEDs come on. Further investigation revealed that the Gertboard was acting as a proximity sensor. I thought that was pretty cool. Have a look and see. Does yours do this too or have I made it wrong? Wink

Subsequently it was discovered that this is due to lack of pullup resistors on the self-assembly kit. The V2 assembled Gertboard launched in Jan 2013 has pullups, which is why the leds are on by default.

Sep 212012
 

Now I’ve got my Gertboard assembled, I thought I’d run some of the programs Gert supplied for testing and learning. First up LEDs.
Delighted to say it worked a treat, so i thought I’d bring you a world premiere of the first blogged video of a Gertboard (sold to the public) in action. LEDs, camera, action…

…and cut.

Short and sweet. In case you’re wondering, I didn’t have enough jumpers and straps to make use of the last two LEDs on the board. I’ll be putting the rest of the board through its paces soon.

Sep 212012
 

Just finished soldering the Gertboard together. Tested the voltage and it came in at 3.34V, which is within tolerance of the target 3.3V. So, next up will be to make it do something, but I thought you should all see it now it’s done. Wink You can click any of these shots to get the full sized version. No comments about RN7 Wink

Assembled Gertboard, from the Tandy kit.

I’ll stick up some assembly shots in a little bit.

In the meantime, here’s the thread where people are talking about their Gertboard Assemblies.
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=42&t=17987

The first few SMDs were tricky and somewhat ugly

Towards the end the SMDs got a bit better

All SMDs and IC sockets fitted.

The back of the completed Gertboard

Zoomed in on the back of the Atmel socket

Sep 202012
 

Not much to say about this really. I found out that Tandy had these in stock so I ordered one on Tuesday evening, and it turned up this morning.

The Gertboard PCB

Here’s a shot of the whole kit, including, board, ribbon cable, sheet of contents and the components packed in assembly order, heat-sealed in a plastic sleeve. Good idea that! Smile

The Tandy Gertboard kit

Looks nice. Well done Tandy. I’ll get it built when I find a slot of time. Smile

According to a post in the Raspberry Pi forums, Tandy has bought the boards from Farnell and made up the kits themselves, which has enabled them toget a slight jump on Farnell, who are due to start shipping towards the end of September. I ordered one from Farnell on 8th August – the day they were announced.

Sep 192012
 

Last week I published a blog and video of watching a DVD in Raspbian using omxplayer. At that time, as far as I could make out, nobody had managed to watch a commercial encrypted DVD, with the DVD drive attached to the Pi, but I figured it was only a matter of time. I ended that blog with…

There is a way to watch encrypted DVDs in linux, but I haven’t sorted it out on my Pi yet. Hopefully a future video will detail that process.

Well, I tried a few different things but was unable to get it working. However, one of the forum members, mikerr, has come up with a creative way to get the job done. This is the thread mikerr started, here.

Basically, you install mplayer, compile and install the libdvdcss decryption library and then set up a video stream in the background, which you then view with omxplayer. It puts all the elements together in a way that works on the Raspberry Pi. Smile

So now I’m going to show you how it’s done…

Starting Point

I started with a freshly flashed SD card containing the August release of Raspbian, then fully updated/upgraded it.

sudo apt-get update
sudo apt-get upgrade
(This takes a little while ~15 mins)

Then install mplayer, which handles the decryption and streaming for us…
I did the whole install starting from /home/pi

cd /home/pi
sudo apt-get install mplayer
Y
(to confirm)

Compiling libdvdcss

wget http://www.videolan.org/pub/libdvdcss/1.2.12/libdvdcss-1.2.12.tar.bz2 (download the zipped archive)
bunzip2 libdvdcss-1.2.12.tar.bz2 (unzip the archive)
tar -xvf libdvdcss-1.2.12.tar (unarchive the files)

cd libdvdcss-1.2.12 (change to the libdvdcss directory)
./configure (run the configuration)
make (compile libdvdcss)
sudo make install (install the compiled files)

sudo cp /usr/local/lib/libdvdcss* /lib (copy the installed files to /lib)

Streaming a DVD

For reasons that I don’t understand, this works for me when I use ssh for the last two commands and not if I do it from the keyboard attached to the Pi. I’m sure someone could figure this out, but not me. Wink

mkfifo /tmp/dvdpipe

Then I ssh into the Pi to execute the next two commands…

mplayer dvd://1 -dumpstream -dumpfile /tmp/dvdpipe 1>/dev/null 2>/dev/null </dev/null & (sets up the stream)

omxplayer -o hdmi -r /tmp/dvdpipe (uses omxplayer to view the stream)

That’s the quick and dirty instructional. I’ll see if I can make a video tomorrow. Smile

Sep 142012
 

In the last week in August (2012), the Raspberry Pi Foundation started selling MPEG2 codec licenses for the Pi. Basically without this you can’t do anything worthwhile with MPEG2 – the DVD file format. Although it’s an old codec, a lot of people have media libraries with MPEG2 files in, and some TV is still broadcast in MPEG2.

You can use this license code to unlock the hardware decode functionality (for MPEG2) of the Pi’s GPU (Graphics Processing Unit). The Pi’s GPU is 95% of the main chip. It’s a real powerhouse for its size. So it’s great to be able to unlock some of its capabilities.


(640×400 video available at end of this post)

In order to use MPEG2, you need to buy an MPEG2 codec from THE Raspberry Pi shop FOR £2.40
You will receive a code and instructions by email. Install the codec unlock code by adding it to your /boot/config.txt file

You also need to have fairly recent firmware (from around 3rd week in August, or later). You can get this with…

sudo apt-get update
sudo apt-get upgrade

Once that’s done, you need to reboot (sudo reboot) and attach your external USB DVD drive. It needs to be externally powered. The Pi won’t be able to provide enough power to run a DVD drive through the USB ports.

Once connected, type…

df -h

This will show you all the drives connected. One of them should be your DVD drive.

df -h shows all drives connected

cd /pathto/yourdrive

if your drive is mounted at /media/DVD VIDEO RECORDING, change “/pathto/yourdrive” to “/media/DVD VIDEO RECORDING” (if it has spaces in, like mine, you’ll need to enclose it in quotes).

ls -l to list the files and sub-directories in the current directory

then you want to see what’s on the DVD, so
ls -l
should show you a couple of folders. We want the one called VIDEO_TS, but it may be different for different types of DVD format.
cd VIDEO_TS

Then list the files.
ls -l

There should be a list of files ending with .VOB. Choose the one you want (VTS_01_1.VOB in my case) and type
omxplayer -o hdmi -r VTS_01_1.VOB (change VTS_01_1.VOB for your chosen filename).

omxplayer command to play a .VOB file on local hdmi screen

Then sit back and relax. When you’re done watching, press Q to quit. If it crashes on quitting (mine does sometimes), you’ll have to ssh into your pi to reboot it (sudo reboot).

You can find some other omxplayer keyboard commands here https://github.com/huceke/omxplayer#using-omxplayer

Don’t Expect 100% Reliability

It won’t work every time. Mine works better when I call it up via ssh rather than the main console. I have no idea why, but when on main console, omxplayer regularly locks up on quitting. Running it through ssh, this doesn’t happen.

It may not work well with YOUR drive. I won’t be able to help with that – sorry.

It won’t work with encrypted DVDs – like the commercial, copy-protected ones you buy. This will only work with your own recordings. There is a way to watch encrypted DVDs in linux, but I haven’t sorted it out on my Pi yet. Hopefully a future video will detail that process. I’m also planning to do a blog post about watching a DVD with OpenELEC some time soon, so watch this space. Smile

Sep 102012
 

I’d heard of the “sticky key” issue on the Raspberry Pi. I’d even experienced it fleetingly once or twice, early on with Debian Squeeze. It seemed to disappear with the Wheezy beta release. And then I went headless – without a screen – doing everything by ssh for seven weeks while away from base. During that time, we got onto Raspbian Wheezy – the hard float release. Playing around with that, headless, over the summer, using the Edimax EW-7811Un wifi dongle was great. Then it was time to head home.

One of the first things I noticed when I started using a screen again was a serious case of sticky keys. You press a key and it repeats as if you held it down, like thisssssssssssssssssssssssssssssssssssssssssss. It gets old quickly. Pissed Off

No, it’s not my keyboard. The keyboard isn’t even plugged directly into the Pi. I’m using a Logitech wireless keyboard. The dongle uses a teeny amount of current – I’ve measured it.

For some reason, either Raspbian or the 900 MHz overclock I implemented while away, is enough to push it over the edge and the Pi is protesting. So, having read about issues with USB devices and polyfuses in this thread here (click), I decided to commit the heinous crime of pouring gobs of molten metal on my poor defenceless Pi.

It was time to short out the troublesome polyfuses. It was a bit scary. When I was done, I was pleasantly surprised to find that, not only did the Pi still work, but the sticky key issue was gone forever (cue evil laugh – Mwwwwwwwwwwwaaaaaaaaaaahaaaaaaaaaaaaaaahaaaaaaaaaaa)* Cool

I used good old-fashioned 60/40 leaded solder, as I thought there would be less chance of baking the Pi with lower temperature solder. It ain’t particularly pretty, but it works. What more can I say? Let the macro photo speak for itself.

bridged polyfuses on Rasberry Pi version 1

I’ve soldered in two short lengths of jumper wire to short out polyfuses F1 and F2. These fuses have been removed from the official revision 2 Raspberry Pi board, so I figure it should be safe – as long as used with good regulated power supplies. (According to Dom, a 1 Ohm resistor would be the ideal solution, rather than shorting them, but I didn’t have any).

Please NOTE: This is not foolproof. I still get sticky keys once in a while, but not as much as before

* Deliberate ironic use of simulated sticky key to denote evil laugh at the demise of sticky key.