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


Groups > sci.electronics.design > #371873 > unrolled thread

Microcontroller phase locked loop, ping Tim Wescott et. al.

Started bybitrex <bitrex@de.lete.earthlink.net>
First post2015-08-06 13:12 -0400
Last post2015-08-06 15:10 -0400
Articles 20 on this page of 28 — 9 participants

Back to article view | Back to sci.electronics.design


Contents

  Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 13:12 -0400
    Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-08-06 13:57 -0400
      Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 14:19 -0400
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <hobbs@electrooptical.net> - 2015-08-06 14:25 -0400
          Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 15:09 -0400
            Re: Microcontroller phase locked loop, ping Tim Wescott et. al. upsidedown@downunder.com - 2015-08-06 22:38 +0300
            Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-08-06 16:34 -0400
              Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 18:20 -0400
            Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Tim Wescott <seemywebsite@myfooter.really> - 2015-08-06 15:48 -0500
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Tim Wescott <seemywebsite@myfooter.really> - 2015-08-06 14:02 -0500
          Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 15:15 -0400
            Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Tim Wescott <tim@seemywebsite.com> - 2015-08-06 15:04 -0500
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. piglet <erichpwagner@hotmail.com> - 2015-08-06 20:23 +0100
          Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 16:04 -0400
          Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 16:06 -0400
      Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-08-06 11:19 -0700
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-06 14:22 -0400
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <hobbs@electrooptical.net> - 2015-08-06 14:26 -0400
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Tim Wescott <seemywebsite@myfooter.really> - 2015-08-06 14:04 -0500
          Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <hobbs@electrooptical.net> - 2015-08-06 16:13 -0400
        Re: Microcontroller phase locked loop, ping Tim Wescott et. al. upsidedown@downunder.com - 2015-08-06 22:48 +0300
          Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <hobbs@electrooptical.net> - 2015-08-06 16:14 -0400
            Re: Microcontroller phase locked loop, ping Tim Wescott et. al. upsidedown@downunder.com - 2015-08-06 23:58 +0300
              Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-08-06 17:13 -0400
                Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Tim Wescott <seemywebsite@myfooter.really> - 2015-08-06 17:40 -0500
                  Re: Microcontroller phase locked loop, ping Tim Wescott et. al. upsidedown@downunder.com - 2015-08-09 12:18 +0300
    Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Tim Wescott <seemywebsite@myfooter.really> - 2015-08-06 13:30 -0500
      Re: Microcontroller phase locked loop, ping Tim Wescott et. al. bitrex <bitrex@de.lete.earthlink.net> - 2015-08-06 15:10 -0400

Page 1 of 2  [1] 2  Next page →


#371873 — Microcontroller phase locked loop, ping Tim Wescott et. al.

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 13:12 -0400
SubjectMicrocontroller phase locked loop, ping Tim Wescott et. al.
Message-ID<55c39580$0$7076$4c5ecfc7@frugalusenet.com>
Has anyone successfully implemented a phase locked loop on a 
microcontroller?

The frequency of interest would be somewhere in the 200kHz range, and 
the objective of the PLL would be FM demodulation.  So I'd have an input 
for the FM modulated frequency, and an external VCO in that range that 
the uC would hopefully control via filtered PWM.  Other than that, this 
is mostly hypothetical for now.

Does this seem possible?  I have the following reference:

http://liquidsdr.org/blog/pll-howto/

I'd be hoping to use something like an ATTiny.  All code would be 
adjusted to use fixed-point math, I'd imagine.

[toc] | [next] | [standalone]


#371875

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-08-06 13:57 -0400
Message-ID<55C39FEF.5010708@electrooptical.net>
In reply to#371873
On 8/6/2015 1:12 PM, bitrex wrote:
> Has anyone successfully implemented a phase locked loop on a
> microcontroller?
>
> The frequency of interest would be somewhere in the 200kHz range, and
> the objective of the PLL would be FM demodulation.  So I'd have an input
> for the FM modulated frequency, and an external VCO in that range that
> the uC would hopefully control via filtered PWM.  Other than that, this
> is mostly hypothetical for now.
>
> Does this seem possible?  I have the following reference:
>
> http://liquidsdr.org/blog/pll-howto/
>
> I'd be hoping to use something like an ATTiny.  All code would be
> adjusted to use fixed-point math, I'd imagine.

For a given resolution, you might as well just use a counter input.

It's not going to be a very good demodulator...what modulation frequency 
and modulation index are you looking to accommodate?

Cheers

Phil Hobbs

