Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Monday, 20 May 2013

my Pi-Car

Pi-Car is a Raspberry Pi (RPi) controlled RC (remote control) car, for details click on the link. In brief Pi-car runs without pressing the remote buttons, instead we will send the instructions by a computer program. I have used the basic Pi-Car kit and Raster RC car Porche GT3 RS from Argos.

How it works?
We connect the RC circuit Left, Right, Forward, Backward button points and 0V points with RPi GPIO pins, using Pi-Car circuit which is made of 4 FETs and 4 Resistors. Need to write Python program that controls the behaviour of pressing the L/R/Frwd/Bkwrd button of the remote. For detailed instruction for building a car like this follow the instructions provided here http://pi-cars.com/2013/01/24/pi-cars-factory-beginners-tool-kit/

Here are the pictures of my setup

1. RC Circuit of Raster RC Car Porche GT3 RS from Argos

2. Make 5mm hole on back of the RC to create a passage for wires

3. Final setup looks like this

4. Here is a video showing how it works, doing one forward and backward loop, there is a sleep of 10 sec in between to change the position of the car



5. This video is showing car following the carpet perimeter forward and reverse



6. Sample Python script, here is link to my Python script, which is a modified version of the sample script provided by Pi-car.com
https://googledrive.com/host/0BwDWZ6lzXD51eXV3d2dvdGVEMkE/PiCarTest1.py

Lessons Learnt
I think overall its a great project for any 10+ years old to learn computer programming in fun way. I found that even the five years olds were quite excited and amazed watching the car run by a computer instead of a remote, all they have to do is hit the enter key :-). They also got a hang of it, Big Computer talking to small one, Small one (RPi) is talking to remote and remote is talking to a car. :-)

Controlling a RC car is not that easy, as the basic car doesn't have speed control or break system. It simply runs based on how long a button is pressed, so getting a time accuracy is bit of tedious job and require lots of trial and error. Also it may not run the same distance on and off carpet due to variation in friction. The charge of the battery will also affect the distance it covers in a given time, for example with full charge it may cover 3 ft in 1 sec but with low charge it may be able to do only 2.5 or 2 feet. I think once you get hang of it its fun.

Sunday, 16 December 2012

Make your Dumb TV a Smart TV using Raspberry Pi



I am not sure about a real definition of Smart TV but I guess it is basically an integration of TV and Internet. It allows to access GMail, Facebook, Skype, YouTube and Video on demand services. Using Raspberry Pi you can convert any TV in to a Smart TV, even more smarter than those from LG and Samsung. More smarter because Pi is basically full-fledged computer running Linux, so anything is possible that we do on regular PC. While those smart TV from Samsung, LG, Sony etc run a stripped down version of Linux or proprietary flavor of Linux. They support only a small set of popular apps or plug-ins. 


Also this solution uses XBMC for media streaming which is an open source free s/w that supports tuns of plug-ins for Video, Music, and Programs


I have converted my old CRT TV into a Smart TV and enjoying BigBoss from Colors (Indian Hindi TV channel) since last few months, in fact i could see any episode anytime I want for free.


My Solution - Hardware
Raspberry Pi Type B (30 GBP)
Edimax USB Wifi dongle (10 GBP)
RiiTek Wireless key board (20 GBP)
USB Hub (9 GBP from eBay)

Power Supply for Pi - No need rather use USB hub with external power and power your Pi through USB port on Hub. I am using 7 port hub as Pi provides only 2, I wanted at least 3 ports one for my Wifi dongle, one for wireless key board and one for external HDD, where I keep my personal collection of Pictures, Music and Videos. 


Software
a) Download xbian i.e. XBian1.0Alpha3.zip, from here http://www.xbian.org/p/download_3325.html

b) Unzip the XBian1.0Alpha3.zip, it will create a win32diskimager folder and XBian1.0Alpha3.img file 
- win32diskimager folder contains a s/w to write a image file on SD card
- Insert a > 2GB SD card and format it
- start Win32DiskImager.exe
- Select XBian1.0Alpha3.img file and drive of your SD card
- click a 'write' button, writing of image to sd card starts
- wait for few min till the writing is complete
- Insert SD card in RPi and boot it


c) Download AJ add-on for Indian TV channels http://code.google.com/p/apple-tv2-xbmc/
- Copy the add on zip file to SD card
- Select an option 'Install from ZIP' while installing an add-on in XBMC, follow this path System > Settings > Add-ons > Install from Zip file

d) For official XBMC Video add-ons like YouTube and many others, downloaded it through XBMC follow this path System > Settings > Add-ons > Get Add-ons > All Add-ons > Video Add-ons

e) Add-ons for GMail, Facebook etc are available in Program add-ons category while Music add-ons are available in Music category. 



Good thing about this solution is you can access all Indian TV channel content on demand for free and LIVE news channels like NDTV, TimesNow and ET Now for free as well. 

I love YouTube on TV as it provide access to vast amount of Video content on demand. Some of my favorites educational content young kids are.
  • Hooplakidz - YouTube channel for young kids, provided tons of rhymes, short stories, abcd/phonics,number and whole lots fun and educational content for kids
  • Alphablocks from Cbeebies - about 50 episode
  • Jolly Phonics - a playlist of 5 videos of jolly phonics. 

