Beep Signal in HP48 - Hewlett Packard

This is a discussion on Beep Signal in HP48 - Hewlett Packard ; Has anyone taken any measurements on the signal sent to the Beeper in the HP48? I've taken some acoustic measurements, using a microphone near a HP48 and have been quite surprised at the acoustic signal content that comes out of ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Beep Signal in HP48

  1. Beep Signal in HP48

    Has anyone taken any measurements on the signal sent to the Beeper in
    the HP48?

    I've taken some acoustic measurements, using a microphone near a HP48
    and have been quite surprised at the acoustic signal content that
    comes out of the beeper. I realize the piezoelectric device will
    produce some harmonics - that is, when the BEEP function is set to
    440, the actual acoustic output contains both the fundamental 440, and
    integer multiples of this frequency (880, 1320, etc...).

    However, I've noticed that in some situations, the harmonic content
    acutally seems to exceed the magnitude of the fundamental.

    I presume that the signal that the Saturn sends to the beeper is
    simply a pulse with a repetition rate set by the frequency of the BEEP
    function.

    I am curious what the limits are on the repetition rate of this
    signal.

    If anyone has any measurements or data to share, I would be most
    curious.

    I may open my HP48 and do some measurements.

    Regards,
    TomCee

  2. Re: Beep Signal in HP48

    On Feb 26, 8:34 pm, tomcee wrote:
    > Has anyone taken any measurements on the signal sent to the Beeper in
    > the HP48?
    >
    > I've taken some acoustic measurements, using a microphone near a HP48
    > and have been quite surprised at the acoustic signal content that
    > comes out of the beeper. I realize the piezoelectric device will
    > produce some harmonics - that is, when the BEEP function is set to
    > 440, the actual acoustic output contains both the fundamental 440, and
    > integer multiples of this frequency (880, 1320, etc...).
    >
    > However, I've noticed that in some situations, the harmonic content
    > acutally seems to exceed the magnitude of the fundamental.
    >
    > I presume that the signal that the Saturn sends to the beeper is
    > simply a pulse with a repetition rate set by the frequency of the BEEP
    > function.
    >
    > I am curious what the limits are on the repetition rate of this
    > signal.
    >
    > If anyone has any measurements or data to share, I would be most
    > curious.
    >
    > I may open my HP48 and do some measurements.
    >
    > Regards,
    > TomCee


    It's probably a square wave, with a 50% duty cycle, which then plays
    through a tiny speaker which effectively is a bandpass filter. Thus
    low tones will tend to lose the fundamental (and low harmonics).
    The actual frequency is not what is commanded, but rather depends on
    the commanded frequency by an algorithm. I did some work on figuring
    this out a while ago and could dig up my results if it's of interest.
    It was something like "take the commanded frequency, calculate the
    commanded period, divide by two go get the half-period, round to the
    nearest multiple of T; call that multiple N. Then the actual frequency
    will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    that I'd have to look up.
    I was interested in this because I was using the 48 as a pitchpipe and
    noted that the pitches were off a bit in a random-looking way.

  3. Re: Beep Signal in HP48

    On Feb 27, 7:02*am, Irl wrote:
    > On Feb 26, 8:34 pm, tomcee wrote:
    >
    >
    >
    >
    >
    > > Has anyone taken any measurements on the signal sent to the Beeper in
    > > the HP48?

    >
    > > I've taken some acoustic measurements, using a microphone near a HP48
    > > and have been quite surprised at the acoustic signal content that
    > > comes out of the beeper. *I realize the piezoelectric device will
    > > produce some harmonics *- that is, when the BEEP function is set to
    > > 440, the actual acoustic output contains both the fundamental 440, and
    > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > However, I've noticed that in some situations, the harmonic content
    > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > I presume that the signal that the Saturn sends to the beeper is
    > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > function.

    >
    > > I am curious what the limits are on the repetition rate of this
    > > signal.

    >
    > > If anyone has any measurements or data to share, I would be most
    > > curious.

    >
    > > I may open my HP48 and do some measurements.

    >
    > > Regards,
    > > TomCee

    >
    > It's probably a square wave, with a 50% duty cycle, which then plays
    > through a tiny speaker which effectively is a bandpass filter. Thus
    > low tones will tend to lose the fundamental (and low harmonics).
    > The actual frequency is not what is commanded, but rather depends on
    > the commanded frequency by an algorithm. I did some work on figuring
    > this out a while ago and could dig up my results if it's of interest.
    > It was something like "take the commanded frequency, calculate the
    > commanded period, divide by two go get the half-period, round to the
    > nearest multiple of T; call that multiple N. Then the actual frequency
    > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > that I'd have to look up.
    > I was interested in this because I was using the 48 as a pitchpipe and
    > noted that the pitches were off a bit in a random-looking way.- Hide quoted text -
    >
    > - Show quoted text -


    Not only that, but the 50% duty cycle is not always such. The pulse
    width generators are controlled by a higher frequency clock, therefore
    there's a certain granularity in the pulse width, being the width an
    exact multiple of a faster clock pulse. So if for example you want a
    frequency that is 1/3 of the higher clock frequency, then your duty
    cycle will be 67% (or 33%), but not 50%. As the fraction of the
    frequency becomes smaller (or the faster clock freq goes higher), you
    get better accuracy but in general, neither the frequency nor the duty
    cycle are exact matches, unless you explicitly know and use a
    frequency that is an exact fraction of the faster clock. That's why
    you noticed that some frequencies were off, and it's normal.

    Regards,
    Claudio



  4. Re: Beep Signal in HP48

    On Feb 27, 12:20 pm, Claudio Lapilli wrote:
    > On Feb 27, 7:02 am, Irl wrote:
    >
    >
    >
    > > On Feb 26, 8:34 pm, tomcee wrote:

    >
    > > > Has anyone taken any measurements on the signal sent to the Beeper in
    > > > the HP48?

    >
    > > > I've taken some acoustic measurements, using a microphone near a HP48
    > > > and have been quite surprised at the acoustic signal content that
    > > > comes out of the beeper. I realize the piezoelectric device will
    > > > produce some harmonics - that is, when the BEEP function is set to
    > > > 440, the actual acoustic output contains both the fundamental 440, and
    > > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > > However, I've noticed that in some situations, the harmonic content
    > > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > > I presume that the signal that the Saturn sends to the beeper is
    > > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > > function.

    >
    > > > I am curious what the limits are on the repetition rate of this
    > > > signal.

    >
    > > > If anyone has any measurements or data to share, I would be most
    > > > curious.

    >
    > > > I may open my HP48 and do some measurements.

    >
    > > > Regards,
    > > > TomCee

    >
    > > It's probably a square wave, with a 50% duty cycle, which then plays
    > > through a tiny speaker which effectively is a bandpass filter. Thus
    > > low tones will tend to lose the fundamental (and low harmonics).
    > > The actual frequency is not what is commanded, but rather depends on
    > > the commanded frequency by an algorithm. I did some work on figuring
    > > this out a while ago and could dig up my results if it's of interest.
    > > It was something like "take the commanded frequency, calculate the
    > > commanded period, divide by two go get the half-period, round to the
    > > nearest multiple of T; call that multiple N. Then the actual frequency
    > > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > > that I'd have to look up.
    > > I was interested in this because I was using the 48 as a pitchpipe and
    > > noted that the pitches were off a bit in a random-looking way.- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > Not only that, but the 50% duty cycle is not always such. The pulse
    > width generators are controlled by a higher frequency clock, therefore
    > there's a certain granularity in the pulse width, being the width an
    > exact multiple of a faster clock pulse. So if for example you want a
    > frequency that is 1/3 of the higher clock frequency, then your duty
    > cycle will be 67% (or 33%), but not 50%. As the fraction of the
    > frequency becomes smaller (or the faster clock freq goes higher), you
    > get better accuracy but in general, neither the frequency nor the duty
    > cycle are exact matches, unless you explicitly know and use a
    > frequency that is an exact fraction of the faster clock. That's why
    > you noticed that some frequencies were off, and it's normal.
    >
    > Regards,
    > Claudio


    I don't think so. The point of my factor of two in calculating the
    frequency ("divide by two to get the half-period..." is to allow for
    keeping the duty cycle fixed at 50%, since the half-cycle as so
    calculated is itself an integral number of ticks (the full cycle then
    being an even number of ticks long). There would be fairly noticeable
    changes in the timbre if the duty cycle changed that much.

  5. Re: Beep Signal in HP48

    On Feb 28, 7:48*am, Irl wrote:
    > On Feb 27, 12:20 pm, Claudio Lapilli wrote:
    >
    >
    >
    >
    >
    > > On Feb 27, 7:02 am, Irl wrote:

    >
    > > > On Feb 26, 8:34 pm, tomcee wrote:

    >
    > > > > Has anyone taken any measurements on the signal sent to the Beeper in
    > > > > the HP48?

    >
    > > > > I've taken some acoustic measurements, using a microphone near a HP48
    > > > > and have been quite surprised at the acoustic signal content that
    > > > > comes out of the beeper. *I realize the piezoelectric device will
    > > > > produce some harmonics *- that is, when the BEEP function is set to
    > > > > 440, the actual acoustic output contains both the fundamental 440, and
    > > > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > > > However, I've noticed that in some situations, the harmonic content
    > > > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > > > I presume that the signal that the Saturn sends to the beeper is
    > > > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > > > function.

    >
    > > > > I am curious what the limits are on the repetition rate of this
    > > > > signal.

    >
    > > > > If anyone has any measurements or data to share, I would be most
    > > > > curious.

    >
    > > > > I may open my HP48 and do some measurements.

    >
    > > > > Regards,
    > > > > TomCee

    >
    > > > It's probably a square wave, with a 50% duty cycle, which then plays
    > > > through a tiny speaker which effectively is a bandpass filter. Thus
    > > > low tones will tend to lose the fundamental (and low harmonics).
    > > > The actual frequency is not what is commanded, but rather depends on
    > > > the commanded frequency by an algorithm. I did some work on figuring
    > > > this out a while ago and could dig up my results if it's of interest.
    > > > It was something like "take the commanded frequency, calculate the
    > > > commanded period, divide by two go get the half-period, round to the
    > > > nearest multiple of T; call that multiple N. Then the actual frequency
    > > > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > > > that I'd have to look up.
    > > > I was interested in this because I was using the 48 as a pitchpipe and
    > > > noted that the pitches were off a bit in a random-looking way.- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > Not only that, but the 50% duty cycle is not always such. The pulse
    > > width generators are controlled by a higher frequency clock, therefore
    > > there's a certain granularity in the pulse width, being the width an
    > > exact multiple of a faster clock pulse. So if for example you want a
    > > frequency that is 1/3 of the higher clock frequency, then your duty
    > > cycle will be 67% (or 33%), but not 50%. As the fraction of the
    > > frequency becomes smaller (or the faster clock freq goes higher), you
    > > get better accuracy but in general, neither the frequency nor the duty
    > > cycle are exact matches, unless you explicitly know and use a
    > > frequency that is an exact fraction of the faster clock. That's why
    > > you noticed that some frequencies were off, and it's normal.

    >
    > > Regards,
    > > Claudio

    >
    > I don't think so. The point of my factor of two in calculating the
    > frequency ("divide by two to get the half-period..." is to allow for
    > keeping the duty cycle fixed at 50%, since the half-cycle as so
    > calculated is itself an integral number of ticks (the full cycle then
    > being an even number of ticks long). There would be fairly noticeable
    > changes in the timbre if the duty cycle changed that much.- Hide quoted text -
    >
    > - Show quoted text -


    That much deviation was an example exaggerating the division (using
    only 3 cycles), just to show clearly my point. Let's say you want a
    880 Hz frequency, with the 32768 Hz clock, then 2N = 37.2. You could
    use 37 cycles (885.6 Hz), with a duty cycle=48% (18 cycles on, 19 off)
    to get the most accurate sound freq. With your method, you force 2N to
    be either 38 or 36 (862.3 Hz or 910Hz respectively), introducing even
    more frequency deviation. I assumed you were using the most accurate
    frequency, and therefore both the duty cycle and the frequency are off
    by a little bit. Changing the duty cycle only causes a slight change
    in the harmonics (timbre), while changing the main frequency you
    affect the tune a lot, especially when the faster clock is not too
    high (32 kHz is very low freq).

    Claudio

  6. Re: Beep Signal in HP48

    On Feb 28, 11:51*am, Claudio Lapilli wrote:
    > On Feb 28, 7:48*am, Irl wrote:
    >
    >
    >
    >
    >
    > > On Feb 27, 12:20 pm, Claudio Lapilli wrote:

    >
    > > > On Feb 27, 7:02 am, Irl wrote:

    >
    > > > > On Feb 26, 8:34 pm, tomcee wrote:

    >
    > > > > > Has anyone taken any measurements on the signal sent to the Beeperin
    > > > > > the HP48?

    >
    > > > > > I've taken some acoustic measurements, using a microphone near a HP48
    > > > > > and have been quite surprised at the acoustic signal content that
    > > > > > comes out of the beeper. *I realize the piezoelectric device will
    > > > > > produce some harmonics *- that is, when the BEEP function is setto
    > > > > > 440, the actual acoustic output contains both the fundamental 440,and
    > > > > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > > > > However, I've noticed that in some situations, the harmonic content
    > > > > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > > > > I presume that the signal that the Saturn sends to the beeper is
    > > > > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > > > > function.

    >
    > > > > > I am curious what the limits are on the repetition rate of this
    > > > > > signal.

    >
    > > > > > If anyone has any measurements or data to share, I would be most
    > > > > > curious.

    >
    > > > > > I may open my HP48 and do some measurements.

    >
    > > > > > Regards,
    > > > > > TomCee

    >
    > > > > It's probably a square wave, with a 50% duty cycle, which then plays
    > > > > through a tiny speaker which effectively is a bandpass filter. Thus
    > > > > low tones will tend to lose the fundamental (and low harmonics).
    > > > > The actual frequency is not what is commanded, but rather depends on
    > > > > the commanded frequency by an algorithm. I did some work on figuring
    > > > > this out a while ago and could dig up my results if it's of interest..
    > > > > It was something like "take the commanded frequency, calculate the
    > > > > commanded period, divide by two go get the half-period, round to the
    > > > > nearest multiple of T; call that multiple N. Then the actual frequency
    > > > > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > > > > that I'd have to look up.
    > > > > I was interested in this because I was using the 48 as a pitchpipe and
    > > > > noted that the pitches were off a bit in a random-looking way.- Hidequoted text -

    >
    > > > > - Show quoted text -

    >
    > > > Not only that, but the 50% duty cycle is not always such. The pulse
    > > > width generators are controlled by a higher frequency clock, therefore
    > > > there's a certain granularity in the pulse width, being the width an
    > > > exact multiple of a faster clock pulse. So if for example you want a
    > > > frequency that is 1/3 of the higher clock frequency, then your duty
    > > > cycle will be 67% (or 33%), but not 50%. As the fraction of the
    > > > frequency becomes smaller (or the faster clock freq goes higher), you
    > > > get better accuracy but in general, neither the frequency nor the duty
    > > > cycle are exact matches, unless you explicitly know and use a
    > > > frequency that is an exact fraction of the faster clock. That's why
    > > > you noticed that some frequencies were off, and it's normal.

    >
    > > > Regards,
    > > > Claudio

    >
    > > I don't think so. The point of my factor of two in calculating the
    > > frequency ("divide by two to get the half-period..." is to allow for
    > > keeping the duty cycle fixed at 50%, since the half-cycle as so
    > > calculated is itself an integral number of ticks (the full cycle then
    > > being an even number of ticks long). There would be fairly noticeable
    > > changes in the timbre if the duty cycle changed that much.- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > That much deviation was an example exaggerating the division (using
    > only 3 cycles), just to show clearly my point. Let's say you want a
    > 880 Hz frequency, with the 32768 Hz clock, then 2N = 37.2. You could
    > use 37 cycles (885.6 Hz), with a duty cycle=48% (18 cycles on, 19 off)
    > to get the most accurate sound freq. With your method, you force 2N to
    > be either 38 or 36 (862.3 Hz or 910Hz respectively), introducing even
    > more frequency deviation. I assumed you were using the most accurate
    > frequency, and therefore both the duty cycle and the frequency are off
    > by a little bit. Changing the duty cycle only causes a slight change
    > in the harmonics (timbre), while changing the main frequency you
    > affect the tune a lot, especially when the faster clock is not too
    > high (32 kHz is very low freq).
    >
    > Claudio- Hide quoted text -
    >
    > - Show quoted text -


    Thank you all for your discussions and thoughts. I am most curious as
    to what the actual electrical signal being applied to the
    'bender'/'beeper' is both in amplitude and timing.

    I will open an HP48 and take some measurements and can post my
    results here.

    If anyone has any specific measurment/frequency requests, please let
    me know.
    regards,
    TomCee

  7. Re: Beep Signal in HP48

    On Feb 28, 10:00*pm, tomcee wrote:
    > On Feb 28, 11:51*am, Claudio Lapilli wrote:
    >
    >
    >
    >
    >
    > > On Feb 28, 7:48*am, Irl wrote:

    >
    > > > On Feb 27, 12:20 pm, Claudio Lapilli wrote:

    >
    > > > > On Feb 27, 7:02 am, Irl wrote:

    >
    > > > > > On Feb 26, 8:34 pm, tomcee wrote:

    >
    > > > > > > Has anyone taken any measurements on the signal sent to the Beeper in
    > > > > > > the HP48?

    >
    > > > > > > I've taken some acoustic measurements, using a microphone near aHP48
    > > > > > > and have been quite surprised at the acoustic signal content that
    > > > > > > comes out of the beeper. *I realize the piezoelectric device will
    > > > > > > produce some harmonics *- that is, when the BEEP function is set to
    > > > > > > 440, the actual acoustic output contains both the fundamental 440, and
    > > > > > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > > > > > However, I've noticed that in some situations, the harmonic content
    > > > > > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > > > > > I presume that the signal that the Saturn sends to the beeper is
    > > > > > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > > > > > function.

    >
    > > > > > > I am curious what the limits are on the repetition rate of this
    > > > > > > signal.

    >
    > > > > > > If anyone has any measurements or data to share, I would be most
    > > > > > > curious.

    >
    > > > > > > I may open my HP48 and do some measurements.

    >
    > > > > > > Regards,
    > > > > > > TomCee

    >
    > > > > > It's probably a square wave, with a 50% duty cycle, which then plays
    > > > > > through a tiny speaker which effectively is a bandpass filter. Thus
    > > > > > low tones will tend to lose the fundamental (and low harmonics).
    > > > > > The actual frequency is not what is commanded, but rather depends on
    > > > > > the commanded frequency by an algorithm. I did some work on figuring
    > > > > > this out a while ago and could dig up my results if it's of interest.
    > > > > > It was something like "take the commanded frequency, calculate the
    > > > > > commanded period, divide by two go get the half-period, round to the
    > > > > > nearest multiple of T; call that multiple N. Then the actual frequency
    > > > > > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > > > > > that I'd have to look up.
    > > > > > I was interested in this because I was using the 48 as a pitchpipeand
    > > > > > noted that the pitches were off a bit in a random-looking way.- Hide quoted text -

    >
    > > > > > - Show quoted text -

    >
    > > > > Not only that, but the 50% duty cycle is not always such. The pulse
    > > > > width generators are controlled by a higher frequency clock, therefore
    > > > > there's a certain granularity in the pulse width, being the width an
    > > > > exact multiple of a faster clock pulse. So if for example you want a
    > > > > frequency that is 1/3 of the higher clock frequency, then your duty
    > > > > cycle will be 67% (or 33%), but not 50%. As the fraction of the
    > > > > frequency becomes smaller (or the faster clock freq goes higher), you
    > > > > get better accuracy but in general, neither the frequency nor the duty
    > > > > cycle are exact matches, unless you explicitly know and use a
    > > > > frequency that is an exact fraction of the faster clock. That's why
    > > > > you noticed that some frequencies were off, and it's normal.

    >
    > > > > Regards,
    > > > > Claudio

    >
    > > > I don't think so. The point of my factor of two in calculating the
    > > > frequency ("divide by two to get the half-period..." is to allow for
    > > > keeping the duty cycle fixed at 50%, since the half-cycle as so
    > > > calculated is itself an integral number of ticks (the full cycle then
    > > > being an even number of ticks long). There would be fairly noticeable
    > > > changes in the timbre if the duty cycle changed that much.- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > That much deviation was an example exaggerating the division (using
    > > only 3 cycles), just to show clearly my point. Let's say you want a
    > > 880 Hz frequency, with the 32768 Hz clock, then 2N = 37.2. You could
    > > use 37 cycles (885.6 Hz), with a duty cycle=48% (18 cycles on, 19 off)
    > > to get the most accurate sound freq. With your method, you force 2N to
    > > be either 38 or 36 (862.3 Hz or 910Hz respectively), introducing even
    > > more frequency deviation. I assumed you were using the most accurate
    > > frequency, and therefore both the duty cycle and the frequency are off
    > > by a little bit. Changing the duty cycle only causes a slight change
    > > in the harmonics (timbre), while changing the main frequency you
    > > affect the tune a lot, especially when the faster clock is not too
    > > high (32 kHz is very low freq).

    >
    > > Claudio- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > Thank you all for your discussions and thoughts. *I am most curious as
    > to what the actual electrical signal being applied to the
    > 'bender'/'beeper' is both in amplitude and timing.
    >
    > I will open an HP48 and take some measurements *and can post my
    > results here.
    >
    > If anyone has any specific measurment/frequency requests, please let
    > me know.
    > regards,
    > TomCee- Hide quoted text -
    >
    > - Show quoted text -


    I've opened a HP48 and done some electrical measurements on the 'BEEP'
    signal right at the spiral spring the connects the main PCB to the
    piezoelectric Beeper device that is heatstaked to the back cover of
    the HP48.

    The signal applied to the Beeper device has a voltage swing from
    ground (0 volts) to +10 volts. This was somewhat of a surprise as I
    was not aware that the BEEP output used the higher system voltage.

    The frequency seems to correlate with the frequency used in the BEEP
    command. However, at higher frequencies, there seems to be some drift
    and/or irregularity in the frequency of this signal.

    Has anybody studied that code segment that generates the BEEP signal
    and be able to share the results?

    Regards,
    TomCee

  8. Re: Beep Signal in HP48

    ,gzip(gfe),gzip(gfe)
    Bytes: 2204
    Xref: number1.nntp.dca.giganews.com comp.sys.hp48:203455

    The acoustic domain measurement doesn't only have the sound generated
    by the
    speaker but the response of the case as well. This vibrating device
    excites
    the case as well when it generates sound. This can be a example of DML
    type
    of loudspeakers, athough I am sure it wasn't intended to do so.
    Therefore,
    the modes of the rear case also are excited and contribute to the
    sound.
    This may give some deviations in your measurements from tempature to
    tempature and maybe even depending on the phase of the moon. What I
    mean is
    that, the repeatability of your measurements are very important.

    /Onur

  9. Re: Beep Signal in HP48

    On Feb 28, 11:51 am, Claudio Lapilli wrote:
    > On Feb 28, 7:48 am, Irl wrote:
    >
    >
    >
    > > On Feb 27, 12:20 pm, Claudio Lapilli wrote:

    >
    > > > On Feb 27, 7:02 am, Irl wrote:

    >
    > > > > On Feb 26, 8:34 pm, tomcee wrote:

    >
    > > > > > Has anyone taken any measurements on the signal sent to the Beeper in
    > > > > > the HP48?

    >
    > > > > > I've taken some acoustic measurements, using a microphone near a HP48
    > > > > > and have been quite surprised at the acoustic signal content that
    > > > > > comes out of the beeper. I realize the piezoelectric device will
    > > > > > produce some harmonics - that is, when the BEEP function is set to
    > > > > > 440, the actual acoustic output contains both the fundamental 440, and
    > > > > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > > > > However, I've noticed that in some situations, the harmonic content
    > > > > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > > > > I presume that the signal that the Saturn sends to the beeper is
    > > > > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > > > > function.

    >
    > > > > > I am curious what the limits are on the repetition rate of this
    > > > > > signal.

    >
    > > > > > If anyone has any measurements or data to share, I would be most
    > > > > > curious.

    >
    > > > > > I may open my HP48 and do some measurements.

    >
    > > > > > Regards,
    > > > > > TomCee

    >
    > > > > It's probably a square wave, with a 50% duty cycle, which then plays
    > > > > through a tiny speaker which effectively is a bandpass filter. Thus
    > > > > low tones will tend to lose the fundamental (and low harmonics).
    > > > > The actual frequency is not what is commanded, but rather depends on
    > > > > the commanded frequency by an algorithm. I did some work on figuring
    > > > > this out a while ago and could dig up my results if it's of interest.
    > > > > It was something like "take the commanded frequency, calculate the
    > > > > commanded period, divide by two go get the half-period, round to the
    > > > > nearest multiple of T; call that multiple N. Then the actual frequency
    > > > > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > > > > that I'd have to look up.
    > > > > I was interested in this because I was using the 48 as a pitchpipe and
    > > > > noted that the pitches were off a bit in a random-looking way.- Hide quoted text -

    >
    > > > > - Show quoted text -

    >
    > > > Not only that, but the 50% duty cycle is not always such. The pulse
    > > > width generators are controlled by a higher frequency clock, therefore
    > > > there's a certain granularity in the pulse width, being the width an
    > > > exact multiple of a faster clock pulse. So if for example you want a
    > > > frequency that is 1/3 of the higher clock frequency, then your duty
    > > > cycle will be 67% (or 33%), but not 50%. As the fraction of the
    > > > frequency becomes smaller (or the faster clock freq goes higher), you
    > > > get better accuracy but in general, neither the frequency nor the duty
    > > > cycle are exact matches, unless you explicitly know and use a
    > > > frequency that is an exact fraction of the faster clock. That's why
    > > > you noticed that some frequencies were off, and it's normal.

    >
    > > > Regards,
    > > > Claudio

    >
    > > I don't think so. The point of my factor of two in calculating the
    > > frequency ("divide by two to get the half-period..." is to allow for
    > > keeping the duty cycle fixed at 50%, since the half-cycle as so
    > > calculated is itself an integral number of ticks (the full cycle then
    > > being an even number of ticks long). There would be fairly noticeable
    > > changes in the timbre if the duty cycle changed that much.- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > That much deviation was an example exaggerating the division (using
    > only 3 cycles), just to show clearly my point. Let's say you want a
    > 880 Hz frequency, with the 32768 Hz clock, then 2N = 37.2. You could
    > use 37 cycles (885.6 Hz), with a duty cycle=48% (18 cycles on, 19 off)
    > to get the most accurate sound freq. With your method, you force 2N to
    > be either 38 or 36 (862.3 Hz or 910Hz respectively), introducing even
    > more frequency deviation. I assumed you were using the most accurate
    > frequency, and therefore both the duty cycle and the frequency are off
    > by a little bit. Changing the duty cycle only causes a slight change
    > in the harmonics (timbre), while changing the main frequency you
    > affect the tune a lot, especially when the faster clock is not too
    > high (32 kHz is very low freq).
    >
    > Claudio


    Sorry, Claudio, but you appear to have missed my intent.
    I want 880 Hz. The period is 1/880. The half-period is 1/1760. In
    terms of ticks of 32768 Hz, this is 18.6... . I don't recall whether
    it truncates or rounds and it doesn't matter for this argument. Let's
    say it rounds, to 19. Then the full period is 38 ticks, an even number
    as ensured by the algorithm described. The frequency ends up being
    862.3... Hz.
    Your example of 3 ticks would turn into 1.5 ticks per half-period,
    giving a full period of either 2 or 4 ticks and a 50% duty cycle.
    This irregularity may be exhibited easily by asking for a beep in,
    say, the 10 kHz range. As you gradually change the commanded
    frequency, the audible tone does not change gradually, but instead at
    certain boundaries of commanded frequency it jumps. That is how I
    figured out the algorithm. I didn't actually measure anything with
    ascope, but rather by looking at the jumps I could see what the
    algorithm was and from that deduced that the Designers had opted to
    maintain a strict 50% duty cycle, which is cool.
    The algorithm, by the way, is different for the 49/50.
    Yours,
    Irl

  10. Re: Beep Signal in HP48

    On Mar 3, 12:51*pm, Irl wrote:
    > On Feb 28, 11:51 am, Claudio Lapilli wrote:
    >
    >
    >
    >
    >
    > > On Feb 28, 7:48 am, Irl wrote:

    >
    > > > On Feb 27, 12:20 pm, Claudio Lapilli wrote:

    >
    > > > > On Feb 27, 7:02 am, Irl wrote:

    >
    > > > > > On Feb 26, 8:34 pm, tomcee wrote:

    >
    > > > > > > Has anyone taken any measurements on the signal sent to the Beeper in
    > > > > > > the HP48?

    >
    > > > > > > I've taken some acoustic measurements, using a microphone near aHP48
    > > > > > > and have been quite surprised at the acoustic signal content that
    > > > > > > comes out of the beeper. *I realize the piezoelectric device will
    > > > > > > produce some harmonics *- that is, when the BEEP function is set to
    > > > > > > 440, the actual acoustic output contains both the fundamental 440, and
    > > > > > > integer multiples of this frequency (880, 1320, etc...).

    >
    > > > > > > However, I've noticed that in some situations, the harmonic content
    > > > > > > acutally seems to exceed the magnitude of the fundamental.

    >
    > > > > > > I presume that the signal that the Saturn sends to the beeper is
    > > > > > > simply a pulse with a repetition rate set by the frequency of the BEEP
    > > > > > > function.

    >
    > > > > > > I am curious what the limits are on the repetition rate of this
    > > > > > > signal.

    >
    > > > > > > If anyone has any measurements or data to share, I would be most
    > > > > > > curious.

    >
    > > > > > > I may open my HP48 and do some measurements.

    >
    > > > > > > Regards,
    > > > > > > TomCee

    >
    > > > > > It's probably a square wave, with a 50% duty cycle, which then plays
    > > > > > through a tiny speaker which effectively is a bandpass filter. Thus
    > > > > > low tones will tend to lose the fundamental (and low harmonics).
    > > > > > The actual frequency is not what is commanded, but rather depends on
    > > > > > the commanded frequency by an algorithm. I did some work on figuring
    > > > > > this out a while ago and could dig up my results if it's of interest.
    > > > > > It was something like "take the commanded frequency, calculate the
    > > > > > commanded period, divide by two go get the half-period, round to the
    > > > > > nearest multiple of T; call that multiple N. Then the actual frequency
    > > > > > will be 1/(2NT). As I recall, T was something like 1/(32768 Hz), but
    > > > > > that I'd have to look up.
    > > > > > I was interested in this because I was using the 48 as a pitchpipeand
    > > > > > noted that the pitches were off a bit in a random-looking way.- Hide quoted text -

    >
    > > > > > - Show quoted text -

    >
    > > > > Not only that, but the 50% duty cycle is not always such. The pulse
    > > > > width generators are controlled by a higher frequency clock, therefore
    > > > > there's a certain granularity in the pulse width, being the width an
    > > > > exact multiple of a faster clock pulse. So if for example you want a
    > > > > frequency that is 1/3 of the higher clock frequency, then your duty
    > > > > cycle will be 67% (or 33%), but not 50%. As the fraction of the
    > > > > frequency becomes smaller (or the faster clock freq goes higher), you
    > > > > get better accuracy but in general, neither the frequency nor the duty
    > > > > cycle are exact matches, unless you explicitly know and use a
    > > > > frequency that is an exact fraction of the faster clock. That's why
    > > > > you noticed that some frequencies were off, and it's normal.

    >
    > > > > Regards,
    > > > > Claudio

    >
    > > > I don't think so. The point of my factor of two in calculating the
    > > > frequency ("divide by two to get the half-period..." is to allow for
    > > > keeping the duty cycle fixed at 50%, since the half-cycle as so
    > > > calculated is itself an integral number of ticks (the full cycle then
    > > > being an even number of ticks long). There would be fairly noticeable
    > > > changes in the timbre if the duty cycle changed that much.- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > That much deviation was an example exaggerating the division (using
    > > only 3 cycles), just to show clearly my point. Let's say you want a
    > > 880 Hz frequency, with the 32768 Hz clock, then 2N = 37.2. You could
    > > use 37 cycles (885.6 Hz), with a duty cycle=48% (18 cycles on, 19 off)
    > > to get the most accurate sound freq. With your method, you force 2N to
    > > be either 38 or 36 (862.3 Hz or 910Hz respectively), introducing even
    > > more frequency deviation. I assumed you were using the most accurate
    > > frequency, and therefore both the duty cycle and the frequency are off
    > > by a little bit. Changing the duty cycle only causes a slight change
    > > in the harmonics (timbre), while changing the main frequency you
    > > affect the tune a lot, especially when the faster clock is not too
    > > high (32 kHz is very low freq).

    >
    > > Claudio

    >
    > Sorry, Claudio, but you appear to have missed my intent.
    > I want 880 Hz. The period is 1/880. The half-period is 1/1760. In
    > terms of ticks of 32768 Hz, this is 18.6... . I don't recall whether
    > it truncates or rounds and it doesn't matter for this argument. Let's
    > say it rounds, to 19. Then the full period is 38 ticks, an even number
    > as ensured by the algorithm described. The frequency ends up being
    > 862.3... Hz.
    > Your example of 3 ticks would turn into 1.5 ticks per half-period,
    > giving a full period of either 2 or 4 ticks and a 50% duty cycle.
    > This irregularity may be exhibited easily by asking for a beep in,
    > say, the 10 kHz range. As you gradually change the commanded
    > frequency, the audible tone does not change gradually, but instead at
    > certain boundaries of commanded frequency it jumps. That is how I
    > figured out the algorithm. I didn't actually measure anything with
    > ascope, but rather by looking at the jumps I could see what the
    > algorithm was and from that deduced that the Designers had opted to
    > maintain a strict 50% duty cycle, which is cool.
    > The algorithm, by the way, is different for the 49/50.
    > Yours,
    > Irl- Hide quoted text -
    >
    > - Show quoted text -


    OK, now I understand you were actually "reporting" how it actually
    works.

    Claudio

+ Reply to Thread