-- 
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#371876

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 14:19 -0400
Message-ID<55c3a544$0$25479$4c5ecfc7@frugalusenet.com>
In reply to#371875
On 8/6/2015 1:57 PM, Phil Hobbs wrote:
> On 8/6/2015 1:12 PM, bitrex wrote:
>> Has anyone successfully implemented a phase locked loop on a
>> microcontroller?
>>
>> The frequency of interest would be somewhere in the 200kHz range, and
>> the objective of the PLL would be FM demodulation.  So I'd have an input
>> for the FM modulated frequency, and an external VCO in that range that
>> the uC would hopefully control via filtered PWM.  Other than that, this
>> is mostly hypothetical for now.
>>
>> Does this seem possible?  I have the following reference:
>>
>> http://liquidsdr.org/blog/pll-howto/
>>
>> I'd be hoping to use something like an ATTiny.  All code would be
>> adjusted to use fixed-point math, I'd imagine.
>
> For a given resolution, you might as well just use a counter input.
>
> It's not going to be a very good demodulator...what modulation frequency
> and modulation index are you looking to accommodate?
>
> Cheers
>
> Phil Hobbs
>

Ah, wait a second, I got confused.  I don't actually need this PLL to do 
FM demodulation, haha.  Rather embarrassing.  What I have is maybe an 
external sine VCO whose "base frequency" I would like to lock to a 
reference. So we have a varactor diode or something for CV input on the 
oscillator, and over long time scales the PLL keeps the VCO synced to 
some kind of reference (generated by the uC?) or something like this.

Maybe there's a better way to do this.

[toc] | [prev] | [next] | [standalone]


#371879

FromPhil Hobbs <hobbs@electrooptical.net>
Date2015-08-06 14:25 -0400
Message-ID<55C3A685.6060401@electrooptical.net>
In reply to#371876
On 8/6/2015 2:19 PM, bitrex wrote:
> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>> On 8/6/2015 1:12 PM, bitrex wrote:
>>> Has anyone successfully implemented a phase locked loop on a
>>> microcontroller?
>>>
>>> The frequency of interest would be somewhere in the 200kHz range, and
>>> the objective of the PLL would be FM demodulation.  So I'd have an input
>>> for the FM modulated frequency, and an external VCO in that range that
>>> the uC would hopefully control via filtered PWM.  Other than that, this
>>> is mostly hypothetical for now.
>>>
>>> Does this seem possible?  I have the following reference:
>>>
>>> http://liquidsdr.org/blog/pll-howto/
>>>
>>> I'd be hoping to use something like an ATTiny.  All code would be
>>> adjusted to use fixed-point math, I'd imagine.
>>
>> For a given resolution, you might as well just use a counter input.
>>
>> It's not going to be a very good demodulator...what modulation frequency
>> and modulation index are you looking to accommodate?
>>
>> Cheers
>>
>> Phil Hobbs
>>
>
> Ah, wait a second, I got confused.  I don't actually need this PLL to do
> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
> external sine VCO whose "base frequency" I would like to lock to a
> reference. So we have a varactor diode or something for CV input on the
> oscillator, and over long time scales the PLL keeps the VCO synced to
> some kind of reference (generated by the uC?) or something like this.
>
> Maybe there's a better way to do this.

How about a 4046?  Guaranteed to lock up anywhere in the VCO's range.

Do you want to lock it at 1:1 or some other ratio?

Cheers

Phil Hobbs

-- 
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#371888

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 15:09 -0400
Message-ID<55c3b0fc$0$1754$4c5ecfc7@frugalusenet.com>
In reply to#371879
On 8/6/2015 2:25 PM, Phil Hobbs wrote:
> On 8/6/2015 2:19 PM, bitrex wrote:
>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>> Has anyone successfully implemented a phase locked loop on a
>>>> microcontroller?
>>>>
>>>> The frequency of interest would be somewhere in the 200kHz range, and
>>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>>> input
>>>> for the FM modulated frequency, and an external VCO in that range that
>>>> the uC would hopefully control via filtered PWM.  Other than that, this
>>>> is mostly hypothetical for now.
>>>>
>>>> Does this seem possible?  I have the following reference:
>>>>
>>>> http://liquidsdr.org/blog/pll-howto/
>>>>
>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>> adjusted to use fixed-point math, I'd imagine.
>>>
>>> For a given resolution, you might as well just use a counter input.
>>>
>>> It's not going to be a very good demodulator...what modulation frequency
>>> and modulation index are you looking to accommodate?
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>>
>>
>> Ah, wait a second, I got confused.  I don't actually need this PLL to do
>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>> external sine VCO whose "base frequency" I would like to lock to a
>> reference. So we have a varactor diode or something for CV input on the
>> oscillator, and over long time scales the PLL keeps the VCO synced to
>> some kind of reference (generated by the uC?) or something like this.
>>
>> Maybe there's a better way to do this.
>
> How about a 4046?  Guaranteed to lock up anywhere in the VCO's range.
>
> Do you want to lock it at 1:1 or some other ratio?
>
> Cheers
>
> Phil Hobbs
>

I'm not sure that it would work in the application I'm thinking of. 
What I want is basically a "tuning" feature where I can have <something> 
apply a CV to a bunch of RF VCOs that will sync them up to a crystal 
controlled reference, then allow the VCOs frequency to vary about that 
reference frequency.

[toc] | [prev] | [next] | [standalone]


#371893

