2
\$\begingroup\$

I'm trying to make a kit for my students for online schooling next semester. On one of the modules, I want to teach them how to control a DC motor using a microcontroller and a 6V battery pack.

Normally, people use motor drivers to handle the high draw of current from the motor and to specify a signal to direct the motion of the motor (Clockwise vs Counter Clockwise vs no motion) from the microcontroller.

Since there are a lot of wires involved in powering the motor driver with the ESP32, I was looking for a simpler solution to power the DC motor.

My Goal is to simplify the motor to be similar to a standard MG90S servo motor where the 4 inputs to the motor are power (from the battery), ground, and two signal pins. Some solutions that I have thought of to achieve this with the DC motor have been:

  • Printing a PCB of the motor driver and soldering it onto the DC motor for my students, This would allow them to only have to connect 4 wires to the output of the PCB (would look similar to the image attached below).
  • Using a brushless motor which has a motor driver built into it. The problem of this is that it would require manual intervention (clicking a reset button) to get it working again after an overcurrent has been detected.

I would really appreciate it if anyone has any other suggestions on how to simplify this process or if anyone knows of a motor that already exists that is capable of doing this.

Thanks, Jason Easton

enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ (1) Your photo shows a geared DC motor with speed sensor. That is a bit difficult for newbies. (2) I would recommend the simplest and cheaper toy DC motors TT130 with cheapie plastic gears. (3) You photo shows a motor with delicate metal gears, which are expensive to fry. (4) For DC motors, the most popular driver for newbies is L298N. (5) MG90S servo is servo, different to DC toy motors, and is 4 times as difficult to play than TT130 motors. (5) ESP32 or ESP8266-12 is also difficult for newbies. Raspberry Pi is also difficult. M0 for now is also difficult. I would recommend Arduino. \$\endgroup\$
    – tlfong01
    Oct 11, 2020 at 6:59
  • \$\begingroup\$ This is the TT130 motor: adafruit.com/product/3777. You can get it from eBay, Amazon, or AliExpress. \$\endgroup\$
    – tlfong01
    Oct 11, 2020 at 7:01
  • 3
    \$\begingroup\$ @tlfong01 please do not recommend the L298, it is an ancient, horribly lossy part. New projects should use FET bridges \$\endgroup\$ Oct 11, 2020 at 16:52

2 Answers 2

9
\$\begingroup\$

I suggest using a separate board for the controller. Why?

  1. It's only two more wires.

  2. Your students will learn the difference between a motor and controller.

  3. Easier to debug and repair.

  4. Motor can have longer wires without worrying about ground loops etc.

  5. Possibility of using a different motor, or some other device.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ I agree with all you 5 points. \$\endgroup\$
    – tlfong01
    Oct 11, 2020 at 6:49
  • 2
    \$\begingroup\$ By all means mount the controller board TO the motor if you can, pre-wired, to make life simpler for class, but still maintain the above advantages. \$\endgroup\$
    – user16324
    Oct 11, 2020 at 12:04
5
\$\begingroup\$

Polulu sales blurb:

Continuous rotation servos are standard hobby RC servos that have been modified to offer open-loop speed control instead of their usual closed-loop position control. The modification effectively turns them into motors with integrated motor drivers in a compact, inexpensive package. Just throw on a wheel and you have a drive system for your robot that can be controlled using an RC signal or a simple direct connection to a single microcontroller I/O line.

They are not the only vendor with similar products.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Continuous rotation servos tend to suffer from neutral point drift, which makes them hard to precisely stop. They're a bit of a hack, useful in a narrow way but not great in an educational sense where bringing out H-bridge control lines would be more informative. \$\endgroup\$ Oct 11, 2020 at 16:53
  • 1
    \$\begingroup\$ they are a lot of a hack, but they should stop moving if you shut off the PWM. \$\endgroup\$ Oct 12, 2020 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.