Re: RaspiLight (ambient light)


136 posts   Page 3 of 6   1, 2, 3, 4, 5, 6
by QBall1977 » Fri Nov 02, 2012 3:51 pm
Just wondered has anyone thought about or had a look at these Ikea lights? Ideal (I would have thought for an ambilight project) and with a control unit (easily / hacked / replaced by RPi?).

http://hackaday.com/2011/08/19/adding-usb-control-for-ikea-rgb-led-strips/

Could you use Raspbian or even XBMC to control this via USB? That would be awesome, and cheap too. I think the lights are around £30 (that's with the PSU and controller!)

Just a thought. Please keep up the good work and keep us inspired! :D :D :D
____________________________________________
Looking for where to start - try Kernel Panic - http://goo.gl/EEQ5J
Posts: 34
Joined: Thu Aug 09, 2012 10:06 am
Location: Hull, East Yorkshire
by metRo_ » Sun Nov 04, 2012 3:51 pm
It only works if I'm running XBMC in a windows machine, isn't it?

Just trying to understand what you've done:
1-You've modified the XBMC so that can send some info about the colors on the screen.
2-RPi receive that information.
3-Turn on the leds according.
is that?

How difficult is do this in the raspbmc or is impossible play a video and at the same time take the color information about the frames?

Thaks for your project:)
Posts: 7
Joined: Mon Jan 23, 2012 10:46 am
by thedruid » Mon Nov 05, 2012 10:53 am
From what i understand you are netiher running boblight client or boblight daemon, or?
Is it possible to make your ambiPi XBMC build for iOS? (Apple tv 2)
Posts: 1
Joined: Mon Nov 05, 2012 10:47 am
by VZoltan » Mon Nov 05, 2012 12:54 pm
dominicclifton wrote:Sure.

Hook up the raspberry pi as per this diagram:

http://learn.adafruit.com/light-paintin ... i/hardware
...




hi, i just got my leds,
Q:

what if i have an active usb hub and the hub powers the pi via usb port. (5V2A)
do i still have to power the pi and the leds via GPIO
or is it ok powering the pi and the leds via the HUB ?
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by dominicclifton » Mon Nov 05, 2012 5:47 pm
would not recommend using hub to power the LEDs, hook it up as per wiriing diagram i linked to. Don't use the microusb connector.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by dominicclifton » Mon Nov 05, 2012 5:55 pm
LEDs are on special offer from the people i bought mine from (alas, not adafruit due to uk import duty).

Price lists here:

http://www.wst168.com/E_Download.asp

Contact details here:

Shenzhen Diya lighting Co.ltd (Shenzhen)
Diya Industry Co., Ltd (Hongkong)
Factory:#21,ShanCheng Industry Zone,Songbai Rd.,Shiyan Town,Bao'an District,Shenzhen,China
Msn: fre_led01@hotmail.com ( online )
Skype: diyasunky
Phone: +86 0755 29005531 Mobile: +86 1501400 9416
Fax: +86 0755 29005531
www.wst168.com
www.sz-diya.cn

They accept paypal too.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by VZoltan » Mon Nov 05, 2012 8:37 pm
dominicclifton wrote:would not recommend using hub to power the LEDs, hook it up as per wiriing diagram i linked to. Don't use the microusb connector.



ok but help me pls:

which wire is what ? :(

Image
http://learn.adafruit.com/system/assets/assets/000/001/589/medium800/diagram.png?1344878827

i have this:

Image
http://vzoltan.com/led.JPG

it has two cables hanging at the ends,

red and blue

and 4 between leds, blue green yellow red.
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Mon Nov 05, 2012 10:25 pm
ok i found this to my leds:

Red=5V DC
Green=Clock
Yellow=Data
Blue=Ground
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by dominicclifton » Tue Nov 06, 2012 1:11 am
Yeah, that looks right. If you get the clock and data the wrong way round you won't do any harm, but don't get the +5V line wrong.

What i did is to connect my LED's +5v and Ground at BOTH ENDS to my PSU and then connect the PSU to the Pi. And then finally connect the clock and data to the Pi.

The reason for connecting the LEDs and both ends is to ensure a more even power distribution to all the LEDs. If you only connec them at one end you may find that the ones nearest the PSU are brighter.

For testing purposes you can just connect one end to the PSU but for a final installation I recommend both ends.

Keep us all posted on your progress.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by dominicclifton » Tue Nov 06, 2012 1:12 am
Also, if you look at the LEDs' circuit boards under a magnifying glass (or digital camera zoom) you can probably work out which color is which from the markings on the LEDs' PCBs.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by VZoltan » Tue Nov 06, 2012 11:34 am
dominicclifton wrote:Also, if you look at the LEDs' circuit boards under a magnifying glass (or digital camera zoom) you can probably work out which color is which from the markings on the LEDs' PCBs.



what am i doing wrong?

i have two row of led (25-25)

one end of each is connected to psu +5 and GND and the other end is connected to each other
but only 1-1 led is lit.
1 is colse to the psu and 1 is at the end of the other row.

Image
http://vzoltan.com/rpi/psuled.jpg
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by dominicclifton » Tue Nov 06, 2012 11:42 am
first off, try with just one set of LEDs.

second, how are you testing the LEDs? using pixelpi? if so what command are you using?
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by VZoltan » Tue Nov 06, 2012 11:47 am
dominicclifton wrote:first off, try with just one set of LEDs.

second, how are you testing the LEDs? using pixelpi? if so what command are you using?



righ now leds are only connected to psu nothing else.

ok, one set connected with both end to psu, or only one end?

Does it matter which end is connected to the psu first and than to each other?
is it some kind of sequence ?
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by dominicclifton » Tue Nov 06, 2012 12:07 pm
when leds are only connected to a PSU with no clock and data signals they will behave randomly. connect up to the pi, run pixel pi's 'chase' mode to test them.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by VZoltan » Tue Nov 06, 2012 12:09 pm
dominicclifton wrote:when leds are only connected to a PSU with no clock and data signals they will behave randomly. connect up to the pi, run pixel pi's 'chase' mode to test them.



OK! thanks for the patience :)
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Tue Nov 06, 2012 12:26 pm
if i wont succeed, will u upload one of your working setup as a rpi-image, pls?