Fromupsidedown@downunder.com
Date2015-08-06 22:38 +0300
Message-ID<mqd7sa5bu72pnvobn90dvlnp65i7lr5uf8@4ax.com>
In reply to#371888
On Thu, 6 Aug 2015 15:09:50 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:

>On 8/6/2015 2:25 PM, Phil Hobbs wrote:
>> On 8/6/2015 2:19 PM, bitrex wrote:
>>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>>> Has anyone successfully implemented a phase locked loop on a
>>>>> microcontroller?
>>>>>
>>>>> The frequency of interest would be somewhere in the 200kHz range, and
>>>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>>>> input
>>>>> for the FM modulated frequency, and an external VCO in that range that
>>>>> the uC would hopefully control via filtered PWM.  Other than that, this
>>>>> is mostly hypothetical for now.
>>>>>
>>>>> Does this seem possible?  I have the following reference:
>>>>>
>>>>> http://liquidsdr.org/blog/pll-howto/
>>>>>
>>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>>> adjusted to use fixed-point math, I'd imagine.
>>>>
>>>> For a given resolution, you might as well just use a counter input.
>>>>
>>>> It's not going to be a very good demodulator...what modulation frequency
>>>> and modulation index are you looking to accommodate?
>>>>
>>>> Cheers
>>>>
>>>> Phil Hobbs
>>>>
>>>
>>> Ah, wait a second, I got confused.  I don't actually need this PLL to do
>>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>>> external sine VCO whose "base frequency" I would like to lock to a
>>> reference. So we have a varactor diode or something for CV input on the
>>> oscillator, and over long time scales the PLL keeps the VCO synced to
>>> some kind of reference (generated by the uC?) or something like this.
>>>
>>> Maybe there's a better way to do this.
>>
>> How about a 4046?  Guaranteed to lock up anywhere in the VCO's range.
>>
>> Do you want to lock it at 1:1 or some other ratio?
>>
>> Cheers
>>
>> Phil Hobbs
>>
>
>I'm not sure that it would work in the application I'm thinking of. 
>What I want is basically a "tuning" feature where I can have <something> 
>apply a CV to a bunch of RF VCOs that will sync them up to a crystal 
>controlled reference, then allow the VCOs frequency to vary about that 
>reference frequency.

Are you perhaps talking about an offset  loop ? Otherwise, your
description doesn't make a lot sense.

[toc] | [prev] | [next] | [standalone]


#371902

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-08-06 16:34 -0400
Message-ID<55C3C4EC.9020504@electrooptical.net>
In reply to#371888
On 8/6/2015 3:09 PM, bitrex wrote:
> On 8/6/2015 2:25 PM, Phil Hobbs wrote:
>> On 8/6/2015 2:19 PM, bitrex wrote:
>>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>>> Has anyone successfully implemented a phase locked loop on a
>>>>> microcontroller?
>>>>>
>>>>> The frequency of interest would be somewhere in the 200kHz range, and
>>>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>>>> input
>>>>> for the FM modulated frequency, and an external VCO in that range that
>>>>> the uC would hopefully control via filtered PWM.  Other than that,
>>>>> this
>>>>> is mostly hypothetical for now.
>>>>>
>>>>> Does this seem possible?  I have the following reference:
>>>>>
>>>>> http://liquidsdr.org/blog/pll-howto/
>>>>>
>>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>>> adjusted to use fixed-point math, I'd imagine.
>>>>
>>>> For a given resolution, you might as well just use a counter input.
>>>>
>>>> It's not going to be a very good demodulator...what modulation
>>>> frequency
>>>> and modulation index are you looking to accommodate?
>>>>
>>>> Cheers
>>>>
>>>> Phil Hobbs
>>>>
>>>
>>> Ah, wait a second, I got confused.  I don't actually need this PLL to do
>>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>>> external sine VCO whose "base frequency" I would like to lock to a
>>> reference. So we have a varactor diode or something for CV input on the
>>> oscillator, and over long time scales the PLL keeps the VCO synced to
>>> some kind of reference (generated by the uC?) or something like this.
>>>
>>> Maybe there's a better way to do this.
>>
>> How about a 4046?  Guaranteed to lock up anywhere in the VCO's range.
>>
>> Do you want to lock it at 1:1 or some other ratio?
>>
>> Cheers
>>
>> Phil Hobbs
>>
>
> I'm not sure that it would work in the application I'm thinking of. What
> I want is basically a "tuning" feature where I can have <something>
> apply a CV to a bunch of RF VCOs that will sync them up to a crystal
> controlled reference, then allow the VCOs frequency to vary about that
> reference frequency.

When you say "allow", do you mean "cause"?  If you're just trying to 
temperature compensate the free-running frequency, that's a 
frequency-locked loop (FLL) rather than a phase-locked loop, and is a 
much easier problem.  Using a uP to implement an FLL is quite reasonable.

For a current project, I'm doing something a little bit similar: 
linearizing VCOs using a Labjack plus a cubic spline fit.  (The spline 
is done inversely, i.e. the frequency is the independent variable and 
the spline gives you the corresponding DAC code.)

