Code Monkey home page Code Monkey logo

Comments (11)

MrYsLab avatar MrYsLab commented on July 24, 2024

Stepper motors require a driver board. This is an example of an inexpensive motor and drive electronics.

This article explains how to connect it to an Arduino.

from pymata-express.

HotView avatar HotView commented on July 24, 2024

Stepper motors require a driver board. This is an example of an inexpensive motor and drive electronics.

This article explains how to connect it to an Arduino.

@MrYsLab
First of all, thank you for your detailed answers. I think I can learn more from you in the way of answering questions.

I know that to control the stepper motor, we need a pin to control the number of steps, a pin to control the direction, an enabled pin and GND. I don't know in this pins list, such as [8,9,10,11], which represents the direction, which represents the steps, which represents the enable, etc

from pymata-express.

MrYsLab avatar MrYsLab commented on July 24, 2024

The number of steps and direction is controlled by the software. Each of the 4 pins controls one of the motor coils and not direction. The pymata-express API method for stepper_write explains how to set the number of steps and the motor direction.

from pymata-express.

MrYsLab avatar MrYsLab commented on July 24, 2024

Here is an example of how to use the stepper motor functions.

There are examples of pymata-express features here.

from pymata-express.

HotView avatar HotView commented on July 24, 2024

@MrYsLab

I read the blog about your recommendation just now. The connection method is Arduino + Stepper Motor Driver + Stepper Motor, as shown in the picture.
image
image

I don’t quite understand what you mean by “ Each of the 4 pins controls one of the motor coils and not direction”.
You mean the arduino is directly connected to the stepper motor?

from pymata-express.

MrYsLab avatar MrYsLab commented on July 24, 2024

The stepper motor driver in firmata-express is based on the standard Arduino stepper library.

The article that I linked to in an earlier posting describes how to wire the ULN2003 motor driver board to the Arduino. I am not familiar with the driver board in your picture above, and I don't think it is supported by the Arduino stepper library, but uses a custom Arduino library. If you want to use that board, you will need to modify the firmata-express sketch to support it. This is a big job, but if you want to try and implement this, you can look at an article I wrote several years back on how to add the Arduino stepper library to firmata as a guide.

from pymata-express.

HotView avatar HotView commented on July 24, 2024

@MrYsLab

Hello, I communicated with you on github just now, but since I am studying in China, I can't access websites like Google and github on my network, so the network is blocked again.

At present, I need to use Python to control an Arduino so that it can control the stepper motor to take different steps according to different external signals. However, after the discussion just now, I found that the stepper function does not support the motor driver I want to use.

I would like to ask whether the pins in firmata-express can be controlled to generate PWM?If this is possible, I can use a pin to generate a PWM wave to control my motor driver.

from pymata-express.

MrYsLab avatar MrYsLab commented on July 24, 2024

Yes, it supports PWM. Here is a simple example.

from pymata-express.

MrYsLab avatar MrYsLab commented on July 24, 2024

I am closing this issue. If you have any additional questions you can post them here and I will see them.

from pymata-express.

panchalmanish2208 avatar panchalmanish2208 commented on July 24, 2024

how to connect or control 2 or 3 stepper motor using pymata ? Pls give some example for the same

from pymata-express.

MrYsLab avatar MrYsLab commented on July 24, 2024

@manish2208 Hi again. None of my Firmata sketches support more than 1 stepper motor. If you are looking for a source about wiring up stepper motors, please check the following links:
https://learn.sparkfun.com/tutorials/easy-driver-hook-up-guide
https://learn.adafruit.com/adafruit-motor-selection-guide

Unless your project requires the precision of a stepper motor, you may wish to consider using either DC motors or Servo motors. Firmata can easily support a multiple of each type.

from pymata-express.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.