MOSFET logic-level shift circuit - Convert Voltage Raspberry Pi to NeoPixel and I2C / SPI Arduino

Опубликовано: 03 Октябрь 2024
на канале: Penguin Tutor
8,650
106

This video explains how MOSFET switcsh can be used to change the voltage output for logic signals. This includes increasing a voltage from 3.3V to 5V, creating an open drain switch for protocols such as I2C and as a bi-directional logic level shifter for communicating between a Raspberry Pi / Raspberry Pi Pico and an Arduino.


This will introduce the N-channel and P-channel MOSFETS and explain how the basic MOSFET switch operates. It then covers how to use this to switch a higher voltage signal creating a single directional inverting buffer for controlling NeoPixels / RGB LEDs / PixelStrips.

It then shows this as a open drain transistor output which will be useful in future when I cover the I2C protocol.


Finally it explains how a bi-directional 4-bit level shift circuit works. This is based on the Adafruit circuit, but is similar to how other manufacturers also create level-shifters including SparkFun.

For more details see:
http://www.penguintutor.com/electroni...


Chapters:
00:00 Introduction
00:50 About MOSFET as a switch
01:26 N-channel and P-channel MOSFETs
02:39 Different voltage devices
03:55 NeoPixel voltage shift with schematic
08:05 Example NeoPixel circuits
08:43 NeoPixel GUI software
09:00 Open drain buffer outputs
10:44 Bi-directional logic level converter
12:09 Adafruit level shifter

Links to related circuits and projects:
NeoPixel Worksheet (breadboard version)
http://www.penguintutor.com/news/rasp...

Disco Light project with NeoPixel level-shifter
http://www.penguintutor.com/projects/...
Christmas House with NeoPixel PCB circuit
http://www.penguintutor.com/projects/...
NeoPixel GUI software
http://www.penguintutor.com/projects/...