OLD Forums (Archived)

** ATTENTION **

These forums are now closed for new posts and are being kept here as an archive.
Please visit and sign up for the new forums here.


Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.

Pages: [1] 2
Author Topic: Raspberry Pi
iwannadie
The Sidekick of Kevin Butler
Posts: 104
Permalink
Post Raspberry Pi
on: July 25, 2012, 20:49
Quote

Ok, I herd about this on another podcast and was instantly wanting one and put in my order. What I will do with it, I have no idea but come on a $35 credit card size computer is a must have.

Anyone have one or want to get one? Any real world uses for it?

http://www.raspberrypi.org/

Image

iwannadie
The Sidekick of Kevin Butler
Posts: 104
Permalink
Post Re: Raspberry Pi
on: July 25, 2012, 22:35
Quote

oops lol.

Image

smthng
The Sidekick of Kevin Butler
Posts: 102
Permalink
Post Re: Raspberry Pi
on: August 2, 2012, 00:14
Quote

Want. MIght get three. One will definitely be used to replace my HTPC if it can handle it. They say it can and the XBMC guys already have builds for it, but I'm a title sceptical there. One will probably go in the Jeep and become an mp3 player. The other will get the GPIC and probably be used for whatever oddball projects I can think up... Webcam uploader, digital rain gauge, pool overflow detector, maybe a wifi media player for the deck.

frunk
PSOne Level User
Posts: 10
Permalink
Post Re: Raspberry Pi
on: August 2, 2012, 05:49
Quote

Hi folks,

I have had one for a number of months... its a fun little toy and well worth the $.

However one or two short-fallings make it an awkward fit for a solid replacement for an HTPC. The $25/$35 price point means they only licensed hardware support for the H.264 codes (which is 50 cents) and not the MPEG2 codecs (over $2). So if you have DVD rips or streams from TV broadcasts you are "outta luck" as it does not have the muscle to decode. Ironic that is chugs happily through 720p MKVs and collapses with an SD TV stream. 1080p is possible but it does struggle a bit if you network stream.

However my experience with XBMC on a Pi is better than that on the AppleTV - so it does have a use.

So what is my Pi doing now? It is being relegated to being a light server in my media room. Have tested with 2 RGB LEDs and now I awai my "big order" from China to turn up... in the next couple of weeks it will drive probably the biggest "ambilight" setup created (700 channels) and I will use another to drive the remaining 1000 LEDs in the room (3000 channels). all independently controlled - any colour - any brightness - updating at 120Hz. In theory it can drive a lot more... but that depends on cabling.

Feel free to hit me up for info on geekery such as this.

Now if you want a low cost very capable and flexible HTPC replacement - my money of on the OUYA πŸ™‚

On the kickstarter for that - to primarily use it as an emulator/HTPC box - as a console replacement I am unsure of its viability... but as an HTPC replacement - ideal!

smthng
The Sidekick of Kevin Butler
Posts: 102
Permalink
Post Re: Raspberry Pi
on: August 3, 2012, 17:03
Quote

Quote from frunk on August 2, 2012, 05:49
... in the next couple of weeks it will drive probably the biggest "ambilight" setup created (700 channels) and I will use another to drive the remaining 1000 LEDs in the room (3000 channels)...
Feel free to hit me up for info on geekery such as this.

Dude, seriously? You've GOT to have a web site or something for that. Kick me a PM with some deets if you don't want to publicly expose it. I'd love to tackle smthng like that, just haven't had the opportunity to figure out a control scheme.

frunk
PSOne Level User
Posts: 10
Permalink
Post Re: Raspberry Pi
on: August 7, 2012, 12:04
Quote

Quote from smthng on August 3, 2012, 17:03

Quote from frunk on August 2, 2012, 05:49
... in the next couple of weeks it will drive probably the biggest "ambilight" setup created (700 channels) and I will use another to drive the remaining 1000 LEDs in the room (3000 channels)...
Feel free to hit me up for info on geekery such as this.

Dude, seriously? You've GOT to have a web site or something for that. Kick me a PM with some deets if you don't want to publicly expose it. I'd love to tackle smthng like that, just haven't had the opportunity to figure out a control scheme.

Hell, if you (or anyone is interested) I am happy to share. There is a fine line between - doing this stuff coz you are a bit of a geek, it's fun and you get to do some cool things and being a regarded as a braggart. So happy to show anyone anything if you ant. Can even set up a web site for the details if you want to build it yourself.

You see doing this sort of thing... it is not how clever YOU are its how clever you geeky friends are and how well you know how to trawl the GPL archives with Google.

The lighting control is actually remarkably simple once you do a little homework and know "what is easy". Also you take the approach of "I am lazy" and want to do "as little as possible" and see what other folks have cooked up you can steal.

Our approach is so simple I can explain it here. If you know electronics at all this will all be described a bit simplistically but I want folks who don't know this stuff to understand this. The fun is trying to get other people to give it a go.

