I got a Raspberry Pi, now what?

Last Christmas I got a Raspberry Pi as a present. I ran out and got a used hdmi monitor for $40 so I could try it out.
I decided to choose Raspbian for my operating system but I had to find instructions for installing it from Linux onto a SD card. It seemed so complicated. Even though I have used Linux for several years now, I really do not use the command line very much. The easy instructions were there if you use Windows.

I nervously loaded Raspbian on to a SD card. knowing that it could wreck my system if I made a mistake. The first few efforts did not work because the instructions were written by someone who knows the CLI very well, and was not described with enough information for someone who had not done this a billion times before.

It booted OK and I began to play around with it. My first thought was I could use it in my Dalek: speech, camera, motor control and remote control all on one PCB. But after doing a little studying about the GPIOs and the overall capability, I realized the amount of current that the R-Pi draws, the limitations of the GPIO and of the overall speed and other complications. I felt that I could accomplish 80% of the items with a Picaxe or Arduino but without some of those extra complications.

So if not for the Dalek, what should I do with it? Well I thought I could turn it into a media centre, however we have a Boxee, a Roku and a Xbox already. How many media centres do I need?
I started looking at what other people had done with their Raspberry Pi’s but I could not find anything that grabbed me or that I liked that could not be done with an Arduino.
I was ready to install a media centre on to it, then inspiration came.

We had planned to have our kitchen renovated for the last year and I suggested to my wife how we needed a computer for the new kitchen. It was sort of a joke when I suggested it, but I looked on line and found a 10″ touch screen available. $134 plus s&h. I suggested this to my wife expecting her to squash the idea but she said, yes, go for it.

I promptly ordered the touch screen (before she could change her mind). It took 9 weeks for the screen to arrive because even though the website showed it was in stock it actually was out of stock. During this time I started to look for a suitable programming language and define the GUI in my head. I assumed that I would actually be using Raspbian.

Talkie electronics

Sound PCB (Playback)
The 60 second ISD2560 voice recorder has a better sampling rate, so I wired 2 together in a direct addressed tandem mode. Basically one plays through the other to give 2 minutes of sound.
I recorded all the dialogue myself, modified in Audacity based on things Talkie might say in the show. Though there are actually only two minutes of recorded speech, the total time for it to run through all its speech is around 10 to 15 minutes, including pauses.

A digital vu meter flashes lights based on how loud the sound level is and I arranged the LEDs to be not in straight lines like a normal VU meter but rather a circular pattern.

To allow Talkie to hear someone I modified a VOX switch (voice operated switch) kit to output a logic level when sound was detected.

Vox to recognize there is a reply
Talkie toaster ears

Everything is turned on by the shadow cast on a light dependant resistor (LDR).
The toaster itself had built in LEDs for frozen bread or bagel selection so I used these to give visual feedback of the current mode; the LED’s lit when it was waiting for a reply.
I wanted the toaster to cry “Help! Help! Toastercide!” if the it was moved so I added a push button switch to the base of the toaster which activated when the toaster was lifted.

I purchased some Picaxe 28x micro controllers. These are similar to a Basic Stamp but have the advantage of being cheaper and very easy to use. I created a small development PCB for the Picaxe and programmed them (I actually ended up using 2 Picaxe 28x because I ran out of ports).

Once installed I was never happy with the light dependent resistor (LDR). Levels of light had to be just right. So recently I changed this and added a SRF05 ultrasonic detector. The hardest part of the conversion to ultrasonics was finding somewhere that is a good lookout point that is not really noticeable. It was the longest part of the conversion and, after trying 3 or 4 places, I finally settled on a location. It actually works very well.

Talkie Toaster

Would you like a piece of toast?

Talkie Toaster
A tea cake?

Talkie Toaster first appeared in Series 1 of Red Dwarf, and then again in Series 4. In both appearances it looked and sounded completely different.
In Series 1 it was in the form of an old style toaster, chrome with rounded edges. In Series 4 it was boxy and red, and had more dialogue. Mine was to be a mixture of the two with the look and voice of Series 1, and the attitude of Series 4.
When I dreamed up the idea to build a Talkie Toaster my plan was to find a toaster that looked like the one from the TV show, remove all the insides, and fill it with some electronics to make it talk. I wanted to build something for fun and have no moving parts to get bogged down with.

What makes Talkie Toaster a recognizable character?

  • The look of Talkie Toaster from Series 1
  • Characteristic sound and attitude
  • Front light that lights up in time with speech interactive speech and motion detection

Total cost would have been about $200-$250 except I reused some parts I had purchased previously.

A Servo Motor for Mini-Me Dalek

I like to make things modular, so I created several general purpose modules. The original purpose of this module was to drive a servo motor based on 3 ultrasonic SRF05 inputs.

I made this so I could hook up more inputs then I used for the servos and the ultrasonic sensor

I used a Picaxe because it’s really a microchip PIC with a basic interpreter preloaded. It’s just pennies above the cost of a normal PIC and the ease of use is worth it.

The 3 servos are physically pointing towards the front, to the left and to the right.
Each one is pulsed in turn
The code turns the servo to one of 5 locations. The optimal values for the 5 locations are full left, half left, center, half right and full right.
The speed at which it turns was found via trial and error. The command ‘pulseout’ gives a length of pulse proportional to the location of shaft on the servo motor. Changing the ‘pulseout’ value in increments of 5, 10, 50 and the pause time, gives the movement speed. A minus step speed reverses the direction. One problem you can run into is that the movement is too fast and the servo overshoots one way, then the other, giving an oscillation effect.
I have included an PCB schematic in PDF form
I used Kicad (open source PCB software) to draw the schematic and layout the PCB.

The PCB has traces on both sides. With some extra effort Kicad  can create a 3D view as well as gerbers. Here is the servo board

Servo board image done in KiCad

The three groups of four holes (P1,P2,P3) on the right are for the SRF05 detectors. (connections are power, pulse out, pulse receive and ground)
They feed into the 28 pin Picaxe (U19) on the left.
The three holes immediately above the (U21) 8 pin picaxe connect to the servo motor (J9 connections are signal Power and gnd).

Schematic description

U19 controls the 3 ultrasonic detectors by triggering a pulse and receiving the signal back from each one in order.The 3 numbers are converted from time in uS to the object to a distance number. Then based on the stored numbers the output pins at pin 26,27 and 28 go high or low the number can be 0 to 7. The number represent 5 locations front, left right mid-left and mid-right

In my application U21 scans the inputs available (in2, in3, in4), reads a binary number and jumps to the location suggested by the number. This translates the inputs to a rotational position turning the servo to the left or right. When it has finished moving the servo it rescans the three inputs, and makes the servo rotate based on the next set of numbers.