Raspberry Pi Pico Tutorial - L298N Motor Driver Module

Тәжірибелік нұсқаулар және стиль

Welcome to the - Learn how to use the Raspberry Pi Pico Tutorial Series:
This tutorial we look at the L298N Motor Driver Module and how to connect it to the Raspberry Pi Pico.
The L298 is an integrated monolithic circuit in a 15-lead Multiwatt and Power SO20 packages. It is a high voltage, high current dual full-bridge driver designed to accept standard TTL logic levels and drive inductive loads such as relays, solenoids, DC and stepping motors.
It is widely used in many DIY robotics projects. The driver has some drawbacks which will be discussed in a future video.
Check out my channel for other videos on the Raspberry Pi Pico, as I will regularly upload tutorials and projects related to the Raspberry Pi Pico.
If you found this tutorial helpful, subscribe to the channel and leave a comment and welcome to the NerdCave.
Code:
github.com/Gui...
If you are new to the Raspberry Pi Pico I have made a Getting started video:
• Raspberry Pi Pico Tuto...

Пікірлер: 59

  • @dabunnisher29
    @dabunnisher29 Жыл бұрын

    I want to say THANK YOU for all your videos. You really helped me out with my projects.

  • @NerdCaveYT

    @NerdCaveYT

    Жыл бұрын

    Thank you for the comment, I sometimes forget the "purpose" of my own channel to share educational content, and not try to be this established company with this super good videos to feed the algorithm. I am glad to hear these tutorial videos are still helping other creators.

  • @MrTrilock
    @MrTrilock11 ай бұрын

    amazing videos. love the way you go through it bit by bit. very educational

  • @NerdCaveYT

    @NerdCaveYT

    11 ай бұрын

    Thank you, I am glad you like them!

  • @iansmiler
    @iansmiler5 ай бұрын

    Great video - exactly what I needed 😃

  • @NerdCaveYT

    @NerdCaveYT

    5 ай бұрын

    I have something better coming up that I played around with last week, better motor driver and PCB board, The L298N has a high voltage drop not super great

  • @GameTL
    @GameTL2 жыл бұрын

    Great video, quick concise. Thank you

  • @NerdCaveYT

    @NerdCaveYT

    2 жыл бұрын

    Thank you for the feedback, been thinking of making the coding parts a bit shorter.

  • @Kris-cd9qs
    @Kris-cd9qs11 ай бұрын

    thank you for help with my code and for an inspiration for next project👌👍

  • @NerdCaveYT

    @NerdCaveYT

    11 ай бұрын

    Most welcome 😊

  • @cursoderobotica
    @cursoderobotica2 жыл бұрын

    I love this project!! Nice job!! 😁👍

  • @NerdCaveYT

    @NerdCaveYT

    2 жыл бұрын

    Thank you, the follow up video will be using a Bluetooth to control it to make a simple robot.

  • @katateochi
    @katateochi9 ай бұрын

    Thanks, this tutorial really helped.

  • @NerdCaveYT

    @NerdCaveYT

    9 ай бұрын

    Glad it helped!

  • @twevocat4107
    @twevocat41077 ай бұрын

    my pico won't active the power out of the controler for the TT motor, but powering the input 1& 2 with 5v and ground will make the motor spin, how do i get my pico to activate the motors?

  • @NerdCaveYT

    @NerdCaveYT

    7 ай бұрын

    I am a bit confused are you power the driver with a separate power source, the pico won't be able to power the motor driver, The motor driver can deliver 5V output which you can connect to pico to power it, but then you can't have USB plugged into the pico.

  • @juliohoyos3936
    @juliohoyos39362 ай бұрын

    Can I control a servo that module? I want to make a roof open and close witj a rain sensor module and one servo that open /close when rains

  • @NerdCaveYT

    @NerdCaveYT

    2 ай бұрын

    It depends on the size of the servo and the current that it will draw, there are other more effective motor driver modules then this L298N

  • @ChrisMcKennaCMK
    @ChrisMcKennaCMK6 ай бұрын

    Thanks, I've been trying to do this , but with just using the IC. It works fine with the arduino uno, but when I plug the same thing into the Pico, I get nothing. I check the pico pins with an LED and there are signals coming out. Any ideas?

  • @NerdCaveYT

    @NerdCaveYT

    6 ай бұрын

    is it possible to send me your diagram so I can have a better look? discord.gg/BTdMWN7ffr

  • @ChrisMcKennaCMK

    @ChrisMcKennaCMK

    6 ай бұрын

    @@NerdCaveYT thanks. I got it working. The issue was that the 3.3v from the Pico wasn't enough to power the ic. Had to use the other supply.

  • @shorts_for_shortcuts
    @shorts_for_shortcuts14 күн бұрын

    i have a wierd problme, the driver can control one motor fine but not both, each motor works fine individualy put when both plugged in only one workds

  • @NerdCaveYT

    @NerdCaveYT

    12 күн бұрын

    That sounds strange so when the left output works and right output of driver but once you run both it does not, could it be possible a code issue? Do you have a multimeter to check to voltage level that might be that there is to high of a voltage drop from the driver and you might want to increase your PWM if you used it

  • @shorts_for_shortcuts

    @shorts_for_shortcuts

    12 күн бұрын

    @@NerdCaveYT yh I think it's a voltage issue but I'm not sure, one runs fast the other slow, the motors are interchangeable so nothings wrong there, but anyway thanks for responding:)

  • @armand9910
    @armand99102 жыл бұрын

    Good video, thank you.

  • @NerdCaveYT

    @NerdCaveYT

    2 жыл бұрын

    Thank you too!

  • @sneu420
    @sneu420 Жыл бұрын

    It's alive, thank you dude...! ~ I'm using four 2A batteries for powersupply, and sometimes there's only beeping sound (and the correct LEDs) from the L298n...! Is this a powersupply issue...?

  • @NerdCaveYT

    @NerdCaveYT

    Жыл бұрын

    Is the beeping sound coming from the module? I have not encountered that before. I know if you use the PWM and you do not supply enough voltage to the motors it will give of this high frequency buzz sound.

  • @sneu420

    @sneu420

    Жыл бұрын

    @@NerdCaveYT yeah, it comes from the module, not the Pico board...!

  • @comical24
    @comical247 ай бұрын

    I have a question, how do i control the speed of the motor normally? i've tried using PWM for the enable pins, and setting the duty cycle lower, but that didn't seem to work. I am not using a joystick, and just want my code to be like the first example, but with speed control. Thanks!

  • @NerdCaveYT

    @NerdCaveYT

    7 ай бұрын

    Only way to do speed control is with PWM, now if the PWM duty cycle is to low, the motor will not receive enough power to make the shaft turn and you should hear a high pitch frequency noise, and as you increase the duty cycle it will start to turn. So with button controlling the speed make the duty cycle to a point where motor turns then you can use a button to increase or decrease the duty cycle to control the speed. Also a side note the L298N even though very common motor driver it is not as efficient as the alternatives. I will next week make an update video with a different driver the drv8833

  • @TeodoraIrina

    @TeodoraIrina

    2 ай бұрын

    @@NerdCaveYT Hello , i have the same problm . I am trying to make robot follwing the black line but the car is moving too fast , and the lowest pwm i can set is 52000 . What can i do ? if you need i will send you my code , please help

  • @pasquentmax
    @pasquentmax7 ай бұрын

    Hello In your video you feed the pico through the usb socket. can it be powered with the LN 298 card? if yes how? otherwise how to power the pico other than through the usb socket?

  • @NerdCaveYT

    @NerdCaveYT

    7 ай бұрын

    So I mentioned in video the LN298 does have a 5V output which you can plug into pin39 of Pico to power if the USB is not plugged in, both should not be plugged in at same time, so when programming the Pico do not have power connected from the motor driver to the Pico.

  • @pasquentmax

    @pasquentmax

    7 ай бұрын

    @@NerdCaveYT Thank you very much for your answer. Another question, is the voltage supplied to the LN298 board lowered when it reaches the engines? If I power the board with 7.4V I will have how much power to the motors?

  • @NerdCaveYT

    @NerdCaveYT

    7 ай бұрын

    @@pasquentmax If I remember correctly there is a high voltage drop like 1.6V or somewhere in that range, the LN298 is not a great motor driver, I used it because had a few laying around, recently I made a new design for the DRV8833 a custom PCB which I will probably upload next week

  • @KriggofGaming
    @KriggofGaming22 күн бұрын

    When i run the code with all the same connections only one motor spins

  • @NerdCaveYT

    @NerdCaveYT

    20 күн бұрын

    did you double check the wiring to the other motor

  • @comical24
    @comical249 ай бұрын

    i don't have access to male-female wires at this time, how can i still do this?

  • @NerdCaveYT

    @NerdCaveYT

    9 ай бұрын

    if you connect the board to a breadboard you can just use normal wire then, network cable works well or just anything that works with breadboard if you have no breadboard then directly soldering wire to pins

  • @comical24

    @comical24

    9 ай бұрын

    i do now have access, but now i'm facing a problem. i'm fairly cretain that it's not the motor's fault, but running the code doesn't seem to affect the motors at all.

  • @comical24

    @comical24

    9 ай бұрын

    wait i am an idiot 😂😂! i didn't provide the power source! silly me! THANKS FOR THE CODE!!!

  • @bantairapper1830
    @bantairapper1830 Жыл бұрын

    Can you tell me how to increase the speed of the motor ? (the code for that) Great video btw !

  • @NerdCaveYT

    @NerdCaveYT

    Жыл бұрын

    Thank you, you can change the speed with the duty cycle there is the line EN_A.duty_u16(int(duty_cycle)). A duty cycle of 65535 will be the highest speed

  • @k.e.stechnogaming5436
    @k.e.stechnogaming543610 ай бұрын

    Bro my library 'machine' isn't working, please tell me a solution btw great project

  • @NerdCaveYT

    @NerdCaveYT

    10 ай бұрын

    Have you installed micropython?

  • @PriyanujKashyap
    @PriyanujKashyap10 ай бұрын

    I want to learn about the calculations. Can you please help me out with that.

  • @NerdCaveYT

    @NerdCaveYT

    10 ай бұрын

    which calculations ?

  • @PriyanujKashyap

    @PriyanujKashyap

    10 ай бұрын

    The math for the joystick position.@@NerdCaveYT

  • @Anonymous0734
    @Anonymous073411 ай бұрын

    which simulator did u use

  • @NerdCaveYT

    @NerdCaveYT

    11 ай бұрын

    Hi, I am confused by what you mean simulator, do you mean the IDE I am running my code in Thonny?

  • @Anonymous0734

    @Anonymous0734

    10 ай бұрын

    by simulator i mean like tinkercad and wokwi @@NerdCaveYT

  • @comical24

    @comical24

    9 ай бұрын

    he's using fusion 360

  • @justsanizer2431
    @justsanizer24312 жыл бұрын

    hello bro i need help

  • @NerdCaveYT

    @NerdCaveYT

    2 жыл бұрын

    What is the problem?

  • @justsanizer2431

    @justsanizer2431

    2 жыл бұрын

    @@NerdCaveYT sorry for distributing problem is solved :D

  • @NerdCaveYT

    @NerdCaveYT

    2 жыл бұрын

    @@justsanizer2431 glad to hear sorry for late reply busy moving hopefully have my workspace set up in a week

  • @justsanizer2431

    @justsanizer2431

    2 жыл бұрын

    @@NerdCaveYT new workshop let's goo

  • @justsanizer2431

    @justsanizer2431

    2 жыл бұрын

    :D

Келесі