Difference between revisions of "LEDLightDistrict"

From Technologia Incognita
Jump to: navigation, search
(Conways Game of Life)
 
(62 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{Project
 
{{Project
 +
|picture=ledwall_dark.jpg
 
|ProjectSkills=soldering,coding
 
|ProjectSkills=soldering,coding
|ProjectStatus=Active
+
|ProjectStatus=Finished
 
|ProjectNiche=Electronics
 
|ProjectNiche=Electronics
 
|ProjectPurpose=World domination
 
|ProjectPurpose=World domination
 
}}
 
}}
Project to LED'ify the outside facing glass 'block' wall. each glass box will be a pixel
+
The Led wall continues its life as our [[Fireplace]]
  
=Wall=
+
Project to LED'ify <del>the outside facing glass 'block' wall. each glass box will be a pixel</del> the space
  
As seen behind the blinds here. Better pics to come
+
== The device ==
  
[[File:Temp_inc_social_area_other_side.jpg|500px]]
+
the Led-wall is currently housed in a surround that makes it look more like a proper fire-place; made of MDF , created by [[User:milo]] [[user:justa]] [[user:einstein]] for use on the UrbanResort open day of 20130921.
  
=Initial Plan=
+
It's been fited with a set of switches on the left hand side that operate the functions of the led-wall and/or a power-bar mounted inside the left-most column of the fireplace.
  
Create a 7 segment clock. [[User:amx109]] is the owner and implementer of this project.
+
The power-bar is supplied so that you can turn on any lamps or other 'peripherals' belonging to the fireplace with one simple action.
  
The clock will utilise 2 x TLC5940 to address 28 '7 segment' elements, spanning a grid of 21x7 blocks. The aim is to complete the clock by 16/05
+
When turning on the fireplace, please allow one minute for the RaspPI to boot. It loads the firmware from an SD card and is not 'insta-on'
  
=Full LED addressable wall=
+
it will automatically start doing the fire. to run the all the animations
 +
 +
sudo bash ; cd /home/erik/lewd/src ; python ledshow.py -spi
  
[[LEDLightDistrict/DesignA|Design A]]
 
  
=Other Suggested Approaches=
+
=== Doesn't work! ===
  
==1==
+
* log in to [[ledwall]] using the user techinc (pw is same as the wifi)
Cheap LEDs, TLC5940's
+
* <code>git checkout https://github.com/techinc/lewd.git</code>
 +
* <code>for the C fireplace: cd c ; ./fire /dev/spidev0.0 (should be started automatically by /etc/rc.local)</code>
 +
* <code>for the python implementation: cd src ; python ledshow.py -spi</code>
  
==2==
+
== Hardware ==
LED strip - addressable LED strip<br>
 
http://www.ledsee.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=720&category_id=209&option=com_virtuemart&Itemid=1&vmcchk=1&Itemid=1
 
  
or maybe
+
=== Design ===
  
http://www.adafruit.com/index.php?main_page=product_info&cPath=37&products_id=285http://www.adafruit.com/index.php?main_page=product_info&cPath=37&products_id=306
+
==== Overview ====
  
or
+
  <strong>Raspberry Pi</strong> ===(SPI)===> <strong>ledwall</strong>
 +
        ^                      ^
 +
        | (5V)                  | (12V)
 +
        \----------<strong>PSU</strong> ---------/
  
http://www.adafruit.com/products/346
+
==== Raspi GPIO pin-out ====
  
or
+
The code uses the hardware SPI present on the the Raspberry Pi.
  
http://www.alibaba.com/product-gs/547114165/Newest_32pcs_5050_RGB_Versatile_LED.html
+
* <span style="color: green; font-weight: Bold;">Green wire</span> on <strong>Pin 23</strong> is <strong>Clock (SCLK)</strong>
 +
* <span style="color: #dddd11; font-weight: Bold;">Yellow wire</span> on <strong>Pin 19</strong> is <strong>Data (MOSI)</strong>
 +
