Fantastic video! Even though the information is not new, I did find your explanation to be much more thorough than other presentations. You've earned a new subscriber. Thank you.
However, Neopixels need a non-inverted signal and the library assumes that there is no inverter. RG makes the circuit unnecessarily slow. A 74HCT125 would be a better solution for Neopixels.
There is an option to invert the output from the library which allows for an inverting buffer. For the rpi_ws281x library then the option is LED_INVERT which should be set to 1 to invert the signal. There are some other libraries (eg. used on microcontrollers) that don't have that option but there are other types of voltage level shifters that can be used and I've covered some on my other video at: th-cam.com/video/9a2otRXyn4A/w-d-xo.html A 74HCT125 would be a suitable alternative, but I also find a simple MOSFET works well when you have the option to invert the signal in software.
I tried to use one with STM32. when I use bidirectional voltage level shifter (like in the end of the video) with a VNH2SP30 motor driver the HV drops to 2.7v instead of putting out 5v. BUT when I connect it directly to the microcontroller the voltage doesn't drop. can't find what is wrong with it. (if I don't connect anything to HV it outputs 5v like it should).
@@PenguinTutor tried that. it results only in changing the logic 0 level. up to ~ 500mv. but this is a PWM pin. it works with 3.3v and 5v power supply. it also works with 3.3v PWM from microcontroller directly. may be i should just leave this pin connected to microcontroller. btw the other pins on the driver behave as they should with no voltage drop through level shifter.
@@lerymisandari4015 I have had mixed success with that level-shifter. Usually it works, but I've experienced some problems including it (indirectly) resulting in damage to an Arduino - See: th-cam.com/video/vKsfrawGgtc/w-d-xo.html Does the communication need to be bidirectional? If not then a 2 stage MOSFET level-shifter may work out better (explained in the video in this comment).
Thanks for the suggestion. I don't have a bill acceptor that I could try. There are many different types although serial RS232 and USB appear to be quite common. For RS232 it should be possible to connect them through the Adafruit logic level shifter to the Raspberry Pi UART. It's then a case of writing code to use the UART which is explained in my earlier video (going from RPi to Arduino using UART): th-cam.com/video/nh5geiIDqjA/w-d-xo.html
Fantastic video! Even though the information is not new, I did find your explanation to be much more thorough than other presentations. You've earned a new subscriber. Thank you.
However, Neopixels need a non-inverted signal and the library assumes that there is no inverter.
RG makes the circuit unnecessarily slow. A 74HCT125 would be a better solution for Neopixels.
There is an option to invert the output from the library which allows for an inverting buffer. For the rpi_ws281x library then the option is LED_INVERT which should be set to 1 to invert the signal.
There are some other libraries (eg. used on microcontrollers) that don't have that option but there are other types of voltage level shifters that can be used and I've covered some on my other video at: th-cam.com/video/9a2otRXyn4A/w-d-xo.html
A 74HCT125 would be a suitable alternative, but I also find a simple MOSFET works well when you have the option to invert the signal in software.
I tried to use one with STM32. when I use bidirectional voltage level shifter (like in the end of the video) with a VNH2SP30 motor driver the HV drops to 2.7v instead of putting out 5v. BUT when I connect it directly to the microcontroller the voltage doesn't drop. can't find what is wrong with it. (if I don't connect anything to HV it outputs 5v like it should).
I'm not familiar with that motor driver. Perhaps the 10k pull-up resistors are too high. You could try replacing that with a 3.3k ohm resistor.
@@PenguinTutor tried that. it results only in changing the logic 0 level. up to ~ 500mv.
but this is a PWM pin. it works with 3.3v and 5v power supply. it also works with 3.3v PWM from microcontroller directly. may be i should just leave this pin connected to microcontroller. btw the other pins on the driver behave as they should with no voltage drop through level shifter.
@@lerymisandari4015 I have had mixed success with that level-shifter. Usually it works, but I've experienced some problems including it (indirectly) resulting in damage to an Arduino - See: th-cam.com/video/vKsfrawGgtc/w-d-xo.html
Does the communication need to be bidirectional? If not then a 2 stage MOSFET level-shifter may work out better (explained in the video in this comment).
great video !
Can you make a video on a raspberry connection with a bill acceptor ??
Thanks for the suggestion. I don't have a bill acceptor that I could try. There are many different types although serial RS232 and USB appear to be quite common. For RS232 it should be possible to connect them through the Adafruit logic level shifter to the Raspberry Pi UART. It's then a case of writing code to use the UART which is explained in my earlier video (going from RPi to Arduino using UART): th-cam.com/video/nh5geiIDqjA/w-d-xo.html
@@PenguinTutor thank you