Bridging the Gap: Arduino Nano's Guide for 3.3V Device Control with Level Shifter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
until now my projects have predominantly operated at 5 volts utilizing Arduino microcontrollers such as Uno or Nano along with various 5 volts components however there is a distinct realm of electronic components that demand 3.3 volts to operate including microcontrollers like Arduino promini and components with a 3.3 volts operating voltage while 5V components can often function in the 3.3 volts domain the reverse POS challenges attempting to integrate 3.3 parts into a 5vt system may lead to inconsistent performance as observed with certain components like OLED displays or even damage like in case of this 11 Laura module a lesson I learned the hard way these 3.3 components cannot seamlessly cross over but what if we could build a bridge to enable safe communication with the 5vt S component known as lever shifter can serve as such bridge if you're unfamiliar with lever shifters and ke to learn more stick [Music] [Applause] around my first real encounter with 3.3 volts circuits was when I was testing Laura module provided to me by rayax this led to unfortunate in accident when I inadvertently damaged that module when trying to connect it to Arduino Nano learning from this mishap I chose to use Arduino PR mini which operates with 3.3 volts logic to successfully complete the tutorial let's simulate connecting the Reax Laura module to an Arduino Nano here are both components I can safely power the Laura module from the 3.3 volt spin of Arduino ground of Laura goes to ground of Arduino proceeding further I connect Laura transmit pin to the Arduino receiver pin the Laura module sends the 3.3 volts signal to the Arduino which despite being outside the voltage range the Arduino operates within is recognized without apparent instability I tested it and it works I sought clarification in Arduino forums regarding potential problems this may cause but there different people expressed contradicting opinions next let's connect the Arduino transmit pin to the Laura receiver and this is where Laura Goes Up in Smoke due to the 5V signal from the Arduino overpowering the Laura module additionally there is a concern about powering the Laura module solely from the Arduino 3.3 volt spin as the Arduino can draw a maximum of 50 milliamps insufficient for the Laura module's 140 milliamps transmission requirement to address this we can introduce external power supply capable of providing one or two amps we connect the positive terminal to the VCC of Laura and the negative terminal to both the ground pin of the Lura module and the ground of Arduino returning to the original issue a potential solution involves connecting the TX pin of the Arduino to the ground through two resistors with one resistor being twice the size of the other creating a junction between these resistors and connecting it to RX pin or the Lura module effectively forms a voltage divider we can calculate the output voltage and we get 3.4 volts resolving the particular issue however if faced with multiple connections between different voltage levels or a desire to provide an actual 5vt signal when connecting the Lura TX to the Arduino RX additional measures such as signal level shifting may be necessary let's look how this can be done this is where a lever shifter comes to play let's look at this four Channel lever shifter the High Sight represents 5 volt logic while the low side represents 3.3 volt logic with the ground connections on both sides next there are pins for providing reference voltage 5 volts at the top and 3.3 volts at the bottom additionally there are four highlevel pins one for each Channel along with corresponding four lowlevel pins on the opposite side the step down process for 5V signals mirrors the approach demonstrated in the Lura example it involves two rows of resistors with two resistors dedicated to each Channel forming four voltage dividers on the other hand the stepup process for 3vt signals utilizes four mosfet transistors you can see positions in the center let's have a short break and talk about the sponsor of this video Ultra host is leading Next Generation web hosting provider known for delivering exceptionally fast secure and userfriendly hosting Solutions the storage they provide is built on Lightning Fast mvme SSD discs for a limited time during their Black Friday promotions you can get 25% discount on their monthly plans and remarkable 50% off on their annual plan their prices start at$ 329 us per month and less than $33 per year if your website requires powerful proven platform please make sure to check the link above I'll will also put the links in the description below go and visit their site and support my channel in the process going back to my video to demonstrate the functionality of this level shifter we'll construct a simple circuit to control this Milat LED as if it was a component requiring a 3.3 voltage Supply initially let's connect this led to both ground and Arduino digital pin 5 using standard blink sketch would be perfect way of sending signals to this pin to control the LED let's connect the Arduino and load the sketch LED starts blinking in 2 seconds intervals now I'll replace the LED with the two male header pins enabling voltage measurement between the ground pin and digital pin five as you can see the reading Falls slightly below 5 volts which is acceptable and likely contributed to arduino's built-in voltage regulator tolerance now let's get rid of the header pins and complicate things a bit by introducing the lever shifter and ensure proper alignment by plugging it so that the high level pins face the Arduino connect the shifter's ground to the Arduino ground and then provide reference voltage on both sides beginning with 5 volts reference from the Arduino 5 volts pin and 3.3 volt reference from the Arduino 3v3 pin on the other side next I will connect the digital pin through which the blink sketch sends signals to the first channel of the shifter on the highight now let's connect the LED with the cathode going to ground and the anode to the first channel pin on the low side after powering the Arduino you see that the blink sketch still functions but the LED is a touch dimmer let's disconnect Arduino and once again replace LED with a header pins connected to the shifter's ground and lv1 pin I will power the Arduino again and measure the voltage between those two header pins you can observe that we have successfully bridged the 5vt signal through the lever shifter to control this led which is simulating a 3.3 volts device now let's see how the use of lever shifter would impact the Lowa circuit first let's get rid of all the existing connections here is our shifter let's start with connecting all the grounds then I provide 5 volts reference voltage to the high side pin from the arduino's 5vt spin the reference voltage for the other side would come from the positive terminal of the external 3.3 volts power supply next it's time to connect the Lura module connecting the ground and VCC where VCC receives power from positive terminal of the 3.3 Vol power supply now we connect both signal pins with the TX and RX of Arduino going to channel one and two of the shifter respectively the corresponding pins on the other side of the shifter would be connected to RX and TX of Laura module this configuration allows us to step up the signal from the Laura RX to the Arduino TX and step down the signal from the Arduino TX to the Laura RX this is all as far as this video is concerned with the understanding on how to use lever shifters with Laura I can now use this knowledge in my upcoming video to build Laura transmitter and Laura receiver devices for outdoor range testing if you found this content useful like share and subscribe also consider supporting my channel in other means available to you thanks for being here means a lot to me I will see you in my next video [Music] [Applause] ciao
Info
Channel: Mario's Ideas
Views: 2,217
Rating: undefined out of 5
Keywords: Arduino, level shifter, nano, step-up, Step-down, voltage divider, lora, reyax, tutorial, how to, easy project, 3.3V logic, 5v logic
Id: fMX-9poNl-g
Channel Id: undefined
Length: 10min 16sec (616 seconds)
Published: Mon Nov 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.