Pour éditer le wiki, il faut demander un compte à un Lapin !
Difference between revisions of "LedFloor"
(→Réalisation) |
(→Description) |
||
Line 6: | Line 6: | ||
** Windows that are H189xW95.5 centimeters | ** Windows that are H189xW95.5 centimeters | ||
** 1000 red leds | ** 1000 red leds | ||
− | *** | + | *** <del>FAIL: too narrow and not strong enough, need to buy ~1000-1200 Highly luminescent LED</del> |
+ | *** bought and receipt 1100 8mm, 120 degrees, 1/2W leds | ||
** loads of RJ45 and old IDE/SCSI/floppy buses | ** loads of RJ45 and old IDE/SCSI/floppy buses | ||
Revision as of 15:50, 16 May 2011
Contents
Description
How to turn the 11 windows of the hacklab into a big led display ?
- what have we got to do it ?
- Windows that are H189xW95.5 centimeters
- 1000 red leds
-
FAIL: too narrow and not strong enough, need to buy ~1000-1200 Highly luminescent LED - bought and receipt 1100 8mm, 120 degrees, 1/2W leds
-
- loads of RJ45 and old IDE/SCSI/floppy buses
- what we need ?
- a system to control each diode (or group of diodes) independantly
- that is not too expensive
Question: do we need on/off for each led, or more advanced modes (eg PWM for various intensities).
- on/off:
- is simpler as regard to schematics
- is simpler as regard to driving code (led bits per image, obviously)
- isn't as cool
- can still, to some extend, allow some variable intensities
PWM "natural" ability is prefered, but choice will be made depending on total cost of solution.
Interesting link about a 8x8x8 ledcube: http://vespine.com/p/8x8x8-rgb-led-cube.html ; TLC based, so mostly same stuff as what we're doing here. See http://www.youtube.com/watch?v=U1t9usUr9ns
Pré-étude
Section rassemblant les infos de sourcing de composant & choix d'architecture, etc
LEDs
http://cgi.ebay.com/1000-5mm-White-Diffused-LED-9k-MCD-Bulb-Lowest-Price-/360173855949pt=LH_DefaultDomain_0&hash=item53dc08e4cd#ht_659wt_113950$ fdpin 1000 leds blanches 5mm diffused (120°) 9000mcd Ca commence à le faire :) (sinon check le reste de ses items) http://cgi.ebay.com/1000-5mm-Green-Diffused-LED-5k-MCD-Bulb-Lowest-Price-/360204432057pt=LH_DefaultDomain_0&hash=item53dddb72b9#ht_773wt_1139 par exemple, un poil moins cher (26$, 5000mcd en vert)
Solution #1
use a TLC5940NT that can control about 16 LED each
- datasheet: http://datasheet.octopart.com/TLC5940NT-Texas-Instruments-datasheet-153017.pdf
- schematic: http://webhome.csc.uvic.ca/~mcheng/samples/led_wheel/images/hack_schematic.jpg is it me or this schematic sucks big time ??? There are examples in the datasheet, way more reliable IMO --cq
- O(price) = $180 for the 64*TLC5940NT, so we'll need also several protoboard to be cut to bind them on.
Naturally leads to a PWM version
Solution #2
use the snootlab's i2c led driver solution that can control 16 LED each
- 64*i2c led driver = 9.95*64 = 636.80
- 1*i2c shield = 17.95
- 1 ardunio = 20
- O(price) = 674.75 euros
Solution #3
- use shift registers... ?
Solution #4
use two Peggy 2 board :
- 2* http://evilmadscience.com/tinykitlist/157
- O(price) = 95*2 = $180 --or far less as you won't need the giant PCB. They have a "parts kit" that includes the 328 and the IC's for $15. you'd still need LED's and transistors and other support components. --cw
looking at the peggyLE schematics, they are not using several of the outputs, it looks like a 32x30 grid is possible with the IC's included, and by adding another IC in place of the buttons 32x45 is possible. --cw => they use two 4 to 16 demux for highside driving. They therefore *have* to keep one output not connected, to allow an "off" state for each of these chips. One solution would be to use two such chips, plus two generic I/O, leading to a (quite ugly) 10 to 32 demux functionality. -- cq => that's only for the 74HC154's, the STP16DP05's can use all 16, so expanding that way there can 48x30 which gives 1440 LED's --cw
Solution #5
- Check with Electrolab, where another similar project is ongoing :-)
=> actually, the (current) project there is about a 8x8x8 led cube (and some pov, too). Which are a bit different. But hey, somehow these are still led based project, so why not.
Solution #6
So, the goal is to achieve a 1024 led screen, with, if possible, PWM on each led, for a total price <150€ (connectors, leds not included) ?
My proposal would be to mix #1 (eg use TLC5940 chips, for their ability to PWM their outputs) and #4 (actually, only reuse the 4 to 16 demuxes (74HC154) idea, with two additionnal GPIO from the uC to achieve a 5 to 32 demux). That is :
- two TLC5940
- drive each row in PWM mode
- can be daisy chained, and they take 8 I/O (or possibly less than that)
- cost about 3€ each at www.mouser.fr
- two 74HC154
- drive each column (one after each other)
- cost less than 1€ each
- some power stage:
- worst case is all 32 rows ON with 100mA each. So each column power driver should be able to sustain a 3.2 A continuous current.
- the evilmadscientist schematic proposes 1.5A pnp transistors ;)
- it'd be a better idea to get some (any) tougher pnp transistors (maybe few € total)
- This requires about 18 I/O for control
- it is out of reach of an Arduino (true only when all the features of the TLC5940 are used. There are solutions to use an Arduino anyway. Note that I consider UNO and similar boards, not mega ones - which are too expensive)
- it is quite doable with a Teensy (http://www.pjrc.com/teensy/ about $30, similar in functionalities to an arduino otherwise)
- or we could just use an naked Atmega chip, as I got a USBtinyISP Kit to program it (compatible with avrdude)
- some power input is required
- I suggest a computer PSU (reuse a standard connector to get 5v on the circuit)
- some connectors are required
- I suggest using standard RJ45 connectors (which stand 1.5A if I remember well. Meh...)
- some passives are required. As usual.
Total cost: O{100€ ?). Sounds good to me :)
issues/open questions
- will the TLC be well adapted to drive each column only 1/16th of the time ? That is, still work well when asked to somehow refresh data at (total refresh rate)*(number of columns)
- according to datasheet, the max required clock speed is 4096*(refresh frequency). Even with a *16 factor, it isn't out of reach of a simple uC
- will the leds give enough light when pulsed at max 1/16th of the time at 100mA ?
- my guess would be: yes
- how to make the board ?
- it can be done on a standard protoboard (quite small, I would even say)
- Check if standard PC power connectors fit on these. If not, use a wire + standard connector.
- it can be done on a standard protoboard (quite small, I would even say)
=> it will => do we have some at hand for the first prototype build ? --cq
- Check if there are thru hole RJ45 connectors available. Looks like there are some (quite cheap, O{10€} for a 8 port version) but pins won't fit on a protoboard.
=> otherwise, we can use female connectors from a patch bay (I got a dozen of them). => yup, that was the main idea ; the problem is that the pins of these things doesnt fit well on breadboards, from what I've seen. TBC... --cq
- Solid core cat5 wire will fit in a breadboard, so some keystone jacks and short lengths of cat5 can be connected
- if one want to really use 12 bit resolution for each of the 1024 leds, using a 8bit uC with 8k of RAM is... probably not the best choice
- I guess it'd be okay to downgrade the resolution to few bits per led, eg never drive LSBs for each led and use only 4bits resolution.
=> I cannot see any big flaw in this solution. Does anyone have a better view here ? --cq
- "it is really an issue to be unable to buffer data"
- wouldnt some usb to serial chips have some additionnal RAM ?
- "it wouldnt hurt to have some more processing power onboard"
- "you're such a p... to use monochrom leds"
=> we already have a stock of 1000 red leds.
- for diffusion, copy the tetalab's idea of using ping pong balls
Solution #7
Similar to #6, but instead of TL+demux, use a uC which has 64 I/O that can be dedicated to the led matrix.
- I cannot think of any chip that would be as cheap and as "simple"
- software layers would be easier
- additionnal power/interfaces would be required to drive the rows
One possible solution:
- use this : http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4114 + an ugly extension board (on a protoboard) with 64 pnp. Someone at Electrolab can provide that board
- then, in a second design iteration, design a full custom board with this chip + transistors, connectors, ...
Solution #8
- 42 ?
Solution #9
- Use the stm8s-discovery kit (~9€, farnell)
for 9€ you have two mcu: a stm32bits uC to upload the stm8its. The stm32b can be hacked ?
- I've 2 stm8s-discovery if you like to test. st-IDE run only on windows can be hacked to run on linux, i don't know ?
Réalisation
Ecrans
Il est envisagé de monter les leds sur du grillage à maille rectangulaire/carrée, pour obtenir un résultat:
- propre/régulier
- transparent à la lumière extérieure
Deux options possible:
- acheter du grillage 'tout fait', et le monter sur le bord de fenêtre
- manque des infos sur ce qui existe/est trouvable, et à quel prix
- réaliser un cadre en bois, et tendre du fil pour les lignes et colonnes
- risque de couter cher en fil
- risque d'etre difficile à réaliser
- Choix d'un rouleau de grillage blanc a maillage serre : pas cher et permet de maintenir les diodes
Dimensionnement des écrans
Pour rappel, les fenêtres sont de dimension: H189xW95.5 centimeters. Dans l'hypothèse où on dispose d'un millier de leds, il est envisageable de réaliser 8 écrans de 8 par 16 leds chacun (total: 1024 leds). Cela se combine bien avec la sélection de composants qui a été réalisée: les drivers de LED TLC5940 pilotent 16 leds/colonnes de leds.
- Pour rendre plus simple le montage, on va considérer plutôt H140x95.5.
- En faisant une matrice de 8x16 on obtient un espacement de ~10cm entre chaque diode.
- Si on rajoute une surface de réflexion (demi-verres ? balles de ping pong ?) on pourra parfaitement distinguer les pixels de loin (et pas des petits points de 8mm).
- trouve 1440 balles de ping pong en cours d'achat sur ebay
Electronique
L'option retenue est la suivante: faire une matrice de LEDs, non carrée: 8 drivers TLC5940 pilotant chacun 16 colonnes, et 8 gros mos (avec possiblement un demux) pour les lignes. Ce découpage colle bien avec la disposition prévue sur les fenêtres.
Le besoin de commande est donc le suivant: - une chaine de TLC5940 (8 signaux de contrôle dans le pire cas) - drive de 8 mos de puissance (8 signaux de commande sans multiplexage, 3+1 en utilisant un demux, type 74HCT4051) Une arduino standard propose suffisamment de signaux pour se passer du multiplexage (si on utilise les pins analog en digital).
Dans l'optique de faire un système modulaire pour d'autres installations, il est prévu de découper l'électronique en 3 parties:
- Master shield (MS): Le MS est celui qui se plug sur l'arduino. A terme, il pourrait être redesigné en intégrant directement l'électronique d'une arduino. Il comprend la connectique de puissance principale, ainsi que deux emplacements pour monter une tour de LS d'une part, et une autre de HS d'autre part.
- Low side slave shield (LS): Le LS est l'élément de base d'un empilement qui permet de driver un nombre modulable de colonnes ; il est basé sur un (ou plusieurs) TLC5940, et est prévu pour pouvoir être empilé sur le MS, en un nombre arbitraire d'exemplaires (jusqu'à 40 TLC peuvent être chainés d'apres la datasheet). Il comporte plusieurs connecteurs RJ45 pour assurer la connectique avec les colonnes de l'écran.
- High side slave shield (HS): Le HS est l'élément de base d'un empilement qui permet de driver un nombre modulable de lignes ; il est basé sur un (ou plusieurs) registres à décalages/multiplexeurs, et des gros MOS, et est prévu pour pouvoir etre empilé sur le MS, en un nombre arbitraire d'exemplaires (pas de limite stricte, sauf à checker la doc exacte des composants utilisés). Il comporte un ou plusieurs connecteurs RJ45 poru assurer la connectique avec les lignes de l'ecran.
Software
Il est probable que l'arduino galère à générer les 12 bits disponibles par colonne ; dans un premier temps, une simple commande en tout ou rien pour chaque led est envisagée.