Page 1 of 1

So the Raspberry Pi is finally here...

Posted: Thu Jun 07, 2012 7:01 pm
by chuckula
After three long months during which most of the Donner party froze to death before being eaten, I have finally have my mitts on a fully operational Raspberry Pi.

Now, the question is... what should I do with it? I have a few ideas and I'm downloading some distro images now, but if there are any projects that Gerbils here would find interesting, please let me know and I'll see if I can find the free time to work on them.

[EDIT: See my latest post where I have a temperature sensor + web server rendering SVG working! Here is the URL for the tl;dr crowd: Six Hour Temperature Monitor for my evil lair.]

Re: So the Raspberry Pi is finally here...

Posted: Thu Jun 07, 2012 7:32 pm
by Jon
I too have ordered a Rapdberry Pi but I'm awaiting it's delivery, August I believe.
I'm using it as a base for a project idea that I've had for 3 years now. Looking forward to it.
Are you aware of any good Raspberry Pi collaboration sites/forums?

Re: So the Raspberry Pi is finally here...

Posted: Fri Jun 08, 2012 10:51 am
by chuckula
Good question about online communities. I know that there are forums on the raspberrypi.org website, and there is an online magazine (http://www.themagpi.com/) that may have some cool project ideas.

Re: So the Raspberry Pi is finally here...

Posted: Fri Jun 08, 2012 7:26 pm
by chuckula
So I got Fedora 17 semi-functional on the card.
The first time I hooked up the HDMI out it sparked and a small puff of smoke came out(!) Fortunately, that smoke did not appear to be the magic smoke and the thing is still operational... but that was not a good oh sh#t moment considering how long I waited to get this thing.

I used an old 4GB SD card, and I think it has some issues with the board because the Fedora 17 for Raspberry Pi beta spit out errors about I/O timeouts and didn't quite let me login to a GUI (but did display a graphical login). I use Arch on a daily basis, so might try the Arch image for a simpler TTY login.

Re: So the Raspberry Pi is finally here...

Posted: Fri Jun 08, 2012 7:29 pm
by moresmarterthanspock
I would like to order one of these. Probably more expensive than the raspberry pi, but also a pit more punch as well.

http://www.fit-pc.com/web/purchase/order-direct-mintbox/

Re: So the Raspberry Pi is finally here...

Posted: Fri Jun 08, 2012 7:55 pm
by DeadOfKnight
moresmarterthanspock wrote:
I would like to order one of these. Probably more expensive than the raspberry pi, but also a pit more punch as well.

http://www.fit-pc.com/web/purchase/order-direct-mintbox/

Uh, yeah...about 2,000% more expensive.

Re: So the Raspberry Pi is finally here...

Posted: Sat Jun 09, 2012 11:07 pm
by ludi
chuckula wrote:
The first time I hooked up the HDMI out it sparked and a small puff of smoke came out(!) Fortunately, that smoke did not appear to be the magic smoke and the thing is still operational... but that was not a good oh sh#t moment considering how long I waited to get this thing.

Sounds like the +5V line briefly made electrical continuity with a ground point. Might still be a metal fragment lingering around in that connector. Personally, I would clean out both the cable connector and the Pi's connector with rubbing alcohol and a soft toothbrush just to make sure everything is truly out of there.

Re: So the Raspberry Pi is finally here...

Posted: Sat Jun 09, 2012 11:26 pm
by cheapFreeAgent
Have you tried to install one of the image from Pi's website ?

Re: So the Raspberry Pi is finally here...

Posted: Sat Jun 09, 2012 11:44 pm
by chuckula
cheapFreeAgent wrote:
Have you tried to install one of the image from Pi's website ?


Yes: I just installed the Arch image and I have it operational via SSH. The image does not have a default graphical desktop so that will require some additional downloads. I'm more interested in using the RPi in embedded applications, so an SSH login is just fine for my uses. I don't have a good breadboard & LED setup anymore, but I do have a multimeter that I can use to check the GPIO pins in a primitive way.

Re: So the Raspberry Pi is finally here...

Posted: Sun Jun 10, 2012 3:15 am
by metalhead
The first time I hooked up the HDMI out it sparked and a small puff of smoke came out


It's mentioned in issue 2 of themagpi online magazine you linked that the display and SD card should only be connected / disconnected when the power is removed. Maybe that was the issue?

Re: So the Raspberry Pi is finally here...

Posted: Fri Jun 22, 2012 10:29 pm
by chuckula
OK.. I haven't had much time to mess with the board, but I have found out the following:
1. The Arch install is the easiest to work with for me (I'm already used to Arch) but has an issue where I can't see any video over HDMI. I thought HDMI was fried, but when I use other distros the output works, so go figure.
2. The RPi is freakin' picky about the SD cards that it will work with. I even went out and bought a name-brand (SanDisk) higher end class 6 card... only to find out that while many SanDisk cards are suppported, my particular card isn't. This resulted in inability to boot anything using the card.. snap. The card with the Arch install on it is an old 2GB Sandisk, but is seems to work OK for its purposes.
3. I got GPIO working! w00t! I installed the GPIO python package to help simplify things, and since I don't have a breadboard & LEDs available, I went even more old-school and hooked up my multimeter via alligator clips. When set to voltage mode, I can make the needle go up and down via software. So basically I have done the moral equivalent of "Hello World" on the Raspberry Pi.. rawk.

4. Idea: I'm thinking about getting extra bits together to turn this thing into a weather station. I've seen some other ideas along the same lines online and it could be a fun project.

Re: So the Raspberry Pi is finally here...

Posted: Sat Jun 23, 2012 1:06 am
by kyboshed
I'm looking forward to the forthcoming camera module. I'm hoping to get it setup as a mobile timelapse rig.

I did have some fun with the gpio pins too!

Re: So the Raspberry Pi is finally here...

Posted: Sat Jun 23, 2012 7:33 am
by chuckula
kyboshed wrote:
I'm looking forward to the forthcoming camera module. I'm hoping to get it setup as a mobile timelapse rig.

I did have some fun with the gpio pins too!


Sweet... driving those 7-segment displays is always fun.

Re: So the Raspberry Pi is finally here...

Posted: Sat Jun 23, 2012 11:44 am
by notfred
chuckula wrote:
2. The RPi is freakin' picky about the SD cards that it will work with. I even went out and bought a name-brand (SanDisk) higher end class 6 card... only to find out that while many SanDisk cards are suppported, my particular card isn't. This resulted in inability to boot anything using the card.. snap. The card with the Arch install on it is an old 2GB Sandisk, but is seems to work OK for its purposes.

Haven't seen the instructions for the Raspberry Pi bootloader, but I've run in to issues on other boards with disk geometry settings when partitioning and also ensuring the partitions are full cylinders. It may be that you are running in to something similar.

Re: So the Raspberry Pi is finally here...

Posted: Wed Jul 04, 2012 11:25 am
by chuckula
Update: I'm getting semi-serious about putting the RasPi to work. I just ordered some Texas Instruments TMP75 temperature sensors. These things are fully digital so no need to wory about filtering and A/D conversion. Additionally, they have an I2C interface that should hopefully be compatible with the Ras Pi if I can get the software running right. I still need to get some sort of prototype board that will let me hook them up electrically. They are surface mount parts (they don't make a through-hole model) but for SM parts they have relatively large leads and only 8 pins, so it shouldn't be too crazy.

Temperature sensing is phase 1. If I can get this working first I may expand to include humidity/barometric pressure/wind speed/etc. sensors as well.

Edit: It looks like the TMP75 sensor is already supported by the lm_sensors project in Linux... so the good news is that I won't have to run around writing I2C code unless I want to get adventurous :-) My evil plan is to log the data with the Ras Pi and setup a web server to display the current temp and stored temperatures in interesting ways.

Re: So the Raspberry Pi is finally here...

Posted: Tue Jul 10, 2012 7:09 am
by DeadOfKnight

Re: So the Raspberry Pi is finally here...

Posted: Tue Jul 24, 2012 7:19 pm
by chuckula
SUCESS!! (Sort of kind of, but more on that in a second)

OK, when I last updated this thread, I had ordered some temperature sensors and other hardware. Well, I got a temperature sensor (TI TMP75) wired up and connected to the Ras Pi via I2C. I got the surface-mount TMP75 parts (using the SOIC package with 1.27 mm pitches) attached to a standard breadboard using... Schmartboard which makes soldering *almost* foolproof even for a dolt like me.

Here were a few hurdles I had to clear:

1. None of the default images that are available on the internet actually include i2c support! doh! I ended up getting Raspbian, then on top of Raspbian I installed the 3.2.23 kernel, which includes the correct drivers, from bootc who is ahead of the curve on RasPi kernel development.

P.S. --> If you try to manually install this package on Raspbian using dpkg, the installer will fail with an incorrect architecture error. You need to dig down into the dpkg command documentation and forcibly ignore the "architecture" error and install anyway. The architecture difference (ARMel for the kernel vs. ARMhf for Raspbian) does not matter and the kernel will boot fine.

2. After I got I2c installed I tried to get the board going... no dice.
One problem: I needed to ground all the address pins to make my device have the default "0x48" i2c address. Duh. (you can select from 8 different addresses using combinations of ground and VCC if you really want).
Next problem: I studiously followed the tmp75 documentation that said the SDA and SCL pins needed pull-up resistors. Well, that's true *but* the SDA and SCL pins on the RasPi already have built-in pull-up resistors, so the ones I put on the bread board were hurting not helping. However, the alert output pin (which I'm not actually using) *should* still have a pull-up resistor, and I am using a 2.2K ohm resistor right now.