* <span style="color: black; font-weight: Bold;">Black wire</span> <strong><del>should be connected to a ground pin.</del> does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise.</strong>
 +
* <span style="color: red; font-weight: Bold;">Red wire</span> <strong>should NOT be connected to the Raspi as it will break it!</strong>
  
or
+
[[Image:raspi_spi.jpg|480px]]
  
The one Antony brought in as Sample was bought: USD 1.21 @ volulmes 20 squares.
+
[[Image:raspi_casing.jpg|480px]]
http://www.aliexpress.com/fm-store/701799/209889132-519156534/20pcs-string-waterproof-led-pixel-module-4pcs-SMD-RGB-5050-1pcs-WS2801-256-gray-level-DC12V.html
 
  
Or
+
==== PSU ====
  
... big square pre-wired pixels: http://bliptronics.com/item.aspx?ItemID=88
+
[[Image:Ledwall_ATX.jpg|480px]]
  
We discussed mounting these in the corner of each brick at an angle so the light diffuses better. Need to experiment to see what works best.
+
There I fixed it X-/
  
The above LED strips/chains are easily controlled via an Arduino with the excellent FastSPI library: http://code.google.com/p/fastspi/
+
[[Image:Ledwall_molex_thereifixedit.jpg|480px]]
  
==3==
+
== Software ==
  
Some suggestions by Axel:
+
== Software Implementations ==
http://www.nerdkits.com/videos/ledarray2/
 
  
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232748045
+
[https://github.com/techinc/lewd The current python based implementation called
 +
lewd] runs
 +
on the machine connected to the LED-Wall over a serial port.
  
