PiRobot Build 5: Raspberry Pi Audio Hardware, Software & Text To Speech

Installation:

$ sudo apt-get install alsa-utils

http://www.alsa-project.org/main/index.php/Main_Page

$ sudo nano /etc/modules

Add snd_bcm2835 (if its is not already there)

$ sudo nano /usr/share/alsa/alsa.conf

change the line “pcm.front cards.pcm.front” to “pcm.front cards.pcm.default”

$ sudo apt-get install mplayer

http://mplayerhq.hu/design7/news.html

$ sudo nano /etc/mplayer/mplayer.conf

Hit control + v to get to the end of the file fast (page by page).

add line nolirc=yes

$ sudo apt-get install lame

http://lame.sourceforge.net

$ sudo apt-get install festival

http://www.cstr.ed.ac.uk/projects/festival/

$ sudo apt-get install espeak

http://espeak.sourceforge.net

Google Translate Bash Shell Script install

http://elinux.org/RPi_Text_to_Speech_(Speech_Synthesis)

$ mkdir ~/TTS

$ cd ~/TTS

$ sudo wget https://gist.github.com/r1b4z01d/5350927/download.tar

$ sudo mkdir /tmp/dirtree

$ sudo tar xfz download.tar -C /tmp/dirtree

$ sudo find /tmp/dirtree -type f -exec mv -i {} . \;

$ sudo rm -rf /tmp/dirtree

$ sudo rm download.tar

$ sudo chmod u+x GoogleSpeech.sh

$ wget http://zoid.3.13.83.61.nip.io/audio.mp3

Verification:

$ sudo reboot

Reboot the Raspberry Pi

$ lsmod

Displays the kernel modules currently loaded

Look for snd-bcn2835     Broadcom snd-bcn2835

http://en.wikipedia.org/wiki/System_on_a_chip

http://www.broadcom.com/products/BCM2835

$ amixer cset numid=3 1

OutputSelect: 0=auto, 1=analog, 2=hdmi

$ amixer cset numid=1 -- 100%

Testing:

$ speaker-test -t sine -f 440 -c 2 -s 1
$ speaker-test -t wav -c 2

ALSL speaker-test utility

http://www.mythtv.org/wiki/Using_ALSA’s_speaker-test_utility

$ aplay ./usr/share/scratch/Media/Sounds/Animal/Kitten.wav

http://linux.die.net/man/1/aplay WAV player that comes with ALSA

$ sudo find -name *.wav

./usr/share/sounds/alsa/Side_Right.wav

./usr/share/sounds/alsa/Front_Center.wav

./usr/share/sounds/alsa/Side_Left.wav

$ mplayer ~/TTS/audio.mp3

$ echo "hello" | festival --tts

$ sudo espeak -ven+m2 -k6 -s250 "hello" 2>/dev/null

$ ~/TTS/GoogleSpeech.sh hello<em id="__mceDel"><em id="__mceDel"><em id="__mceDel"> </em></em></em>

Click/Poping update your firmware

 

PiRobot Build 2: Adding Heat Sink & Temp Tests Raspberry Pi

I wanted to add heat sinks to keep the core Raspberry Pi temperature down while running cpu intensive processes. I have made some huge strides on the PiRobot project, I just need get may act together and make all the posts. Here is one of the last things I have done but it is going to be an easy blog post so I decided to publish this 1st.

I checked the Raspberry Pi core and external temperatures during 3 stages for both OEM and after the heat sinks were installed. As a control the device had an external temperature reading of 24.7°c off and unplugged. While Idling the OEM average core temperature was 43.29°c with a max of 44.4°c and a min of 42.2°c. The external temperature was just about 40°c.

The 1st load test I did was using Python finding prime numbers. It found 78497 primes in 5:42.61 but the CPU usage never went above 25% so I needed to find another test. After reading how I can use the basic calculator as the CPU benchmark I modified the original equation so that the CPU would be maxed out for at least 20 minutes:

 $time echo "scale=10000; a(3)*8" | bc -l

You may need to install the bc package:

 $sudo apt-get install bc

After 20 minuets of 100% CPU usage the average core temperature was 45.38°c on the OEM Raspberry Pi, it maxed out at 47.1°c.

After installing the heat sinks on the Raspberry Pi the core and external temperatures definitely dropped. After idling for 24 hours the external temperature was 38.5°c and the  core temperature was 39.5°c. After ruining the same bc equation for over 20 minutes (100% CPU usage) the average core temperature was 42.67°c with a miximum temerature of 44.4°c. For more details of temperatures download this: HeatSinkTests.xls.

Raspberry Pi Heat Sink:

raspberry pi

Raspberry Pi Robot Part 1: Roomba Teardown

Updated: More Photos

In anticipation of receiving my Raspberry Pi

Raspberry Pi

The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of raspberry pi

this week I wanted to get a head start one of my next projects, PiRobot. PiRobot is going to be a web site controlled robot powered by a Raspberry Pi. The website will utilize webiopi to control the Raspberry Pi’s general purpose in/output ins (GPIO). For network connectivity I will be using a high gain USB WIFI network card. I will add a location to place and iPhone with tethering If I need to control the PiRobot outside of a local WIFI.

