Shop OBEX P1 Docs P2 Docs Learn Events
Very Low Frequency Sine — Parallax Forums

Very Low Frequency Sine

ArchiverArchiver Posts: 46,084
edited 2003-06-16 18:39 in General Discussion
I would appreciate any ideas as to how to generate a very low frequency sine
wave with a period of 3-5 minutes (or more) using a BS2.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 19:11
    With a DtoA converter, combined with an accurate
    RTC chip (DS1302 springs to mind) you can output
    varying voltages like this. The problem is to
    'smooth' the output.

    The BS2 can step from 0 to 255 and back in some
    time period. The DtoA will convert the 0 to 255
    into some stepped version of 0 to +5 volts.
    It will look 'mostly' like a sign wave, will
    actually be 255 'steps' between 0 and 5 volts.

    You can add low-pass filtering to reduce the
    'stepiness' of the output -- but at that low
    a frequency, it could be difficult.

    See the Parallax "Analog and Digital Course"
    for more info.

    Plus, why do you want to do this? The only
    use I know of is a slow ramp needed for a
    sound effect.

    --- In basicstamps@yahoogroups.com, "eigenbraket" <mod@e...> wrote:
    > I would appreciate any ideas as to how to generate a very low
    frequency sine
    > wave with a period of 3-5 minutes (or more) using a BS2.
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 19:11
    At 05:59 PM 6/12/03 +0000, you wrote:
    >I would appreciate any ideas as to how to generate a very low frequency sine
    >wave with a period of 3-5 minutes (or more) using a BS2.

    What about connecting the Digital I/O's directly to an R2R (DAC) and then to
    a Op-Amp configured as a voltage follower. Then it's just a matter of setting
    the I/O pins to correspond to the correct analog level via a SIN/COS function,
    or a pre-calculated lookup table.
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 19:43
    Thank you Beau and Allan for your ideas. I think you're saying the same
    things--exactly what I was thinking. I've given up on analog techniques.
    Allan, to answer your question Why?--let's just say for the sake of ART.
    Allan, you're right, the problem here is to smooth the output. The
    "fundamental" being so low makes the partials low and very difficult to filter
    with a low pass. I've done some research on low pass filters and the lowest
    cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    activity). How to smooth the output of the DAC?!!!!
    Matthew
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 20:02
    For such a low frequency, I would consider using a stepper motor through a
    gear-train driving a potentiometer. A "pot" has essentially infinite
    resolution, and a gear train could convert a stepper running perhaps 60 RPM
    down to the .01 Hz or so you need. Essentially, the gear train would
    multiply the resolution of the stepper by its own ratio. Then just buffer to
    suit.

    Mike Sokol
    mikes@m...
    www.ModernRecording.com


    "Yes, we're mum and dad - and good and bad -
    and everyone's happy to be here.
    Genesis-

    Original Message
    From: "eigenbraket" <mod@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, June 12, 2003 2:43 PM
    Subject: [noparse][[/noparse]basicstamps] Very Low Frequency Sine


    > Thank you Beau and Allan for your ideas. I think you're saying the same
    > things--exactly what I was thinking. I've given up on analog techniques.
    > Allan, to answer your question Why?--let's just say for the sake of ART.
    > Allan, you're right, the problem here is to smooth the output. The
    > "fundamental" being so low makes the partials low and very difficult to
    filter
    > with a low pass. I've done some research on low pass filters and the
    lowest
    > cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    > activity). How to smooth the output of the DAC?!!!!
    > Matthew
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 20:12
    Thanks Mike for the suggestion. Your "mechanical" solution hadn't occurred
    to me.
    Matthew


    --- In basicstamps@yahoogroups.com, "Mike Sokol" <mikes@m...> wrote:
    > For such a low frequency, I would consider using a stepper motor through a
    > gear-train driving a potentiometer. A "pot" has essentially infinite
    > resolution, and a gear train could convert a stepper running perhaps 60
    RPM
    > down to the .01 Hz or so you need. Essentially, the gear train would
    > multiply the resolution of the stepper by its own ratio. Then just buffer to
    > suit.
    >
    > Mike Sokol
    > mikes@m...
    > www.ModernRecording.com
    >
    >
    > "Yes, we're mum and dad - and good and bad -
    > and everyone's happy to be here.
    > Genesis-
    >
    >
    Original Message
    > To: <basicstamps@yahoogroups.com>
    > Sent: Thursday, June 12, 2003 2:43 PM
    > Subject: [noparse][[/noparse]basicstamps] Very Low Frequency Sine
    >
    >
    > > Thank you Beau and Allan for your ideas. I think you're saying the same
    > > things--exactly what I was thinking. I've given up on analog techniques.
    > > Allan, to answer your question Why?--let's just say for the sake of ART.
    > > Allan, you're right, the problem here is to smooth the output. The
    > > "fundamental" being so low makes the partials low and very difficult to
    > filter
    > > with a low pass. I've done some research on low pass filters and the
    > lowest
    > > cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    > > activity). How to smooth the output of the DAC?!!!!
    > > Matthew
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 20:17
    >Thank you Beau and Allan for your ideas. I think you're saying the same
    >things--exactly what I was thinking. I've given up on analog techniques.
    >Allan, to answer your question Why?--let's just say for the sake of ART.
    >Allan, you're right, the problem here is to smooth the output. The
    >"fundamental" being so low makes the partials low and very difficult to filter
    >with a low pass. I've done some research on low pass filters and the lowest
    >cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    >activity). How to smooth the output of the DAC?!!!!
    >Matthew


    Start with a 16 bit D/A, then it will not need filtering that anyone
    would notice. One bit at that level is like the thickness of one
    sheet of paper in a stack 22 feet high. Or 12 bits, like one sheet
    in a stack of 8 reams.

    The TI TLV5618A is a dual 12-bit DAC in an 8-pin package, using
    SHIFTOUT interface on the Stamp.

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 21:16
    You can do low pass filtering down to dc with an op-amp low pass filter
    (INTEGRATOR) so I don't know where you got the .01hz idea. First of all,
    why do you need this great precision? The step distortion is relatively
    insignificant at this frequency. A simple roll off filter will smooth the
    edges of the steps from the dac and if this is not good enough, generate the
    sine wave with analog circuitry that you could even phase lock to a high
    frequency crystal time base for stability if frequency control is so
    important.

    Jim
    http://www.geocities.com/jimforkin2003/


    Original Message
    From: eigenbraket [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=1kW_xUhmyqqlIgYgZEKw8tkembkM99mDlFGAUWjW-5ZTsnN3CSJun6HBAh3DAU632QuEMUjplQQ]mod@e...[/url
    Sent: Thursday, June 12, 2003 2:43 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Very Low Frequency Sine


    Thank you Beau and Allan for your ideas. I think you're saying the same
    things--exactly what I was thinking. I've given up on analog techniques.
    Allan, to answer your question Why?--let's just say for the sake of ART.
    Allan, you're right, the problem here is to smooth the output. The
    "fundamental" being so low makes the partials low and very difficult to
    filter
    with a low pass. I've done some research on low pass filters and the lowest
    cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    activity). How to smooth the output of the DAC?!!!!
    Matthew


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 21:35
    Thanks Jim for your comments. Could you direct me to some schematics of
    an op-amp low pass filter down to DC?

    As far as analog techniques I've tried using the sine output of a couple
    different function-generators-on-a-chip (XR2206 and 8038) without success.
    The sine became grossly distored below 0.01 Hz. I've tried a relaxation
    oscillator and that was stable but didn't produce a nice rounded sine, but
    more of a triangle. Are you refering to some kind of a Wien bridge? As far as
    stabilizing it with a PLL--this is beyond me right now. I do want a small range

    of frequency control (1min-5min).

    Matthew


    --- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
    > You can do low pass filtering down to dc with an op-amp low pass filter
    > (INTEGRATOR) so I don't know where you got the .01hz idea. First of all,
    > why do you need this great precision? The step distortion is relatively
    > insignificant at this frequency. A simple roll off filter will smooth the
    > edges of the steps from the dac and if this is not good enough, generate the
    > sine wave with analog circuitry that you could even phase lock to a high
    > frequency crystal time base for stability if frequency control is so
    > important.
    >
    > Jim
    > http://www.geocities.com/jimforkin2003/
    >
    >
    >
    Original Message
    > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > Sent: Thursday, June 12, 2003 2:43 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Very Low Frequency Sine
    >
    >
    > Thank you Beau and Allan for your ideas. I think you're saying the same
    > things--exactly what I was thinking. I've given up on analog techniques.
    > Allan, to answer your question Why?--let's just say for the sake of ART.
    > Allan, you're right, the problem here is to smooth the output. The
    > "fundamental" being so low makes the partials low and very difficult to
    > filter
    > with a low pass. I've done some research on low pass filters and the lowest
    > cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    > activity). How to smooth the output of the DAC?!!!!
    > Matthew
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 21:47
    If you get a DAC with enough bits, do you really need to smooth it?
    Define smooth...

    amg

    On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    writes:
    > Thank you Beau and Allan for your ideas. I think you're saying the
    > same
    > things--exactly what I was thinking. I've given up on analog
    > techniques.
    > Allan, to answer your question Why?--let's just say for the sake of
    > ART.
    > Allan, you're right, the problem here is to smooth the output. The
    >
    > "fundamental" being so low makes the partials low and very difficult
    > to filter
    > with a low pass. I've done some research on low pass filters and
    > the lowest
    > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > brainwave
    > activity). How to smooth the output of the DAC?!!!!
    > Matthew

    ________________________________________________________________
    The best thing to hit the internet in years - Juno SpeedBand!
    Surf the web up to FIVE TIMES FASTER!
    Only $14.95/ month - visit www.juno.com to sign up today!
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-12 22:03
    By "smooth" I mean imperceptible to the human eye.
    12 bits over a period of 3min would mean a transition every 4 hundredths of a
    second . . . uhm I guess that's pretty smooth!!

    PS. I'm still curious about the analog solution using a low pass filter as this

    was my first approach, but abandoned it.




    --- In basicstamps@yahoogroups.com, amg amg <controlsdude2000@j...>
    wrote:
    > If you get a DAC with enough bits, do you really need to smooth it?
    > Define smooth...
    >
    > amg
    >
    > On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    > writes:
    > > Thank you Beau and Allan for your ideas. I think you're saying the
    > > same
    > > things--exactly what I was thinking. I've given up on analog
    > > techniques.
    > > Allan, to answer your question Why?--let's just say for the sake of
    > > ART.
    > > Allan, you're right, the problem here is to smooth the output. The
    > >
    > > "fundamental" being so low makes the partials low and very difficult
    > > to filter
    > > with a low pass. I've done some research on low pass filters and
    > > the lowest
    > > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > > brainwave
    > > activity). How to smooth the output of the DAC?!!!!
    > > Matthew
    >
    >
    ____________________________________________________________
    ____
    > The best thing to hit the internet in years - Juno SpeedBand!
    > Surf the web up to FIVE TIMES FASTER!
    > Only $14.95/ month - visit www.juno.com to sign up today!
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-13 06:56
    The human eye generally moves in small jerks, called micro saccades, as
    occurs in reading words on a page or on a computer screen. Smooth eye
    movements can occur while tracking a moving target at moderately low
    frequencies, using an oculomotor brain system known as the smooth
    pursuit system. It will not accurately track movements of any system
    with a period of 3-5 minutes, but performs well at periods from about .1
    to 1 seconds. So you need a better criterion than "imperceptible to the
    human eye." Perception of motion is an even a higher-level problem
    which supercedes objectively recorded "smooth" eye movements. So
    perception of a transition of 4 hundredths of a second is not
    physiologically possible.

    I do research in human eye movements for fun and profit -- stamp related
    of course [noparse]:)[/noparse] .

    Dennis

    Original Message
    From: eigenbraket [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=1L_-ZysVlFjtDEqgUlanmrozcs1cYZbfbxTsMbWpHywBTXsEyb0YzlYhzqYG5CKCu7C7IgaH5j4]mod@e...[/url
    Sent: Thursday, June 12, 2003 2:03 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine


    By "smooth" I mean imperceptible to the human eye.
    12 bits over a period of 3min would mean a transition every 4 hundredths
    of a
    second . . . uhm I guess that's pretty smooth!!

    PS. I'm still curious about the analog solution using a low pass filter
    as this
    was my first approach, but abandoned it.




    --- In basicstamps@yahoogroups.com, amg amg <controlsdude2000@j...>
    wrote:
    > If you get a DAC with enough bits, do you really need to smooth it?
    > Define smooth...
    >
    > amg
    >
    > On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    > writes:
    > > Thank you Beau and Allan for your ideas. I think you're saying the
    > > same
    > > things--exactly what I was thinking. I've given up on analog
    > > techniques.
    > > Allan, to answer your question Why?--let's just say for the sake of
    > > ART.
    > > Allan, you're right, the problem here is to smooth the output. The
    > >
    > > "fundamental" being so low makes the partials low and very difficult
    > > to filter
    > > with a low pass. I've done some research on low pass filters and
    > > the lowest
    > > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > > brainwave
    > > activity). How to smooth the output of the DAC?!!!!
    > > Matthew
    >
    >
    ____________________________________________________________
    ____
    > The best thing to hit the internet in years - Juno SpeedBand! Surf the

    > web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com
    > to sign up today!


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-13 16:27
    If you run a triangle wave through a low pass filter, you get a sine wave.
    For circuits, look at any op-amp design text. Several were published by
    National Semiconductor over the years and may be available on the internet.
    Radio shack has some books on op amps and any college level electronics text
    will help. Sounds like a trip to the local library is in order.

    The American Radio Relay League has published several books which detail op
    amp design including filters.

    Here's an idea; use an op amp as an integrator with a slow response and
    change the offset using a low level digital signal.
    the output will track the input offset and will produce a sine wave.
    Linearity may be difficult to achieve to a great extent, but at these
    frequencies, you couldn't tell anyway.

    jim
    http://www.geocities.com/jimforkin2003/


    Original Message
    From: eigenbraket [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=b8AYLW0hzlqoGtSl10T25dL3hCsj1sPoyHE4Gq-4z0NbbxYB_GnGMU50WQomwng6Tjd-ppiozZZL5HNm]mod@e...[/url
    Sent: Thursday, June 12, 2003 4:36 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine


    Thanks Jim for your comments. Could you direct me to some schematics of
    an op-amp low pass filter down to DC?

    As far as analog techniques I've tried using the sine output of a couple
    different function-generators-on-a-chip (XR2206 and 8038) without success.
    The sine became grossly distored below 0.01 Hz. I've tried a relaxation
    oscillator and that was stable but didn't produce a nice rounded sine, but
    more of a triangle. Are you refering to some kind of a Wien bridge? As far
    as
    stabilizing it with a PLL--this is beyond me right now. I do want a small
    range
    of frequency control (1min-5min).

    Matthew


    --- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
    > You can do low pass filtering down to dc with an op-amp low pass filter
    > (INTEGRATOR) so I don't know where you got the .01hz idea. First of all,
    > why do you need this great precision? The step distortion is relatively
    > insignificant at this frequency. A simple roll off filter will smooth the
    > edges of the steps from the dac and if this is not good enough, generate
    the
    > sine wave with analog circuitry that you could even phase lock to a high
    > frequency crystal time base for stability if frequency control is so
    > important.
    >
    > Jim
    > http://www.geocities.com/jimforkin2003/
    >
    >
    >
    Original Message
    > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > Sent: Thursday, June 12, 2003 2:43 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Very Low Frequency Sine
    >
    >
    > Thank you Beau and Allan for your ideas. I think you're saying the same
    > things--exactly what I was thinking. I've given up on analog techniques.
    > Allan, to answer your question Why?--let's just say for the sake of ART.
    > Allan, you're right, the problem here is to smooth the output. The
    > "fundamental" being so low makes the partials low and very difficult to
    > filter
    > with a low pass. I've done some research on low pass filters and the
    lowest
    > cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    > activity). How to smooth the output of the DAC?!!!!
    > Matthew
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-13 18:54
    Good argument, but then his problem is how to
    get the stamp to move something that slowly.

    Moving it in little 'jerks' is what the stamp is
    going to do if you output a voltage change every
    so often -- unless each 'jerk' is smoothed into
    something slower than the criteria which
    you've laid you here.

    Personally, I can't directly watch the sweeping
    of a minute hand and see it move -- but I can
    observe it after a time and see it has moved.
    That is, unless it is a 'digital' minute hand,
    which steps from position to position. That
    I can see.

    --- In basicstamps@yahoogroups.com, Dennis O'Leary <doleary@e...>
    wrote:
    > The human eye generally moves in small jerks, called micro
    saccades, as
    > occurs in reading words on a page or on a computer screen. Smooth
    eye
    > movements can occur while tracking a moving target at moderately low
    > frequencies, using an oculomotor brain system known as the smooth
    > pursuit system. It will not accurately track movements of any
    system
    > with a period of 3-5 minutes, but performs well at periods from
    about .1
    > to 1 seconds. So you need a better criterion than "imperceptible
    to the
    > human eye." Perception of motion is an even a higher-level problem
    > which supercedes objectively recorded "smooth" eye movements. So
    > perception of a transition of 4 hundredths of a second is not
    > physiologically possible.
    >
    > I do research in human eye movements for fun and profit -- stamp
    related
    > of course [noparse]:)[/noparse] .
    >
    > Dennis
    >
    >
    Original Message
    > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > Sent: Thursday, June 12, 2003 2:03 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine
    >
    >
    > By "smooth" I mean imperceptible to the human eye.
    > 12 bits over a period of 3min would mean a transition every 4
    hundredths
    > of a
    > second . . . uhm I guess that's pretty smooth!!
    >
    > PS. I'm still curious about the analog solution using a low pass
    filter
    > as this
    > was my first approach, but abandoned it.
    >
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, amg amg <controlsdude2000@j...>
    > wrote:
    > > If you get a DAC with enough bits, do you really need to smooth
    it?
    > > Define smooth...
    > >
    > > amg
    > >
    > > On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    > > writes:
    > > > Thank you Beau and Allan for your ideas. I think you're saying
    the
    > > > same
    > > > things--exactly what I was thinking. I've given up on analog
    > > > techniques.
    > > > Allan, to answer your question Why?--let's just say for the
    sake of
    > > > ART.
    > > > Allan, you're right, the problem here is to smooth the output.
    The
    > > >
    > > > "fundamental" being so low makes the partials low and very
    difficult
    > > > to filter
    > > > with a low pass. I've done some research on low pass filters
    and
    > > > the lowest
    > > > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > > > brainwave
    > > > activity). How to smooth the output of the DAC?!!!!
    > > > Matthew
    > >
    > >
    > ____________________________________________________________
    > ____
    > > The best thing to hit the internet in years - Juno SpeedBand!
    Surf the
    >
    > > web up to FIVE TIMES FASTER! Only $14.95/ month - visit
    www.juno.com
    > > to sign up today!
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-13 20:18
    Perhaps I'm a little dense here... If you design around
    the idea that whatever bit-resolution you decide to go
    with, (be it an 8,10,12, or 16 bit DAC), and you ensure
    that no more than 1 LSB changes on a clock transition. Then
    shouldn't the only frequency that's required to be filtered
    out is the fundamental frequency of the clock driving the
    bits supplying the DAC?

    Here is a table I generated indicating the required number
    of steps between 0 and 360 deg with various bit-resolutions
    guaranteeing that only 1 LSB changes on each clock transition
    from a simple little QBASIC program that could be altered and
    used to build a lookup table database.

    res STEP (deg) steps/period
    8-Bit 0.233 1,545
    10-Bit 0.0568 6,338
    12-Bit 0.01407 25,586
    16-Bit 0.000875 411,428



    '
    'QBASIC program Start
    '
    CLS
    Bits = 16
    Pi = ATN(1) * 4
    N = 2 ^ Bits
    Count = 0
    FOR Deg = 0 TO 360 STEP .000875
    rad = (Deg / 180) * Pi
    OldX = X
    X = INT(SIN(rad) * N)
    IF (X - OldX) > 1 THEN
    PRINT Count, X, Deg
    END IF
    Count = Count + 1
    NEXT Deg
    PRINT "
    "
    PRINT Count, X, Deg
    '
    'QBASIC program End
    '


    3 min = 180 sec = 0.00555Hz
    5 min = 300 sec = 0.00333Hz

    ...So the fundamental frequency for a 3 min Period @ 16_bit
    resolution would be...
    (.00555 x 411,428) = 2,283 Hz

    ...for a 5 min Period @ 16_bit this works out to...
    (.00333 x 411,428) = 1,370 Hz

    2,283Hz is what would be "audible" or considered noise on the
    VLF output at 3Min and 1,370Hz at 5min

    If your time interval changes or is adjustable as has been
    indicated, then a simple LOW PASS filter set to at least twice
    the highest fundamental you would be operating at.

    -Beau Schwabe


    >Good argument, but then his problem is how to
    >get the stamp to move something that slowly.
    >
    >Moving it in little 'jerks' is what the stamp is
    >going to do if you output a voltage change every
    >so often -- unless each 'jerk' is smoothed into
    >something slower than the criteria which
    >you've laid you here.
    >
    >Personally, I can't directly watch the sweeping
    >of a minute hand and see it move -- but I can
    >observe it after a time and see it has moved.
    >That is, unless it is a 'digital' minute hand,
    >which steps from position to position. That
    >I can see.
    >
    >--- In basicstamps@yahoogroups.com, Dennis O'Leary <doleary@e...>
    >wrote:
    > > The human eye generally moves in small jerks, called micro
    >saccades, as
    > > occurs in reading words on a page or on a computer screen. Smooth
    >eye
    > > movements can occur while tracking a moving target at moderately low
    > > frequencies, using an oculomotor brain system known as the smooth
    > > pursuit system. It will not accurately track movements of any
    >system
    > > with a period of 3-5 minutes, but performs well at periods from
    >about .1
    > > to 1 seconds. So you need a better criterion than "imperceptible
    >to the
    > > human eye." Perception of motion is an even a higher-level problem
    > > which supercedes objectively recorded "smooth" eye movements. So
    > > perception of a transition of 4 hundredths of a second is not
    > > physiologically possible.
    > >
    > > I do research in human eye movements for fun and profit -- stamp
    >related
    > > of course [noparse]:)[/noparse] .
    > >
    > > Dennis
    > >
    > >
    Original Message
    > > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > > Sent: Thursday, June 12, 2003 2:03 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine
    > >
    > >
    > > By "smooth" I mean imperceptible to the human eye.
    > > 12 bits over a period of 3min would mean a transition every 4
    >hundredths
    > > of a
    > > second . . . uhm I guess that's pretty smooth!!
    > >
    > > PS. I'm still curious about the analog solution using a low pass
    >filter
    > > as this
    > > was my first approach, but abandoned it.
    > >
    > >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, amg amg <controlsdude2000@j...>
    > > wrote:
    > > > If you get a DAC with enough bits, do you really need to smooth
    >it?
    > > > Define smooth...
    > > >
    > > > amg
    > > >
    > > > On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    > > > writes:
    > > > > Thank you Beau and Allan for your ideas. I think you're saying
    >the
    > > > > same
    > > > > things--exactly what I was thinking. I've given up on analog
    > > > > techniques.
    > > > > Allan, to answer your question Why?--let's just say for the
    >sake of
    > > > > ART.
    > > > > Allan, you're right, the problem here is to smooth the output.
    >The
    > > > >
    > > > > "fundamental" being so low makes the partials low and very
    >difficult
    > > > > to filter
    > > > > with a low pass. I've done some research on low pass filters
    >and
    > > > > the lowest
    > > > > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > > > > brainwave
    > > > > activity). How to smooth the output of the DAC?!!!!
    > > > > Matthew
    > > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-13 22:26
    Jim,
    I poked around digikey's catalog and found some low pass filters in ic
    packages available for less than $20.
    5th order low pass from MAXIM (MAX281) "DC to 20kHz cutoff"
    8th order low pass Linear Tech (LTC1064-3)
    Matthew



    --- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
    > If you run a triangle wave through a low pass filter, you get a sine wave.
    > For circuits, look at any op-amp design text. Several were published by
    > National Semiconductor over the years and may be available on the
    internet.
    > Radio shack has some books on op amps and any college level electronics
    text
    > will help. Sounds like a trip to the local library is in order.
    >
    > The American Radio Relay League has published several books which
    detail op
    > amp design including filters.
    >
    > Here's an idea; use an op amp as an integrator with a slow response and
    > change the offset using a low level digital signal.
    > the output will track the input offset and will produce a sine wave.
    > Linearity may be difficult to achieve to a great extent, but at these
    > frequencies, you couldn't tell anyway.
    >
    > jim
    > http://www.geocities.com/jimforkin2003/
    >
    >
    >
    Original Message
    > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > Sent: Thursday, June 12, 2003 4:36 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine
    >
    >
    > Thanks Jim for your comments. Could you direct me to some schematics of
    > an op-amp low pass filter down to DC?
    >
    > As far as analog techniques I've tried using the sine output of a couple
    > different function-generators-on-a-chip (XR2206 and 8038) without
    success.
    > The sine became grossly distored below 0.01 Hz. I've tried a relaxation
    > oscillator and that was stable but didn't produce a nice rounded sine, but
    > more of a triangle. Are you refering to some kind of a Wien bridge? As far
    > as
    > stabilizing it with a PLL--this is beyond me right now. I do want a small
    > range
    > of frequency control (1min-5min).
    >
    > Matthew
    >
    >
    > --- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
    > > You can do low pass filtering down to dc with an op-amp low pass filter
    > > (INTEGRATOR) so I don't know where you got the .01hz idea. First of all,
    > > why do you need this great precision? The step distortion is relatively
    > > insignificant at this frequency. A simple roll off filter will smooth the
    > > edges of the steps from the dac and if this is not good enough, generate
    > the
    > > sine wave with analog circuitry that you could even phase lock to a high
    > > frequency crystal time base for stability if frequency control is so
    > > important.
    > >
    > > Jim
    > > http://www.geocities.com/jimforkin2003/
    > >
    > >
    > >
    Original Message
    > > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > > Sent: Thursday, June 12, 2003 2:43 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Very Low Frequency Sine
    > >
    > >
    > > Thank you Beau and Allan for your ideas. I think you're saying the same
    > > things--exactly what I was thinking. I've given up on analog techniques.
    > > Allan, to answer your question Why?--let's just say for the sake of ART.
    > > Allan, you're right, the problem here is to smooth the output. The
    > > "fundamental" being so low makes the partials low and very difficult to
    > > filter
    > > with a low pass. I've done some research on low pass filters and the
    > lowest
    > > cutoff frequency I've seen is around 0.01 Hz (for seismic and brainwave
    > > activity). How to smooth the output of the DAC?!!!!
    > > Matthew
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject and
    > > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-13 23:26
    Beau,

    I don't understand you yet, but if you're right my life is much easier off.
    I don't understand the first table you made:

    res step (deg) steps/period
    8-Bit 0.233 1,545
    10-Bit 0.0568 6,338
    12-Bit 0.01407 25,586
    16-Bit 0.000875 411,428

    How are you getting the middle column? Let's look at 16 bit resolution.
    2^16 = 65536 steps
    360degrees/65536 steps = 0.00549 degrees/step

    Do you own a copy of the CMOS Cookbook?


    --- In basicstamps@yahoogroups.com, "Beau Schwabe" <bschwabe@a...>
    wrote:
    > Perhaps I'm a little dense here... If you design around
    > the idea that whatever bit-resolution you decide to go
    > with, (be it an 8,10,12, or 16 bit DAC), and you ensure
    > that no more than 1 LSB changes on a clock transition. Then
    > shouldn't the only frequency that's required to be filtered
    > out is the fundamental frequency of the clock driving the
    > bits supplying the DAC?
    >
    > Here is a table I generated indicating the required number
    > of steps between 0 and 360 deg with various bit-resolutions
    > guaranteeing that only 1 LSB changes on each clock transition
    > from a simple little QBASIC program that could be altered and
    > used to build a lookup table database.
    >
    > res STEP (deg) steps/period
    > 8-Bit 0.233 1,545
    > 10-Bit 0.0568 6,338
    > 12-Bit 0.01407 25,586
    > 16-Bit 0.000875 411,428
    >
    >
    >
    > '
    > 'QBASIC program Start
    > '
    > CLS
    > Bits = 16
    > Pi = ATN(1) * 4
    > N = 2 ^ Bits
    > Count = 0
    > FOR Deg = 0 TO 360 STEP .000875
    > rad = (Deg / 180) * Pi
    > OldX = X
    > X = INT(SIN(rad) * N)
    > IF (X - OldX) > 1 THEN
    > PRINT Count, X, Deg
    > END IF
    > Count = Count + 1
    > NEXT Deg
    > PRINT "
    "
    > PRINT Count, X, Deg
    > '
    > 'QBASIC program End
    > '
    >
    >
    > 3 min = 180 sec = 0.00555Hz
    > 5 min = 300 sec = 0.00333Hz
    >
    > ...So the fundamental frequency for a 3 min Period @ 16_bit
    > resolution would be...
    > (.00555 x 411,428) = 2,283 Hz
    >
    > ...for a 5 min Period @ 16_bit this works out to...
    > (.00333 x 411,428) = 1,370 Hz
    >
    > 2,283Hz is what would be "audible" or considered noise on the
    > VLF output at 3Min and 1,370Hz at 5min
    >
    > If your time interval changes or is adjustable as has been
    > indicated, then a simple LOW PASS filter set to at least twice
    > the highest fundamental you would be operating at.
    >
    > -Beau Schwabe
    >
    >
    > >Good argument, but then his problem is how to
    > >get the stamp to move something that slowly.
    > >
    > >Moving it in little 'jerks' is what the stamp is
    > >going to do if you output a voltage change every
    > >so often -- unless each 'jerk' is smoothed into
    > >something slower than the criteria which
    > >you've laid you here.
    > >
    > >Personally, I can't directly watch the sweeping
    > >of a minute hand and see it move -- but I can
    > >observe it after a time and see it has moved.
    > >That is, unless it is a 'digital' minute hand,
    > >which steps from position to position. That
    > >I can see.
    > >
    > >--- In basicstamps@yahoogroups.com, Dennis O'Leary <doleary@e...>
    > >wrote:
    > > > The human eye generally moves in small jerks, called micro
    > >saccades, as
    > > > occurs in reading words on a page or on a computer screen. Smooth
    > >eye
    > > > movements can occur while tracking a moving target at moderately low
    > > > frequencies, using an oculomotor brain system known as the smooth
    > > > pursuit system. It will not accurately track movements of any
    > >system
    > > > with a period of 3-5 minutes, but performs well at periods from
    > >about .1
    > > > to 1 seconds. So you need a better criterion than "imperceptible
    > >to the
    > > > human eye." Perception of motion is an even a higher-level problem
    > > > which supercedes objectively recorded "smooth" eye movements. So
    > > > perception of a transition of 4 hundredths of a second is not
    > > > physiologically possible.
    > > >
    > > > I do research in human eye movements for fun and profit -- stamp
    > >related
    > > > of course [noparse]:)[/noparse] .
    > > >
    > > > Dennis
    > > >
    > > >
    Original Message
    > > > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > > > Sent: Thursday, June 12, 2003 2:03 PM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine
    > > >
    > > >
    > > > By "smooth" I mean imperceptible to the human eye.
    > > > 12 bits over a period of 3min would mean a transition every 4
    > >hundredths
    > > > of a
    > > > second . . . uhm I guess that's pretty smooth!!
    > > >
    > > > PS. I'm still curious about the analog solution using a low pass
    > >filter
    > > > as this
    > > > was my first approach, but abandoned it.
    > > >
    > > >
    > > >
    > > >
    > > > --- In basicstamps@yahoogroups.com, amg amg <
    controlsdude2000@j...>
    > > > wrote:
    > > > > If you get a DAC with enough bits, do you really need to smooth
    > >it?
    > > > > Define smooth...
    > > > >
    > > > > amg
    > > > >
    > > > > On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    > > > > writes:
    > > > > > Thank you Beau and Allan for your ideas. I think you're saying
    > >the
    > > > > > same
    > > > > > things--exactly what I was thinking. I've given up on analog
    > > > > > techniques.
    > > > > > Allan, to answer your question Why?--let's just say for the
    > >sake of
    > > > > > ART.
    > > > > > Allan, you're right, the problem here is to smooth the output.
    > >The
    > > > > >
    > > > > > "fundamental" being so low makes the partials low and very
    > >difficult
    > > > > > to filter
    > > > > > with a low pass. I've done some research on low pass filters
    > >and
    > > > > > the lowest
    > > > > > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > > > > > brainwave
    > > > > > activity). How to smooth the output of the DAC?!!!!
    > > > > > Matthew
    > > > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-16 16:10
    Yes, 16 bit resolution is 65536 steps IF you are representing the resolution
    of something that is linear. A sine wave however is not linear. Certain
    Areas under the curve experience expansion and contraction if you are
    incrementing the degree value in fixed increments. In other words there will
    be some cases where consecutive points on the sine wave during expansion will
    be greater than 1/65536. What I am suggesting is that if you desire a 16-Bit
    resolution, then the precision should be maintained under the curve in a
    worst case scenario (during expansion) so that the maximum delta between
    consecutive points during an expansion of the sine should not exceed 1/65536,
    otherwise the precision of the sine will be lost. If you agree that it is
    possible to visually adjust the period of a sine wave so that you can represent
    both the top half and the bottom half of a circle then what I'm about to
    explain
    might make more sense. Initially the "middle column" was derived by trial
    and error with the program I provided indicating that there was only 1/65536
    difference between consecutive points. However this value can be calculated
    more accurately by the following....

    Pi = 3.14159265359
    StepsPerPeriod = (2^Bits) * 2 * Pi
    DegreeStep = 1 / ( StepsPerPeriod / 360 )
    FundamentalFrequency = ( 1 / ( Min * 60 ) ) * StepsPerPeriod

    ...In this case it works out to 0.000874 compared to 0.000875 for the
    DegreeStep.
    The difference is a result of integer rounding and the precision in which
    Pi was
    carried out.

    -Beau Schwabe


    >Beau,
    >
    >I don't understand you yet, but if you're right my life is much easier off.
    >I don't understand the first table you made:
    >
    >res step (deg) steps/period
    > 8-Bit 0.233 1,545
    >10-Bit 0.0568 6,338
    >12-Bit 0.01407 25,586
    >16-Bit 0.000875 411,428
    >
    >How are you getting the middle column? Let's look at 16 bit resolution.
    >2^16 = 65536 steps
    >360degrees/65536 steps = 0.00549 degrees/step
    >
    >Do you own a copy of the CMOS Cookbook?
    >
    >
    >--- In basicstamps@yahoogroups.com, "Beau Schwabe" <bschwabe@a...>
    >wrote:
    > > Perhaps I'm a little dense here... If you design around
    > > the idea that whatever bit-resolution you decide to go
    > > with, (be it an 8,10,12, or 16 bit DAC), and you ensure
    > > that no more than 1 LSB changes on a clock transition. Then
    > > shouldn't the only frequency that's required to be filtered
    > > out is the fundamental frequency of the clock driving the
    > > bits supplying the DAC?
    > >
    > > Here is a table I generated indicating the required number
    > > of steps between 0 and 360 deg with various bit-resolutions
    > > guaranteeing that only 1 LSB changes on each clock transition
    > > from a simple little QBASIC program that could be altered and
    > > used to build a lookup table database.
    > >
    > > res STEP (deg) steps/period
    > > 8-Bit 0.233 1,545
    > > 10-Bit 0.0568 6,338
    > > 12-Bit 0.01407 25,586
    > > 16-Bit 0.000875 411,428
    > >
    > >
    > >
    > > '
    > > 'QBASIC program Start
    > > '
    > > CLS
    > > Bits = 16
    > > Pi = ATN(1) * 4
    > > N = 2 ^ Bits
    > > Count = 0
    > > FOR Deg = 0 TO 360 STEP .000875
    > > rad = (Deg / 180) * Pi
    > > OldX = X
    > > X = INT(SIN(rad) * N)
    > > IF (X - OldX) > 1 THEN
    > > PRINT Count, X, Deg
    > > END IF
    > > Count = Count + 1
    > > NEXT Deg
    > > PRINT "
    "
    > > PRINT Count, X, Deg
    > > '
    > > 'QBASIC program End
    > > '
    > >
    > >
    > > 3 min = 180 sec = 0.00555Hz
    > > 5 min = 300 sec = 0.00333Hz
    > >
    > > ...So the fundamental frequency for a 3 min Period @ 16_bit
    > > resolution would be...
    > > (.00555 x 411,428) = 2,283 Hz
    > >
    > > ...for a 5 min Period @ 16_bit this works out to...
    > > (.00333 x 411,428) = 1,370 Hz
    > >
    > > 2,283Hz is what would be "audible" or considered noise on the
    > > VLF output at 3Min and 1,370Hz at 5min
    > >
    > > If your time interval changes or is adjustable as has been
    > > indicated, then a simple LOW PASS filter set to at least twice
    > > the highest fundamental you would be operating at.
    > >
    > > -Beau Schwabe
    > >
    > >
    > > >Good argument, but then his problem is how to
    > > >get the stamp to move something that slowly.
    > > >
    > > >Moving it in little 'jerks' is what the stamp is
    > > >going to do if you output a voltage change every
    > > >so often -- unless each 'jerk' is smoothed into
    > > >something slower than the criteria which
    > > >you've laid you here.
    > > >
    > > >Personally, I can't directly watch the sweeping
    > > >of a minute hand and see it move -- but I can
    > > >observe it after a time and see it has moved.
    > > >That is, unless it is a 'digital' minute hand,
    > > >which steps from position to position. That
    > > >I can see.
    > > >
    > > >--- In basicstamps@yahoogroups.com, Dennis O'Leary <doleary@e...>
    > > >wrote:
    > > > > The human eye generally moves in small jerks, called micro
    > > >saccades, as
    > > > > occurs in reading words on a page or on a computer screen. Smooth
    > > >eye
    > > > > movements can occur while tracking a moving target at moderately low
    > > > > frequencies, using an oculomotor brain system known as the smooth
    > > > > pursuit system. It will not accurately track movements of any
    > > >system
    > > > > with a period of 3-5 minutes, but performs well at periods from
    > > >about .1
    > > > > to 1 seconds. So you need a better criterion than "imperceptible
    > > >to the
    > > > > human eye." Perception of motion is an even a higher-level problem
    > > > > which supercedes objectively recorded "smooth" eye movements. So
    > > > > perception of a transition of 4 hundredths of a second is not
    > > > > physiologically possible.
    > > > >
    > > > > I do research in human eye movements for fun and profit -- stamp
    > > >related
    > > > > of course [noparse]:)[/noparse] .
    > > > >
    > > > > Dennis
    > > > >
    > > > >
    Original Message
    > > > > From: eigenbraket [noparse][[/noparse]mailto:mod@e...]
    > > > > Sent: Thursday, June 12, 2003 2:03 PM
    > > > > To: basicstamps@yahoogroups.com
    > > > > Subject: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine
    > > > >
    > > > >
    > > > > By "smooth" I mean imperceptible to the human eye.
    > > > > 12 bits over a period of 3min would mean a transition every 4
    > > >hundredths
    > > > > of a
    > > > > second . . . uhm I guess that's pretty smooth!!
    > > > >
    > > > > PS. I'm still curious about the analog solution using a low pass
    > > >filter
    > > > > as this
    > > > > was my first approach, but abandoned it.
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > --- In basicstamps@yahoogroups.com, amg amg <
    >controlsdude2000@j...>
    > > > > wrote:
    > > > > > If you get a DAC with enough bits, do you really need to smooth
    > > >it?
    > > > > > Define smooth...
    > > > > >
    > > > > > amg
    > > > > >
    > > > > > On Thu, 12 Jun 2003 18:43:17 -0000 "eigenbraket" <mod@e...>
    > > > > > writes:
    > > > > > > Thank you Beau and Allan for your ideas. I think you're saying
    > > >the
    > > > > > > same
    > > > > > > things--exactly what I was thinking. I've given up on analog
    > > > > > > techniques.
    > > > > > > Allan, to answer your question Why?--let's just say for the
    > > >sake of
    > > > > > > ART.
    > > > > > > Allan, you're right, the problem here is to smooth the output.
    > > >The
    > > > > > >
    > > > > > > "fundamental" being so low makes the partials low and very
    > > >difficult
    > > > > > > to filter
    > > > > > > with a low pass. I've done some research on low pass filters
    > > >and
    > > > > > > the lowest
    > > > > > > cutoff frequency I've seen is around 0.01 Hz (for seismic and
    > > > > > > brainwave
    > > > > > > activity). How to smooth the output of the DAC?!!!!
    > > > > > > Matthew
    > > > > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-16 18:39
    As follow-up to Beau's answer about nonlinearity, I'm driving a stepper
    motor with a sinusoidal profile to create a laser-diode moving target
    for a visual moving stimulus. At the peak of the sine wave, the
    step-to-step amplitude change is so small that I just let the beam dwell
    at the same amplitude for about 12 steps.

    Dennis

    Original Message
    From: Beau Schwabe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ijpxF2dS7IE3QaRHp-p-2H_pId6Q7-DP65bNl8PH530WT_IjxBBLZBgjyCcl2OlIc9gKjPiPgyvpBZ_Hbf24]bschwabe@a...[/url
    Sent: Monday, June 16, 2003 8:11 AM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Re: Very Low Frequency Sine


    Yes, 16 bit resolution is 65536 steps IF you are representing the
    resolution of something that is linear. A sine wave however is not
    linear. Certain Areas under the curve experience expansion and
    contraction if you are incrementing the degree value in fixed
    increments. In other words there will be some cases where consecutive
    points on the sine wave during expansion will be greater than 1/65536.
    What I am suggesting is that if you desire a 16-Bit resolution, then the
    precision should be maintained under the curve in a worst case scenario
    (during expansion) so that the maximum delta between consecutive points
    during an expansion of the sine should not exceed 1/65536, otherwise the
    precision of the sine will be lost. If you agree that it is possible to
    visually adjust the period of a sine wave so that you can represent both
    the top half and the bottom half of a circle then what I'm about to
    explain
    might make more sense. Initially the "middle column" was derived by
    trial and error with the program I provided indicating that there was
    only 1/65536 difference between consecutive points. However this value
    can be calculated more accurately by the following....

    Pi = 3.14159265359
    StepsPerPeriod = (2^Bits) * 2 * Pi
    DegreeStep = 1 / ( StepsPerPeriod / 360 )
    FundamentalFrequency = ( 1 / ( Min * 60 ) ) * StepsPerPeriod

    ...In this case it works out to 0.000874 compared to 0.000875 for the
    DegreeStep.
    The difference is a result of integer rounding and the precision in
    which
    Pi was
    carried out.

    -Beau Schwabe
Sign In or Register to comment.