First off we don't want to code analysis software for our "Ambilight clone" if someone has done it before. Indeed XMBC supports something called Boblight. Great! There is half of our job done!

Looking into Boblight you see there is a GPL server that is designed to run a variety of hardware - mostly based on Arduino (these are DIY modules running ATMEL micro-controllers). They just take data from the server and drive LEDs wired to the back of your telly.

Fine for 20-30 LEDs but I have a 7 meter permimter cionema screen to surround and that looks far too much like hard work. So we took a look around...

The Raspberry PI and most micro-controllers have an array I/O functions. One of them is SPI which is designed for the processor to speak to other chips on the same circuit board. However you can always speak longer distances at a slower rate. It is a really simple output consisting "CLOCK" which you run a constant "tick" at a set frequency (anything from a few hundred kilohertz all the way to the clock speed of the main bus - in a PI this is 250MHz). Then you have a "DATA OUT" which you just send out a binary sequence of data... very... very fast - each bit of data is read in time with the clock frequency.

So the frequency tells you exactly how many bits of data you can send in a second. Run it at 8MHz and you can transmit 8,000,000 bits of data in a second, or 1 million bytes of data second - which you can probably run along a few metres of shielded cable without a problem. If we run into speed problems we deal with them then... if not "let it ride". No point in engineering a solution to a problem that doesn't need fixing. But knowing where and when it might occur is useful.

There is also some control lines and data in... but we can ignore them.

So we have a fast way of getting data out... can anything use that data in that format to control LEDs.

Those LED chains or tape have progressed significantly in the last couple of years. They have the basic "analogue ones" where you shove power down a R, G and B lines to make the whole tape go one colour and there are the new-fangled digitally-addressable ones.

Once they were all "black magic" where you had to buy a special controller. But now everyone is making them and publishing the technical data sheets on how they work. And most of them work the same way. There are 2-3 chip sets available - all which work in a similar way. They expect a "CLOCK" and a "DATA" line, they read in the data and assume the first chunk is theirs. They chop off the bit they need and let the rest of the data pass through to the next chip in the line. With it's data it does its PWM magic to set the RGB values in the LED. This is where the chips vary and you need to read the data sheets carefully:

- Some are fast (can operate up to 25MHz), some slow (can operate at 800KHz)
- Some have basic 2-bit colour control (4 shades of R, G & B giving 64 colours in total), some have high colour resolutions
- Some strips have a chip on every LED - making each "pixel" controllable, some have a chip every 2-3 LEDs making each group addressable. You can also have strips with varying densities of LED/m
- Find a data sheet in your language πŸ™‚ May sound obvious but many of these chips are created in the cheap foundries in China and only used internally - so you are best adopting something that is well documented in something you can understand.

I settled in a very capable LED strip - every pixel is addressable - with 36 pixels per length - each pixel can has full 24-bit addressing - 8 bits each for R/G/B giving 16 million possible colours. It had proper documentation in English AND it all made sense.

Then you do whatever any cost-concious geek does - install "Alibaba Trade Manager" and hit Alibaba's site and haggle the best price for what you want from any of the DOZENS of happy Chinese companies wanting to sell directly to you.

They vary in price according to what you want, expect to pay around $75-$100 for 5m the more capable ones with about 30-40 LEDs/meter of tape. Or $0.5 - $0.75 per LED if you buy the chains.

If you want to do a little prototyping (as we did) you can get individual LEDs and an IC from Sparkfun on a little handy board for $10 each πŸ™‚ See the price difference there! Useful to test ideas cheaply - useless to execute them πŸ™‚

Once you have that sorted out all you have to do is squirt the right sequence of ones and zeros down that DATA line on the PI. A match made in heaven.

And someone has made a kernal on the Raspberry Pi which has the drivers for the SPI enabled as device drivers. So you can just type into the command line to "echo" &FF &00 &00 to dev/spi and bing! the first light in the chain goes bright red.

When we first typed that our jams hit the ground... electronics was never meant to be this easy!

Then you do the maths... okay I have 700cm/3 = about 250 LEDs. I want to update them at 30Hz - no point in doing it any faster as the screen is not refreshing any quicker. Each LED is 24bits * 250 LEDS = 6000 bits of information to refresh the colour on the whole chain. Refreshing 30 times a secoind means I have to run my clock at 30*6000 = 180 KHz... phht - that is SLOW! No problem with SPI then!

Plenty of bandwidth left to run 1000's more LEDs... so guess what... I bought some - postage is the killer from China! May as well! πŸ™‚

So I get to put up an LED every 3cm around a 7m perimeter screen with only 4 wires for around $150 πŸ™‚ Sweet - laziness that suits me.

Okay - I have made a couple of shortcuts in the description above... but not much.

