servo and dc motor projects

Raspberry Pi & Motor Control

Ask QuestionAsked todayActive todayViewed 14 times0

I am looking to use raspberry pi to control a motor that has multiple speeds but want all speed and timing to be controlled on the pi. Would the proper setup be a breadboard with a servo motor controller or what. I will be taking out a DC in box that has a dial to control motor functionality. What is best route to take? The motor is a basic in/out.pi-2dc-motorshareedit  follow  close 2flag asked 9 hours agoChristopher Lock1 New contributor

  • Unanswerable without knowing the type of motor. E.g. servo, stepper, standard DC? Could you link to an example of the motor you plan to use? – joan 8 hours ago
  • Hi @Christopher Lock, Welcome and nice to meet you. Now let me see. So you wish to control the start/stop times and speed of a motor? We hobbyists usually play with two kinds of motors: (1) DC motor which can be used to say, drive the wheels of a toy car, (2) Servo motor, which can be used, say drive the steering wheel of a toy car. / to continue, … – tlfong01 25 mins ago   
  • Now let us dig deeper. (1) DC motor usually turns continuously, and the speed is usually controlled by the PWM (Pulse Width Modulation), and to turn forward and backward, a “H-bridge” module such as “L298N” is used to (a) Start and stop, (b) Change direction Clockwise and Counter Clockwise, (3) Change speed (yes, using the Rpi’s PWM pin. / to continue, … – tlfong01 19 mins ago   
  • If you don’t have much experience messing around with DC motor or servo, I would recommend you to start with DC motor, and perhaps building a toy car, as suggested by the official Rpi project page: projects.raspberrypi.org/en/projects/build-a-buggy. / to continue, … – tlfong01 16 mins ago   
  • In case you found the above toy car project a bit too simple, you can DIY a much more complicated robot with DC motors (using L298N as described above), servos, ultrasonic senor, camera for object detection (Using professional OpenCV pattern recognition tricks) etc, with reference to the AdaFruit toy as described in the following Rpi SE Q&A: raspberrypi.stackexchange.com/questions/108873/…. Happy learning and DIY. Cheers. – tlfong01 11 mins ago    
  • By the way, of course you don’t need to start learning by building a toy car. You can just get a servo, say very popular TowerPro SG90, search keyword “PWM” in this forum to get ideas on how to set position of a servo. Or search keyword “L298N” to try how to start/stop/change direction of a DC motor. Cheers. – tlfong01 25 secs ago   Edit   

add a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.