Editing Arduino/Raspberry Pi based Dancing Clock

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
This is a rework of an earlier PIC based project, see:  [[PIC based Stepper Motor Dancing Analog Clock]]
 
This is a rework of an earlier PIC based project, see:  [[PIC based Stepper Motor Dancing Analog Clock]]
  
This is an article started by Russ Hensel, see ["http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" '''About My Articles'''] for a bit of info.  The page is just begun, the project is 90% complete, it is the last 10% that kills you.
+
This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" '''About My Articles''' for a bit of info.  The page is just begun, the project is 90% complete, it is the last 10% that kills you.
  
 
= next all copied from earlier article,  in process editing it =
 
= next all copied from earlier article,  in process editing it =
Line 131: Line 131:
  
 
==== Power Supply ====
 
==== Power Supply ====
 +
 +
This is a straight forward half wave rectifier with a linear regulator.  It is powered by a wall wart transformer rated at about 9 volts.  The unregulated voltage is over 9 volts ( 9 * ( 2 ^ 1/2 )) by simple theory.  This unregulated voltage is used directly by the steppers so choose you wall wart to match your stepper motors.  You should also size the filter caps based on the current that will be used by the motors.  A couple of volts of ripple is not a problem as long as you have enough overhead for the 5 volt regulator ( the PIC might run on less, let me know if you try it ).  An important part of the power supply is a 60 hz, roughly square wave.  It is clipped off from the AC input.  The 60 Hz power line tends to be very accurate over the long term, less so if you suffer power outages.  You could run the clock on batteries but the motors load down a battery pretty badly and you would need a different timing signal ( the original code has a subroutine for timing off the crystal ).
  
 
===== Power Supply =====
 
===== Power Supply =====
Line 156: Line 158:
  
 
==== Compiling ====
 
==== Compiling ====
 +
The zip file contains the entire source bootst project.  Unzip into a directory and open in source boost.  There are some additional notes at the top of the main source file.  Follow the instructions there, they will tell you about any compiler and/or linker options, and report on memory usage from a recent compile of mine.  The compile should run without error. 
 +
 +
If you do not wish to compile you can use the precompiled hex version also included in the zip archive.
  
 
=== Building the Clock ===
 
=== Building the Clock ===
Line 171: Line 176:
  
 
==== Without the Serial Interface ====
 
==== Without the Serial Interface ====
 +
 +
*Before plugging it in set the hands to 12 oclock and and 0 minutes ( if the hands are accessable, else skip this ).
 +
 +
*Plug in.  The hands should spin a bit and then stop. 
 +
 +
*The clock will be set to 12:00 and will immediately start running.  But the hands may not be initialized or adjusted to the correct zero positions.  To adjust them change the mode switch to Adj Hour Hand  and manipulate the up down switch untill the hour hand moves to 12:00 ( this does not change the internal time of the clock ), switch to Adj Minute Hand and adjust it to 0 minutes.
 +
 +
*Switch the clock back to run, the hands may move a bit, the time is very near 12:00 ( unless it took you a long time to adjust the hands ).
 +
 +
*Switch to set hour to set the correct hour.
 +
 +
*Switch to set minute to set the correct minute.
 +
 +
*Switch to run and enjoy.
  
 
==== With the Serial Interface ====
 
==== With the Serial Interface ====
Line 281: Line 300:
 
Email me [[russ_hensel]], or use the talk page for this topic.  All feedback is welcome.
 
Email me [[russ_hensel]], or use the talk page for this topic.  All feedback is welcome.
  
[[category:projects]][[category:Serial Communications]][[category:Microcontroller]] [[Category:Arduino/RaspberryPi]]  
+
[[category:projects]][[category:Serial Communications]][[category:Microcontroller]][[category:PIC]]
 
[[category: clock]]
 
[[category: clock]]

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)