Cheers

Phil Hobbs

-- 
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#371918

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 18:20 -0400
Message-ID<55c3ddb6$0$6998$4c5ecfc7@frugalusenet.com>
In reply to#371902
On 8/6/2015 4:34 PM, Phil Hobbs wrote:
> On 8/6/2015 3:09 PM, bitrex wrote:
>> On 8/6/2015 2:25 PM, Phil Hobbs wrote:
>>> On 8/6/2015 2:19 PM, bitrex wrote:
>>>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>>>> Has anyone successfully implemented a phase locked loop on a
>>>>>> microcontroller?
>>>>>>
>>>>>> The frequency of interest would be somewhere in the 200kHz range, and
>>>>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>>>>> input
>>>>>> for the FM modulated frequency, and an external VCO in that range
>>>>>> that
>>>>>> the uC would hopefully control via filtered PWM.  Other than that,
>>>>>> this
>>>>>> is mostly hypothetical for now.
>>>>>>
>>>>>> Does this seem possible?  I have the following reference:
>>>>>>
>>>>>> http://liquidsdr.org/blog/pll-howto/
>>>>>>
>>>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>>>> adjusted to use fixed-point math, I'd imagine.
>>>>>
>>>>> For a given resolution, you might as well just use a counter input.
>>>>>
>>>>> It's not going to be a very good demodulator...what modulation
>>>>> frequency
>>>>> and modulation index are you looking to accommodate?
>>>>>
>>>>> Cheers
>>>>>
>>>>> Phil Hobbs
>>>>>
>>>>
>>>> Ah, wait a second, I got confused.  I don't actually need this PLL
>>>> to do
>>>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>>>> external sine VCO whose "base frequency" I would like to lock to a
>>>> reference. So we have a varactor diode or something for CV input on the
>>>> oscillator, and over long time scales the PLL keeps the VCO synced to
>>>> some kind of reference (generated by the uC?) or something like this.
>>>>
>>>> Maybe there's a better way to do this.
>>>
>>> How about a 4046?  Guaranteed to lock up anywhere in the VCO's range.
>>>
>>> Do you want to lock it at 1:1 or some other ratio?
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>>
>>
>> I'm not sure that it would work in the application I'm thinking of. What
>> I want is basically a "tuning" feature where I can have <something>
>> apply a CV to a bunch of RF VCOs that will sync them up to a crystal
>> controlled reference, then allow the VCOs frequency to vary about that
>> reference frequency.
>
> When you say "allow", do you mean "cause"?  If you're just trying to
> temperature compensate the free-running frequency, that's a
> frequency-locked loop (FLL) rather than a phase-locked loop, and is a
> much easier problem.  Using a uP to implement an FLL is quite reasonable.
>
> For a current project, I'm doing something a little bit similar:
> linearizing VCOs using a Labjack plus a cubic spline fit.  (The spline
> is done inversely, i.e. the frequency is the independent variable and
> the spline gives you the corresponding DAC code.)
>
> Cheers
>
> Phil Hobbs
>

The stuff that "piglet" posted was sort of up  my alley - I guess a FLL 
_is_ what I'm after.  I want a tunable RF VCO with a center frequency 
that doesn't drift all around.

http://www.hanssummers.com/images/stories/library/qexfeb96.pdf

[toc] | [prev] | [next] | [standalone]


#371905

FromTim Wescott <seemywebsite@myfooter.really>
Date2015-08-06 15:48 -0500
Message-ID<kcKdnYy7_5awVV7InZ2dnUVZ5h6dnZ2d@giganews.com>
In reply to#371888
On Thu, 06 Aug 2015 15:09:50 -0400, bitrex wrote:

> On 8/6/2015 2:25 PM, Phil Hobbs wrote:
>> On 8/6/2015 2:19 PM, bitrex wrote:
>>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>>> Has anyone successfully implemented a phase locked loop on a
>>>>> microcontroller?
>>>>>
>>>>> The frequency of interest would be somewhere in the 200kHz range,
>>>>> and the objective of the PLL would be FM demodulation.  So I'd have
>>>>> an input for the FM modulated frequency, and an external VCO in that
>>>>> range that the uC would hopefully control via filtered PWM.  Other
>>>>> than that, this is mostly hypothetical for now.
>>>>>
>>>>> Does this seem possible?  I have the following reference:
>>>>>
>>>>> http://liquidsdr.org/blog/pll-howto/
>>>>>
>>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>>> adjusted to use fixed-point math, I'd imagine.
>>>>
>>>> For a given resolution, you might as well just use a counter input.
>>>>
>>>> It's not going to be a very good demodulator...what modulation
>>>> frequency and modulation index are you looking to accommodate?
>>>>
>>>> Cheers
>>>>
>>>> Phil Hobbs
>>>>
>>>>
>>> Ah, wait a second, I got confused.  I don't actually need this PLL to
>>> do FM demodulation, haha.  Rather embarrassing.  What I have is maybe
>>> an external sine VCO whose "base frequency" I would like to lock to a
>>> reference. So we have a varactor diode or something for CV input on
>>> the oscillator, and over long time scales the PLL keeps the VCO synced
>>> to some kind of reference (generated by the uC?) or something like
>>> this.
>>>
>>> Maybe there's a better way to do this.
>>
>> How about a 4046?  Guaranteed to lock up anywhere in the VCO's range.
>>
>> Do you want to lock it at 1:1 or some other ratio?
>>
>> Cheers
>>
>> Phil Hobbs
>>
>>
> I'm not sure that it would work in the application I'm thinking of. What
> I want is basically a "tuning" feature where I can have <something>
> apply a CV to a bunch of RF VCOs that will sync them up to a crystal
> controlled reference, then allow the VCOs frequency to vary about that
> reference frequency.