3. After all of that and lots of extra trial & error I finally got it working! (sort of)
So... If you happen to have a board like this that is actually working, here are the magic commands to get it initialized:
0. Make sure that lm-sensors is installed ("apt-get install lm-sensors" if you are using debian)
1. modprobe i2c_bcm2708 --> may already be loaded for you
2. modprobe lm75 --> my device-specific driver that works with the TMP75 sensor, but you may be using a different device with a different driver
3. modprobe i2c-dev --> another important i2c driver

4. Here's my problem: I can get the sensor to work, but it has proven to be *flaky* with the i2c connect. For example, it will work for a while, then just stop. I've fiddled with the wiring, made sure the solder joints were secure, but it has been a challenge. I'm worried that the i2c implementation in the Rpi itself is not all its cracked up to be. I've noticed that the sensors will still return a temperature, but that the temperature value never changes even though it obviously should be heating up or cooling down based on stuff I've done to the chip.

I did manage to get the thing working for a while to actually sense changes in temperature tonight. Here are my results after using the fiance's hair drier to heat up the chip, then letting it cool down slowly:

Adapter: bcm2708_i2c.0
temp1: +97.7°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +96.8°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.9°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.0°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.0°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.0°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +90.5°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +85.1°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +78.8°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +77.0°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +76.1°F (high = +176.0°F, hyst = +167.0°F)