References

  1. Smart TV on Wikipedia, http://en.wikipedia.org/wiki/Smart_TV
  2. XBMC home, http://xbmc.org/
  3. XBian home, http://www.xbian.org/
  4. AJ Add-on for Indian TV content and Movies, http://code.google.com/p/apple-tv2-xbmc/





Thursday, 8 November 2012

$35 Computer - Raspberry Pi

Don't confuse it with recently released Hindi film Life Of Pi, I am talking about 'Raspberry Pi', a 35 dollar computer. This is credit card size and weight just 45g, it's computer that you can carry in your pocket if you like. It runs on Linux and powered by 1 GHz ARM CPU.



Specification: 1 GHz ARM CPU, 512 MB RAM, 2 USB Port, 1 Ethernet Port, 1 HDMI Port (to connect with LCD/LED TVs), 1 RCA Video port, 1 Audio Port (these two port can be used to connect it with old generation TVs), 1 SD Card Slot and 1 mini USB port for power supply. 

There are two versions of Raspberry Pi type A and type B. It comes with 1 GHz ARM CPU  and 512 MB RAM, ARM is the same CPU that runs on most of the smart phones. The picture and specs above is for Type B Pi that cost 35 USD. Cost of Type A is even lower only 25 USD, it comes with 1 USB, 256 MB RAM and No Ethernet Port. 

Why it is so cheap?
This computer is designed by Raspberry Pi Foundation a UK registered charities. The computer on offer for 35 USD is what you see in above picture. Yes there will be no key board  mouse, monitor, power supply or even a case. But that's ok, you can use your mobile's power supply to power Raspberry Pi (minimum requirement 1A and 5V) and other accessories lying at home (keyboard, mouse etc). You don't need a monitor as you can use your home TV as a monitor. Of-course there is no Hard disk, the machine boots from a SD Card and it treats SD card as hard disk. If required an external USB hard disk or USB Stick can be used for extra memory. You can buy a Pi case, Power Supply, Keyboard, Mouse and USB Wifi for about same cost as Pi, in total for 70-80 USD you can have good working computer. 

Raspberry Pi comes with 26 GPIO (General Purpose Input/ Output) pins, these pins can be used to make many interesting electronic projects. GPIOs pins can be used to connect and control (via program running on Pi) external devices like temperature sensor, motion sensors, robots, motors etc. For more on GPIO see wikipedia ttp://en.wikipedia.org/wiki/General_Purpose_Input/Output & http://elinux.org/RPi_Low-level_peripherals

Some of the projects that immediately comes to mind are

a) Personal Whether Station: You can make your own whether station by connecting temperature and/or humidity, wind sensors and record the reading periodically. See it on your computer or publish it on Internet may be your personal site or a blog.
b) Security Solution: If you want to be more adventurous think of using Pi to control the TV and lights of a home over the Internet or put it on auto-mode. This way you can keep the burglars away when you are on holidays by simulating your daily lights and TV routine. 

I think it is a perfect toy for any 10-15 years old, particularly if you want to inspire them towards the fields of electrical/electronics/ computer engineering. Also not a bad options if you want to develop a hobby around electronics. 

MagPi - A free monthly magazine that covers interesting set of topics like Pi based projects, Linux Tips, PythonPit (to lean Python), The Scratch Patch (to learn Scratch, a Lego like programming language developed by MIT for kids), The C Cave (to learn C). The magazine's look and feel is designed for kids.


My Five Favourites Pi Projects.
1) Media Streamer/ Server: Put XBMC on Pi and it becomes your media streamer/server similar to a Apple TV or Android TV. To know more read my blog http://indusmaker.blogspot.co.uk/2012/12/make-your-dumb-tv-smart-tv-using.html

2) Drive a Remote car with Pi, so instead of pressing button on remote a program on Pi can control the car. Refer http://pi-cars.com/2012/11/13/pi-cars-control-your-radio-controlled-cars-through-your-raspberry-pi/ for more details. This is how probably a future driver less car might be built with a computer, GPS and lots of sensors (i.e. proximity, light, rain sensors etc)

3) Internet Radio, see these links for some ideas. http://contractorwolf.wordpress.com/raspberry-pi-radio/
http://www.instructables.com/id/Pandoras-Box-An-Internet-Radio-player-made-with/

4) Home Automation, how about switching on your Microwave with phone so that when you arrive at home your rice in microwave is ready. Refer pg 8-9 of Issue 8 (Dec 2012) of Mag Pi http://issuu.com/themagpi/docs/issue_8_final?mode=window

5) Advertisement Solution: Turn your TV in Shop/Factory into an advertisement console. It can be used to advertise about your other business or your friends business. Refer this link to know more about this solution. http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=19640

Is it available in India?
Yes it is, however please be aware there are only two official store for Raspberry Pi, RS Components and Farnell (element 4), click on the link for their Indian web site. See this discussion thread for more details on other options for India.


For more details visit Pi website - http://www.raspberrypi.org/

* The ARM CPU that comes with Pi is 700Mhz only, however it is possible to push its speed up to 1GHz using simple configuration option