Y'know, for all that I'm usually pounding a drum about using a micro -- 
why here?  If you're doing the oscillator in analog-land, why not 
implement the whole PLL there?

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

[toc] | [prev] | [next] | [standalone]


#371886

FromTim Wescott <seemywebsite@myfooter.really>
Date2015-08-06 14:02 -0500
Message-ID<kcKdnZK7_5bCMl7InZ2dnUVZ5h6dnZ2d@giganews.com>
In reply to#371876
On Thu, 06 Aug 2015 14:19:50 -0400, bitrex wrote:

> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>> On 8/6/2015 1:12 PM, bitrex wrote:
>>> Has anyone successfully implemented a phase locked loop on a
>>> microcontroller?
>>>
>>> The frequency of interest would be somewhere in the 200kHz range, and
>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>> input for the FM modulated frequency, and an external VCO in that
>>> range that the uC would hopefully control via filtered PWM.  Other
>>> than that, this is mostly hypothetical for now.
>>>
>>> Does this seem possible?  I have the following reference:
>>>
>>> http://liquidsdr.org/blog/pll-howto/
>>>
>>> I'd be hoping to use something like an ATTiny.  All code would be
>>> adjusted to use fixed-point math, I'd imagine.
>>
>> For a given resolution, you might as well just use a counter input.
>>
>> It's not going to be a very good demodulator...what modulation
>> frequency and modulation index are you looking to accommodate?
>>
>> Cheers
>>
>> Phil Hobbs
>>
>>
> Ah, wait a second, I got confused.  I don't actually need this PLL to do
> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
> external sine VCO whose "base frequency" I would like to lock to a
> reference. So we have a varactor diode or something for CV input on the
> oscillator, and over long time scales the PLL keeps the VCO synced to
> some kind of reference (generated by the uC?) or something like this.
> 
> Maybe there's a better way to do this.

What?  Are you saying you have a pure tone at 200kHz that you want to 
lock onto with a PLL?  And you want to do the loop filter with a 
microcontroller?

Could you please go back and restate your question?  Please let us know 
what you're using for a reference signal, what you're using for a VCO, 
why you can't use the reference signal, why the VCO is going to be making 
things better, etc.

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

[toc] | [prev] | [next] | [standalone]


#371890

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 15:15 -0400
Message-ID<55c3b23c$0$1754$4c5ecfc7@frugalusenet.com>
In reply to#371886
On 8/6/2015 3:02 PM, Tim Wescott wrote:
> On Thu, 06 Aug 2015 14:19:50 -0400, bitrex wrote:
>
>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>> Has anyone successfully implemented a phase locked loop on a
>>>> microcontroller?
>>>>
>>>> The frequency of interest would be somewhere in the 200kHz range, and
>>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>>> input for the FM modulated frequency, and an external VCO in that
>>>> range that the uC would hopefully control via filtered PWM.  Other
>>>> than that, this is mostly hypothetical for now.
>>>>
>>>> Does this seem possible?  I have the following reference:
>>>>
>>>> http://liquidsdr.org/blog/pll-howto/
>>>>
>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>> adjusted to use fixed-point math, I'd imagine.
>>>
>>> For a given resolution, you might as well just use a counter input.
>>>
>>> It's not going to be a very good demodulator...what modulation
>>> frequency and modulation index are you looking to accommodate?
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>>
>>>
>> Ah, wait a second, I got confused.  I don't actually need this PLL to do
>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>> external sine VCO whose "base frequency" I would like to lock to a
>> reference. So we have a varactor diode or something for CV input on the
>> oscillator, and over long time scales the PLL keeps the VCO synced to
>> some kind of reference (generated by the uC?) or something like this.
>>
>> Maybe there's a better way to do this.
>
> What?  Are you saying you have a pure tone at 200kHz that you want to
> lock onto with a PLL?  And you want to do the loop filter with a
> microcontroller?
>
> Could you please go back and restate your question?  Please let us know
> what you're using for a reference signal, what you're using for a VCO,
> why you can't use the reference signal, why the VCO is going to be making
> things better, etc.
>

