Pages: [1]   Go Down
Author Topic: enabling stepper to turn once every 24 hr  (Read 312 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm new to arduino and was wondering if there is a simple sketch that will allow me to control my 200 step motor to complete one turn over a 24 hour period?
Logged

South East USA
Offline Offline
God Member
*****
Karma: 4
Posts: 636
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino itself does not have a good RTC ( real time clock), it would loose seconds, everyday.  (4-6 maybe). How accurate are you looking for?  If its for timekeeping, you may consider a RTC like the DS1307 for a few dollars that's easy to connect to the Arduino.  Or if you want real good accuracy something like the DS3234 only looses a few seconds a year.  If a few seconds a day isn't a big deal, then you can simply program the Arduino to watch the millis() and tick the stepper ahead every so often.
Are you wanting it to make the one revolution all at once, or spread out equally over 24 hours?
Logged

Offline Offline
Full Member
***
Karma: 5
Posts: 113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Following on from SouthernAtHeart, many RTCs have a square wave output, often down to 1 second. count off the number of ticks required to give the correct step interval. Call your step and go back to watching the clock.
Depending on what else you need to do, you may have to employ interrupts to allow you to do some useful work while watching the ticks.

Have fun smiley
Logged

For whom does the clock pulse? It pulses for you!

Pages: [1]   Go Up
Jump to: