Linear Actuator Arduino Control using L298N Motor Control Board

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ค. 2024
  • Linear Actuator Arduino Control using L298N Motor Control Board
    In this tutorial I will show you how to use the L298N motor control board and write simple Arduino code to control a linear actuator. The L298N is a compact and inexpensive H bridge motor control board that easily interfaces with microcontrollers such as the Arduino or Raspberry Pi. Though it costs a little more than the L9110, it is capable of much higher power and can also provide 5V for your Arduino. It is also capable of dc motor speed control.
    In a previous video I used an L9110 and a magnetic proximity sensor to control an industrial linear actuator. In this video, I use an L298N with a 3 button switch to extend, retract, and stop a linear actuator. I also describe the Arduino code used to interface with the L298N. In a future video, I will use and RC transmitter and receiver to control the speed and direction of the linear actuator. Please subscribe to my channel and help me reach my goal of 1,000 subscribers by the end of 2020.
    Pin Connections:
    L298N 12V to Battery +
    L298N GND to Battery -
    L298N GND to Breadboard GND Rail
    L298N 5V to Breadboard 5V Rail
    L298N OUT1 to Linear Actuator +
    L298N OUT1 to Linear Actuator -
    L298N In1 to Arduino Pin 9
    L298N In2 to Arduino Pin 10
    Button Common to Breadboard GND Rail
    Retract Button to Breadboard 5V through 10k resistor and to Arduino Pin 2
    Extend Button to Breadboard 5V through 10k resistor and to Arduino Pin 3
    Stop Button to Breadboard 5V through 10k resistor and to Arduino Pin 4
    Arduino GND to Breadboard GND Rail
    Arduino 5V pin to Breadboard 5V Rail
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @michaelweatherby8648
    @michaelweatherby8648 3 ปีที่แล้ว

    Thanks. I was pretty sure I knew what to do, but it's always nice to have a reference. This is exactly what I was thinking, 12V, l298n, and a limit switch. Cheers!

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

    That’s got to be the clearest presentation of this ever.

  • @m.on.a.b.
    @m.on.a.b. 4 ปีที่แล้ว +4

    Hello Sir! Great videos that you're making! Please keep up the nice work. You helped me with the EasyDriver Stepper Control Video on a side project for my Bachelors Degree. I hope that your channel gets popular!

  • @neogator26
    @neogator26 3 ปีที่แล้ว +5

    Number 750. lol As I get more time I feel your channel will be exceedingly helpful as I learn more about Arduino's for fun projects. As for now you are being quite helpful with my principles of measurement class. :-)

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

    Excellent code and explanaition my friend, it was really helpful. :) Keep doing this kind of videos. Greetings from Mexico

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Gracias, lo haré!

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

      dont know if you guys cares but if you're bored like me atm you can stream all of the latest movies on instaflixxer. Have been watching with my girlfriend for the last couple of days :)

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

      @Otto Louis yea, I have been watching on instaflixxer for since december myself =)

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

      @Otto Louis Yea, I've been watching on instaflixxer for months myself :D

  • @3xAudio
    @3xAudio 4 ปีที่แล้ว +1

    Always interesting ideas to get inspiration in the Arduino community thanks for sharing.

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

    Thanks for sharing! Great video format and content

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

    Nice video! I like that you explain everything!

  • @sarthakskumar6026
    @sarthakskumar6026 3 ปีที่แล้ว +2

    That's a really good video. Keep Up the Work Sir. I'm Kinda Interested in these stuffs and look forward to your support.

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Much appreciated!

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

      @@ScienceFunInnovations Are you available on Instagram? If you would allow me to share your channel and let you know. I guess that would just make me a better friend of yours.

  • @darrreltrigg2282
    @darrreltrigg2282 3 ปีที่แล้ว

    Thanks for the video very interesting. I am only just getting into electronics and would like to take this a step further, by being able to read an output from the linear actuator as to how far it is extended, then display this on a LCD screen and also have the ability to be able to stop the actuator in different memory positions. I want to use these to control to 600N 500mm linear actuators to make a sit stand desk.

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

      I am planning on doing a video about linear actuator position control very soon. My part is scheduled to arrive from China in a week or two, then I hope to have the video out by the end of the month. Hit subscribe and turn on notifications so that you are alerted once it posts. Thanks for watching!

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

    Special thanks to you.

  • @iangreaves5457
    @iangreaves5457 4 ปีที่แล้ว +2

    Hi, a good demonstration. A schematic for the wiring would be helpful.

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 ปีที่แล้ว

      I added a schematic to my Facebook page: th-cam.com/users/redirect?redir_token=02jIURwDAyLgAtjWnW65wxRyDdl8MTU4NjgzNTUyNEAxNTg2NzQ5MTI0&q=https%3A%2F%2Ffb.me%2FScienceFun4u&event=channel_description
      Thanks for the feedback.

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

      That's great, thanks very much. I'll be using this in the next couple of weeks to steer a mobility scooter base via remote control -- hopefully.

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

    Hi great video! I am following your instructions to make my own arduino-controlled linear actuator. Quick question, is it possible to burn out the L298N by accidentally leaving the switch in extend/retract position for a few minutes and forgetting to press the stop button? (Assuming your linear actuator has an automatic cut-off function). I think I may have burnt out my L298N!

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Most actuators have automatic cut off on both ends, so that should not burn out the L298N. What could burn it out is if you actuator pulls more than 2 amps continuous or more than 3 amps momentary. Actuators under heavy force will pull more current. I may do a future video using a different motor control board that can handle more power.

    • @charleslim4741
      @charleslim4741 3 ปีที่แล้ว

      @@ScienceFunInnovations Thanks for your reply! I figured out the issue, turns out I placed the L298N on a metal surface and the contacts on the bottom shorted out, causing the L298N to fail. Looking forward to that video!

  • @Cosmos229
    @Cosmos229 10 วันที่ผ่านมา

    Hi, your video is so helpful for me. But I have one question. As I know, peak current of L298N is 2A. But your linear actuator's continuous current or stall current seem to exceed 2A. is it okay to use L298N?

  • @JohnAnderson-Catfish
    @JohnAnderson-Catfish 3 ปีที่แล้ว +1

    Hi, great demo! I have a question, I'm using two wifi switches with my linear actuator with 4 relays, I would like to not use the relays and use something like this but with a raspberry pi or arduino. Can that be done?

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

      Control will work with Rasperry Pi or Arduino, but you will need some sort of H-bridge or motor controller that is capable of handling the current of the actuator. The current can be much higher with higher loads, so you will want to make sure that the driver controlled by the Arduino can handle the load.

    • @JohnAnderson-Catfish
      @JohnAnderson-Catfish 3 ปีที่แล้ว

      @@ScienceFunInnovations Thank you for replying, I new to both the Arduino and Raspberry, I did order an H bridge. Thanks again!

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

    great video, i have a question, if I want to use linear actuator with encoder to control it at specific location or length, how may I know the range of it, can i use manual method by just supply power to it and read the encoder position from the beginning until the end of it?

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

      Yes you can. Check out my more recent videos to see how to do that.

  • @netsurfer2975
    @netsurfer2975 3 ปีที่แล้ว

    For someone as new as I am to this I have to say you were too quick in explaining wiring and too brief in the explanation of some terms. But I do appreciate your video.

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Glad it helped. I have a few other linear actuator videos that may help fill in some of the gaps.

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

    G'day mate, question, if i were to incorporate this set up for an outboard/ jet nozzel steering system, how would i be able to make the actuator finish at the centre position (self centre) when there's no input signal. thank you in advance, Raymond from Sydney.

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

      Great question. They do make actuators that have position feedback (usually a potentiometer) that you could feed into an Analog channel on the Arduino. Otherwise you would have to use some sort of position feedback system such as an LVDT.

    • @raymondche3685
      @raymondche3685 3 ปีที่แล้ว

      @@ScienceFunInnovations thanks for your reply, I understand the theory, but do you reckon you could make a video on this project, also write the code for the arduino part as I am better with the building part, (not so good with the coding part) I am an electrician by trade. Thx.

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      I have had some similar requests for a video like that, so it is definitely on my to-do list. I'll have to order some parts first, but I do hope to do that video sometime in the next few months.

  • @user-cr6ki4qs4y
    @user-cr6ki4qs4y 3 ปีที่แล้ว +1

    Hi and thanks so much for this video! Is there such a way to make it so it works similar to a power window? Like hold the up button for 2 seconds and release to fully extend but make presses less than 2 seconds, a move and release? Also is it possible to make the stop button move the actuator to a specific position?

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

      Yes, you could program it to be like a power window. Once the switch is pressed you record the timestamp using millis(). Then in your loop you would calculate elapsed time = millis() - timestamp. Once enough time has elapsed, you would check the switch again to set the mode to extend.
      Stopping in a specific position requires an actuator with a built in potentiometer (a bit more money) or an external linear position sensor. Once of these days I will do a video about it.

    • @itaycarpis9291
      @itaycarpis9291 3 ปีที่แล้ว

      ​@@ScienceFunInnovations, let's assume I have an actuator ​with a built-in potentiometer, is it possible to move the actuator to a specific position using the L298N only? or I must involve the Arduino with some code?

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      @@itaycarpis9291 You would still need some simple code to keep track of the window position. You would use an analog input to measure the potentiometer position. That way you could have it go to specific positions. I will likely do a video about this in the future.

    • @itaycarpis9291
      @itaycarpis9291 3 ปีที่แล้ว

      ​ @Science Fun , thank you for the super quick answer :)
      Do you know maybe if there is a motor control that does the position fix without any external involvement, such as Arduino...
      Some motor control that gets the feedback from a potentiometer actuator signal as an input and fixes the position according to the required position.

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

      @@itaycarpis9291 There may be some that use limit switches, but I'm not sure if there are any with position control.

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

    What do the resistors do for the switches? What do you mean by “pull up resistors”? Can’t the switch just wire directly to the input?

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

      There is a way to wire directly to the inputs without using pull-up or pull-down resistors if the microcontroller has resistors built in. Most of the newer Arduinos can do it without the resistors, but you may need to add a little more code. There are many articles about this if you search for it on the web. Cheers!

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

    Great ones. I would like to know which is the name of the three button switch

  • @hemayetkabir1331
    @hemayetkabir1331 4 ปีที่แล้ว +2

    A schematic would really help. Please upload that. Thank you so much.

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 ปีที่แล้ว +2

      I added a schematic to my Facebook page: th-cam.com/users/redirect?redir_token=02jIURwDAyLgAtjWnW65wxRyDdl8MTU4NjgzNTUyNEAxNTg2NzQ5MTI0&q=https%3A%2F%2Ffb.me%2FScienceFun4u&event=channel_description
      Thanks for the feedback.

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

    I am attempting to do this except using a FlySky i6x and wanting to control the actuator with the 3 position switch. I can get the actuator to extend, but not retract. I'm sure it's in the code. Thoughts?

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

      Probably in the code. I have several videos about controlling linear actuators, hopefully one of those gives you some good ideas.

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

    Please reply...I have a 24v 6 amp linear actuator can I use L298N Motor drive or do I need to use more powerful motor drive?

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

      L298N is only good to about 3 amps. I would use a BTS7960.

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

      Instead of using all these motor drives, Arduino, membrane button to control actuators, I have used DBDT (Double pole double throw) switch and I am able to control actuators.

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

    I thought we have to use BTS7960B 43A or similar. will L298N be enough?

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Depends on the load on the actuator and the current draw. For heavy loads, use the BTS7960B. I will be using the BTS7960B in an upcoming video.

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

    is it possible if we want to implement linear actuator for sliding a door (house) not a smaller one?

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

    How can I supply 12V to the linear actuator while still utilizing the Arduino? I need to establish an upper limit (extend 3.5") for the actuator and I need to supply all 12V as I will be maxing out the weight capabilities of my actuator. Its rated for 225lb with a 4" stroke, I need to lift 215lbs 3.5"

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Does you actuator have a max current rating? If it pulls more than about 3 amps at full load, you may need to use something stronger like a motor controller similar to this one ebay.to/2yrsTjn

    • @PreMix759
      @PreMix759 3 ปีที่แล้ว

      @@ScienceFunInnovations 4.6A. I have a L298N as well

  • @user-ou6bc6ci4b
    @user-ou6bc6ci4b 5 หลายเดือนก่อน +1

    thank u for cool video.
    i ahve a question that did you use any library manger?
    When I write your code, high and low couldn't be blue.
    Is it okay that high and low code is just normal?
    I hope you solve my question quickly!

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

      I try not to use any libraries if I can help it. Check out some of my other actuator videos to learn more.

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

    could you not do the same with a dpdt switch plus relays if you wanted to be easy on on the switch?

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Yes. A DPDT would work as well. The motor control board allows for variable speed control (as well as automation if sensors are used instead of buttons).

    • @richardpayne9640
      @richardpayne9640 3 ปีที่แล้ว

      @@ScienceFunInnovations I understand actuators are pretty neat

  • @Kimky265
    @Kimky265 4 ปีที่แล้ว +2

    Thank you for your vidio, i wonder part name of the switch(?)

    • @Kimky265
      @Kimky265 4 ปีที่แล้ว

      Please let me know !

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 ปีที่แล้ว

      It is called a 1X3 Membrane Switch. I purchased mine from Ebay ebay.to/2RXWxUk

    • @nurjamahashiabdulle1711
      @nurjamahashiabdulle1711 3 ปีที่แล้ว

      @@ScienceFunInnovations what is the size of this I linked and saw 1*3key 36*55 mm one

    • @nurjamahashiabdulle1711
      @nurjamahashiabdulle1711 3 ปีที่แล้ว

      @@ScienceFunInnovations is it?

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

    Can I just use any Linear Actuator with the L298N Motor Control Board? or there are specific linear actuators?

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

      The L298N is limited to about 3 amps. You may want a more heavy duty controller if you intend to have high loads/forces. But they all pretty much work the same way. Just find out how many amps the actuator uses under full load first, then select a motor control board that can handle the power draw. Cheers!

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

    How can you input data ( measure) to extend to the right measurement e.x input 20mm the bar should increase 20mm exactly.. if you input new data they will adjust the previus measurement to the new data

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Some actuators have built in position feedback sensors that can connect straight to an Arduino. These generally cost a bit more. Other options are to use an external linear potentiometer or an ultrasonic sensor. I'm hoping to cover this topic in a future video. Thanks for watching.

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

    EDIT: I Switched to my Arduino Mega and for some reaason everything works now.
    I'm getting frustrated here. I've been trying to measure the PWM signal from my tx input using the serial monitor. However, before I even turn on my tx, the serial monitor spits out random numbers, and when I turn the tx on, it still does the same. I double checked the code, which is exactly as you have it. I'm on pin 7, both in the sketch and on the Uno. I plugged a servo into several different channels as a test that they're working. I've tried this with my flysky fs-t6 in sticks mode as well as my tactic pistol controller. NOTHING works like it should in the video. What's going on here? I'm about ready to give up.

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

      That is weird that it worked on the Mega but not the Uno. Did you have any breakthroughs on what was wrong?

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

    Good day. I would like to control a TGM7 series 24V 6A geared motor using a 24V DC motor controller (lithium battery) and Arduino. I would appreciate your help on this subject.

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

      What exactly are you needing help with? You could send an email to my business email with details.

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

    Hello sir, want to ask how about connection two linear actuators and syncing the movement of the linear actuator?

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

      In order to sync the positions of the actuators, you need actuators with position feedback. Some of my new videos use these 5 wire actuators. You would still want 2 seperate motor controllers but you would use the position feedback from one actuator to control the other actuator.

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

    First I’d like to start off by saying I am a complete novice when it comes to this type of stuff. I’m wanting to put together a automatic chicken door opener. I have components from a lift chair which consist of a 24v dc linear actuator and power supply. I’m trying to figure out the best way to control this system and I’m wanting.

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

      It would be similar, but you would probably want a stronger motor controller. Good luck!

  • @user-tw1ti1tr3l
    @user-tw1ti1tr3l ปีที่แล้ว

    안녕하세요 혹시 아두이노 메가로 변경하면 핀 번호가 달라져야 하나요?

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

      Mega는 Uno와 동일한 핀을 가지고 있어야 하며 더 많은 핀이 있어야 합니다.

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

    Hello sir good day. I have a question instead of controlling the linear actuator using three buttons, how can I automatically move the linear actuator based on input data from SD card? I hope you can help me

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 หลายเดือนก่อน +1

      You would just do a read command to get the new position value, then set that to the current position as is done in some of my other actuator videos.

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

      can you please give the link to the video so I can refer to the video
      @@ScienceFunInnovations

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

    Hi sir , if want to make this linearmotor system to move automatically, how to do it?

    • @ScienceFunInnovations
      @ScienceFunInnovations  5 หลายเดือนก่อน

      I have some other videos on my channel that do that. Check them out.

  • @mirulzzz99
    @mirulzzz99 3 ปีที่แล้ว +2

    hi can u help me with the circuit and code if i added hc 06 bluetooth module

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

      You can send more details to my business email sciencefunbiz@gmail.com and I can see what I can do to help. Thanks for watching!

    • @nurjamahashiabdulle1711
      @nurjamahashiabdulle1711 3 ปีที่แล้ว

      @@ScienceFunInnovations How can i control linear actuator without using these 1x3 membrane switches?

  • @user-sy5bp3mv3w
    @user-sy5bp3mv3w 4 ปีที่แล้ว +1

    What is the name of the remote control with 3 buttons?
    Could you tell me the name or purchase link of that part?

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 ปีที่แล้ว

      It is called a 1X3 Membrane Switch. Here is a link ebay.to/2RXWxUk

    • @user-sy5bp3mv3w
      @user-sy5bp3mv3w 4 ปีที่แล้ว

      @@ScienceFunInnovations thank you very much

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

    Can a raspberry pi be used instead of the arduino?

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

      Yes. The pi can do digital inputs and outputs, but at 3.3V instead of 5V. Most motor controllers will work with the lower voltage.

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

    Is there any way of doing this without a motor driver

  • @moathnaji2763
    @moathnaji2763 4 ปีที่แล้ว

    Hi …I want to control a dc motor making it rotate 10 times forward then pause for 3 seconds and rotate 10 times backward…. this rotation cycle back and forth will be repeated automatically 20 times exactly like the washing machine. What I need to do that?

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

      You could do that with a stepper motor th-cam.com/video/aKxi7B4-d2U/w-d-xo.html or else you would need a motor with position feedback such as an encoder.

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 ปีที่แล้ว

      Also you could use an easydriver th-cam.com/video/nafoHAhz8Ys/w-d-xo.html

  • @kanhuprasadmaharana6409
    @kanhuprasadmaharana6409 3 ปีที่แล้ว +2

    Where I got this button, please give the link

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

    Hmm, this basic simply code in arduino and drive have same function as only 2-pole switch with blind position in middle.... :)

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      Pretty much, but you can also change the speed with this setup. Thanks for watching.

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

    How do we contact you with out going to facebook? Looking to see if you would be willing to support the design for a controls system that is too long to describe here? Thanks In Advance Todd

    • @ScienceFunInnovations
      @ScienceFunInnovations  4 ปีที่แล้ว

      I just added an email address in the "About" section on my TH-cam channel. If nothing else, I could read about your idea and possibly give some suggestions.

  • @sammoore9689
    @sammoore9689 3 ปีที่แล้ว

    Did u upload your code anywhere?

  • @daffaarfnd463
    @daffaarfnd463 3 ปีที่แล้ว

    hai, how to make it move automaticly? like every 3 second actuator will change direction. i need for science project, sorry for bad english hahah

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      You could set it up in a 3 second loop that alternates between extend and retract mode. Start by deleting the code related to the buttons and just use the extend and retract commands. Good luck.

  • @MattG101680
    @MattG101680 3 ปีที่แล้ว

    What is the benefit of using this board over a relay board?

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      With this board, you can adjust the speed. With a relay it is either full on or full off.

    • @MattG101680
      @MattG101680 3 ปีที่แล้ว

      @@ScienceFunInnovations, thank you, that is great info. I have a project, that I am trying to figure out, and new to Arduino. Researching all the parts to see what is best. Im basically making power windows with auto up and down when you hit the switch. I just dont have it figured out yet, then I want to update the switch to a GPS module so the motor would run one way at a certain speed and the other at a certain speed. Its for a retractable rear spoiler on a car.

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว

      @@MattG101680 The are GPS modules compatible with Arduino. You would probably need to convert the speed text string from the GPS into a number on the Arduino and then just run a simple if statement. You also may want to add a time condition so that it doesn't keep going up and down if you are cruising right at the trigger speed. Good luck!

    • @MattG101680
      @MattG101680 3 ปีที่แล้ว

      @@ScienceFunInnovations, thats kind of what I was thinking, I thought id make it go down at 25 and up at 30. I have the GPS module on order, I thought maybe getting it set up by switch first is smart and then switch it to the GPS as the switch

  • @MuhammadAwais-jh2dy
    @MuhammadAwais-jh2dy ปีที่แล้ว

    Sir why you use that white board?

  • @williamfrench1277
    @williamfrench1277 3 ปีที่แล้ว +3

    I was wondering if the code was available to download?

    • @ScienceFunInnovations
      @ScienceFunInnovations  3 ปีที่แล้ว +2

      Here it is:
      const int Retract_button = 2;
      const int Extend_button = 3;
      const int Stop_button = 4;
      const int Extend = 10; //Connect to L298N Pin In1
      const int Retract = 9; //Connect to L298N Pin In2
      void setup() {
      pinMode(Retract_button, INPUT);
      pinMode(Extend_button, INPUT);
      pinMode(Stop_button, INPUT);
      pinMode(Extend, OUTPUT);
      pinMode(Retract, OUTPUT);
      digitalWrite(Extend, LOW);
      digitalWrite(Retract, LOW);
      }
      void loop() {
      if(digitalRead(Retract_button)==LOW) {
      digitalWrite(Retract, HIGH);
      digitalWrite(Extend, LOW);
      }
      if(digitalRead(Extend_button)==LOW) {
      digitalWrite(Retract, LOW);
      digitalWrite(Extend, HIGH);
      }
      if(digitalRead(Stop_button)==LOW) {
      digitalWrite(Retract, LOW);
      digitalWrite(Extend, LOW);
      }
      delay(250);
      }

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

      @@ScienceFunInnovations thanks 4 beautiful code with beautiful project 😍😍😍

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

    Thanks but it would be nice if you put the code on github and put a link in the description or us

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

      I don't have that code anymore, but from now on I will be posting much of my codes.

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

      @@ScienceFunInnovations thanks. And thanks for the video. I got my first linear actuator working thanks to you

  • @alicehenderson5445
    @alicehenderson5445 3 ปีที่แล้ว

    Code isn't working