View Single Post
  #18   Report Post  
Posted to uk.d-i-y
Andy Burns[_13_] Andy Burns[_13_] is offline
external usenet poster
 
Posts: 7,829
Default Laser Christmas outdoor projectors..

Tim Watts wrote:

This is the supplier the bloke in the video used:
https://www.aliexpress.com/store/gro...506643321.html


Yes, pretty cheap, can't remember what I paid last year (Chinese new
year discounts).

I think those chips drive the same way as the Pi's Unicorn Hat


You drive them with varying width pulses (long high followed by short
low is a "1", short high followed by long low is a "0") each pixel
re-clocks the output to the next in the chain.

Timing is quite tight to within about 150ns, the adafruit library does
it by setting a 6MHz clock, and using a whole byte of 0b11111000 for the
"1" or 0b11100000 for the "0" pulse, so each RGB triplet takes 24 bytes
to send the 24 pulses per pixel, the USB block transfer size means this
is limited to about 340 pixels.

I realised I could set the clock to 2.4MHz on my USB dongle and just
send three bits per pulse either 0b110 for "1" or ob100 for "0" so just
8 bytes per RGB triplet, theoretically I could run 2400 pixels and the
timing works out closer to the ideal pulse width.

A Pi can drive one such data line directly using one of the DMA
controlled pulse shaping IO pins - but you usually need a level shifter
to gi from 5V to 12V for the lamps.


My strips are 5V powered, but I still need a 3.3-5.0 level shifter for
the clock signal.

In a way, it might make the setup easier to use 1 Pi per string - write
a super simple daemon that sits on Wifi and accepts various pattern
requests and plays them out to the string.


For now I just run the python script on a netbook, hooked by USB to the
sync converter, in fact I was powering the small strip of 8 pixels from
the USB too. I found all the various components and hooked them back
together, found I could power 24 pixels of my longer strip, any more
than that sagged the voltage so much it started "crashing" the pixels
i.e. they weren't clocking and re-sending the data reliably.

So I need to dig out a 5V 3A PSU to power the LEDs not from the USB,
then I can work on some more impressive patterns for the full strip.

Fun stuff.