# Motor speed and count control

**URL:** <https://forum.arduino.cc/t/motor-speed-and-count-control/1029380>\
**Category:** General Guidance\
**Created:** [September 7, 2022, 1:50am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380 "2022-09-07T01:50:55Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcoyang](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@marcoyang](https://forum.arduino.cc/u/marcoyang)\
**Post date:** [September 7, 2022, 1:50am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/1 "2022-09-07T01:50:56Z")

</div>

Hi Friends,  
This is my first project with the Aurdino.  
I ready to make a device, it has ability to control the speed like unit as "RPM" and count.  
Would you can give me some suggests about motor selection and function code?

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [September 7, 2022, 2:13am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/2 "2022-09-07T02:13:04Z")

</div>

First you need to choose a motor that will provide the torque and speed that you require. Then a motor driver and power supply. Engineer the hardware then think about software.

No Arduino can directly drive a motor so a driver is required. If the motor needs to rotate in only one direction (ie. a pump) a simple MOSFET driver would suffice. Choose the MOSFET based on motor supply voltage and stall current.

If the motor needs to be reversible, an H-bridge driver will be required. Again, the driver must be chosen to handle the motor rated voltage and stall current.

The stall current can be several times the running current. The stall current will be drawn, briefly, every time that the motor is started. The stall current should be listed in the motor data sheet.

Now that you have a motor and driver you will need a power supply. No Arduino is a power supply so an external supply is required for the motor(s). It must provide the required voltage and handle the motor stall current gracefully.

Once you have that, it is time to go to Google to find pages on using your motor driver, controlling a motor with Arduino, measuring and controlling RPM with an Arduino and so on.

If you get stuck with any of those steps, post your questions and we will try to help.

[**Please** read the forum guidelines](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966).

---

<div class="post-metadata">

**Author:** ![marcoyang](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@marcoyang](https://forum.arduino.cc/u/marcoyang)\
**Post date:** [September 7, 2022, 2:48am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/3 "2022-09-07T02:48:25Z")

</div>

Thanks a lot your reply.  
Could you give me a direction about what kinds motor can meet my request?  
Is servo or stepper motor? As you known them have different drive code by the Arduino.

---

<div class="post-metadata">

**Author:** ![marcoyang](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@marcoyang](https://forum.arduino.cc/u/marcoyang)\
**Post date:** [September 7, 2022, 3:00am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/4 "2022-09-07T03:00:09Z")

</div>

Sorry, please let me supplement a request.  
The rotation speed scope need from 0~600 rpm.

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [September 7, 2022, 3:13am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/5 "2022-09-07T03:13:15Z")

</div>

What is the motor used for? A detailed description of the end use would help to recommend a choice.

Servo motors are used for positioning. They do not usually rotate more that 180 to 270 degrees. Steppers are great for precise positioning but have their own unique problems with use. They need some way to home (establish a reference point) before use. They are limited in speed and torque though. DC gear motors can be equipped with encoders to do pretty precise positioning and can generate high speeds and torque. An encoder is required if precise speed control is desired.

Do you require precise positioning with the motor?

How much torque must the motor generate?

What power source is available for the motor?

These kinds of questions need answers before an intelligent choice of motors.

---

<div class="post-metadata">

**Author:** ![marcoyang](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@marcoyang](https://forum.arduino.cc/u/marcoyang)\
**Post date:** [September 7, 2022, 4:14am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/6 "2022-09-07T04:14:25Z")

</div>

Thank you sir, you have inspired my interest, again.

Do you require precise positioning with the motor? yes, I need have a precise position control.

How much torque must the motor generate? a least 5 N-m.

What power source is available for the motor? I can add a power supply for it.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [September 7, 2022, 4:58am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/7 "2022-09-07T04:58:57Z")

</div>

> [@marcoyang](#):
>
> Do you require precise positioning with the motor? yes, I need have a precise position control.

How many locations does the motor need to stop while making a 360 degree rotation? Will the locations always be in the same place?

---

<div class="post-metadata">

**Author:** ![marcoyang](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@marcoyang](https://forum.arduino.cc/u/marcoyang)\
**Post date:** [September 7, 2022, 5:34am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/8 "2022-09-07T05:34:50Z")

</div>

Sir,  
I hope can setting its start point at 0 120 & 240, total 3 points.

---

<div class="post-metadata">

**Author:** ![alinajoseph](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@alinajoseph](https://forum.arduino.cc/u/alinajoseph)\
**Post date:** [September 7, 2022, 7:06am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/9 "2022-09-07T07:06:15Z")

</div>

nice idea! May u have succeed..

---

<div class="post-metadata">

**Author:** ![marcoyang](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@marcoyang](https://forum.arduino.cc/u/marcoyang)\
**Post date:** [September 7, 2022, 7:57am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/10 "2022-09-07T07:57:33Z")

</div>

Well, thanks a lot.

---

<div class="post-metadata">

**Author:** ![lastchancename](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lastchancename/32/215426_2.png) [@lastchancename](https://forum.arduino.cc/u/lastchancename)\
**Post date:** [September 7, 2022, 8:23am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/11 "2022-09-07T08:23:48Z")

</div>

As noted earlier, we need to know quite a bit more about the application.

Speed, torque, power sources etc.

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [September 7, 2022, 9:22am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/12 "2022-09-07T09:22:46Z")

</div>

Hi,  
What is the application, what are you spinning at 600rpm and want to stop in one of three different positions?

Is it an ram or turntable?  
How did you arrive at the 5 N-m figure?

> [@How to get the best out of this forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966):
>
> See also [FAQ - Arduino Forum](https://forum.arduino.cc/faq) for general rules on forum behaviour and etiquette. Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…

Thanks.. Tom... 😃 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 6, 2023, 9:23am UTC](https://forum.arduino.cc/t/motor-speed-and-count-control/1029380/13 "2023-03-06T09:23:03Z")

</div>

Closed on March 6, 2023, 9:23am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
