Control a Pump with Arduino (Lesson #15)

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

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

  • @radiamoon2395
    @radiamoon2395 ปีที่แล้ว +7

    thank you so much, i had a project two years before but failed to get a good result. but now i understand everything and where i failed thanks to your notes

  • @Jellyfishgift
    @Jellyfishgift 11 วันที่ผ่านมา

    We're using a 12 volt motor instead of a 6 volt one. Could you send me a link to a transistor that you would recommend and could you tell us which transistor you were using in the video? Thank you❤

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

    There is no need for a reverse diode to protect the circuite when the motor turns off?

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      In general it's a good idea to include one, in practice with an Arduino and small motors it seems that you can get away without one and not cause any damage.

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

      @@Science.Buddies Thank you, and thanks for pointing out this aspect in the other video which I saw later.

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

    nice vid i love your videos thanks for the information! is there any full vids of arduino 101? and can u make some tinker cad projects like not irl

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      You can see our full Arduino playlist here: th-cam.com/play/PLlBVuTSjOrclb0iCMSRpS_H1lSrlSVeEm.html. We do not currently have any videos on the Arduino 101, but many of the videos do use Tinkercad to demonstrate the circuit and code.

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

    Can we use a sensor instead of the button?
    The code should be changed then?
    Just for on and off

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +1

      Hi - how you would change the code and circuit depends on what type of sensor you want to use. We have several videos covering sensors in our Arduino tutorial playlist that you can check out.

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

    10:40 how does the pin 9 will gives the speed to mosfet and the mos gives it to the dc motor?

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

      Pin 9 is a PWM pin, which basically means it can transmit power at variable levels, rather than an I/O pin which just turns on and off.
      Their code takes the reading from the potentiometer, which transmits data in 10-bit, and converting it to 8-bit for the output range.
      So when the Arduino receives a signal from the potentiometer, it sends a corresponding 8-bit signal through the 9 pin which tells the MOSFET to turn on with a specific voltage corresponding to the value coming from the potentiometer.
      Logic
      Arduino reads an integer going into Analog Pin A0
      Potentiometer Sends a Speed integer value to A0 pin ranging from 0-1023, which gets translated into a range of 0-255.
      Pin 9 sends out Voltage corresponding to the value of the potentiometers current state (ex. 128 = ~2.5v, 255 = 5v) which the MOSFET opens the circuit to send out that voltage, which powers the pump.

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

    Hi. Thank you for your instructive content and videos. I am a beginner at this with zero programming skills. I am trying to set up a system to monitor garage for water leakage and if there is one to trigger a vacuum cleaner to collect standing water. I wired up an off the shelf sensor (the Watchdog Water Alarm) to trigger the vac through an IoT Relay, as soon as water is present. Now I am trying to add arduino to this to control the system more intelligently. Specifically, a vac needs to run for few seconds longer *after* water has been collected, and the sensor is off to allow water inside the hose to be fully absorbed into the vac instead of leaving back on the floor after the vac shuts off. What is the best way to code this in arduino? Any suggestions would be great. Thank you

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

    Hi! great video I just wanted to ask if a relay module could replace both the button and the transistor and if no what will the connection be like between the transistor and the relay

    • @Science.Buddies
      @Science.Buddies  10 หลายเดือนก่อน

      Hi - there are some details about using transistors vs relays that we can't really cover in a TH-cam comment, you would need to ask in a more dedicated electronics forum like Stackexchange or the official Arduino forums.

  • @Jellyfishgift
    @Jellyfishgift 21 วันที่ผ่านมา

    In the video what are the red and black alligator wires connected to?

    • @Science.Buddies
      @Science.Buddies  20 วันที่ผ่านมา

      They are connected to the pump on one end and to jumper wires that go to the breadboard on the other end.

    • @Jellyfishgift
      @Jellyfishgift 5 วันที่ผ่านมา

      @@Science.Buddies We're using a 12 volt motor instead of a 6 volt one. Could you send me a link to a transistor that you would recommend and could you tell us which transistor you were using in the video? Thank you❤

  • @McCapper
    @McCapper 27 วันที่ผ่านมา

    how do I code it so that it only transfers water for a couple seconds. I don't want a lot of water to come out. I just want it to pump water out for a few seconds and then stop.

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

    Hi! Thanks a lot for the video. Which NMOS model did you employed to drive the 6V peristatic pump? thanks

    • @Science.Buddies
      @Science.Buddies  5 หลายเดือนก่อน

      These or something similar: www.amazon.com/gp/product/B07CTF1JVD/

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

    Hi! Will it be okay to use a 2N2222A or a 2N4401 transistor? I couldn´t find the NMOS :(

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +2

      Hi - yes, you can use an npn BJT instead of a MOSFET, but the circuit is slightly different because 1) while the BJT's pins (base, collector, emitter) are roughly analogous in behavior to the MOSFET's pins (gate, drain, source), they may not be in the same physical order 1-2-3, so you need to check the datasheet for the pinout and 2) the BJT requires a resistor on the base pin.

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

    This seems interresting to one of my current projects.
    I do have a question.
    Is it easy to add another pump to run at the same time with one button press?
    I would like to add liquid to a container and remove the same amount of liquid at the same time from the same container.

    • @Science.Buddies
      @Science.Buddies  8 หลายเดือนก่อน

      Yes, that's very easy to do, but adding another pump will draw twice as much current and you might not be able to power it directly from the Arduino. Please see this video: th-cam.com/video/I7MrL5Q7zvY/w-d-xo.htmlsi=jFzYVQjESj3mYQEH

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

    Hey can i get a link to where i can get this 4 as battery case

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      If you search Amazon for "4xAA battery holder" there are many options.

  • @MrIPiterek
    @MrIPiterek 10 หลายเดือนก่อน +3

    why does my motor works for a few seconds and then stop and when i switch + and - it works again for a while

    • @Science.Buddies
      @Science.Buddies  10 หลายเดือนก่อน

      We can't say for sure without knowing more about your circuit and code. If you are a student doing a school science project you can ask for help in our Ask an Expert forums but you will need to provide more information: www.sciencebuddies.org/science-fair-projects/ask-an-expert-intro. If you are not a student doing a school project then you may be able to get help in the official Arduino forums: forum.arduino.cc/

    • @Asto-qg6hg
      @Asto-qg6hg 7 หลายเดือนก่อน

      hello having same issue did you end up finding a fix?

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

    Great tutorial, may I know where can I get the code of this tutorial?

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

    Great video

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

    hey man i wanna create a soda machine for a physics project where i wanna use a scanner in which when placed a cup with qr code attached to it the scanner will scan it and the electric pump will pour soda directly into the cup so can i use this pump for tht purpose

    • @Science.Buddies
      @Science.Buddies  2 หลายเดือนก่อน

      This pump will work to transfer liquids but please make sure any pump and tubing you purchase are labeled as "food grade" if you will be drinking the soda.

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

    Is a mosfet transistor necessary? Or can other types of transistor be used also? If so which ones?

    • @Science.Buddies
      @Science.Buddies  4 หลายเดือนก่อน

      You could use a BJT transistor instead - we don't have our own tutorial for that, but you can find them online.

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

      @@Science.Buddies may I know if I should use a npn or pnp transistor?

    • @Science.Buddies
      @Science.Buddies  4 หลายเดือนก่อน

      npn's are more common for this application

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

    what about a spray type pump? is it possible?

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

    What type of wire is needed for the battery

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

    Hey what mosfet should i buy so that i can use an arduino uno to power a motor rated 6v and has more than 1amp current

    • @Science.Buddies
      @Science.Buddies  5 หลายเดือนก่อน

      We typically use these or something similar: www.amazon.com/gp/product/B07CTF1JVD/

  • @lorainejoyplaida6888
    @lorainejoyplaida6888 11 หลายเดือนก่อน +1

    is it possible to set an amount of water to dispense? like only 2ml

    • @Chipsu
      @Chipsu 11 หลายเดือนก่อน +3

      For this you would need to have something like a flow sensor to calculate the liquid going through or just time it in a code but it can be inaccurate

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

      some pumps specifications say the ml that can go through per second, maybe you can calculate how long the pump should be on for using that spec

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

    Is there anyway to power both the arduino and the 12v pump using only a 12v 1a adapter

    • @Science.Buddies
      @Science.Buddies  7 หลายเดือนก่อน

      Short answer yes, but more than we can explain in a comment. See this page: docs.arduino.cc/learn/electronics/power-pins/

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

    Does the pump you select have to be specifically designed to be controlled with PWM?

    • @Science.Buddies
      @Science.Buddies  10 หลายเดือนก่อน +1

      All DC pumps and motors should work with PWM.

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

      @@Science.Buddies great thank you science buddies!

  • @scientistplayz.y.t2089
    @scientistplayz.y.t2089 11 หลายเดือนก่อน

    Can i use a 5v water pump and not use that transistor

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

    what would you do if the external power supply a doesn't have a positive/negative end such as a barrel connector

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      You can buy a barrel jack adapter like this: www.amazon.com/UltraPoE-Connector-Adapter-Secruity-Terminal/dp/B0BTHTBKL1/

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

      @@Science.Buddiesthank you for replying ! I meant that Im using a 12 V DC adapter that requires using a barrel jack connector . How would you wire the power supply if it doesn’t have a positive or negative wires?

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

      Would the wiring matter in that case ?

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      Hi - to clarify, you plug the barrel jack from the power supply into that adapter, then you connect jumper wires to the screw terminals of the adapter and plug those into your breadboard. Most power supplies are center-positive meaning the middle of the plug is positive and the outside is negative, which will correspond to the + and - labels on the screw terminals of the adapter.

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

    so tinkercard exists, i should have known before i bought my arduino smh, it feels great to have it on your hand tho not gonna lie

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

    Would the functionality be the same for an npn resistor?

    • @Science.Buddies
      @Science.Buddies  9 หลายเดือนก่อน

      The functionality is ultimately similar but the circuit is not identical. We don't have our own tutorial on npn transistors but you can find plenty online if you search.

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

    Thanks buddy

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

    hii quickly ask what is the blue thing in the middle that u push?

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +1

      That is a pushbutton with a blue plastic cap. We have a tutorial about buttons here: th-cam.com/video/yBgMJssXqHY/w-d-xo.htmlsi=xXAfag6-eIzCdEUH

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

      thank youuuuuu@@Science.Buddies

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

      hi i do have problem with the coding (first coding that just use mini push button and no battery), i try to do it on arduino ide software but i got error, may i know why@@Science.Buddies

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

      6:30 using transistor

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      Hi - unfortunately we can't help troubleshoot code in TH-cam comments, but if you post your code and a detailed question on the official Arduino forums someone may be able to help you.

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

    can i know what kind simulation did you used ?

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      The online simulator is Tinkercad Circuits (www.tinkercad.com)

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

    If you were to use this for a hydrophonic system where I want to make the pump activate every 4 hours for X amount of time how would I be able to integrate it to this circuit? Thanks :)

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +1

      Hi - there are multiple ways you can do this. We recommend looking into the Arduino delay() and millis() functions. There are also libraries like TaskScheduler: www.arduino.cc/reference/en/libraries/taskscheduler/

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

      Can we use a normal transistor

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

    What is the name of this simulation program ??

    • @Science.Buddies
      @Science.Buddies  7 หลายเดือนก่อน +1

      It's called Tinkercad and we have a tutorial about it here: th-cam.com/video/9RF_BZ1Cg4k/w-d-xo.htmlsi=VIB8ZTzJvKkUOohx

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

    I mean say the name of the transistor

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +1

      The type of transistor in this video is called an N-channel MOSFET. There are many different types, but here is an example: www.sparkfun.com/products/10213

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

    How to get that code?

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +1

      Unfortunately TH-cam doesn't like the formatting of Arduino code when we try to paste it into the video description and it gives an error message, but you can pause the video and transcribe the code instead of copy/pasting it.

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

    where is the script itself

    • @Science.Buddies
      @Science.Buddies  8 หลายเดือนก่อน

      TH-cam descriptions don't like Arduino code formatting so we couldn't paste it in - you will have to pause the video and transcribe the code (the program isn't very long).

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

      @@Science.Buddies oh OK thank you very much I will write it now because I want to try it thank you ❤️

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

    Im using a temp sensor, soil humidity sensor and a screen
    Using PN 2222A transistor
    Pin(1) source
    Pin(2) base
    Pin(3) drain
    I added 1k ohm resistor for the base pin for the transistor
    For the pump im using external source
    When my pump works my temp sensor and screen stops working even when the pump turn off they dont work back
    But the soil sensor is still working fine
    What could be the problem

    • @Science.Buddies
      @Science.Buddies  7 หลายเดือนก่อน

      Hi - if you are a K-12 student doing a science project, you can ask for help in the Ask an Expert forums on our website. We will need to see your code and pictures of your circuit to help you troubleshoot, we can't tell what's wrong just from a written description. If you are not a K-12 student, you may be able to get help on the official Arduino forums or other forums dedicated to electronics on sites like Reddit or Stackexchange.

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

    program not working

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

    pointless