Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Position control of a DC motor - arduino

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,979
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 16, 2010

Its back, new and improved! Using a printer I got at a garage sale this weekend, I made another servo out of a DC motor. I used the optical encoder from the printer and interrupts on the arduino for feedback of the position. A pot controls the position. A SN754410 drives the motor. I got help with the encoder/interrupt code from this website http://abigmagnet.blogspot.com/ from his post doing basically the same thing I just did. This thing isn't effect by the PID constants as much as the other servo I made.

I was planning on doing the same thing with the print head but accessing the encoder pins on that board is a little tricky.

Now I just have to make something useful out of it.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (Andrewinadoghat)

  • what do you call that circle transparent plastic?

  • @rhonmanalo I would call it an encoder code wheel.

see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • @momavalencia lol. Position is controlled by comparing the real position (sensor's feedback) versus desired position. In this case, sensor feedback is a quadrature encoder (the transparent plastic wheel), and the control is the potentiometer (or joystick) in the guy's hand. Who does all this? a microcontroller with running software on it. Yes you can also attach a pot to mechanism, acting as sensor (feedback). In fact RC servos work like that while desired input is PWM. Pro servos are brushless.

  • If you want more precision, you would put the encoder directly on the motor shaft.

  • Sir how do you control the position of the motor? How do you check the position error? Connecting a potentiometer to the shaft of the dc motor?

  • Sir how do you control the position of the motor? How do you check the position error? Connecting a potentiometer to the shaft of the dc motor?

  • I am looking to do something very similar with a dc motor with an encoder attached. Can you please share the code with me so I can get started. I will be controlling it with a pot as you did also. I ant find any code in the link you posted. I would appreciate any help at all.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more