Thanks for the video! Didn't know it's possible to test out arduino stuff in software. Will be useful especially when messing with batteries and condensers which can blow up.
The one thing that you should teach students is that with a switch, you should always make/break the hot side, (the plus voltage side) and never switch the ground. This is a safety issue and if your students go out into the world they will be forced to always break the hot side. Therefore, one side of a switch should be wired to +Voltage, the other side of the switch should have a 10K ohm resistor to ground and the arduino digital pin is wired to the junction of the resistor and the switch. With this configuration the wiring meets the NEC in all 50-states. I know in the hobby world it doesn't matter, but you never know if your students are working, or will be working in industry.
Does NEC really cover the design of low voltage devices, here 5V DC? In Electronics, it is quite common that signals are provided inverted, ie. Negation(RESET), Negation(ChipSelect), etc. The customs can vary significantly. Here the author programmatically enables the built-in resistor within Arduino board which pulls the input value towards +5V (logical 1), hence one has to connect the input via a switch to zero potential (logical 0). It teaches the student that he can (1) save one external resistor and one wire connection, ie. the wiring is simpler and it also teaches (2) to lower the cost of your design, plus that (3) the input can have the inverted value (Logical 1 = switch OFF [a default], Logical 0 = switch ON). Basic Arduino Starter Kit still contains even the wiring which uses your design (resistor, and a positive logic of a switch). Just for the completness. But any advanced user will use the approach used here.
@@vojtechkment2956 The NEC talks about low voltage wiring. They typically start at 24Vac/dc and up. I am very aware of the Arduino built-in resistors and I don't see any problem using them; however, the way safety standards are heading I would start teaching students, when using a mechanical switch, to always break the hot or high side; the voltage side. Even at lower voltages it's still the safest way so that the user is always on the ground side.
This video is great but I cant really wrap my head around how the motor is connected to the breadboard. I tried the code after putting everything in place, double checked the wires and it didnt work but idk if my motor is conected correctly. I also was wondering what arduino version you use.
If you're having trouble we recommend starting at the beginning of our Arduino tutorial playlist (linked in the description) and also watching our How to Use a Breadboard video: ua-cam.com/video/6WReFkfrUIk/v-deo.htmlsi=byMxk5OcEK-xG2Df. The H-bridge is a more complicated circuit so it will be challenging if this is the first thing you're trying to do. Our videos show the Arduino UNO R3.
As a novice, I find your videos extremely helpful. In my current project, I am writing (Adruino) code to slowly ramp up 12vDC motor speed (soft start). I would like to use a pot to only determine the motor max speed. So, the steps would be to (1) turn the pot knob to set desired max speed, (2) start the Arduion Uno, (3) read the value from the pot and soft start the motor to the speed set by the pot. Pots come with different levels of resistance (100ohm, 200 ohm ... 10k ohm). What pot would you recommend for such a project? (Thanks!)
Hi - we are unable to provide detailed help with individual projects and this is a bit more than we could explain in just a UA-cam comment anyway, we recommend asking for help in the official Arduino forums.
Thanks, I've some questions: Is hooking up 4 GND pins needed? They are for cooling, and the clamps in the board will cool them. The 6V input is also a single pin, and it has the same current going through. Do you need to set the pins as output? As there are a bunch of power transistors in the IC, won't they work on the default low-power output? Or do they need full 20mA to trigger? Can you set Tinkercad to put wires on top, now they dive under the IC which looks very weird. Does a LEGO motor work the same? How to change speed/power in code?
Hi - you have a lot of questions here, more than we can address in a single UA-cam comment. You may be able to get more answers on the official Arduino forums or forums dedicated to electronics like on Reddit or Stackexchange.
I found out, quite by mistake I think, that I could (1) eliminate the connection from the Arduino pin 8 to the Input 1 pin of the L293D and (2) connect the Arduino ~11 pin directly to the Input 1 pin of the L293D. Then, I could still analogWrite() values between 0 and 255 to the Arduino pin 11 to control the speed of the motor without reading input from the pot. My goal was to automate a "soft start" and then "soft stop" the motor. Is that a valid, alternate way to control the speed of the motor? Is there a down side?
Yes, it's perfectly fine to hard-code ramp-up/ramp-down PWM behavior instead of having it controlled by an external input like a potentiometer. This applies to any other input/output relationship with an Arduino. For example, a standard introduction activity is to hard-code an LED to blink on and off once every second, so there is no external input; then you learn to use a button to turn the LED on and off. In both cases the "output" code is the same. You could use anything (an internal delay, a button, some other external sensor) to trigger the output.
This is a general tutorial, but we have many specific projects on our site that use this circuit, such as www.sciencebuddies.org/science-fair-projects/project-ideas/Robotics_p042/robotics/arduino-self-driving-car
I'm unable to find the datasheet of my ic which is l293d 99 wav vw mys 99 995 and with everything connected I recive less than 3v at the motor output. What should i do?
Hi - we are unable to provide detailed troubleshooting help in UA-cam comments, we recommend asking your question on the official Arduino forums or a dedicated electronics forum like Stackexchange.
Great videos! I am wondering how I increase the rpm in this scenario. I need the motor to run up to around 8000rpm. Any suggestions would be great, thanks.
Hi - this is more than we can cover in the reply to a UA-cam comment. You will need to look at the motor's datasheet and find its maximum RPM. We recommend asking for help in a forum dedicated to electronics.
Hey , i need to ask you something, so im doing a project which involves of linear motion of back and forth continuous without pressing buttons is it possible.... Could you please reply me it urgent ...🥺🥺🥺...
Hey i know its late but can i ask a question, i followed your instruction step step and it works here's the question though my arduino is plugin to the computer as should be but the still motors run even though the external battery is not connected why is that?
You probably have something wired incorrectly on your circuit such that the motors are being powered by the 5V from the Arduino. We recommend asking for more help in the official Arduino forums. People will need to see pictures of your breadboard in order to help.
Bro ı have a question for u ı cant understand from datasheet how can ı add one more motor ı've understood the code part but ı am not sure aboıt the cables.Can u help me
Hi,thanks for your video.I have some questions:If i use the switch to control the motor ,when i push the first switch button it can clockwise rotation,but when i push it again,it can not stop. And then i push the second switch button------- it makes clockwise rotation slowly but can not counterclockwise rotation, and then if i do not push the second button,it still clockwise rotation without slowly condition.I do not know why..Could you please help me ?
Hi! I'm currently building machine, which will be using 4 separate dc motors with a wheel on each. Is it possible to connect 1st and 9th ports of L293 (speed regulators) to the single PMW so that both motors would have the same speed?
In general you don't want to use a 9V battery to power motors as they will drain the battery very quickly. Check out this video to learn more about your options for powering Arduino projects: ua-cam.com/video/I7MrL5Q7zvY/v-deo.htmlsi=zagNwvLt5MSBBGNQ
@@Science.Buddies if I power it with a 24v 3a power supply would I need any? What would cause me to need them? I plan on using 24v dc motor and adding an OLED display with some extra functions, it will be my first project
Hi - if you need detailed help, we recommend asking in a dedicated electronics forum like the official Arduino forums, or a site like Reddit or Stackexchange. We are unable to help with individual projects in UA-cam comments.
awesome video, really helped me a lot! Just a question tho... couldnt this work wtihout arduino? just using a another supply instead of it? We would be using the buttons just for switching voltage to the input pins on L293D
Yes, you can use an H-bridge to switch the direction of a motor without an Arduino if you just want manual hardware control. For software control and more advanced tasks (e.g. steering a robot to react to sensors) you need the Arduino.
Wonderful vid ! I'm gonna use it to create a functioning RC-boat :D I do have a question though - In the previous video u showed that, when using a MOSFET instead of an H-Bridge, you gotta use a capacitor in order to reduce electric noise. Is it still necessary with an H-Bridge ? Would love to know bcs I'm applying an IR receiver to send the signal to the enable pin, so background noise will mess with the circuit/logic.
Hey, im also planning on building an RC boat. How were you able to communicate with the boat tho? Im struggling in that aspect as well as what material did you build it with? Did you have a “steering” system or just used the motors to turn? Sry for the list of questions :D
Hey, I don't mean for it to look like I'm asking for tech support, but I decided it worth asking anyways. In following along with the video, I got stuck when I went to try to add the two buttons in by myself. I then tried to just copy why you had done, but the motor would just run at 83rpm without any input, and would only change (to 0) while holding down but2pin. All this on Tinkercard by the way. Is it possible for you to tell me what I'm doing wrong?
Hi - if you're a student doing a science project, you can ask for help in the Ask an Expert forums on our website: www.sciencebuddies.org/science-fair-projects/ask-an-expert-intro, which is monitored by volunteers. Unfortunately we're a small organization and don't have the capacity to provide tech support beyond that, but we'd recommend starting earlier in our Arduino playlist (linked in the description) and check out the video about buttons before you move on to motors and H-bridges.
Hi - we recommend checking out our full Arduino tutorial playlist. You can control the motor's movement using hard-coded digitalWrite commands and delays, just like you would when blinking an LED as covered earlier in the playlist. This does not require any buttons or switches as inputs.
Hey, great video. But I am confused, whenever I hook up a small DC motor to this circuit the motor doesn't work. The motor works when I take it off and plug it directly to the battery pack. Do I just need a bigger battery?
The same concept applies but you will need to check the datasheet for your motor to see how much current it requires, and make sure the H bridge you purchase can handle that much current.
@@Science.Buddies so my plan is to first try and write the code for a small simple motor Then I can use a large motor also I got some recommendations to use a l298n module
Hi, I am struggling to get this to work with no buttons. I have included Motor.h and Arduino.h and used your exact code. I get the error message of; C:\Users\cespa\OneDrive\Documents\Arduino\libraries\L298_Motor_Driver\Motor.cpp: In member function 'void Motor::goPercentage(uint8_t)': C:\Users\cespa\OneDrive\Documents\Arduino\libraries\L298_Motor_Driver\Motor.cpp:101:13: error: 'speed' was not declared in this scope checkWrite(speed); ^~~~~ C:\Users\cespa\OneDrive\Documents\Arduino\libraries\L298_Motor_Driver\Motor.cpp:101:13: note: suggested alternative: '_speed' checkWrite(speed); ^~~~~ _speed exit status 1 Error compiling for board Arduino Uno. Please help, thanks!
When you get an error message like that, it helps to google specific parts of it (not necessarily the parts with the file path on your computer, since that won't match what other people have when encountering the same error). When you see something like "error: 'speed' was not declared in this scope" that usually means a variable was not declared properly, e.g. "int speed" may be missing from the beginning of your program. Going forward, we can't provide much debugging help in UA-cam comments, but the official Arduino forums can usually help.
Hey, this is a fantastic video! I do need a hand with something though. I am trying to use this circuit to control a vinyl player (conceptually). I have allocated a button for forward and reverse but I want to use two potentiometers. One at max speed would turn the disc at 33 revolutions per minute and one would turn it at 45 revolutions per min. How do I map both with the same speed function? or what do i even do hahaha thanks :)
Hi - unfortunately we can't provide support to write code for individual projects like this. We have many other videos in our tutorial series, including earlier videos specifically about buttons and potentiometers that may help, but putting it all together to do exactly what you want is up to you :-). You may be able to get help with your code on the official Arduino forums.
Hi - unfortunately the UA-cam description field doesn't like Arduino code and the formatting gets messed up. For most of our newer videos there is a link to a Tinkercad Circuits simulation where you can copy the code, we're sorry we don't have it for all the old ones!
We don't currently have plans for a separate motor driver tutorial, but many motor driver boards are simply breakout boards for an H-bridge like the L293D.
The simulation program we use in our tutorials is called Tinkercad Circuits and we have a video about it here: ua-cam.com/video/9RF_BZ1Cg4k/v-deo.htmlsi=etlI65BHW12xj1Ln
Thanks for the video, now understanding the H bridge which is L293D incorporated in controlling a DC motor. Thank you very much.
This was a fantastic tutorial of h-bridge usage. Thank you 🙏
your videos are amazing they are fun and infomativ. I finally understand everything thanks
I don't have any words to thank you! Just can't express how helpful this video has been.
Thanks for the video! Didn't know it's possible to test out arduino stuff in software. Will be useful especially when messing with batteries and condensers which can blow up.
Thank you, you helped me a lot :)
Absolutely fantastic video. I will be experimenting with doing this with Arduino Uno and also a PIC. Thank you!!!!
love this way of teaching those basics!
Thank you very much. You explained a very complicated subject so perfectly ...I understand it now :)
The one thing that you should teach students is that with a switch, you should always make/break the hot side, (the plus voltage side) and never switch the ground. This is a safety issue and if your students go out into the world they will be forced to always break the hot side. Therefore, one side of a switch should be wired to +Voltage, the other side of the switch should have a 10K ohm resistor to ground and the arduino digital pin is wired to the junction of the resistor and the switch. With this configuration the wiring meets the NEC in all 50-states. I know in the hobby world it doesn't matter, but you never know if your students are working, or will be working in industry.
Does NEC really cover the design of low voltage devices, here 5V DC?
In Electronics, it is quite common that signals are provided inverted, ie. Negation(RESET), Negation(ChipSelect), etc. The customs can vary significantly.
Here the author programmatically enables the built-in resistor within Arduino board which pulls the input value towards +5V (logical 1), hence one has to connect the input via a switch to zero potential (logical 0).
It teaches the student that he can (1) save one external resistor and one wire connection, ie. the wiring is simpler and it also teaches (2) to lower the cost of your design, plus that (3) the input can have the inverted value (Logical 1 = switch OFF [a default], Logical 0 = switch ON).
Basic Arduino Starter Kit still contains even the wiring which uses your design (resistor, and a positive logic of a switch). Just for the completness. But any advanced user will use the approach used here.
@@vojtechkment2956 The NEC talks about low voltage wiring. They typically start at 24Vac/dc and up. I am very aware of the Arduino built-in resistors and I don't see any problem using them; however, the way safety standards are heading I would start teaching students, when using a mechanical switch, to always break the hot or high side; the voltage side. Even at lower voltages it's still the safest way so that the user is always on the ground side.
This video is great but I cant really wrap my head around how the motor is connected to the breadboard. I tried the code after putting everything in place, double checked the wires and it didnt work but idk if my motor is conected correctly. I also was wondering what arduino version you use.
If you're having trouble we recommend starting at the beginning of our Arduino tutorial playlist (linked in the description) and also watching our How to Use a Breadboard video: ua-cam.com/video/6WReFkfrUIk/v-deo.htmlsi=byMxk5OcEK-xG2Df. The H-bridge is a more complicated circuit so it will be challenging if this is the first thing you're trying to do. Our videos show the Arduino UNO R3.
As a novice, I find your videos extremely helpful. In my current project, I am writing (Adruino) code to slowly ramp up 12vDC motor speed (soft start). I would like to use a pot to only determine the motor max speed. So, the steps would be to (1) turn the pot knob to set desired max speed, (2) start the Arduion Uno, (3) read the value from the pot and soft start the motor to the speed set by the pot. Pots come with different levels of resistance (100ohm, 200 ohm ... 10k ohm). What pot would you recommend for such a project? (Thanks!)
Hi - we are unable to provide detailed help with individual projects and this is a bit more than we could explain in just a UA-cam comment anyway, we recommend asking for help in the official Arduino forums.
You mentioned that we weren't going to use a 2nd motor, if I wanted to use 2 motors how would I do that?
Thanks, I've some questions:
Is hooking up 4 GND pins needed? They are for cooling, and the clamps in the board will cool them. The 6V input is also a single pin, and it has the same current going through.
Do you need to set the pins as output? As there are a bunch of power transistors in the IC, won't they work on the default low-power output? Or do they need full 20mA to trigger?
Can you set Tinkercad to put wires on top, now they dive under the IC which looks very weird.
Does a LEGO motor work the same? How to change speed/power in code?
Hi - you have a lot of questions here, more than we can address in a single UA-cam comment. You may be able to get more answers on the official Arduino forums or forums dedicated to electronics like on Reddit or Stackexchange.
Video is just great ! , can you indicate what should be the value of potentiometer.
Can you explain why do you need a common ground? 9:45
I found out, quite by mistake I think, that I could (1) eliminate the connection from the Arduino pin 8 to the Input 1 pin of the L293D and (2) connect the Arduino ~11 pin directly to the Input 1 pin of the L293D. Then, I could still analogWrite() values between 0 and 255 to the Arduino pin 11 to control the speed of the motor without reading input from the pot. My goal was to automate a "soft start" and then "soft stop" the motor. Is that a valid, alternate way to control the speed of the motor? Is there a down side?
Yes, it's perfectly fine to hard-code ramp-up/ramp-down PWM behavior instead of having it controlled by an external input like a potentiometer. This applies to any other input/output relationship with an Arduino. For example, a standard introduction activity is to hard-code an LED to blink on and off once every second, so there is no external input; then you learn to use a button to turn the LED on and off. In both cases the "output" code is the same. You could use anything (an internal delay, a button, some other external sensor) to trigger the output.
Great work! :)
Thank you so much for your videos!!!
is it fine if a use a 9V Battey instead, or will it burn the circuit?
You always need to look at the datasheet and maximum voltage ratings for the parts you are using in order to answer that question.
@@Science.Buddies ok, ty
This helped me a lot in my project. Would be nice if you included the link to the project
This is a general tutorial, but we have many specific projects on our site that use this circuit, such as www.sciencebuddies.org/science-fair-projects/project-ideas/Robotics_p042/robotics/arduino-self-driving-car
Hi, if I wanted the motor to continue running after just pressing the button (not holding it down) how could I modify this code to accomplish this?
Hi - we recommend asking this question in the official Arduino forums.
can you make a dc motor spin with a joystick using the same chip ? i cant figure it out.
my moter wont stop spinning
I'm unable to find the datasheet of my ic which is l293d 99 wav vw mys 99 995 and with everything connected I recive less than 3v at the motor output. What should i do?
Hi - we are unable to provide detailed troubleshooting help in UA-cam comments, we recommend asking your question on the official Arduino forums or a dedicated electronics forum like Stackexchange.
Thanks, this worked for me.
Great videos! I am wondering how I increase the rpm in this scenario. I need the motor to run up to around 8000rpm. Any suggestions would be great, thanks.
Hi - this is more than we can cover in the reply to a UA-cam comment. You will need to look at the motor's datasheet and find its maximum RPM. We recommend asking for help in a forum dedicated to electronics.
Hey , i need to ask you something, so im doing a project which involves of linear motion of back and forth continuous without pressing buttons is it possible.... Could you please reply me it urgent ...🥺🥺🥺...
Hi - we can't provide help with individual projects like this in UA-cam comments, we recommend asking on the official Arduino forums if you need help.
Thanks a lot it realy helped me
Hey i know its late but can i ask a question, i followed your instruction step step and it works here's the question though my arduino is plugin to the computer as should be but the still motors run even though the external battery is not connected why is that?
You probably have something wired incorrectly on your circuit such that the motors are being powered by the 5V from the Arduino. We recommend asking for more help in the official Arduino forums. People will need to see pictures of your breadboard in order to help.
Bro ı have a question for u ı cant understand from datasheet how can ı add one more motor ı've understood the code part but ı am not sure aboıt the cables.Can u help me
Hi - we are unable to provide help in UA-cam comments, you could try asking for help in the official Arduino forums.
is it possible that when you press the button it slowly starts and picks up speed...
Yes, this is possible - we can't provide coding help in UA-cam comments, but you could ask for help in the official Arduino forums.
Hi,thanks for your video.I have some questions:If i use the switch to control the motor ,when i push the first switch button it can clockwise rotation,but when i push it again,it can not stop. And then i push the second switch button------- it makes clockwise rotation slowly but can not counterclockwise rotation, and then if i do not push the second button,it still clockwise rotation without slowly condition.I do not know why..Could you please help me ?
Maybe the HIGH and Low is not clear in the code,and when i modify a little code ,it works.....
Sir ,
I have exact same mini project.
but we have to use a 15 V supply
so which motor should I use And is there anything that I need to worry about?
Hi - we recommend asking this question on the official Arduino forums.
Can you please write the arduino code
Hi! I'm currently building machine, which will be using 4 separate dc motors with a wheel on each. Is it possible to connect 1st and 9th ports of L293 (speed regulators) to the single PMW so that both motors would have the same speed?
Yes, you should be able to do that!
can this be used for electromagnets as well?
Yes, it can be used for other inductive loads like electromagnets and solenoids.
Is there an alternative way to power this like with a 9 volt battery to the Arduino
In general you don't want to use a 9V battery to power motors as they will drain the battery very quickly. Check out this video to learn more about your options for powering Arduino projects: ua-cam.com/video/I7MrL5Q7zvY/v-deo.htmlsi=zagNwvLt5MSBBGNQ
Do you need any resistors or anything? Thanks!
Not for this circuit!
@@Science.Buddies if I power it with a 24v 3a power supply would I need any? What would cause me to need them? I plan on using 24v dc motor and adding an OLED display with some extra functions, it will be my first project
Hi - if you need detailed help, we recommend asking in a dedicated electronics forum like the official Arduino forums, or a site like Reddit or Stackexchange. We are unable to help with individual projects in UA-cam comments.
awesome video, really helped me a lot! Just a question tho... couldnt this work wtihout arduino? just using a another supply instead of it? We would be using the buttons just for switching voltage to the input pins on L293D
Yes, you can use an H-bridge to switch the direction of a motor without an Arduino if you just want manual hardware control. For software control and more advanced tasks (e.g. steering a robot to react to sensors) you need the Arduino.
@@Science.Buddies Great. Thank you !
Wonderful vid ! I'm gonna use it to create a functioning RC-boat :D I do have a question though - In the previous video u showed that, when using a MOSFET instead of an H-Bridge, you gotta use a capacitor in order to reduce electric noise. Is it still necessary with an H-Bridge ? Would love to know bcs I'm applying an IR receiver to send the signal to the enable pin, so background noise will mess with the circuit/logic.
Hey, im also planning on building an RC boat. How were you able to communicate with the boat tho? Im struggling in that aspect as well as what material did you build it with? Did you have a “steering” system or just used the motors to turn? Sry for the list of questions :D
Hey, I don't mean for it to look like I'm asking for tech support, but I decided it worth asking anyways. In following along with the video, I got stuck when I went to try to add the two buttons in by myself. I then tried to just copy why you had done, but the motor would just run at 83rpm without any input, and would only change (to 0) while holding down but2pin. All this on Tinkercard by the way. Is it possible for you to tell me what I'm doing wrong?
Hi - if you're a student doing a science project, you can ask for help in the Ask an Expert forums on our website: www.sciencebuddies.org/science-fair-projects/ask-an-expert-intro, which is monitored by volunteers. Unfortunately we're a small organization and don't have the capacity to provide tech support beyond that, but we'd recommend starting earlier in our Arduino playlist (linked in the description) and check out the video about buttons before you move on to motors and H-bridges.
And also is it possible to toggle direction with the button instead and have the speed controlled by the potentiometer?
Yes, this should be possible.
this is cool
Im looking to see how to control a dc motor without buttons or switches. Just coded movement. How do i do this? Tutorials??
Hi - we recommend checking out our full Arduino tutorial playlist. You can control the motor's movement using hard-coded digitalWrite commands and delays, just like you would when blinking an LED as covered earlier in the playlist. This does not require any buttons or switches as inputs.
Hey, great video. But I am confused, whenever I hook up a small DC motor to this circuit the motor doesn't work. The motor works when I take it off and plug it directly to the battery pack. Do I just need a bigger battery?
To clarify, you need to have Arduino code running for this circuit to work, the motor won't just spin if you plug it directly into the H bridge.
Yes, the circuit did have code running, but I found that if I give it a little push it will spin slowly. I think I just need a bigger battery.
So can this be applied to 2000 rpm 12 V motor too?
The same concept applies but you will need to check the datasheet for your motor to see how much current it requires, and make sure the H bridge you purchase can handle that much current.
@@Science.Buddies so my plan is to first try and write the code for a small simple motor
Then I can use a large motor also I got some recommendations to use a l298n module
The code should be the same regardless of the motor size.
@@Science.Buddies ok thank you sir
Hi, I am struggling to get this to work with no buttons. I have included Motor.h and Arduino.h and used your exact code. I get the error message of;
C:\Users\cespa\OneDrive\Documents\Arduino\libraries\L298_Motor_Driver\Motor.cpp: In member function 'void Motor::goPercentage(uint8_t)':
C:\Users\cespa\OneDrive\Documents\Arduino\libraries\L298_Motor_Driver\Motor.cpp:101:13: error: 'speed' was not declared in this scope
checkWrite(speed);
^~~~~
C:\Users\cespa\OneDrive\Documents\Arduino\libraries\L298_Motor_Driver\Motor.cpp:101:13: note: suggested alternative: '_speed'
checkWrite(speed);
^~~~~
_speed
exit status 1
Error compiling for board Arduino Uno.
Please help, thanks!
When you get an error message like that, it helps to google specific parts of it (not necessarily the parts with the file path on your computer, since that won't match what other people have when encountering the same error). When you see something like "error: 'speed' was not declared in this scope" that usually means a variable was not declared properly, e.g. "int speed" may be missing from the beginning of your program. Going forward, we can't provide much debugging help in UA-cam comments, but the official Arduino forums can usually help.
Hey, this is a fantastic video! I do need a hand with something though. I am trying to use this circuit to control a vinyl player (conceptually). I have allocated a button for forward and reverse but I want to use two potentiometers. One at max speed would turn the disc at 33 revolutions per minute and one would turn it at 45 revolutions per min. How do I map both with the same speed function? or what do i even do hahaha thanks :)
Hi - unfortunately we can't provide support to write code for individual projects like this. We have many other videos in our tutorial series, including earlier videos specifically about buttons and potentiometers that may help, but putting it all together to do exactly what you want is up to you :-). You may be able to get help with your code on the official Arduino forums.
what simulator you are using?
It's called TinkerCAD (you can see the logo in the top left corner)
The simulator is called Tinkercad Circuits, we have a separate tutorial about it here: ua-cam.com/video/9RF_BZ1Cg4k/v-deo.htmlsi=9QhBv4rMeamxNTDF
It doesn't work. Why?????
can you start putting the code down below so we can copy and paste. Please!!!
Hi - unfortunately the UA-cam description field doesn't like Arduino code and the formatting gets messed up. For most of our newer videos there is a link to a Tinkercad Circuits simulation where you can copy the code, we're sorry we don't have it for all the old ones!
thank you
Can u make a tutorial on how to use a motor driver
We don't currently have plans for a separate motor driver tutorial, but many motor driver boards are simply breakout boards for an H-bridge like the L293D.
program not working
:D
@@whatsupbudbud :D
my h bridge overheats super fast
what is the program he's using?
The simulation program we use in our tutorials is called Tinkercad Circuits and we have a video about it here: ua-cam.com/video/9RF_BZ1Cg4k/v-deo.htmlsi=etlI65BHW12xj1Ln
How can I connect a second motor?
You can use the other side of the H-bridge to connect a second motor the same way you connected the first one.
@@Science.Buddies It doesnt work