Raspberry Pi Pico Tutorial - L298N Motor Driver Module

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 71

  • @FabriuhR
    @FabriuhR 2 วันที่ผ่านมา

    My god! this channel has every tutorial i was needing, excellent!

    • @NerdCaveYT
      @NerdCaveYT  วันที่ผ่านมา

      It should have had more but I was lazy lol, next two years I will be more active on TH-cam

  • @doganbenli9681
    @doganbenli9681 4 หลายเดือนก่อน

    Thank you very much for all your labor and time. You have been very helpful. Greetings from Turkey.

    • @NerdCaveYT
      @NerdCaveYT  3 หลายเดือนก่อน +1

      Thank you very much, it is comments like this that keeps me making videos.

    • @doganbenli9681
      @doganbenli9681 3 หลายเดือนก่อน

      @@NerdCaveYT we are always waiting for beautiful shares

  • @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.

  • @iansmiler
    @iansmiler 9 หลายเดือนก่อน

    Great video - exactly what I needed 😃

    • @NerdCaveYT
      @NerdCaveYT  9 หลายเดือนก่อน

      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

  • @MrTrilock
    @MrTrilock ปีที่แล้ว

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

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว +1

      Thank you, I am glad you like them!

  • @Kris-cd9qs
    @Kris-cd9qs ปีที่แล้ว

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

  • @mmshilleh
    @mmshilleh 2 หลายเดือนก่อน

    I am powering my motors with 6V battery pack and my robot is not responding sometimes to my input. Is 6V not enough to power both robot motors? I am using 4 AA batteries

    • @NerdCaveYT
      @NerdCaveYT  2 หลายเดือนก่อน +1

      it might be if your PWM is set to low the motors will not turn, not having enough energy. These drivers also has a high voltage drop they are not very good drivers

    • @mmshilleh
      @mmshilleh 2 หลายเดือนก่อน

      @@NerdCaveYT Good point! Thanks for your help

  • @juliohoyos3936
    @juliohoyos3936 6 หลายเดือนก่อน

    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  6 หลายเดือนก่อน

      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

  • @pasquentmax
    @pasquentmax 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน +1

      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 11 หลายเดือนก่อน

      @@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  11 หลายเดือนก่อน

      @@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

  • @katateochi
    @katateochi ปีที่แล้ว

    Thanks, this tutorial really helped.

  • @nice1__
    @nice1__ 3 หลายเดือนก่อน

    Why did we connected the ground of l298n, battery and the pico? What would happen if i directly connect l298n ground to the battery?

    • @NerdCaveYT
      @NerdCaveYT  3 หลายเดือนก่อน

      All electronic components need a reference point to interpret voltages correctly. This reference point is usually the ground (or 0V) of the system. For the Raspberry Pi Pico, and the L298N, and power source battery, having a common ground ensures that all parts of the circuit share the same reference point. This way, the signals and voltages are interpreted consistently across the components. If we do not have a common ground this can cause signal reading problems

    • @nice1__
      @nice1__ 3 หลายเดือนก่อน

      @@NerdCaveYT Thanks for the reply but what could be the consequences?

  • @ChrisMcKennaCMK
    @ChrisMcKennaCMK 10 หลายเดือนก่อน

    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  10 หลายเดือนก่อน +1

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

    • @ChrisMcKennaCMK
      @ChrisMcKennaCMK 10 หลายเดือนก่อน

      @@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.

  • @GameTL
    @GameTL 2 ปีที่แล้ว

    Great video, quick concise. Thank you

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว

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

  • @twevocat4107
    @twevocat4107 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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.

  • @comical24
    @comical24 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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 6 หลายเดือนก่อน

      @@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

  • @cursoderobotica
    @cursoderobotica 2 ปีที่แล้ว +1

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

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว +1

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

  • @PriyanujKashyap
    @PriyanujKashyap ปีที่แล้ว

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

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      which calculations ?

    • @PriyanujKashyap
      @PriyanujKashyap ปีที่แล้ว

      The math for the joystick position.@@NerdCaveYT

  • @shorts_for_shortcuts
    @shorts_for_shortcuts 4 หลายเดือนก่อน

    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  4 หลายเดือนก่อน +1

      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 4 หลายเดือนก่อน

      @@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:)

  • @Anonymous0734
    @Anonymous0734 ปีที่แล้ว

    which simulator did u use

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

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

    • @Anonymous0734
      @Anonymous0734 ปีที่แล้ว

      by simulator i mean like tinkercad and wokwi @@NerdCaveYT

    • @comical24
      @comical24 ปีที่แล้ว

      he's using fusion 360

  • @comical24
    @comical24 ปีที่แล้ว

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

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      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 ปีที่แล้ว

      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 ปีที่แล้ว

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

  • @HineUr
    @HineUr 6 วันที่ผ่านมา

    isnt the motor driver 5 v logiv

  • @KriggofGaming
    @KriggofGaming 4 หลายเดือนก่อน

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

    • @NerdCaveYT
      @NerdCaveYT  4 หลายเดือนก่อน

      did you double check the wiring to the other motor

  • @sneu420
    @sneu420 2 ปีที่แล้ว

    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  2 ปีที่แล้ว +1

      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 2 ปีที่แล้ว

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

  • @k.e.stechnogaming5436
    @k.e.stechnogaming5436 ปีที่แล้ว

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

    • @NerdCaveYT
      @NerdCaveYT  ปีที่แล้ว

      Have you installed micropython?

  • @armand9910
    @armand9910 2 ปีที่แล้ว

    Good video, thank you.

  • @bantairapper1830
    @bantairapper1830 2 ปีที่แล้ว

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

    • @NerdCaveYT
      @NerdCaveYT  2 ปีที่แล้ว

      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

  • @CodingProgrammingAccount
    @CodingProgrammingAccount 2 ปีที่แล้ว

    hello bro i need help