I guess that is essentially what I'm asking.  Using a uC as the loop 
filter in a PLL to keep a bunch of say, Colpitts oscillators with 
varactor diodes or something as the tuning elements locked to a 
reference over long time scales.

[toc] | [prev] | [next] | [standalone]


#371896

FromTim Wescott <tim@seemywebsite.com>
Date2015-08-06 15:04 -0500
Message-ID<RMOdnUfifaFDIF7InZ2dnUU7-VGdnZ2d@giganews.com>
In reply to#371890
On Thu, 06 Aug 2015 15:15:11 -0400, bitrex wrote:

> On 8/6/2015 3:02 PM, Tim Wescott wrote:
>> On Thu, 06 Aug 2015 14:19:50 -0400, bitrex wrote:
>>
>>> On 8/6/2015 1:57 PM, Phil Hobbs wrote:
>>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>>> Has anyone successfully implemented a phase locked loop on a
>>>>> microcontroller?
>>>>>
>>>>> The frequency of interest would be somewhere in the 200kHz range,
>>>>> and the objective of the PLL would be FM demodulation.  So I'd have
>>>>> an input for the FM modulated frequency, and an external VCO in that
>>>>> range that the uC would hopefully control via filtered PWM.  Other
>>>>> than that, this is mostly hypothetical for now.
>>>>>
>>>>> Does this seem possible?  I have the following reference:
>>>>>
>>>>> http://liquidsdr.org/blog/pll-howto/
>>>>>
>>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>>> adjusted to use fixed-point math, I'd imagine.
>>>>
>>>> For a given resolution, you might as well just use a counter input.
>>>>
>>>> It's not going to be a very good demodulator...what modulation
>>>> frequency and modulation index are you looking to accommodate?
>>>>
>>>> Cheers
>>>>
>>>> Phil Hobbs
>>>>
>>>>
>>> Ah, wait a second, I got confused.  I don't actually need this PLL to
>>> do FM demodulation, haha.  Rather embarrassing.  What I have is maybe
>>> an external sine VCO whose "base frequency" I would like to lock to a
>>> reference. So we have a varactor diode or something for CV input on
>>> the oscillator, and over long time scales the PLL keeps the VCO synced
>>> to some kind of reference (generated by the uC?) or something like
>>> this.
>>>
>>> Maybe there's a better way to do this.
>>
>> What?  Are you saying you have a pure tone at 200kHz that you want to
>> lock onto with a PLL?  And you want to do the loop filter with a
>> microcontroller?
>>
>> Could you please go back and restate your question?  Please let us know
>> what you're using for a reference signal, what you're using for a VCO,
>> why you can't use the reference signal, why the VCO is going to be
>> making things better, etc.
>>
>>
> I guess that is essentially what I'm asking.  Using a uC as the loop
> filter in a PLL to keep a bunch of say, Colpitts oscillators with
> varactor diodes or something as the tuning elements locked to a
> reference over long time scales.

Yes you can do this.  It's the sort of things that's mostly worthwhile if 
your reference has short-term noise that you want to clean up with the 
oscillators (which means you need to build low phase-noise oscillators).

Assuming the reference comes to you as a square wave, I would square up 
the VCO output.  Then I would capture both the reference and the VCO 
signal with a capture/compare input on a timer on the microcontroller.  
The difference in arrival time is what you use as your "phase error".

You probably need to implement some sort of cycle counting to aid in 
acquisition, and be very careful about not introducing phase noise into 
your oscillators with your correction signal: filtered PWM may not cut 
it, you may need to use a DAC (and you should take care about noise on 
your DAC reference voltage, or on your PWM rails).

You may even be able to do this with an AT-Tiny, but you won't be doing 
much else.  I've done something similar to gen-lock digital video to an 
external source, but in our case it made sense because our video timing 
was in digital-land: had it all been analog I would have been the first 
one to question why we weren't doing the PLL entirely in the analog (in 
fact, IIRC, I made sure that we blocked out an analog solution before we 
decided that digital was better).

-- 
www.wescottdesign.com

[toc] | [prev] | [next] | [standalone]


#371891

Frompiglet <erichpwagner@hotmail.com>
Date2015-08-06 20:23 +0100
Message-ID<mq0c2h$qnc$1@dont-email.me>
In reply to#371876
On 06/08/2015 19:19, bitrex wrote:
> Ah, wait a second, I got confused.  I don't actually need this PLL to do
> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
> external sine VCO whose "base frequency" I would like to lock to a
> reference. So we have a varactor diode or something for CV input on the
> oscillator, and over long time scales the PLL keeps the VCO synced to
> some kind of reference (generated by the uC?) or something like this.
>
> Maybe there's a better way to do this.

Try reading up some articles on "huff and puff frequency stabilisers" - 
may inspire or help you hit your goal.

piglet

[toc] | [prev] | [next] | [standalone]