w00t!

Re: So the Raspberry Pi is finally here...

Posted: Tue Jul 24, 2012 7:21 pm
by chuckula
Here are some more results in the opposite direction after I shot the thing with compressed air to cool it off (ambient is being shown as 73.4F):

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +63.5°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +65.3°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +66.2°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +68.0°F (high = +176.0°F, hyst = +167.0°F)

root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +68.0°F (high = +176.0°F, hyst = +167.0°F)

tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +70.7°F (high = +176.0°F, hyst = +167.0°F)

Re: So the Raspberry Pi is finally here...

Posted: Sat Aug 11, 2012 6:34 pm
by chuckula
OK: New status update & Request for ideas:
1. Got i2C monitoring to be more reliable by intentionally not loading the i2c-dev module since that module is not actually needed to use the sensor. Instead, it appears to be used with the i2cdetect utility. That's a nice utility, but it tends to mess up i2c devices that are already running.

2. Got a nice python daemon running that automatically polls the file associated with the detected temperature once a minute and saves the data, keyed to a timestamp, into a Berkeley DB file. So now I have data logging going on and a nice DB backend for the next phase.

3. The next phase is where I'm having the biggest problems right now. The most commonly used package for generating graphs in python, matplotlib, does not work with my Raspberry Pi. I can install the software, but as soon as I import the module, my RPi hangs and needs to be power-cycled to be used again (theoretically it's not a crash since I can still ping my system, but all user-level programs hang and I can't kill python or login with a second SSH session). Note: I have also tried the mathgl and chaco packages for generating graphs, and both have crashed my system in similar ways :cry:

