🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    pneumatic seeder

    Scheduled Pinned Locked Moved PROJECTS
    4 Posts 2 Posters 10.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fameuhly
      last edited by

      Hi,
      i've just discovered M5stack, great product !

      I am a farmer and I produce organic vegetables.
      I have a project of pneumatic seed drill with venturi effect.
      I know a little arduino but not at all micropython.
      I am a little lost, I would like to know where to start my project.
      I have to control stepper motors and a solenoid valve.

      I would like to start simply by programming a stepper motor to advance a conveyor belt.

      Any ideas to help me?
      thank you very much

      1 Reply Last reply Reply Quote 0
      • J Offline
        Julian
        last edited by

        There is an Arduino IDE stepper motor example listed on the M5stack site - I think it links to this forum. It is very simplistic, controlling a stepper to make a simple "clock" but it should be enough to get you started.

        1 Reply Last reply Reply Quote 0
        • F Offline
          fameuhly
          last edited by

          Hello, thank you Julian, i've tried this sample. It work fine.
          But is there a sample of this code with comments too really understand each part ?
          Is there some exemples with "fritzing" draw ?

          thank you.

          1 Reply Last reply Reply Quote 0
          • F Offline
            fameuhly
            last edited by

            Hello again,
            i've made a sketch on arduino ide to control a nema 17 stepper motor with the shield L298N

            here is the sketch :
            /*
            Controle de moteur pas à pas avec un L298N
            Le moteur est connecté sur les broches 2,3,4 et 5 de l'Arduino
            Le fil de masse (GND) est commun aux 2 platines.
            */

            #include <Stepper.h>

            const int NbPasParTour = 200; // Nombre de pas pour 360 degres
            Stepper Moteur1(NbPasParTour, 2, 3, 4, 5); // Initialise le moteur sur les broches 2 à 5

            void setup()
            {
            Moteur1.setSpeed(60); //Vitesse de rotation du moteur
            Serial.begin(9600); //Initialise le moniteur série
            }

            void loop()
            {
            Serial.println("Sens horaire"); //On fait 1 tour en sens horaire
            Moteur1.step(NbPasParTour);
            delay(1000); //Pause 1 seconde

            Serial.println("Sens anti-horaire"); //On fait 1 tour en sens anti-horaire
            Moteur1.step(-NbPasParTour);
            delay(1000); //Pause 1 seconde
            }

            It's work fine !

            But when i try on the m5, on the PIN 3, 1, 16, 17 with this sketch, the motor only vibrate :
            /*
            Controle de moteur pas à pas avec un L298N
            Le moteur est connecté sur les broches 3, 1, 16, 17 du m5
            Le fil de masse (GND) est commun aux 2 platines.
            */
            #include <M5Stack.h>
            #include <Stepper.h>

            const int NbPasParTour = 200; // Nombre de pas pour 360 degres

            Stepper Moteur1(NbPasParTour, 3, 1, 16, 17); // Initialise le moteur sur les broches

            void setup()
            {
            Moteur1.setSpeed(100); //Vitesse de rotation du moteur
            m5.begin();
            M5.Lcd.setBrightness(200);

            M5.Lcd.setTextColor(0xffff);
            M5.Lcd.setTextSize(3);
            M5.Lcd.setCursor(50, 20);
            M5.Lcd.print("M5 Seeder");
            }

            void loop()
            {
            M5.Lcd.setTextColor(0x7bef);
            M5.Lcd.setTextSize(2);
            M5.Lcd.setCursor(55, 60);
            M5.Lcd.print("Sens horaire");
            Moteur1.step(NbPasParTour*2);
            delay(1000); //Pause 1 seconde

            M5.Lcd.setTextColor(0x7bef);
            M5.Lcd.setTextSize(2);
            M5.Lcd.setCursor(55, 60);
            M5.Lcd.print("Sens anti-horaire");
            Moteur1.step(-NbPasParTour);
            delay(1000); //Pause 1 seconde

            m5.update();
            }

            Any idea ?
            thank you

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post