#371895

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 16:04 -0400
Message-ID<55c3bdb4$0$26434$4c5ecfc7@frugalusenet.com>
In reply to#371891
On 8/6/2015 3:23 PM, piglet wrote:
> On 06/08/2015 19:19, bitrex wrote:
>> Ah, wait a second, I got confused.  I don't actually need this PLL to do
>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>> external sine VCO whose "base frequency" I would like to lock to a
>> reference. So we have a varactor diode or something for CV input on the
>> oscillator, and over long time scales the PLL keeps the VCO synced to
>> some kind of reference (generated by the uC?) or something like this.
>>
>> Maybe there's a better way to do this.
>
> Try reading up some articles on "huff and puff frequency stabilisers" -
> may inspire or help you hit your goal.
>
> piglet

Thank you! This seems to be very much like what I'm looking for.

[toc] | [prev] | [next] | [standalone]


#371897

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-06 16:06 -0400
Message-ID<55c3be28$0$26434$4c5ecfc7@frugalusenet.com>
In reply to#371891
On 8/6/2015 3:23 PM, piglet wrote:
> On 06/08/2015 19:19, bitrex wrote:
>> Ah, wait a second, I got confused.  I don't actually need this PLL to do
>> FM demodulation, haha.  Rather embarrassing.  What I have is maybe an
>> external sine VCO whose "base frequency" I would like to lock to a
>> reference. So we have a varactor diode or something for CV input on the
>> oscillator, and over long time scales the PLL keeps the VCO synced to
>> some kind of reference (generated by the uC?) or something like this.
>>
>> Maybe there's a better way to do this.
>
> Try reading up some articles on "huff and puff frequency stabilisers" -
> may inspire or help you hit your goal.
>
> piglet

http://www.hanssummers.com/images/stories/library/ttfeb07.pdf

Awesome.

[toc] | [prev] | [next] | [standalone]


#371877

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-08-06 11:19 -0700
Message-ID<l697sadvs4nsgce9j1lut58g5cv7ehkder@4ax.com>
In reply to#371875
On Thu, 06 Aug 2015 13:57:03 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>On 8/6/2015 1:12 PM, bitrex wrote:
>> Has anyone successfully implemented a phase locked loop on a
>> microcontroller?
>>
>> The frequency of interest would be somewhere in the 200kHz range, and
>> the objective of the PLL would be FM demodulation.  So I'd have an input
>> for the FM modulated frequency, and an external VCO in that range that
>> the uC would hopefully control via filtered PWM.  Other than that, this
>> is mostly hypothetical for now.
>>
>> Does this seem possible?  I have the following reference:
>>
>> http://liquidsdr.org/blog/pll-howto/
>>
>> I'd be hoping to use something like an ATTiny.  All code would be
>> adjusted to use fixed-point math, I'd imagine.
>
>For a given resolution, you might as well just use a counter input.
>
>It's not going to be a very good demodulator...what modulation frequency 
>and modulation index are you looking to accommodate?
>
>Cheers
>
>Phil Hobbs

Awwwh, shucks, Phil, Don't you know that the solution for all analog
problems is a uP ?>:-}
		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
                    Age gets better with wine!

[toc] | [prev] | [next] | [standalone]


#371878

FromDecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org>
Date2015-08-06 14:22 -0400
Message-ID<2e97saht58p399hc10u6oqv6kf7frngr21@4ax.com>
In reply to#371877
On Thu, 06 Aug 2015 11:19:55 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> Gave us:

>On Thu, 06 Aug 2015 13:57:03 -0400, Phil Hobbs
><pcdhSpamMeSenseless@electrooptical.net> wrote:
>
>>On 8/6/2015 1:12 PM, bitrex wrote:
>>> Has anyone successfully implemented a phase locked loop on a
>>> microcontroller?
>>>
>>> The frequency of interest would be somewhere in the 200kHz range, and
>>> the objective of the PLL would be FM demodulation.  So I'd have an input
>>> for the FM modulated frequency, and an external VCO in that range that
>>> the uC would hopefully control via filtered PWM.  Other than that, this
>>> is mostly hypothetical for now.
>>>
>>> Does this seem possible?  I have the following reference:
>>>
>>> http://liquidsdr.org/blog/pll-howto/
>>>
>>> I'd be hoping to use something like an ATTiny.  All code would be
>>> adjusted to use fixed-point math, I'd imagine.
>>
>>For a given resolution, you might as well just use a counter input.
>>
>>It's not going to be a very good demodulator...what modulation frequency 
>>and modulation index are you looking to accommodate?
>>
>>Cheers
>>
>>Phil Hobbs
>
>Awwwh, shucks, Phil, Don't you know that the solution for all analog
>problems is a uP ?>:-}
>		
>                                        ...Jim Thompson

  Envelope tracking. (not a post office term)

[toc] | [prev] | [next] | [standalone]


#371880

