1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RPi + Other Software Level Shifter based MOS

Discussion in 'Hardware Support' started by azzuro, 7 March 2017.

  1. azzuro

    azzuro New Member

    Messages:
    20
    Hello,

    i'm Azzuro, i'm new in the hyperion community.
    i'm in the elaborating since a while now, to create my own ambilight project ( at least more complex)
    i started with WS2801 bull led, and an Arduino (teensy2 board) using AtmoWin and MediaPortal.

    i decided to jump on RPi with APA102 (265 led).

    reading carrefully your wiki, i see than using an RPi for leds, it's better to includ an level shifter.
    i buy an small level shifter board ready to use, found on ebay.

    can you say me , if it's an good solution and i can go with this ?

    the model :
    _57.JPG
    http://www.ebay.fr/itm/291950584703?_trksid=p2057872.m2749.l2649&var=590941336852&ssPageName=STRK%3AMEBIDX%3AIT

    Description:
    Four MOS tube : four channel , two-way conversation 3V and 5V
    The power input with anti-reverse protection, integrated 3.3VLDO,and provide current less than 150mA
    With power indicate
    Used for UART/IIC/1-WIRE/SPI
     
  2. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,630
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    should be ok, just give it a try
     
    • Like Like x 1
  3. azzuro

    azzuro New Member

    Messages:
    20
    Hello TPmodding.
    I will try with this. And report the result.

    But what you think, compared to the hct07, is the best option.
     
    Last edited: 7 March 2017
  4. penfold42

    penfold42 Moderator Developer

    Messages:
    751
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    HCT is my preferred option.

    I've had poor experiences with mosfet level shifters
     
    • Thank you Thank you x 1
  5. azzuro

    azzuro New Member

    Messages:
    20
    do you mean, breaking something on my setup ?
     
  6. penfold42

    penfold42 Moderator Developer

    Messages:
    751
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Not breaking anything, just not working very well.

    The rise time was very slow which limits the speed you can run it at.

    Stronger pull-up resistors help but 74HCT were fine
     
  7. azzuro

    azzuro New Member

    Messages:
    20
    I have read on few thread, than the 74HCT00 is not the best version for use it as level shifter. Due to low voltage of the rpi, the version 74HC00 without the T should be an better choice. What do you think?
     
  8. penfold42

    penfold42 Moderator Developer

    Messages:
    751
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Use an HCT not an HC.

    The input outage thresholds on an HC end up being no better than most leds.

    An HCT with a 5v supply has a minimum voltage of 2v for a high.

    The rpi gpio pins output about 3.3v for a high so there's plenty of margin
     
  9. azzuro

    azzuro New Member

    Messages:
    20
    thanks,
    i received today my rpi3
    installed OSMC, and wait like an younger, to be back to home for connecting led and try.
    i'm only surprised, than Hypercon download osmc build for RPi2 instead of RPi3.
     
  10. azzuro

    azzuro New Member

    Messages:
    20
    i can reply to myself :
    on osmc the CPU for the Rpi3 is detected as BCM2709. because used on 32bit mode.
     
  11. azzuro

    azzuro New Member

    Messages:
    20
    Hello guy's
    i have connected all my system to RPi + level shifter ( MOS-fet)

    for now the setup is :
    265 led APA102
    wired with 18AWG ( power + data ) + Power connector on each corner ( 4x0.75mm²)
    PSU : RSP-75-5 (15A - 5 V)
    RPi3 : OSMC + Hyperion ( Network LAN )
    HTPC : MediaPortal (using Atmolight)
    Connection to LED : RPi - SPI

    for now, it seems work with my actual level shifter, i can see few flickering on the green and the blue color.
    i have buy an 74HCT00, i must try with it on test breadboard, if better or not.

    i can try with an arduino too, and an proper sketch.

    except the flickering, i have an delay on the leds display. my TV show the color before the leds. between 1-2 sec.
    on the RGB sequence test video, it's an big joke. :sickxx:
    it's maybe an good solution to open a new thread for this issue.

    @Rick164, i'm here ;)
     
  12. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,630
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    between 1-2 sec.

    you sure? 2 sec??
     
  13. azzuro

    azzuro New Member

    Messages:
    20
    maybe more 1 sec.
    but i don't have an system/method for know exactly the delay ...
     
  14. azzuro

    azzuro New Member

    Messages:
    20
    Hello, i think found my culprit
    the delay come from MediaPoral with MadVR enabled
    watching movie and TV with EVR, the delay is better (the led has few ms of delay on the rgb sequence test )
    only need to improve my setup ( lan ... )

    About the levelshifter, except few randomn lightning it seems working great on APA102 ( need to investigate this point)
    i must power on directly from PSU, because i will try to use an extension wire, for store the RPi inside my tv stand
    need to try the 74HCT00
    do you have an method for comparing both result ?
     
  15. penfold42

    penfold42 Moderator Developer

    Messages:
    751
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    The best method of comparison is an oscilloscope.

    You could try a lower data rate - if your level shifter is a bit "slow" this might help
     
  16. azzuro

    azzuro New Member

    Messages:
    20
    i don't have this :whistle:

    do you have an example of baudrate ?
    i have set the default to "1 000 000 "
     
  17. penfold42

    penfold42 Moderator Developer

    Messages:
    751
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    250,000

    A stronger pull up resistor on the output of the mosfet level shifter might also help as it decreases the rise time.
     
    • Thank you Thank you x 1
  18. azzuro

    azzuro New Member

    Messages:
    20
    hello guy's,

    i have used the 74HCT00 as alternative, i have too much flickring compared to Mosfet level shifter.
    so for me, ac my actual stage, the mosfet is less sensible than the nand gate.

    but i always have sometime "flash" on few leds randomly , i think the issue come with my PSU, but is not so bad, it 's an Meanwell RSP75-5.
    i know my wires lenght are very long ( 5meter ) between the Pi and the 1st led, but the wire gauge is an 18AWG. i reduced the number of flickering by adding an extra wire between levelshifter and PSU (60 cm 20 AWG), but always few "flash"
    do you think i can connect the +5v of the PI on level shifter ? instead of the PSU, and make an common GND on return ?

    i will try to make an scheme board, but what software of websoftware do you use for create good draw ?
     
  19. penfold42

    penfold42 Moderator Developer

    Messages:
    751
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Both should work but I prefer to get 5v for the level shifter from the rpi.

    You always need a common ground connected between the leds, led psu, rpi and level shifter.
     
  20. azzuro

    azzuro New Member

    Messages:
    20
    here my setup

    Actual .png

    on my case, it's not the 74HCT00, it's the mosfet level shifter.
    so, you say, i do the connection of the next scheme.

    5v from Rpi.png
     
    • Thank you Thank you x 1