NEWBIE HERE, please help

  • Think the moral of this story is start with a directly connected to the strip pi zero w and forget the Arduino :)


    I'm sorry but I disagree here, that is if I understand it all correct.
    I didn't want a hardware grabber and I would like to connect wireless from the pi. Could have been another ESP8266 device but I didn't know at the time I bought the arduino. And with the arduino USB connected I knew the leds were working, so it had it's purpose also investigating what went wrong.


    Thanks for the reply though ;)

  • I believe I was incorrect. I think I needed the arduino because of the type of led I chose, the ws2813.


    You don't need an Arduino between the pi and strip for 2812b and it's kin anymore. If you got a pi zero w you could connect it directly to the strip running Hyperion and then you'd have a wireless connection between Kodi on your PC and the pi. This is how mine is set up though I used an apa102 strip instead


    Unless I misunderstood, most of your problems seem to have revolved around getting the pi talking to the Arduino, hence my reply :)

  • You don't need an Arduino between the pi and strip for 2812b and it's kin anymore. If you got a pi zero w you could connect it directly to the strip running Hyperion and then you'd have a wireless connection between Kodi on your PC and the pi. This is how mine is set up though I used an apa102 strip instead


    This is great! I didn't know that. I'm returning the arduino and buying the pi zero wifi instead. Can you give me a link or direct info on how to connect (physical) etc?


    Thanks again!!


    Wim

  • This is great! I didn't know that. I'm returning the arduino and buying the pi zero wifi instead. Can you give me a link or direct info on how to connect (physical) etc?


    Thanks again!!


    Wim


    No probs, couple of ways of doing it, this one...


    https://hyperion-project.org/wiki/3-Wire-PWM


    ... And there's a different way using SPI that the ever helpful penfold42 created but I don't think that's been officially documented, definitely been discussed on the forum though.

  • Okay,


    I'm back and trying to connect the zero wifi to the ws2813 without Arduino. Not much luck so far. So trying with my RPI2 now.
    There seem to be 3 ways to connect Pi1, 2 ways to connect whatever Pi: With ws281x or ws281x-spi driver.


    1. With ws281x-driver din on pin 6, gnd on pin 12.
    2. With ws281x-spi driver din on pin 19 and gnd on pin 21 for /dev/spidev0.0 (and to pins 24 and 26 for /dev/spidev0.1).


    1. Nothing.
    2. Something. That's about it.
    When I put the led off (via the android app), some lights go off (some stay on) and when I put the led on, some lights go on. So I got a response. Colours incorrect. Leds randomly flashing (the leds that are on always, stay exactly the same always).


    Can anyone help me further?

  • Here: https://hyperion-project.org/wiki/3-Wire-PWM I read:
    "If you want to use a ws2812 without tying up a USB port you may want to consider a SPI to ws2812 converter.bThere are a couple of these written by penfold42 published here:
    https://github.com/penfold42/stuff?files=1"


    But I don't know what to do with this.


    This seems to give some info, but I don't know what to do with it:
    https://github.com/hyperion-project/hyperion/issues/6


    I read this:
    https://github.com/626Pilot/RaspberryPi-NeoPixel-WS2812


    But no indication about what resistor, capacitor, pins etc.


    Read this:
    https://hyperion-project.org/t…onnection-device-type.82/


    This:
    https://devhub.io/repos/penfold42-stuff


    ???


  • I have never used a ws2813 strip of led's. However from what I have read the ws2813's use exatly the same as ws2812's. So use adalight if connecting the leds to an Arduino. Or ws281x-SPI if connecting the led's to the gpio pins of the RPi directly with out an Arduino.


    Think the moral of this story is start with a directly connected to the strip pi zero w and forget the Arduino :)


    Guys, I could really use your help here to get this going.


    Do I need a capacitor and/or a resistor? What values? Or a level-shifter or whatever? What pins to use?
    As said, I'm now trying with the Pi2 instead of the zero wifi, just to be sure. I got it working before with the pi2 connected via usb to the arduino.


    Wim

  • Hi,



    2. With ws281x-spi driver din on pin 19 and gnd on pin 21 for /dev/spidev0.0 (and to pins 24 and 26 for /dev/spidev0.1).


    2. Something. That's about it.
    When I put the led off (via the android app), some lights go off (some stay on) and when I put the led on, some lights go on. So I got a response. Colours incorrect. Leds randomly flashing (the leds that are on always, stay exactly the same always).


    Can anyone help me further?


    The LED strip is expecting a data signal of 5V (-/+ about 5%). The data signal coming from the GPIO's of the Rpi's (all RPi's) it a 3.3v signal. Some LED strips have a wider tolerance and well be able to accept the lower data signal from the Rpi's GPIO's with out glitching, some not.


    It seems as the LED strip you have has a very tight tolerance and is reading the 3.3v signal from the RPI's GPIO's as best it can. but is receiving a incomplete and or corrupt data stream from the signal being only 3.3v.



    Guys, I could really use your help here to get this going.


    Do I need a capacitor and/or a resistor? What values? Or a level-shifter


    Wim


    A capacitor is more for guaranteeing the longevity of the LED strip. it provides a buffer to the onrush of voltage to the LED strip when the power is switched on. (I live dangerous. I omitted it from my setup. To no ill effect, So far )


    From what I understand. A resistor is used to "clean up" the data signal. From what I gather it smooth the spikes from the data signal. I've only used a resistor when driving the LED's from a arduino. Usually around 300 ohm's (-/+ 100 ohm's) precision is not needed here.


    Now a Level shifter (or Bus buffer as I see the data sheets call it) takes a lower voltage data signal and boost's it to a 5v signal. So the LED's have a strong signal and less likely to glitch from data signal interference. I use SN74AHCT125N shifter / buffer's. Some diagrams in a previous post here ( https://hyperion-project.org/t…y-question.935/#post-6977 )


    Hope its of help.

  • Thanks for the input Akriss,


    2 ways to connect whatever Pi: With ws281x or ws281x-spi driver.
    1. With ws281x-driver din on pin 6, gnd on pin 12.
    2. With ws281x-spi driver din on pin 19 and gnd on pin 21 for /dev/spidev0.0 (and to pins 24 and 26 for /dev/spidev0.1).


    First I'm trying to understand about the options:
    Is the above correct?
    Why no luck with option 1?
    Or is option 1 not the way to go? Only 2?
    Do I need the same (level shifter or whatever) for both options?
    Are there PROs and CONs for option 1 and 2?


    I read that there's no need for a resistor and capacitor for the 2813 leds.



    Then about option 2 and level-shifter.
    On the link, in your post


    Now a Level shifter (or Bus buffer as I see the data sheets call it) takes a diagrams in a previous post here ( https://hyperion-project.org/t…y-question.935/#post-6977 )


    First of all, in your diagram you use different pins than I do.
    My 2813 is like 2812b but with double data-lines, which I tie together, so 3-lines. Are the above pins correct in my case?


    I also read
    https://hyperion-project.org/t…ter-based-on-74hct08.512/
    There is mentioning of PWM and level-shifter and of spi-based drivers, which give me the impression there's no need for the level-shifter using spi instead of PWM. And got the impression that option 1 is PWM and option 2 is spi. But I might get that completely wrong.


    There's also mentioning about the number of 74HCT to use. So maybe I should use a simpler version than the SN74AHCT125N?
    Since I have a separate power supply for the pi, do I need to connect the din only? Which pins on the level shifter would that be?
    Or do I need to connect GND also? I guess not the 5V?


    I can go to a electronics shop in town here, but there seem to be different kinds. Some only for analog or digital, some not for I2C or 1-wire based machines (whatever it may be). How can I make the seller understand what I need?


    Thanks,


    Wim

  • Hi,


    A lot of what you asked can be better explained by the tutorial here ( https://learn.adafruit.com/neopixels-on-raspberry-pi ).
    I not a coder, however I think Penfold42 spi code and the code mentioned in the tutorial are similar and use the same pins.


    My 2813 is like 2812b but with double data-lines, which I tie together, so 3-lines. Are the above pins correct in my case?


    I may be wrong (never used 2813's) I believe you leave the fall over wire unconnected.


    And some more advanced info link, if the first link was trivial :) ( https://wp.josh.com/2014/05/13…nce-you-get-to-know-them/ )


    hope is of help.

  • Hi,


    A lot of what you asked can be better explained by the tutorial here ( https://learn.adafruit.com/neopixels-on-raspberry-pi ).
    I not a coder, however I think Penfold42 spi code and the code mentioned in the tutorial are similar and use the same pins.


    There's a lot of information scattered over the forum and the internet, this is an interesting link too. As soon as I understand it, I will post about it for others to make it easier for them.


    Hi,
    I may be wrong (never used 2813's) I believe you leave the fall over wire unconnected.


    The 2813 has a data-line (DIN) and a backup data-line (BIN). Normally when a led is broken all of the leds stop working, but because of the backup line the next leds keep on working. Only when 2 leds in a row are broken, the others stop working too. So I have to wire these 2 data-lines together.


    Thanks for the help again.

  • Okay, I'm a bit further now.
    This site helped me too:
    https://hyperion-project.org/wiki/Supported-hardware
    especially the little "connection scheme" in the middle of the page, when you click on it you get more info.


    I seemed to have used the wrong pins, my suggestion here about option 2 is wrong (don't know about option 1)


    1. With ws281x-driver din on pin 6, gnd on pin 12.
    2. With ws281x-spi driver din on pin 19 and gnd on pin 21 for /dev/spidev0.0 (and to pins 24 and 26 for /dev/spidev0.1).


    It should be (I think) when using spidev0.0: din on GPIO10 which is pin19 on the pi2 and GND which are pins 6/9/14/20/25/30/34/39 on the pi2.


    Leds respond much beter, although not entirely correct.



    I also understand how to connect the level-shifter now. And I (using the 2813, like 2812b) indeed only need to use a 1-channel version (although they may even not exist, I don't know). I went into town today to buy a level-shifter but the shop was already closed, I'll try again tomorrow.
    I'll report back tomorrow when I have the level-shifter.

  • Quick comments for now:
    1) pwm using rpi281x won't work well unless you disable analog audio.


    2) spi must use gpio 10 = pin 19. Both spidev0.0 and spidev0.1 use this pin for data so it won't make any difference.


    If you can lower the led voltage from 5 to 4.5v this will have a similar effect to using a level shifter while you wait.

  • Quick comments for now:
    1) pwm using rpi281x won't work well unless you disable analog audio.


    2) spi must use gpio 10 = pin 19. Both spidev0.0 and spidev0.1 use this pin for data so it won't make any difference.


    If you can lower the led voltage from 5 to 4.5v this will have a similar effect to using a level shifter while you wait.


    Hi Penfold, thank you for responding.
    I got the level shifter, but that makes no difference. MAybe it's the wrong type?
    I got this one:
    https://www.grootaers.nl/?page=product&id=32497


    Otherwise it must be the analog audio.
    I'll search the web how to do that.


    Wim

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!