Stepper motor locked to mains supply frequency

Discussion in 'General Electronics Chat' started by richard3194, Oct 25, 2011.

  1. richard3194

    Thread Starter Member

    Oct 18, 2011
    65
    2
    I'm making a strip chart recorder with a stepper mptor . Say you want a fair degree of accuracy regarding paper feed over a period of say a day or indeed several days.

    Is there a way, or a circuit, to lock the frequency received by the stepper motor to the stable and accurate ac mains?

    Seems the way to go to get good precision in the paper feed. Thanks.
     
  2. chrisw1990

    Active Member

    Oct 22, 2011
    543
    41
    theres no such thing as a stable and accurate mains..
     
  3. richard3194

    Thread Starter Member

    Oct 18, 2011
    65
    2
    Of course, if I make the frequency to the stepper variable I can establish (by trial and error) the frequency that produces the required precision of feed over a day or more.

    But, that frequency needs to be stable. I am wondering whether the frequency to the stepper ought to be locked to ac mains.
     
  4. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    don't know what your loading is, but those small synchronous motors that drive your humidifier drums are relativley cheap at a hardware store.
     
  5. richard3194

    Thread Starter Member

    Oct 18, 2011
    65
    2
    Hi.

    You know, I always assumed that ac mains was a good stable reference point, probably because I know synchronous motor clocks keep time accordimng to ac mains.

    But, you are right, it's not exceedingly stable.

    http://jorisvr.nl/gridfrequency.html

    I suppose then locking the stepper motor frequency may have no advantage.
     
  6. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    Use a crystal oscillator. That will give you quartz watch precision which is going to be plenty and assuming you are using a Microcontroller, the crystal setup is going to require less than a dollars worth of parts added to the Microcontroller circuit.

    You will also want to consider using a MicroSD Card interface data recorder instead of a strip chart. For the $5 of a MicroSD card with 2 GB you would need maybe a hundred dollars worth of paper rolls and the paper would add nothing to the accuracy or the usefulness of the data.

    The best use for a strip chart recorder would be as a movie prop. To be fair it is also good for legal substance purposes. Signed, dated, documented, and vaulted; they can be used as evidence to counter claims of falsified data. The SD card is still where I would look for the data.
     
  7. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    I would also prefer a crystal oscillator. But if you want to lock your motor to mains, you can extract the mains frequency by simple connecting a step-down transformer to it, pass the output through two resistors and then 2 antiparallel diodes, which you connect to the inputs of a single supply comparator. If you supply it with 5V you will a have (almost) 5V square wave at the output of the comparator, which you can use to synchronize your motor.
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    In the US, over a period > 1 day, the mains have been extremely accurate. Many stoves, microwaves and even alarm clocks keep time by using the mains frequency as the clock.

    However, it was announced recently (last spring or fall?) that they will no longer be holding US lines to the same accuracy (parts per million), and the frequency will be accurate in the parts per thousand region instead.

    Reason for the change was something to do with alternative energy connectivity, but it that doesn't fully make sense, other than the .gov doesn't have full control over alternative energy devices feeding the grid in order to perfrom frequency correction.
     
  9. chrisw1990

    Active Member

    Oct 22, 2011
    543
    41
    ahh well my apologies! iv just always been told - mains = not stable =]
     
  10. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    That is somewhat true in Europe and many other countries. The US has always had a thing about 60Hz line power being exactly 60Hz.
     
  11. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    My understanding was that the 60hz in the United States was accurate OVER TIME. Instantaneous accuracy was not quite that exact.

    Check out this site...... http://leapsecond.com/pages/mains/
     
  12. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    True, over the period of a day, the average is 60.00000 Hz

    Looking at a 60Hz timebase for something, you get from 60.005 to 59.995 Hz, which is still quite a bit closer than EU electricity grids.

    A crystal in an oven is the most accurate "hobbyist" level time source, a non-temp controlled crystal has more drift over time than the 60Hz mains do. It'd be cool if Cesium fountain clocks get down into the sub $200 range, though they'd still be a bit bulky to fit into a project.

    In the meantime, OXCO with PLL are the most stable you can get without breaking the bank.

    Alarm Clocks and clocks on stoves never drift more than a minute away from the correct time between changing between DST and standard time, which is good enough for most purposes.

    --ETA: I disagree with his "long period" measurement method of taking the measurement of 1 second every 10 minutes. It should be the sum of cycles over the 10 minute period divided by 600 for each data point. As is, the plot is simply showing second to second stability with the seconds sampled 10 minutes apart, which is far different than "stability over time".
     
  13. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    I did some messing about testing mains freq accuracy (in a rural area of Australia) and found the mains generally within 500 PPM (parts per million error) over any second, with some excursions (corrections?) up to 3000 PPM error for a few minutes.

    17 minutes logging mains freq, error shown in PPM;

    [​IMG]
    http://www.romanblack.com/onesec/High_Acc_Timing.htm

    I also describe on that page 3 algorithms that can be used to run a microcontroller loosely synced to the mains so it has the better short term stability of the micro, but maintains the long term "sync" to the mains frequency.

    Back on topic, I think you could run the stepper motor from a mains transfomer that reduces the mains voltage to a sinewave of lower voltage to run the stepper motor winding A. Then the stepper motor winding B could be coupled through a phase delaying capacitor to the same low voltage AC sine, in a "split-phase" or "capactor-split" style. Assuming a low shaft load on the motor that will probably work fine.
     
  14. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Don't forget RB's awesomely inexpensive $1 OCXO.
     
  15. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Yes, that is an AWESOME "hack", using that term in the most endearing way. We are exceedingly blessed by having THE_RB an active member of this forum!

    I really love some of his PIC projects, especially the 8 pin SMPS (waiting for the 3 phase version), and hope he publishes some more soon on his blog! (*ahem* *cough* HINT *cough*)
     
  16. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Aww shucks thanks guys. ;)

    It has been a while (months) since I added project content to my page, I've just been too busy for hobby stuff. It's tough finding half an hour for electronics forum reading! :(
     
Loading...