wow this guy is brutally descriptive, I love this channel already i wish i could give this video a 1000 likes. now i understand what is PWM. this video hit the spot on my quest for knowledge. Keep making videos like this, i have subscribed.
@@Dronebotworkshop hi , i tried to controll my motor with L298N and arduino nano , but my motor was not running . why it happened cause i checked the pins and program was also correct according with pin . but it doesn't work Can you help me please
@@Dronebotworkshop hi sorry for sudden ask but what is the required(max and minimum if there is such) for L298N H Dual Bridge? i tried to use my laptop/USB Port to connect in arduino but its not running. so far i dont have battery to test it. my code seems correct anyway but it is still not running so i figured the source power is at fault...i might also fry my arduino if i just randomly run voltages which is risky to replace + we are in pandemic and i cant easily go outside.
Thanks so much for the nice comment. I have a few more in the queue, should be releasing one next week on the new Raspberry Pi Zero W. You also have a channel with a lot of potential, I just subbed to you! :)
Nicely done. Very easy to understand and follow your sketches. You have a rare ability to explain the concepts in an easy to understand way without talking down to your audience. Thank you and hope to see much more.
Thank you for sharing your knowledge, Dude! How can I control 20 step motors using a PC or Arduino? I mean... drivers and/or IC like the 74HC595... Do you know any project like so? Thank you in advance!
great video as usual. love the way you systematically divide larger projects up into functional nibblets and then concisely and clearly communicate them with sufficiently high production value. keep it up !!
I liked this project. I'm working as an English teacher in Moscow and some 12 to 16 y.os have no interest in learning English. Then neither did I at that age. Some of them are very bright and they start getting physics in school at about 13 So I want to teach them how to build a whole series of simple electric motors. This will be the perfect way to introduce them to the Arduino!!!
I ordered 10 of these devices for less than $20. I only really wanted 3 of them, but I couldn't turn down this offer.. Perhaps I'll build myself a whole new niche teaching English and might even get adults interested. :)
Hey so maybe you can help, I want to take a RC Excavator that has push buttons for some of the movements and I would like to use a joystick for those movements. Is it possible and would you help me figure this out.
Hello Dronebot Worshop. Informative, interesting and well delivered. I think you have a potentially large audience of people like me who may not have an electronics or programming background but who are interested in learning about arduino, raspberry pi, ect. Thank you for the video, hope to watch more from you soon.
Thanks for the nice comment Karl, it is my pleasure to teach anyone interested in the Arduino, Raspberry Pi and electronics anything that I can. I know it's been too long since I last posted a video but that should change very soon as I have a few that are almost ready to upload.
Hi , i wish to ask does this tutorial on controlling dc motors with L298N H bridge works the same way as when using a speed sensors in the another tutorial videos?
I'm sorry to disagree with the sketch you submitted for the following reasons: 1) you start from the assumption of controlling the L298 using INH1 and INH2 to indicate the direction and adjust the speed by injecting the PWM signal via the ENABLE pins, this can work with Drivers such as the L298 which have inputs managed by an operational comparator, but using other IC or H bridge based on different technologies this can lead to cross conduction problems! with relative destruction of the circuit. 2) The correct management of the L298 itself is to use an INH input to inject the PWM signal with variable duty cycle to adjust the speed and the other INH input kept at a low logic level - and vice versa to change the direction of rotation. The enable pin must only be used to completely cut off the power to the two half bridges and block the H bridge. Unfortunately I note that this method of management leads many enthusiasts to use the same system (shetck) with other H bridges with often catastrophic results.
Thank You - I try and keep it neat, makes it a lot easier to get things done. Wasn't always that way though, you should have seen the previous workshop that was in my basement before I built this one last year! But I'm pretty proud of this one as I built it all myself (I had never drywalled before in my life LOL) so I plan to keep it neat.
You did a great job I'm very impressed with your explanation I've learned a lot thank you very much you may you you made it slow enough that I could keep up but fast enough where I didn't get bored thanks
your tutorials are really helpful and you explain every single detail of everything, I really need someone to help me with my project which is connecting solar panel to the Arduino wireless car, may you please help me!
Personally, I prefer soldering my DIP components myself, but that's just a matter of taste. Sometimes I'm lazy and just plug a Nano. map() is overkill when converting a 1024 values range into a 256 values range, "div 4" is not as bad, but still excessive, and [0-1023] is definitely a multiple of [0-255]. The shortest way of dividing by 4 (integer division) is simply to shift the bits right by 2 positions (shr 2, or >>2). Also, you prefer using 511 as the middle of the interval [0-1023] because it's the end of the first half of the interval, not 512 which is the "0" of the second half. But as you say, the joystick's center is not that precise, you don't care too much. How about a "center" function? The test for the joystick position ("margin") is pointless, because you also have a test for minimum speed before sending the analogWrite() commands, so you're basically doing twice the same thing. The command from the joystick EITHER changes direction OR goes forward or backwards. Not very practical... Therefore, you only want shr 1 (a shorthand for div 2), and subtract 256 to it, giving you 2 values (H and V) in the interval [-256 ; +255]. A test on bit 15 (shr 15 gives 1 for negative numbers) gives the sign in each direction (the 10-bit [0-1023] value is converted into a 16 bit value when you store it into an int) so it's pretty easy to get the direction to send into the H-bridge without cascading the if()s. Anyway, if() is just a waste of resources when you can use a and(0xff) to force a [0;255] range. Also, on demo2(), a linear for() loop with a constant delay is definitely not right for an acceleration or deceleration, that's simple physics. You wouldn't do that in the real world. I know, on such a "project", you have used only a tiny part of the memory for code and variables, you don't care too much about code speed anyway, thus all of the above may sound excessive ranting, but the goal is to get proper techniques rather than trying to find the quickest way to build an example application, right?
Thanks i'm going to try and use this. You must be from the old school. A vid on this kind of stuff would be beneficial to the younger generation(me included) that thinks memory and performance is abundant. Thank you.
Not sure I understand what you are asking here? Are you asking why I personally would need a motor driver board (answer - to build robots) or why one would need one in general (answer - to control two DC motors using the TTL logic level signals from a microcontroller or other logic device). Your avatar indicates that you are a programmer so I'm not sure what you don't understand here. Please let me know so I can assist you further.
You need one driver, as the Arduino output pins can't provide enough current to drive a motor. If you try get to much current from or into a port, you will destroy the port and maybe even the Arduino. You have to check, but the Arduino have a maximum output current on each board and a maximum sum of all ports. So you are not allowed to go over both limits. There are also problems driving a motot, which a driver also fix, like the motor can generat to much short spikes of higher voltage, which also will ruin you Arduino port, and posible the Arduino. A ruin Arduino can be fixed by changing the processor chip.
Please someone answer : can I use it for a physics project where I need a high frequency current of like 3.3V meaning low and 5V meaning high. Can I like use it by changing it really fast with the Arduino commands and create the signal I want to create ? Thank you!
Great movie as always! Thank you very much! : D I have one question. In my boat, I have to replace the engines with more powerful ones. I don't want to burn my motherboard. The motors are brushed. I need an ESC for brushed motors with more power. But there is a problem - only 2 wires go per motor from the motherboard. The new ESC has 3 wires at the input. I don't know how to connect the wires - to still control the speed of the motors. Is there any signal converter I need? Do I also have to construct such a converter by myself? If anyone knows how to solve such a problem, please answer my question. Thank you and best regards. : ).
Thanks for this video. I actually miss the PCB diagram. You can find the datasheet for the chip, L298N. Questions: 1) Do the PCB have free wheeling diodes for the outputs? 2) I am a bit confused regarding current sense of the module. If you like to measure current, do the jumpers connects to ground? Do you need to apply an external shunt resistor at the jumpers position? 3) If you got some other way of controlling the H-bridge, I guess it will be in order to use In1 and In2 with individual PWM signals and have EnA constantly high.
Great Video mate! I've been through many other tutorials regarding the same topic but none was as informative and understandable as yours is. Keep more coming, Thanks! Subscribed!
This is the explanation I have been looking for. You covered all the little details thoroughly enough to give a newbie like the confidence to get started. I'm so happy I found your channel.
Hi, could you please advise me to where the Zip file is containing the project L298N software, I have searched without success. Thank you........................................Berni
Great video. I’m trying to this like your car but huge hubs motors and 72volts, the throttle still works from a 0-5v, but when you pull back I would not want it to engage reverse as the forward momentum would burn out the motors. I would just want them to stop forward throttle or maybe start it’s regeneration braking.
So, when i tried to control the speed, the motor was just going at max speed no matter the number i gave it(aside from 0 which stops it) Can you help? I am using the L298N motor driver. I removed the jumpers, and added a connection from ENA to my arduino, but when i set it to an integer between 1 and 255, it just goes at max speed
I dont know but if I use analogWrite, the motor doesnt want to run at all, even 200 it will run only for digitalWrite(enA, HIGH); I have checked const int enA = 12; const int in1 = 11; const int in2 = 10; void setup() { Serial.begin(9600); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pinMode (enA, OUTPUT); } void loop() { analogWrite (enA, 60); digitalWrite(in1, HIGH); digitalWrite(in2,LOW); } motor doesnt want to run -_-
Great video. Such clear and concise instructions, and great explanations on how things work. One thing though. The L298N has an input voltage range of 7-12VDC correct? Wouldn't it be easier to leave the transformer jumper in place. Then you would have an output of 5VDC from the L298N that you could power your Arduino
Enjoying your tutorials a lot. I like how you present the projects and break down the steps. Would you please do a video on building an Arduino controlled PID circuit for DC motors. There are plenty of videos explaining PID bit none show what to use to get the feedback needed. Keep up the great work.
Hello there. I'm from Finland and we famously don't smalltalk much so when I'm saying you saved our university-level assignement, I do mean It. Everyrhing works fine with our line followin robot but... The 5 V for logics (???) comes from USB i.e. the wire has to be attached between computer and the Arduino board. Are you having two different powersources with this? I am abreal novice so I' m sorry if I ask a stupid guestion. Anyway Youre really good at explaining things.
Brilliant video! Could I use an Interlink Electronics FSR402 0.5" Diameter Force Sensing Resistor to move one or two motors to a position (or say move the motor slowly for 4 seconds or so) when pressed and stop the motor - then when pressure on the Force Sensor is released, the motor goes back in the opposite direction to the starting position? I would be truly grateful for any assistance. Thank you.
Thanx for explaining how to work with this driver. Mine will arrive in twoo days probaby. I'm a noob when it comes to programming and microcontrollers. Looking at the video around 30:51min you made me wonder. It is really nessesarry to subtract "460" form "JoyposVert" and than invert it using "*-1" Why not using the "map()" function to achieve this ressult? Kind regards, Daniel
First of all, thx for the great video. Really well explained. But i have a problem Based on 13:54, you using 7.4V. I try to using 3 batteries with 3.7v each, which is the total is 11.1V. And the motor stopped working. Why?
Thank you very much, English is not my language, but it speaks so clearly, that I asked to understand it with my basic English, besides that it explains very well
Would anyone know how much current can pass through one of these? I'm particularly interested in how much the FETs will limit current, as I do not want my NEMA 17 to experience over 1 Amp!
This is an awesome video, very descriptive at the right pace, and has consolodated lots of knowledge I've found scattered around other videos in one nice 30min package. Thanks again, been making notes through out ;)
Your videos are outstanding and greatly appreciated, especially to a newbie like me. My original intent was to build the robot following your “Build a Robot” series but up to video #5 I realized it was somewhat more than I could do, so I’ve opted to learn and build from your individual robot videos (baby steps). I am familiar with ac electrical power which helps when working with dc. I’ve built a few of your examples, following the instructions, including all on this video, using the Arduino and motor controller and none of them functioned initially. Reading the comments from your other followers made me believe it was something I was doing wrong. I purchased all the same equipment and followed your instructions (I think). But this actually turned out to be a blessing. I was forced to read and learn about Arduinos, motors, motor controllers, etc. and not just piece pieces of equipment together and copy code. For instance, in this video with regards to using a joystick. Following your instructions, I was able to get motor B to turn in one direction, nothing else. Moving the enable pin for motor A to #2 on the Arduino and the data pins to #6 and 7, then updating the code, everything is functioning fine. Having to make these adjustments I hope is not a result of me doing something incorrectly as far as your instructions. (Maybe the equipment is not created equal?)