4. So, given the problems of point 3, I'm looking for a decent solution for generating halfway nice looking graphs from data. Python would be preferable as a language, but other solutions are welcome as well. I have been able to use straight-up python-cairo to generate some very simple axis lines in an SVG file, but actually plotting data points is going to be a very big PITA since cairo only provides me with the most bare-bones drawing primitives instead of nice calls to a graphing library that turns the data into a nice graph. Any ideas?

Re: So the Raspberry Pi is finally here...

Posted: Mon Aug 27, 2012 8:39 pm
by chuckula
And... after quite a bit of hacking we are in business!

Please go here to check out a Raspberry Pi temperature graph from the temperature sensor that is rendered to SVG and hosted on a web server sitting right on my Raspberry Pi: Hourly SVG Temperature Updates The graph you see is a 6 hour history of temperatures (in celcius) taken once per minute. Please use ctrl + mousewheel to zoom in on the drawing and you'll see how nicely SVG renders. It should look fine in either Firefox or Chrome.

I have a temperature daemon program that polls the temperature sensor once a minute for the temperature and stores the data in Berkeley DB files. I then wrote a command line utility to actually generate the graph using the data in the DB files. Right now I've just added the graph utility to my cron list to run the job hourly.

I am using the svgfig (http://code.google.com/p/svgfig/) package + some customizations to turn the data into the nice figure you see. The customizations are that I'm manually inserting the SVG code for a gradient, which gives you the green to orange color effect, and I also had to hack svgfig because it has a bug where it will drop the Y-axis labels in situations where the X-axis is much longer than the Y-axis, as in this figure. If you happen to see a completely flat temperature line, it will be black because the color gradient doesn't work on flat lines.

I should also post some hardware layout schematics in case anybody is interested. The configuration is pretty simple, but there are some tricks that you need to watch out for due to unclear documentation.

My next project may be to get a (much more expensive) temperature and humidity sensor to measure more than just temperatures... fun fun.

Re: So the Raspberry Pi is finally here...

Posted: Tue Aug 28, 2012 12:07 am
by Jason181
Nice thermometer! Kinda cool project. :wink: Sounds like the software was the hard part.

Re: So the Raspberry Pi is finally here...

Posted: Tue Aug 28, 2012 6:41 am
by chuckula
Jason181 wrote:
Nice thermometer! Kinda cool project. :wink: Sounds like the software was the hard part.


Yeah, the wiring was pretty simple even for a moron like me who isn't that great with a soldering iron. At some point I'll probably try to submit the project to one of the Raspberry Pi publications and people will probably do much cooler things with it.

Re: So the Raspberry Pi is finally here...

Posted: Tue Aug 28, 2012 9:49 am
by chuckula
While the temperature is pretty boring overnight due to the AC actually working, the thermostat lets the house warmup during the day and I've just gotten the first change in temperature since this morning.
Yay! (OK, it's pretty boring really, but I want to get the sensor into an outdoor-proofed enclosure and do outdoor temperature sensing which should be more exciting).

Re: So the Raspberry Pi is finally here...

Posted: Tue Aug 28, 2012 10:21 am
by d0g_p00p
I have mine and I love it. The first thing I did was to get a case. Ladyada has a excellent case for around $15 at adafruit industries. I was thinking to replace my old FreeBSD server box. I have 3 more on order and my plan in the future is to cluster them and get them all into a 1U Sun Netra case. While waiting for those parts I am currently taking apart a 5 port switch and usb switch for networking and power. I am pretty sure I can squeeze all that into the Sun case. It's not a full size 1U so there will be some issues with space.

4 node linux cluster for around $100? Oh hells yes!