Touchscreen Internet Radio, Raspberry

by mkarvonen in Circuits > Raspberry Pi

199281 Views, 999 Favorites, 0 Comments

Touchscreen Internet Radio, Raspberry

Kansi.jpg
DSCN6074.JPG

Make this super easy and cool looking 2.8" touchscreen Internet Radio that can be controlled with PC, Smartphone and basically every machine that has got a browser and an internet connection..

(find the speakers at the back from here ;)

Components list:

-Raspberry Pi, basically any one works from the first gen.

-Adafruit PiTfT touch screen

-Cable between the screen and raspberry.

Case was printed with Printrbot Makers kit.

Planning.

DSCN5932.JPG
DSCN5929.JPG
DSCN5933.JPG
DSCN5935.JPG
DSCN5936.JPG
DSCN5926.JPG

The dimensions in the picture are in millimeters.

The plan is simple. Make a table top case for the screen and raspberry. I had to make the base of the case 3mm taller than in the plans. I was fooled by the length of the solders under the raspberry.

The 3D model of the case was made with ScetchUp, witch is a free and brilliant software to use.

The project will include the printable file, but if you like and want to support my future projects you can buy the files from HERE. Cost is only 1 dollar and helps me a lot :)

All of my printable files on sale in here!

Printing.

DSCN5952.JPG
DSCN5954.JPG
DSCN5957.JPG
DSCN5990.JPG
DSCN5992.JPG
DSCN5994.JPG
DSCN5995.JPG
The whole project is printed with Printrbot makers kit.

Simple and small printer does the job well.

Printing time for the whole case was about 2.5 Hour's. With layer height of 0.2mm and speed of 50mm/s. Nozzle size is 0.4mm.

Printed with support .

Testing.

DSCN5996.JPG
DSCN5997.JPG
DSCN5998.JPG
DSCN5999.JPG
DSCN6000.JPG
DSCN6001.JPG
DSCN6002.JPG
DSCN6003.JPG
DSCN6005.JPG
DSCN6006.JPG
DSCN6007.JPG
DSCN6008.JPG
DSCN6009.JPG
DSCN6010.JPG
DSCN6011.JPG
DSCN6012.JPG
DSCN6013.JPG
DSCN6015.JPG
DSCN6016.JPG
Test that the components fit in to case. In my case the parts just snapped in to place.

I had a Adafruit's plug and play image that works with the screen right away in the testing process. You can find the image from Adafruit's site under the PiTfT screen.

Remember to properly fold the cable in the case. If you like i have reserved a place for four buttons under the screen. I didn't have good (suitable) buttons to use in that place.

The Rom.

DSCN6019.JPG
DSCN6028.JPG
DSCN6030.JPG
DSCN6031.JPG
DSCN6032.JPG

I used a base of the Volumio image to use. It has got in basics a Web based Ui witch means that if you write your raspberry's IP address on your URL bar it will open a page where you can control the Raspberry.

To make the screen work i had to install the drivers to it and make the screen load up in boot. Then i had to install LXDE environment and finally make the raspberry's own internet browser to open up automatically with the Web Ui open.

Look on the next step to see how it is done.

Install Drivers.

DSCN6025.JPG
DSCN6023.JPG
DSCN6020.JPG
DSCN6044.JPG

**NOTE**

The Volumio has to be version 1.41 to make the TFT screen work.

I will not guarantee this working in other versions of Volumio.

See volumio's page.

If you are going to use the Volumio without the TFT screen, just use the latest version available.

To connect to the Raspberry it has to be on internet. Access to it via SSH. Use PuTTy for easy access.

********************************************************************************

Basic username is : root

And password : volumio

1. Burn the Volumio image to your SD card. Find the instructions from the Volumio's site.

2. Remap the partition size. Add a line at a time to the console and answer the "questions" as follows.

<p>sudo fdisk /dev/mmcblk0<br>Command : d
Partition number : 3
Command : n
Select : default
Partition number : 3
Partition start : default
Partition end : default
Command : w</p>sudo reboot



After reboot continue.

sudo resize2fs /dev/root