something is wrong:(

pi and leds are connected to psu like it is on that picture.

i get this:


Code: Select all
pi@raspbmc:~/PixelPi$ sudo git clone git://github.com/hydra/PixelPi.git
Cloning into 'PixelPi'...
remote: Counting objects: 94, done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 94 (delta 54), reused 78 (delta 39)
Receiving objects: 100% (94/94), 25.33 KiB, done.
Resolving deltas: 100% (54/54), done.
pi@raspbmc:~/PixelPi$ cd PixelPi
pi@raspbmc:~/PixelPi/PixelPi$ sudo git checkout ambipi
Branch ambipi set up to track remote branch ambipi from origin.
Switched to a new branch 'ambipi'
pi@raspbmc:~/PixelPi/PixelPi$ sudo python pixelpi.py ambipi --chip WS2801 --udp-ip 192.168.2.107 --udp-port 20434 --num_leds 50
Traceback (most recent call last):
  File "pixelpi.py", line 1, in <module>
    import cwiid
ImportError: No module named cwiid
pi@raspbmc:~/PixelPi/PixelPi$


and no light at all, none :(
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Tue Nov 06, 2012 1:07 pm
now i have pi running and first 3 leds on (full rgb -white-)
still no luck on the software side :(
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Tue Nov 06, 2012 1:48 pm
i did install python and GPIO stuff as described here:
http://thegreatgeekery.blogspot.ca/2012 ... s2801.html

but i got
Code: Select all
pi@raspbmc:~/PixelPi$ sudo python pixelpi.py  --chip WS2801 --mode chase--refresh_rate 1
Traceback (most recent call last):
  File "pixelpi.py", line 1, in <module>
    import cwiid
ImportError: No module named cwiid
pi@raspbmc:~/PixelPi$


still :(



ok, now ive commented the first line in pixelpi.py
#cwiid

and rund a all_on test
every led get full white, and RPi just froze :)

well it is some kind of progress:)

Image
http://vzoltan.com/rpi/allon.jpg
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Tue Nov 06, 2012 2:36 pm
first big step for me :)

"cahse" test at 30
http://www.youtube.com/watch?v=LDOGyqx8U4Q

testing with this
Code: Select all
sudo python pixelpi.py chase --chip WS2801 --num_leds 50 --refresh_rate 30


"fade" test at 30
http://www.youtube.com/watch?v=i0I3MREBYcY

testing with this
Code: Select all
sudo python pixelpi.py fade --chip WS2801 --num_leds 50 --refresh_rate 30


When it reaches full rgb WHITE, it just froze :(
why?
Last edited by VZoltan on Tue Nov 06, 2012 2:43 pm, edited 2 times in total.
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by dominicclifton » Tue Nov 06, 2012 2:42 pm
Well done! Good to see your LEDs working. Now you just have to run pixelpi in ambipi mode and my xbmc build and set your networking settings up.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by VZoltan » Tue Nov 06, 2012 2:44 pm
dominicclifton wrote:Well done! Good to see your LEDs working. Now you just have to run pixelpi in ambipi mode and my xbmc build and set your networking settings up.



even with this
#cwiid
line at the first line?

and what about this white error (freez)
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Tue Nov 06, 2012 3:09 pm
your xbmc is set up and up and running,
rpi gives me this:

Code: Select all
pi@raspbmc:~/1/PixelPi$ sudo python pixelpi.py ambipi --chip WS2801 --udp-ip 192.168.2.100 --udp-port 20434 --num_leds 50
Start Ambi listener 192.168.2.100:20434
Traceback (most recent call last):
  File "pixelpi.py", line 555, in <module>
    args.func()
  File "pixelpi.py", line 219, in ambipi
    serversocket.bind( (args.UDP_IP, args.UDP_PORT) )
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address
pi@raspbmc:~/1/PixelPi$
]

chase test still works.
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by dominicclifton » Tue Nov 06, 2012 3:14 pm
Check your ip address with 'ifconfig' it should be the ip address of the Pi itself.
Posts: 27
Joined: Thu Aug 23, 2012 10:40 pm
by VZoltan » Tue Nov 06, 2012 3:20 pm
Data error (led count mismatch, expected: 50, received: 104)
Resetting...
Turning all LEDs Off


------------------

with 104 set on, it is working, but i have only 50
how can i set up to 50 ?

-------------------


just a quick demo:

http://www.youtube.com/watch?v=8oVkOye9f8M

now i have to put the leds on the frame, and enjoy :) (i will upload a video when its ready)

BTW, there is no SOUND with your xbmc bulit!!! can you help me with that?
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm
by VZoltan » Tue Nov 06, 2012 9:38 pm
Sound is OK :)

but still cant configure to 50 leds :(


and im not sure how to organize the leds around the frame, where to start with what led
id like to put

Top=16
Bottom=16
Left=9
Right=9

total=50 :)
Posts: 179
Joined: Sat Jun 02, 2012 10:00 pm