Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #466658

Re: F to bits

From Les Cargill <lcargill99@comcast.com>
Newsgroups sci.electronics.design
Subject Re: F to bits
Date 2017-07-03 00:51 -0500
Organization A noiseless patient Spider
Message-ID <ojclmr$run$1@dont-email.me> (permalink)
References <oj9occ$nvk$1@reader2.panix.com> <ojbasu$7nc$1@dont-email.me> <ojbebu$jha$1@dont-email.me>

Show all headers | View raw


Don Y wrote:
> On 7/2/2017 10:40 AM, Les Cargill wrote:
>> David Lesher wrote:
>>> Seeking a packaged line (~~60hz) frequency [or period] counter
>>> with I2C or SPI output to feed a Mega2560 box. The goal is to
>>> monitor a b/u generator's speed.
>>>
>>> Suggestions?
>>
>> All the "frequency" oriented things I have seen with SPI in the PI
>> universe are pulse train oriented. If you can get the AC waveform
>> down to pulses, that might work. But that's out of the frying pan
>> into the fire.
>
> The problem with a "generic" frequency/period measurement device is
> they aren't aware of the types of "transition events" that are often
> associated with power events.  I.e., *might* be good when the genset
> is running steady-state (and able to keep up with the load) but
> potentially confused by the genset's coming on line, power falling
> away, etc.
>
> I almost always include a "line frequency clock" in my (mains
> powered) designs.  Its job is just to watch the zero-crossings of the
> mains.  From this, it can tell me: - power is available - nominal
> mains frequency (for dual 50/60Hz deployments) - actual instantaneous
> mains frequency (to frequency lock certain sensor/display
> technologies to reject interference from line noise, display beating,
> etc.) - long term timebase reference (over the course of a day or
> twenty, the AC mains are a remarkably stable reference; computers can
> count over long intervals just as easily as over short!  :> )
>
> But, more importantly, you can create very effective, narrow band
> filters that reject signal components that aren't part of the desired
> signal E.g., if you have deduced that you are operating on a
> particular mains frequency, you can ignore zero crossings that happen
> too close to -- or too far FROM -- the most recent zero-crossing
> (think "bounce" in the transfer switch's contacts or a utilities
> "dying gasps" as it tries valiantly to remain on-line despite network
> events).
>
> How do you tell a generic sensor which of these individual events to
> ignore in its frequency reporting?
>

Ignore? Those sound like the signal :) ; the steady-state operation is 
the noise[1]. And I'd think in terms of plant characterization for that.

[1] er, carrier perhaps...

>> You might be able to make do with a lesser processor; not sure.
>>
>> Clip the waveform, use a diode pair after the clipper to feed two
>> PIO - one for up, one for down. Be careful of voltage and current
>> range on the PIO. I'd have to headscratch a bit on the clipper -
>> you want a pretty hi-Z output.
>>
>> http://www.electronics-tutorials.ws/diode/diode-clipping-circuits.html
>
>>
> If you design the power supply with this in mind, it usually comes
> out (close to) "for free".  Presumably, his box has *some* sort of
> power source...?
>

I bet so.

>> I'd have to think isolation thru on something like this. Might use
>> optos. Dunno yet.
>>
>> You'd prefer that this turn on and off at pi/4, 3pi/4, 5pi/4 and
>> 7pi/4. That's negotiable through oversampling. For production, I
>> might use digital pots to tune the duty cycle.
>>
>> I'd butch the clipper/diode setup up and watch it on a scope for a
>> while to make sure it's not gonna damage the PIO or itself. Buy
>> enough parts to make three. Again, not being a hardcore analog
>> guy, I'd have to think about isolation and the like.
>>
>> That gives you up to four time measurements per cycle. The
>> critical design element then becomes choice of filters.
>>
>> Arduino has a library function called "micros()" that returns a 32
>> bit upcounter w/ resolution of 4 or 8 microseconds. It rolls over
>> at like 70 seconds @ 16MHz.
>>
>> https://www.arduino.cc/en/Reference/Micros
>>
>> 8x oversampling for 60Hz is 960Hz - a very long time @ 16MHz. That
>> should satisfy Nyquist although the duty cycle might be off. You'll
>> have to consider the time to output to the USB serial port...

-- 
Les Cargill

Back to sci.electronics.design | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

F to bits David Lesher <wb8foz@panix.com> - 2017-07-02 03:13 +0000
  Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-01 20:27 -0700
    Re: F to bits David Lesher <wb8foz@panix.com> - 2017-07-02 05:21 +0000
      Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 07:36 -0700
  Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-01 22:34 -0700
    Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 07:55 -0700
      Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 11:44 -0400
        Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 08:51 -0700
          Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 12:00 -0400
            Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 10:20 -0700
              Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 13:52 -0400
      Re: F to bits Neon John <no@never.com> - 2017-07-02 13:41 -0400
      Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 11:22 -0700
      Re: F to bits "John Miles, KE5FX" <jmiles@gmail.com> - 2017-07-02 12:55 -0700
        Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 13:12 -0700
          Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 13:27 -0700
          Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 14:18 -0700
            Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 14:37 -0700
              Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 14:44 -0700
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 14:48 -0700
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 15:44 -0700
                Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 16:23 -0700
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 16:26 -0700
                Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 16:36 -0700
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 16:44 -0700
                Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 17:13 -0700
                Re: F to bits krw@notreal.com - 2017-07-02 19:53 -0400
                Re: F to bits Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2017-07-03 10:30 +0300
                Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-03 09:44 -0700
                Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-03 09:50 -0700
                Re: F to bits Jasen Betts <jasen@xnet.co.nz> - 2017-07-04 05:18 +0000
              Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-03 00:44 -0500
            Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-03 00:42 -0500
            Re: F to bits Jasen Betts <jasen@xnet.co.nz> - 2017-07-04 05:11 +0000
        Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 19:32 -0400
          Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 16:40 -0700
            Re: F to bits klaus.kragelund@gmail.com - 2017-07-02 16:45 -0700
            Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 19:55 -0400
              Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 17:07 -0700
                Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 20:30 -0400
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 17:39 -0700
                Re: F to bits klaus.kragelund@gmail.com - 2017-07-02 18:09 -0700
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 18:45 -0700
                Re: F to bits "John Miles, KE5FX" <jmiles@gmail.com> - 2017-07-02 17:49 -0700
                Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 22:56 -0400
                Re: F to bits "John Miles, KE5FX" <jmiles@gmail.com> - 2017-07-02 21:52 -0700
                Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-03 01:38 -0400
                Re: F to bits David Brown <david.brown@hesbynett.no> - 2017-07-03 12:37 +0200
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-03 04:23 -0700
                Re: F to bits David Brown <david.brown@hesbynett.no> - 2017-07-03 14:10 +0200
                Re: F to bits leongdentalsf@gmail.com - 2017-07-03 06:14 -0700
                Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 15:46 +0100
                Re: F to bits edward.ming.lee@gmail.com - 2017-07-03 08:24 -0700
                Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 17:12 +0100
                Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-03 12:50 -0400
                Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 18:36 +0100
                Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-05 02:01 -0400
                Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-03 09:30 -0700
                Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 12:32 +0100
    Re: F to bits David Lesher <wb8foz@panix.com> - 2017-07-03 00:54 +0000
      Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 18:14 -0700
        Re: F to bits David Lesher <wb8foz@panix.com> - 2017-07-03 02:33 +0000
          Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 21:29 -0700
          Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 22:46 -0700
  Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-02 12:40 -0500
    Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 11:38 -0700
      Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-03 00:51 -0500

csiph-web