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

Saturday, August 9, 2014

Raspberry Pi cooling fan

Hi ! So, after quiet some time I've decided to post something here. Recently I've been working with Raspberry Pi more often, and I noticed that even with small load for longer periods of time it can get hot, and that lead me to decision to add a small fan to it.

 
 
You can check temperature of your Pi in Celsius via terminal by typing one of these two commands :
 
  /opt/vc/bin/vcgencmd measure_temp 
   cat /sys/class/thermal/thermal_zone0/temp (divide by 1000)
 
After one hour of pretty much idle sitting, Pi can get all the way up to 53.5 °C, which may not be critical but it's not ideal, taking in consideration fact that while performing demanding tasks temperature will grow higher. I went for 30x30 mm fan, that can sit directly above the processor. Screw in the mounting hole available at the Pi alongside with the s-video jack hold it in place. I wanted to keep 2x13 GPIO pin headers intact, so instead I've used P5 pins, that have all that is needed in order to make this work. I've then added simple header connector that has a 2n2222 transistor on it, base of which is controlled by GPIO pin number 30. By changing resistor value you can pretty much vary fan speed. One I've used is rated 5V and 72mA, but I decided to use 10k resitor on the base which together with beta of transistor (~ 100) gives around 45 mA to the fan, so that it runs smoothly and very quietly. At the bottom you can see simple bash script that is executed in rc.local to run as a background process everytime Pi is turned on. It's basically constantly checking whether temperature has crossed the threshold and when yes it activates the fan for 5 minutes. Of course you can go even further, use python for instance that will give you with help of RPi.GPIO library ability to use PWM to scale the speed to current temperature, but I wanted to keep it simple. 





Sunday, March 31, 2013

Portable Power Supply


Hi ! First of all happy Easter to everyone. If you haven’t seen it yet, go watch my reel, I hope you’ll like it.



Currently I’m working on a project that uses Raspberry Pi, but it requires Pi to be portable. This raises a question of power supply. Of course, I could just use 4 AA batteries or something temporary, but idea of portable power supply has been in my mind for some time. Once again I decided to use Nokia LiPo batteries, since they are great, and I have a lot of them. I used 3 x 1500 mAh ones so it gives me about 4.5 Ah to work with, which is not bad at all. At ebay I found these 3.7V to 5V booster converters, they’re great so I’ve already bought two of them. There was some problem with grounding, because circuit wasn’t working after resetting, so I had to connect battery and output ground with schottky diode, which solved the problem. I decided to put it all in an altoids tin. I still have lot of them from the times when I was building portable circuits. I have to say this thing is a beast, it has no problems with powering things like Arduino, Raspberry Pi or even charging my phone. Only problem is that circuit doesn’t have control of how much is being drawn from batteries, so when I’m charging my phone, circuit is giving out something like 1 ampere, and it gets really hot immediately. But that doesn’t matter since I will only be using it on my bench. Having handy 5V supply available every time is great.


Tuesday, November 6, 2012

First steps with Raspberry Pi

Hi there ! I've been inactive for few weeks because we have moved to a new flat. It's in the same city, but my PC was disassembled for few days and I'm still putting together my workplace.


In spite of that, I've been playing with Raspberry Pi and this awesome Bluetooth keyboard, that has already arrived, and a I have to tell that it's amazing ! No problem with pairing, charges really fast, can be connected to virtually anything, has amazing function keys, USB Bluetooth dongle can be stored in it and it has laser pointer and back-lighted keys ! I have to say it's one of the most useful things I ever bought. Raspberry Pi itself is amazing as-well, I wasn't expecting it to be fast, actually I've expected it to be slow as hell. At first I used Occidentalis from Adafruit as OS, but it turned out that there are some issues with the kernel and the new model of Pi that has 512 MB RAM, so I downloaded newest Wheezy, which is basically debian. I myself prefer Ubuntu, but on a piece of hardware like that, you don't wan't to waste any of your processing power. First thing I did was that I've overclocked ARM 11 processor from 700 MHZ to 950 MHZ and with 450 (usable) MB or RAM this device has quicker response than I've imagined, of course if you're installing something via terminal, it takes a lot of time. Second thing I did was that I've used a small script to automatically bind that Bluetooth keyboard to Raspberry, because it's not wireless, but bluetooth keyboard so you have to connect it manually. This script allows me to work with this keyboard immediately, with no need of wired keyboard or mouse. After that was done, I wanted to play with some GPIOs, but there was a problem, ribbon cable. I only had 40 pin one, and Pi uses 26 pin. So long story short, I've 'adjusted' cable with some pliers for metal and hot glue.


After that I downloaded Geany, which is really lightweight IDE for various languages. Then you need to download RPi.GPIO library via terminal and you're good to go. This was first time when I saw python, I have to say I like this language, it's easy, simple, portable yet have lot of possibilities. So if you're considering buying Raspberry Pi, I recommend you to, because for that amount of money it's an amazing piece of hardware and it's really fun to play with and you can definitely expect some projects that will use it.

Wednesday, October 17, 2012

Raspberry Pi

Hi ! First of all I would like to thank all of you, because I've recently hit 50,000 views on youtube ! It makes me proud and motivates me to do more and better stuff.



Next important thing is that my Raspberry Pi has finally arrived ! (it took 75 days) Original one that I've ordered got lost, so they had to send new one, on the other hand it's probably even better, because they've send me new model B with 512 MB RAM. I've already bought HDMI cable, Acrylic case and SD card. I want to make my raspberry fully portable, so expect some mods in near future, for that reason I've ordered this mini bluetooth keyboard with mouse pad from ebay. It's small, portable, wireless and uses only one USB port.