==4==
+
The older [https://github.com/techinc/LedWallServer javascript node.js version]
 +
can communicate with the python implementation to push frames to the LED-Wall
 +
using TCP sockets.
  
Shift register with pwm output
+
Python documentation (temporary location) http://old.villavu.com/merlijn/lewd
  
 +
=== Lewd ===
  
product number:
+
The Python (lewd) implementation features several backends. '''-serial''',
74595
+
'''-spi''', '''-net''' and '''-local''' (which renders on an SDL screen).
  
HC595
+
See the file "ledwall.py" for an example on how to use all these different
 +
LedWall frontends. At the space, you should typically use RemoteLedScreen to
 +
interface with the (already running) server to the LEDWall.
  
==5==
+
To just play around with the code locally, look into the VirtualLedScreen code;
 +
you will need to install pygame to actually use the local UI.
  
Simulate a pwm based shift register
+
==== Python documentation (temporary location) ====
  
http://www.elcojacobs.com/shiftpwm/
+
http://old.villavu.com/merlijn/lewd
  
 +
== Photos & Videos ==
 +
<gallery heights=150px>
 +
File:Ledwall1.0-leds-spooned.jpg
 +
File:Ledwall2.0-mount.jpg
 +
File:ledwall.jpg
 +
File:ledwall_dark.jpg
 +
File:ledwall_arduino_pinout.jpg
 +
File:Techinc_Hearth.jpg
 +
</gallery>
  
==6==
+
== OLD ==
  
http://francisshanahan.com/index.php/2009/how-to-build-a-8x8x3-led-matrix-with-pwm-using-an-arduino/
+
=== Alternative configuration using Arduino (Obsolete) ===
  
 +
  <strong>computer</strong> ===(serial over usb)===> <strong>arduino</strong> ===(SPI)===> <strong>ledwall</strong>
 +
                                                            ^
 +
                                                            | (12V)
 +
                                                          <strong>PSU</strong>
  
== 7 ==
+
==== Arduino code ====
  
http://www.austriamicrosystems.com/led-driver/AS1130
+
<code lang="C">
 +
#include <SPI.h>
 +
 +
void setup()
 +
{
 +
    Serial.begin(1000000);
 +
    SPI.begin();
 +
    SPI.setBitOrder(MSBFIRST);
 +
    SPI.setDataMode(SPI_MODE0);
 +
    SPI.setClockDivider(SPI_CLOCK_DIV16);
 +
}
 +
 +
void loop()
 +
{
 +
    uint8_t c;
 +
 +
    for(;;)
 +
    {
 +
        while (!Serial.available()) {}
 +
 +
          /* 254 signals end of frame in the communication
 +
          * over the serial port
 +
          */
 +
          if ( (c = Serial.read()) == 254 )
 +
            delay(1); /* the WS2801 chips will latch after not getting
 +
                        * any data for .5ms, so we wait 1ms
 +
                        */
 +
        else
 +
            SPI.transfer(c); /* not end of frame? push data */
 +
    }
 +
}
 +
</code>
  
A 132 channel led driver with pwm...
+
==== Arduino pin-out ====
  
We could order samples. 3 samples per person, so if 3 people order a sample, we have sufficient channels...
+
The code uses the hardware SPI present on the the ATMega
  
 +
* <span style="color: green; font-weight: Bold;">Green wire</span> on <strong>Pin 13</strong> is <strong>Clock</strong>
 +
* <span style="color: #dddd11; font-weight: Bold;">Yellow wire</span> on <strong>Pin 11</strong> is <strong>Data</strong>
 +
* <span style="color: black; font-weight: Bold;">Black wire</span> <strong><del>should be connected to the arduino's ground pin.</del> does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise.</strong>
 +
* <span style="color: red; font-weight: Bold;">Red wire</span> <strong>should NOT be connected to the arduino as it will break it!</strong>
  
And at 8$ they aren't that expensive either...
+
[[Image:ledwall_arduino_pinout.jpg|480px]]
  
Though I might not understand what they do and they might be dissapointing...
+
{{OnFire
 
+
|IsOnFire=Definitely
 
+
}}
== 8 ==
 
 
 
These are bloody cheap though they are supposedly hard to program.
 
 
 
20$ per roll, and you have to buy 5 rolls minimum... but... 5m per roll, and... 40 color leds per m (from what I can tell). That means that we buy several screens, but in total it will still be cheaper. Strips can be cut per segment of two (studying the picture, correct me if I am wrong). This makes extending them relatively easy. We cut all wires to the appropriate length in one go. We have to connect some 150 of these strips, but it is repetitive work, so we can do it very fast.
 
 
 
http://www.alibaba.com/product-gs/529960769/_SMD5050_hl1606_rgb_led_strip.html
 
 
 
 
 
== Similar work ==
 
 
 
http://hackaday.com/2012/01/01/hackerspace-light-wall-plays-video-at-30-fps/
 
 
 
==Some relevant info==
 
http://waitingforbigo.com/
 
 
 
=Code=
 
 
 
==Driver/development framework==
 
Server running on [http://nodejs.org node.js], control for any games using a browser window, interface with the wall using a [https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions C/C++ written node module].
 
 
 
===Create online api for running code on the screen===
 
 
 
It would be cool if people could browse to a site and enter code that they can run on the screen.
 
 
 
Great fun for teaching people about coding...
 
 
 
This does mean that you create a gateway for someone to run code on the server, and this code could be hostile.
 
 
 
How to keep it secure:
 
 
 
http://nodejs.org/api/vm.html#vm_vm_runinthiscontext_code_filename
 
http://nodejs.org/docs/v0.3.1/api/child_processes.html#child_process.spawn
 
 
 
==Software==
 
 
 
===Snake===
 
 
 
A game of snake. This project is almost done. It just requires some more practical website for controlling the snakes (right now they can be controlled using keyboard, which sucks for smart phones). See [https://github.com/guidocalvano/snakegame Snake implementation]
 
 
 
===Super bomber man===
 
 
 
No work done yet
 
 
 
====Blocking issues====
 
It is practical to only work on it after better abstracting the framework to be used.
 
 
 
===Conways Game of Life===
 
 
 
A cool screen saver.
 
 
 
 
 
==Non member participants==
 
Herman Kopinga
 

Latest revision as of 15:39, 23 December 2023

Projects
Ledwall dark.jpg
Participants Guido, Wizzup
Skills soldering, coding
Status Finished
Niche Electronics
Purpose World domination

The Led wall continues its life as our Fireplace

Project to LED'ify the outside facing glass 'block' wall. each glass box will be a pixel the space

The device

the Led-wall is currently housed in a surround that makes it look more like a proper fire-place; made of MDF , created by User:milo user:justa user:einstein for use on the UrbanResort open day of 20130921.

It's been fited with a set of switches on the left hand side that operate the functions of the led-wall and/or a power-bar mounted inside the left-most column of the fireplace.

The power-bar is supplied so that you can turn on any lamps or other 'peripherals' belonging to the fireplace with one simple action.

When turning on the fireplace, please allow one minute for the RaspPI to boot. It loads the firmware from an SD card and is not 'insta-on'

it will automatically start doing the fire. to run the all the animations

sudo bash ; cd /home/erik/lewd/src ; python ledshow.py -spi


Doesn't work!

  • log in to ledwall using the user techinc (pw is same as the wifi)
  • git checkout https://github.com/techinc/lewd.git
  • for the C fireplace: cd c ; ./fire /dev/spidev0.0 (should be started automatically by /etc/rc.local)
  • for the python implementation: cd src ; python ledshow.py -spi

Hardware

Design

Overview

 Raspberry Pi ===(SPI)===> ledwall
       ^                       ^
       | (5V)                  | (12V)
       \----------PSU ---------/

Raspi GPIO pin-out

The code uses the hardware SPI present on the the Raspberry Pi.

  • Green wire on Pin 23 is Clock (SCLK)
  • Yellow wire on Pin 19 is Data (MOSI)
  • Black wire should be connected to a ground pin. does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise.
  • Red wire should NOT be connected to the Raspi as it will break it!

Raspi spi.jpg

Raspi casing.jpg

PSU

Ledwall ATX.jpg

There I fixed it X-/

Ledwall molex thereifixedit.jpg

Software

Software Implementations

[https://github.com/techinc/lewd The current python based implementation called lewd] runs on the machine connected to the LED-Wall over a serial port.

The older javascript node.js version can communicate with the python implementation to push frames to the LED-Wall using TCP sockets.

Python documentation (temporary location) http://old.villavu.com/merlijn/lewd

Lewd

The Python (lewd) implementation features several backends. -serial, -spi, -net and -local (which renders on an SDL screen).

See the file "ledwall.py" for an example on how to use all these different LedWall frontends. At the space, you should typically use RemoteLedScreen to interface with the (already running) server to the LEDWall.

To just play around with the code locally, look into the VirtualLedScreen code; you will need to install pygame to actually use the local UI.

Python documentation (temporary location)

http://old.villavu.com/merlijn/lewd

Photos & Videos

OLD

Alternative configuration using Arduino (Obsolete)

 computer ===(serial over usb)===> arduino ===(SPI)===> ledwall
                                                           ^
                                                           | (12V)
                                                          PSU

Arduino code

#include <SPI.h>

void setup()
{
    Serial.begin(1000000);
    SPI.begin();
    SPI.setBitOrder(MSBFIRST);
    SPI.setDataMode(SPI_MODE0);
    SPI.setClockDivider(SPI_CLOCK_DIV16);
}

void loop()
{
    uint8_t c;

    for(;;)
    {
        while (!Serial.available()) {}

         /* 254 signals end of frame in the communication
          * over the serial port
          */
         if ( (c = Serial.read()) == 254 )
            delay(1); /* the WS2801 chips will latch after not getting
                       * any data for .5ms, so we wait 1ms
                       */
        else
            SPI.transfer(c); /* not end of frame? push data */
    }
}

Arduino pin-out

The code uses the hardware SPI present on the the ATMega

  • Green wire on Pin 13 is Clock
  • Yellow wire on Pin 11 is Data
  • Black wire should be connected to the arduino's ground pin. does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise.
  • Red wire should NOT be connected to the arduino as it will break it!

Ledwall arduino pinout.jpg

Is on Fire? Definitely