FromPhil Hobbs <hobbs@electrooptical.net>
Date2015-08-06 14:26 -0400
Message-ID<55C3A6BE.80108@electrooptical.net>
In reply to#371877
On 8/6/2015 2:19 PM, Jim Thompson wrote:
> On Thu, 06 Aug 2015 13:57:03 -0400, Phil Hobbs
> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>
>> On 8/6/2015 1:12 PM, bitrex wrote:
>>> Has anyone successfully implemented a phase locked loop on a
>>> microcontroller?
>>>
>>> The frequency of interest would be somewhere in the 200kHz range, and
>>> the objective of the PLL would be FM demodulation.  So I'd have an input
>>> for the FM modulated frequency, and an external VCO in that range that
>>> the uC would hopefully control via filtered PWM.  Other than that, this
>>> is mostly hypothetical for now.
>>>
>>> Does this seem possible?  I have the following reference:
>>>
>>> http://liquidsdr.org/blog/pll-howto/
>>>
>>> I'd be hoping to use something like an ATTiny.  All code would be
>>> adjusted to use fixed-point math, I'd imagine.
>>
>> For a given resolution, you might as well just use a counter input.
>>
>> It's not going to be a very good demodulator...what modulation frequency
>> and modulation index are you looking to accommodate?
>>
>> Cheers
>>
>> Phil Hobbs
>
> Awwwh, shucks, Phil, Don't you know that the solution for all analog
> problems is a uP ?>:-}
> 		
>                                          ...Jim Thompson

Just like the solution for all optical problems is a webcam and a 
crapload of software.

Cheers

Phil Hobbs


-- 
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#371887

FromTim Wescott <seemywebsite@myfooter.really>
Date2015-08-06 14:04 -0500
Message-ID<kcKdnY27_5YxMl7InZ2dnUVZ5h6dnZ2d@giganews.com>
In reply to#371877
On Thu, 06 Aug 2015 11:19:55 -0700, Jim Thompson wrote:

> On Thu, 06 Aug 2015 13:57:03 -0400, Phil Hobbs
> <pcdhSpamMeSenseless@electrooptical.net> wrote:
> 
>>On 8/6/2015 1:12 PM, bitrex wrote:
>>> Has anyone successfully implemented a phase locked loop on a
>>> microcontroller?
>>>
>>> The frequency of interest would be somewhere in the 200kHz range, and
>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>> input for the FM modulated frequency, and an external VCO in that
>>> range that the uC would hopefully control via filtered PWM.  Other
>>> than that, this is mostly hypothetical for now.
>>>
>>> Does this seem possible?  I have the following reference:
>>>
>>> http://liquidsdr.org/blog/pll-howto/
>>>
>>> I'd be hoping to use something like an ATTiny.  All code would be
>>> adjusted to use fixed-point math, I'd imagine.
>>
>>For a given resolution, you might as well just use a counter input.
>>
>>It's not going to be a very good demodulator...what modulation frequency
>>and modulation index are you looking to accommodate?
>>
>>Cheers
>>
>>Phil Hobbs
> 
> Awwwh, shucks, Phil, Don't you know that the solution for all analog
> problems is a uP ?>:-}

'struth.  It's just that for some of them, the uP that'll do the job 
hasn't been invented yet.

Just you wait -- before you die, Linear Technologies will have high-end 
op-amps with ARM cores.

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

[toc] | [prev] | [next] | [standalone]


#371899

FromPhil Hobbs <hobbs@electrooptical.net>
Date2015-08-06 16:13 -0400
Message-ID<55C3BFE5.6030205@electrooptical.net>
In reply to#371887
On 8/6/2015 3:04 PM, Tim Wescott wrote:
> On Thu, 06 Aug 2015 11:19:55 -0700, Jim Thompson wrote:
>
>> On Thu, 06 Aug 2015 13:57:03 -0400, Phil Hobbs
>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>
>>> On 8/6/2015 1:12 PM, bitrex wrote:
>>>> Has anyone successfully implemented a phase locked loop on a
>>>> microcontroller?
>>>>
>>>> The frequency of interest would be somewhere in the 200kHz range, and
>>>> the objective of the PLL would be FM demodulation.  So I'd have an
>>>> input for the FM modulated frequency, and an external VCO in that
>>>> range that the uC would hopefully control via filtered PWM.  Other
>>>> than that, this is mostly hypothetical for now.
>>>>
>>>> Does this seem possible?  I have the following reference:
>>>>
>>>> http://liquidsdr.org/blog/pll-howto/
>>>>
>>>> I'd be hoping to use something like an ATTiny.  All code would be
>>>> adjusted to use fixed-point math, I'd imagine.
>>>
>>> For a given resolution, you might as well just use a counter input.
>>>
>>> It's not going to be a very good demodulator...what modulation frequency
>>> and modulation index are you looking to accommodate?
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>
>> Awwwh, shucks, Phil, Don't you know that the solution for all analog
>> problems is a uP ?>:-}
>
> 'struth.  It's just that for some of them, the uP that'll do the job
> hasn't been invented yet.
>
> Just you wait -- before you die, Linear Technologies will have high-end
> op-amps with ARM cores.
>
Nice of you to wish us another 100 years or so. ;)

Cheers

Phil Hobbs

-- 
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | sci.electronics.design


csiph-web