ATMega8 DC motor control using pot

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

This is my first post. :)

I'm working on project DC Motor Control using potentiometer (Reverse, Forward, Stop using one pot)
(Microcontroller ATMega8)

I have successfully build the project on this link and its working fine: http://docs.google.com/Doc?id=ddmkwx3z_16gg6kmdhp

I want Start, Stop and Reverse using one potentiometer.

Can any one guide me what changes needed in above code to control motor using one potentiometer?

Thanks,
Nilesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nvaghasana wrote:
Hi All,

This is my first post. :)

And you have made it in the wrong forum Nilesh. This area is for discussing projects that have been completed. You are just starting, so post your questions in the correct area please.

Cliff or Nard, could you move this please?

nvaghasana wrote:
I'm working on project DC Motor Control using potentiometer (Reverse, Forward, Stop using one pot) (Microcontroller ATMega8).

Can any one guide me what changes needed in above code to control motor using one potentiometer?

Thanks,
Nilesh

So what are your initial thoughts? A potentiometer will give you a near infinite range of voltages between full scale and least. How should these be measured? You have 3 regions of operation ... speed in one direction, a stop region ans speed in the other direction. How do these relate to your range of potentiometer settings?

Back to you.

By the way ... we will not do your homework for you ... but will help by suggesting ideas for YOU to consider.

Cheers,

Ross

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
So what are your initial thoughts? A potentiometer will give you a near infinite range of voltages between full scale and least. How should these be measured? You have 3 regions of operation ... speed in one direction, a stop region ans speed in the other direction. How do these relate to your range of potentiometer settings?

Hello Ross,

Sorry for the wrong post.

As per my thought, potentiometer middle some portion for stop operation, if we move pot to right direction it should go forward and left related to middle it should go reverse, potentiometer is analog signal so is it possible to using ADC? if yes any examples?

Regards,
Nilesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, a pot will give you a reading of 0-1023. You can think of this as +-511 about a center value of 512. If you are using 8 bit timers for the pwm, you will need to think of some mathematical way to convert the pot values of 0-511 to a pwm value of 0-255.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Yes, a pot will give you a reading of 0-1023. You can think of this as +-511 about a center value of 512. If you are using 8 bit timers for the pwm, you will need to think of some mathematical way to convert the pot values of 0-511 to a pwm value of 0-255.

Hello Bob,

Thanks for info. It will surely help me in my project.

I also found one good tutorial here: https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=56429

- Nilesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hey hello to every Freak!!!
well this is my first ..dunno whether it will be..as i am very new to this so dunno were to do what..but will gradually learn.Well, i have problem regarding the dc motor control. Problem: Motor rotates well only in one direction and very very slow in other direction. Plz kindly help me out..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Acceleratron wrote:
hey hello to every Freak!!!
well this is my first ..dunno whether it will be..as i am very new to this so dunno were to do what..but will gradually learn.Well, i have problem regarding the dc motor control. Problem: Motor rotates well only in one direction and very very slow in other direction. Plz kindly help me out..

You need to double check line 42 in your program. It's clearly wrong! As is hijacking somebody else's thread. Start your own ;)

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!