Dc motor conttant speed

Hello
I have to drive the DC motor at a constant speed for a clock project. Example 1 rpm or 5 rpm. With motor gearbox. I will also use the encoder for this project. Can you help me with the circuit and code? Thank you from now.

You will need a source of precision time if you want your clock to be precise. A DS3231 RTC module might be a good choice.

You mention "the encoder" without specifying what encoder you are using. Since you clock only moves in one direction you only need an interruptor (slotted disk) and not a quadrature (bidirectional) shaft encoder.

I would measure the amount of motion and periodically (every minute?) and adjust the PWM output driving the DC motor. For extra precision you could use Timer1 to generate 16-bit PWM.

johnwasser:
You will need a source of precision time if you want your clock to be precise. A DS3231 RTC module might be a good choice.

You mention "the encoder" without specifying what encoder you are using. Since you clock only moves in one direction you only need an interruptor (slotted disk) and not a quadrature (bidirectional) shaft encoder.

I would measure the amount of motion and periodically (every minute?) and adjust the PWM output driving the DC motor. For extra precision you could use Timer1 to generate 16-bit PWM.

Thank you for your reply.

I wanted to get the clock on this clock.

A small stepper motor may be a good solution here. No need for encoder and feedback loop.

wvmarle:
A small stepper motor may be a good solution here. No need for encoder and feedback loop.

Thank you for the answer. The stepper motor is too vibrating. I think of other options.

You can get small car instrument steppers , inc one that is a double with co axial spindles - could be a good option and easier

You might consider a geared-down AC synchronous motor. They are synchronized to the AC line frequency (50 or 60 Hz depending on where you live) and they are very accurate. The power line frequency in most countries is super-accurate and they "correct it", so if the power line frequency is a little fast for a short period of time, they'll slow it down to correct electric clocks. Clocks that run from the AC line frequency are usually perfect for years... until there is no power outage.

hammy:
You can get small car instrument steppers , inc one that is a double with co axial spindles - could be a good option and easier

Thank you for your answer.I'll think.

DVDdoug:
You might consider a geared-down AC synchronous motor. They are synchronized to the AC line frequency (50 or 60 Hz depending on where you live) and they are very accurate. The power line frequency in most countries is super-accurate and they "correct it", so if the power line frequency is a little fast for a short period of time, they'll slow it down to correct electric clocks. Clocks that run from the AC line frequency are usually perfect for years... until there is no power outage.

Very logical idea. But very difficult to find ac motors in Turkey.

sinan:
Very logical idea. But very difficult to find ac motors in Turkey.

No one has electric clocks in Turkey?

Paul

Paul_KD7HB:
No one has electric clocks in Turkey?

When was the last time you saw an AC-powered electro-mechanical clock for sale? The AC clocks I see for sale are all digital and the electro-mechanical clocks I see for sale are all battery powered quartz movements. Of course your area may differ from mine (Eastern Massachusetts, USA).

I always look to thrift stores and garage sales for stuff for my projects!

Paul