I am going to recycle an old iRobot Roomba to uses as the main driving unit. This post shows my teardown of the iRobot Roomba in preparation for this project. To save on weight I wanted to remove all the components that I would not be utilizing. To start I only need the frame, wheels, motor, suspension and the logic board.

I will be interfacing the Raspberry Pi with the iRobot Roombi’s built in logic board via serial using pyrobot. This will allow me control each driving motor as well as interface with all built in sensors and the other motors (that I just removed). If I can’t get the serial connection to work I will take some tips from Ben J. I will more then likely be using the Raspberry Pi’s GPIO but I can also utilize the additional ports on the Roomba’s logic board to control the accessories I plan to add once I get the PiRobot up and moving.

I first want add a tilt and pan high definition webcam to have the ability to drive it with out seeing the unit. The next accessory will be a powered speaker and use the webcam’s microphone for two way audio communication. Then I will be adding an ultrasonic proximity sensors on each side of the robot to detect obstacles while controlling the unit remotely. These sensors have a sensing range from about 5 inches to about 15 feet with a resolution of about .1 of an inch.

The website will stream the video from the webcam as well as have controls to operate the PiRobot. It will display two virtual joystick, one to move the PiRobot and one to control the tilting and panning of the webcam. I will also be including the ability to use the keyboards standard ←↕→ keys and a mouse or possibly even a joystick. I am thinking of having the site display a 3d top view of the Raspberry Pi Robot with graphical feedback from all the sensors and to display the position of the webcam’s tilt and pan. Once all that is done I will be adding an arm and hand to it extend the functionality.

 

Happy Saint Patty’s Day Everyone, have fun and stay safe!

Happy Saint Patty’s Day, I decided to make corn beef and and cabbage for the 1st time and in a pressure cooker! On lunch I went to the market to get some lunch, I picked up a plate of corn beef and and cabbage from the “already hot” section of their deli department. I walk 30 feet out of the door and wind blew the plate completely out of my hand. So I decided to try to make it myself. I didn’t want to wait for 4 hours for it to cook so I made it using the pressure cooker, less then one and a half hours later….

saint patty's day

saint patty's day

20130317-162624.jpg

corn beef and and cabbage

saint patty\'s day

 

Saint Patty’s Day

 

Happy Pi Day: Buy a Raspberry Pi

Hope you all had a great Pi Day:

Pi Day

Pi Day is an annual celebration commemorating the mathematical constant pi (pi). Pi Day is observed on March 14 (or 3/14 in the month/day

I celebrated Pi Day by buying a Raspberry Pi:

The Raspberry Pi is a credit-card sized computer that plugs into your TV. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. I will be using it for an upcoming electronic project mainly because I have wanted to learn Python for a while now and the price. This tiny computer has a built in SD-card reader, HDMI port, RCA out, Audio out, 2 USB, an Ethernet port and 512 Ram all for $35. If I were to use one of my standard microcontrollers I would have to pay extra for each additional feature. For example just to add Ethernet to an Arduino would cost $60 alone. These great little devices are allowing schools to affordably offer robotic and electronic circuitry classes.

raspberry pi day

pi day

IALEDPants v0.2b WS2801 Speed Test

Here is the 2nd demo of my new WS2801 individually addressable RGB LED pants. The pants are lined with WS2801 RGB LED strips. The strips are controlled by an Arduino nano and powered by 4 AA batteries. I wanted to create this video quick before I add some additional features. I plan to add a microphone to code them to be noise active as well as add a pot to control the intensity of the LEDs.

WS2801

ws2801

IALEDPants v0.1b ws2801 Color Test

Here is the color demo of my new ws2801 individually addressable RGB LED pants. The pants are lined with WS2801 RGB LED strips. The strips are controlled by an Arduino and powered by 4 AA batteries. I wanted to create this video quick before I add some additional features. I plan to add a microphone to code them to be noise active as well as add a pot to control the intensity of the LEDs. Check out the website http://zoid.3.13.83.61.nip.io and subscribe to check out my other projects and any update to this.

My Arduino Code:

https://gist.github.com/r1b4z01d/4757278

WS2801 LED Strips:

ws2801

IALEDPants v0.1b: WS2801 + Arduino

Here is the demo of my new WS2801 individually addressable RGB LED pants. The pants are lined with WS2801 RGB LED strips. The strips are controlled by an Arduino and powered by 4 AA batteries. I wanted to create this video quick before I add some additional features. I plan to add a microphone to code them to be noise active as well as add a pot to control the intensity of the LEDs.

WS2801

ws2801

iPad In dash Dock Prototype Test Video

Here is the prototype demo of the iPad in dash dock for my Toyota Tacoma. I am using a TomTom Bluetooth GPS receiver along with the Navigon app to provide the navigation. DashCommand is the ODB-II app the connects to a bluetooth ODB-II Transceiver plugged in to the Tacoma. The Music visualization app is called Rabbit Hole by Feldspar, I really enjoy the app but because it uses the internal mic it cases the audio to skip for a few milliseconds when open and closing the app. Once it gets a little bit nicer out I plan to redesign the dock. I want to permanently mount the iPad and create a channel for the front facing camera. check back soon to see more progress on my iPad In Dash Dock.

iPad In Dash Dock:

ipad in dash