Saturday, January 11, 2014

My Pi part 2


My Pi is up with Raspbmc and communicate with my SMA inverter and update data to pvoutput.org. But I still lack of something, an USB hub, an external powered USB hub.

Initially, I went to the IT shop to seek for a cheap solution, but the price just stop me. A 4-port powered USB hub from Belkin is selling about RM70. If a Pi only cost RM111, how unreasonable if I get a hub for RM70. So, I make up my mind to do it one for myself.

The idea is very simple, you get an old USB hub that can be powered by external power supply, then you cut the power terminal that connected to the Pi, left only data line. This is to prevent unbalance voltage that might causing the Pi malfunction.



Once you have cut the power supply connection, it is safe to connect the hub to Pi. I found a 5V, 3A adaptor from my store, so it is just nice to use it, lucky :)

Now the external powered hub is ready to use. I connect back the external HDD, and I can continue enjoy the movie. Too bad that Raspbmc does not support rm/rmvb file. But that is not a major problem, just get a converter and convert it to other format will do. With the current CPU power and GPU power, it is just a few seconds job to convert rm/rmvb to avi.

Then the next task will be the remote for my Pi. I order a TSOP34138 infrared receiver from Farnell with cost of about RM5. Then I found an old VCD player remote and use it to become the remote for my Pi. STM Labs has a very detail instruction of how to use GPIO of Raspberry Pi to become IR receiver. For those that can't afford to buy a nice IR from Logitech, this is the cheapest solution that you can use.

Basically, I have done most of my tasks, but I still have more challenging task to do with my Pi. Will update once I have more detail to share.

Wednesday, January 01, 2014

My Pi

I was a fan of Raspberry Pi since beginning of the release, this credit-card-sized single board computer really attract my attention. I always want to use some simple hardware to perform some simple task, using minimum computing power to execute daily not so complicated computing task, e.g. media player, data logger, web server, home automation, NAS, etc. I have few old PC which I can use it for those function but few reasons stop me from doing that.

First of all, the power consumption of those PC is too high. For a normal Intel CPU, you are talking around 65W up to 250W which the power consumption of a monitor is not yet being included. Lets say, it takes an average of 100W and I don't need monitor. For this PC to run 24x7x365, the electricity per annual will be

100W x 24hrs x 365 days =  876kWhr/annual or 73kWhe/month

Our electricity tariff is based on the total amount of electricity you are using, the lesser you use, the lower the rate. For domestic, the tariff range from RM0.218/kWh until RM0.454/kWh (however year 2014, TNB give us the best new year gift, the maximum rate is RM0.571/kWh, thank you to all fuckers that vote blindly)
My house average monthly electricity consumption is around 400kWh, which is about RM100++ of electricity bill. If let say I use normal PC to do these additional function, I need to pay extra 73kWh x RM0.516, which is around RM38 per month, or RM450 per year. That's why I aiming for this lower power system that use very minimum power and at the same time do the job I want.

Raspberry Pi consume around 3.5W of power, which mean about 32kWh/annual or 2.6kWhr per month. That mean I need to pay extra RM16 per annual if I power my Pi for 24x7x365. Well, I believe this kind of power consumption you can't complain with.

I have been waiting a chance to buy a Pi, until recently, my wife asking me if I can buy a media player for her farther, and immediately I donate my media player to her :) and I get myself a Raspberry Pi from Farnell. It cost me RM111 for the Pi, then I get a acyclic case from ebay for around RM12.

So, what I going to do with this PC?

First of all, I need to make it a media center. This job is very easy, just go to Raspbmc and follow the instruction to install the image into a SD card. I have tried few times to make the machine up. The advice is use Lan for the installation process, once you are in the XBMC, then only you go for wireless.

The second task is to install a Bluetooth toggle to connect with my PV system and upload the data automatically to the internet. I'm using SMAspot, they got a very nice instruction of how to install and configure their program with Pi. Now I can monitor my PV system automatically from any where I go.




I still have few tasks to be completed:

1. To modify a normal USB hub to become powered USB hub. Initially, I was thinking to get a powered USB hub, but the price is too expensive, nearly RM70. So, I decided to get a power supply from my store and modify a normal USB hub into a powered USB hub so that I can connect my portable HDD to the Pi.

2. Remote control for the XBMC. Again, I will use a GPIO of the Pi to connect a infrared receiver and get a cheap Astro remote control.

3. NAS. I got few old 3.5" HDD and I thinking a way to connect it to the Pi. Will find a solution soon.

4. Adding an LCD display to the Pi. I got few 2.2" LCD with me, so will find a time to connect it to the Pi for some message display.

5. Home automation, This is a long term project. Will do it once I settle down.

Ok, a long post for the New Year.

Happy new year to everyone out there.