3.Get the drivers from Adafruit for the screen

sudo apt-get update

curl -SLs https://apt.adafruit.com/add | sudo bash

sudo apt-get install -y adafruit-pitft-helper



Wait the processes to finish and continue.

sudo nano /boot/config.txt



Insert this to the txt file.

[pi1]

device_tree=bcm2708-rpi-b-plus.dtb

[pi2]

device_tree=bcm2709-rpi-2-b.dtb

[all]

dtparam=spi=on

dtparam=i2c1=on

dtparam=i2c_arm=on

dtoverlay=pitft28r,rotate=90,speed=32000000,fps=20



Save the file with Ctrl+O and quit Ctrl+X

sudo reboot

After reboot the screen should be black. If it isn't redo the whole thing.

If the screen is black. continue.

Take the touch screen drivers to use.

write the command.

sudo nano /etc/modules



And add to the last line this.

stmpe-ts



Save and quit.

Last things to the touch screen are these.

sudo mkdir /etc/X11/xorg.conf.d

sudo nano /etc/X11/xorg.conf.d/99-calibration.conf



Write these lines to the screen and save.

Section "InputClass"

Identifier "calibration"

MatchProduct "stmpe-ts"

Option "Calibration" "3800 200 200 3800"

Option "SwapAxes" "1"

EndSection



Now the screen and drivers are installed. Don't worry. There is no picture at the time.

4.Next we will install LXDE environment.

sudo apt-get update

sudo apt-get install -y xserver-xorg xinit xserver-xorg-video-fbdev lxde lxde-common



This one is your "desktop".

5.Install and configure Chromium browser and LXDE

sudo apt-get install chromium x11-xserver-utils unclutter

sudo nano /etc/xdg/lxsession/LXDE/autostart



Insert the following lines to the autostart file. Comment (#) the screen saver line.

#@xscreensaver -no-splash

@xset s off
@xset -dpms


@xset s noblank

@chromium --kiosk --incognito --user-data-dir --disable-touch-editing --enable-touch-events http://volumio.local



If you have a problem with the volumio.local address, change it to your raspberrys IP address.

finally write

sudo reboot

6. Now that everything is in order, Its time to wake up the screen.

Write

FRAMEBUFFER=/dev/fb1 startx

You should now have a picture in your screen.

To make it automatically to boot the screen on power up you will have to make a new file to boot it up.

sudo nano /etc/rc.local



Add these lines just before exit 0 line at the bottom.

sudo modprobe spi-bcm2708

sudo modprobe fbtft_device name=adafruits rotate=90

export FRAMEBUFFER=/dev/fb1

startx



save the file.

Reboot and hope for the best.

Testing

DSCN6045.JPG
DSCN6046.JPG
DSCN6047.JPG
DSCN6048.JPG
See that everything works the way it should. Pop some speakers in to the plug at the back and hit play.

If you have any questions i will try to answer them as soon as i can.

Bottom Lid.

DSCN6050.JPG
DSCN6051.JPG
DSCN6052.JPG
DSCN6053.JPG
DSCN6054.JPG
DSCN6055.JPG
DSCN6059.JPG
DSCN6060.JPG
Almost forgot. Glue the bottom lid to the bottom of the base. Use glue or tape or whatever.

If you want you can make a small "cut" to the base for the SD card for easy remove. You know...if you like to play Nes or other emulator with it ;)

That's All Folks.

DSCN6061.JPG
DSCN6063.JPG
DSCN6064.JPG
DSCN6040.JPG
DSCN6065.JPG
DSCN6068.JPG
DSCN6070.JPG
DSCN6071.JPG
DSCN6076.JPG
DSCN6077.JPG
DSCN6078.JPG
DSCN6079.JPG
DSCN6080.JPG
DSCN6081.JPG
DSCN6082.JPG
DSCN6083.JPG
DSCN6084.JPG
Thanks for reading. Enjoy your internet radio that you can control with everything that is connected to your local internet.

If you like my projects be sure to follow me to get the latest projects first.

And also remember to VOTE.

Happy buildings

-Miska Karvonen.