Now you can just compile up BOBLIGHT on a Raspberry PI - after writing a really simple SPI interface driver which you will return to the GPL library for other peeps to use (tonight's job!).

And we want to do some cool sound-to-light stuff eventually - so we are writing some fast basic light control software that is designed to be called from an easier language like Python to control them in more creative ways: i.e. LED to 3D coordinate, etc. We will get round to that eventually. I have specced it out (my job in Real Life) but will get someone else to code as I can't any more. Hell you can just shove a spec online and get someone else to code it for you for "next to nothing" but I have friends who love this stuff too. When you are a programmer it can be a little dull not seeing the fruits of your labors... but it is amazing how many programmers come out of the woodwork when you say you want to control 1000s of LEDs in cool patterns πŸ™‚

And - that is a long post... sorry - lemme know if it of interest and I can blog our progress here Hopefully provide enough info that you can "build your own" if you want.

frunk
PSOne Level User
Posts: 10
Permalink
Post Re: Raspberry Pi
on: August 7, 2012, 12:16
Quote

Hmm - perhaps a web site for this would be a cool idea... too much for here I feel!

Erm... better talk Playstation to stay on topic... er... ahh fukit... the podcast is 80% tangents... it's why we listen... just call this one...

Hail Baby!

smthng
The Sidekick of Kevin Butler
Posts: 102
Permalink
Post Re: Raspberry Pi
on: August 7, 2012, 15:47
Quote

This is the off-topic forum, carry on as much as you want. But, I'd really be interested in a couple specs and/or model numbers of some of the parts you're using. The coding is a bit over my head right now, but I could probably figure out what I need eventually.

frunk
PSOne Level User
Posts: 10
Permalink
Post Re: Raspberry Pi
on: August 8, 2012, 04:38
Quote

Hehe - just kidding.

The coding is not actually that bad... and once we do it - should be fairly easy to steal and modify to your own needs.

Apart from the Raspberry PI Model B all we are using the only "part" is the LED strip/string.

There seem to be 3 chip sets commonly used for this type of thing – here are some specs:

         Channels                     Clock    Colour Depth        β€œResolution”
TM1809   9 (chip drives 3x RGB LEDs)  800 KHz  24 bit (8bit RGB)   36 LEDs/m (12 ICs)
LDP8806  6 (chip drives 2x RGB LEDs)  20 MHz   21 bit (7 bit RGB)  36 or 48 LEDs/m (18 or 24 ICs)
WS2801   3 (chip for each LED)        25MHz    24 bit (8bit RGB)   36 LEDs/m (36 ICs)

The LDP8806 can offer higher ribbon densities (48/m) as it requires a lower IC: LED ratio. So it is a close contender but I have opted for the WS2801 based LED strip for several reasons:
- 36 LEDs/m will probably be sufficient – one every 3cm rather than 1 every 2 cm. Although more is better it does get pricey and it is probably getting ridiculous (as if it is not ridiculous now!)
- The TM1809 is far too slow for what we want to do – the WS2801 offers extra speed – so it is more flexible in the long term. Also the LDP8806 uses a less dense data format (32 bits/LED compared to 24bits/LED for the other chips)
- I think colour accuracy will be important for the TV setup – more options for colour correction and that extra bit doubles the resolution
- The WS2801 actually has proper data sheets… in English… with detailed protocol information! (http://www.adafruit.com/datasheets/WS2801.pdf)
So on balance the WS2801 wins. It’s also slightly cheaper at $15/m.

If you want to buy strip in any quantity then I recommend Alibaba. If you want a meter or two to play with then hit up Adafruit locally.

I got great service from these guys for strip:
http://www.clenled.com/en/ or http://clenled.en.alibaba.com/
This was the stuff I ordered:
http://clenled.en.alibaba.com/product/611587892-209818705/rgb_led_ws2801_36_led_36IC.html

Also got some "LED string based on the same chip from here:
http://www.aliexpress.com/store/312912
This stuff:
http://www.aliexpress.com/store/product/12mm-WS2801-pixel-module-IP66-DC5V-input-full-color/312912_453561867.html

It would be good to have some opto-isolation to protect the PI from any nasty stuff happening on the cable. I will also have to drop in a 3.3 - 5v converter at some point to convert the PI voltages to the ones expected on the strip... but my prototypes work fine with 3.3v. I imagine problems will occur when we start dealing with longer lengths. May well build these (and a DMX interface) into a small PCB that can just be plugged into the PI expansion header. Total cost - no more than $5 of components unless you want to get DMX connectors.

Then all you have to worry about is a power supply - those strips/chains are very power hungry needing up to 6A @ 5V for EACH meter (power from both ends is the recommendation) to avoid voltage drop.

Although this all may take a brief back seat - as one of my mates came over with another idea which we may well implement first as it is VERY COOL and probably worth something to someone! Fingers crossed.

PacManLive-
s
PS2 Level User
Posts: 39
Permalink
Post Re: Raspberry Pi
on: August 11, 2012, 21:45
Quote

I cant wait to see what ppl end up doing with these things. Being so cheap and having really nice specs for an embedded system.
They could make some really nice shiva plugs or something like...

Pages: [1] 2
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.076 seconds.