From: Tim Wescott on
Chris wrote:
> I have posted several threads about converting 24Hz pulses to 60Hz
> basically a 5/2 ratio. I tried a phase locked loop, it sorta works,
> but my chip count is getting high, and I am thinking about making more
> of these and selling them if I can write a computer program to resolve
> wave sound files.
>
> Therefore, since I am not very familiar with micro controllers, I was
> not planning on using one. However, I remember an engineer friend of
> mine mentioning the BASIC stamp. I have dabbled in BASIC so, I might
> approach the problem with this as a solution, especially if I can do
> it with one or two chips.
>
> I would think that I could sample the 24Hz side for one second. Take
> that number and use it to divide a much higher frequency quartz
> reference by some large value of N so that I can get it back down to
> 60Hz. Therefore my lock time would be one second. I can have an easy
> lock indication and a fairly fast response to any changes in
> frequency.
>
> What do you guys/gals think?

That algorithm is both awkward and inaccurate.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Tim Wescott on
Jan Panteltje wrote:
> On a sunny day (Fri, 5 Mar 2010 12:32:47 -0800 (PST)) it happened Chris
> <christopher.maness(a)gmail.com> wrote in
> <248a815a-80f1-425c-8bbe-fe9a2829ba14(a)g8g2000pri.googlegroups.com>:
>
>> On Mar 5, 11:59 am, Jan Panteltje <pNaonStpealm...(a)yahoo.com> wrote:
>>> On a sunny day (Fri, 5 Mar 2010 11:11:38 -0800 (PST)) it happened Chris
>>> <christopher.man...(a)gmail.com> wrote in
>>> <29529065-09fc-4636-9a29-c618cbc16...(a)x1g2000prb.googlegroups.com>:
>>>
>>>
>>>
>>>> I have posted several threads about converting 24Hz pulses to 60Hz
>>>> basically a 5/2 ratio. I tried a phase locked loop, it sorta works,
>>>> but my chip count is getting high, and I am thinking about making more
>>>> of these and selling them if I can write a computer program to resolve
>>>> wave sound files.
>>>> Therefore, since I am not very familiar with micro controllers, I was
>>>> not planning on using one. However, I remember an engineer friend of
>>>> mine mentioning the BASIC stamp. I have dabbled in BASIC so, I might
>>>> approach the problem with this as a solution, especially if I can do
>>>> it with one or two chips.
>>>> I would think that I could sample the 24Hz side for one second. Take
>>>> that number and use it to divide a much higher frequency quartz
>>>> reference by some large value of N so that I can get it back down to
>>>> 60Hz. Therefore my lock time would be one second. I can have an ea=
>> sy
>>>> lock indication and a fairly fast response to any changes in
>>>> frequency.
>>>> What do you guys/gals think?
>>>> Regards,
>>>> Chris Maness
>>> Years ago I posted a PIC 50 Hz PLL asm code here.
>>> Or maybe it was 25 Hz.
>>> I would not bother with BASIC, likely way too slow, and way too much reso=
>> urces hungry.
>>> A 1$50 12 pin PIC should do...
>> What are some models that would be good for that application. I see
>> some 8 pin models that are only $2. The only problem is that I have
>> NO clue how to start programming them.
>>
>> Regards,
>> Chris
>
> I dunno, how many I/O pins, what clock speed,
> do you need any thing else like an ADC or comparators, EEPROM?
> I used a 12F629.
> You need a programmer, can be made yourself for a few $,
> or buy one for a lot of dollars, like 50$ even.
> Then you need MPLAB from Microchip, the PC software development environment.
> I do no tuse that either, I wrote my own programmer software and use Linux and gpasm.
> You DO need an oscilloscope in my opinion, else no clue what PIC does.
>
But then you need an oscilloscope for an analog PLL, or no clue what
it's doing.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Tim Wescott on
Chris wrote:
> I have posted several threads about converting 24Hz pulses to 60Hz
> basically a 5/2 ratio. I tried a phase locked loop, it sorta works,
> but my chip count is getting high, and I am thinking about making more
> of these and selling them if I can write a computer program to resolve
> wave sound files.
>
> Therefore, since I am not very familiar with micro controllers, I was
> not planning on using one. However, I remember an engineer friend of
> mine mentioning the BASIC stamp. I have dabbled in BASIC so, I might
> approach the problem with this as a solution, especially if I can do
> it with one or two chips.
>
> I would think that I could sample the 24Hz side for one second. Take
> that number and use it to divide a much higher frequency quartz
> reference by some large value of N so that I can get it back down to
> 60Hz. Therefore my lock time would be one second. I can have an easy
> lock indication and a fairly fast response to any changes in
> frequency.
>
> What do you guys/gals think?

Get a PICkit from DigiKey for $50, learn a bit of assembly (if you know
BASIC, and if you're smart enough to make a digital PLL work, then
you're smart enough to figure out assembly language programming). Then
go for it.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Chris on
On Mar 5, 1:12 pm, Tim Wescott <t...(a)seemywebsite.now> wrote:
> Jan Panteltje wrote:
> > On a sunny day (Fri, 5 Mar 2010 12:32:47 -0800 (PST)) it happened Chris
> > <christopher.man...(a)gmail.com> wrote in
> > <248a815a-80f1-425c-8bbe-fe9a2829b...(a)g8g2000pri.googlegroups.com>:
>
> >> On Mar 5, 11:59 am, Jan Panteltje <pNaonStpealm...(a)yahoo.com> wrote:
> >>> On a sunny day (Fri, 5 Mar 2010 11:11:38 -0800 (PST)) it happened Chris
> >>> <christopher.man...(a)gmail.com> wrote in
> >>> <29529065-09fc-4636-9a29-c618cbc16...(a)x1g2000prb.googlegroups.com>:
>
> >>>> I have posted several threads about converting 24Hz pulses to 60Hz
> >>>> basically a 5/2 ratio.  I tried a phase locked loop, it sorta works,
> >>>> but my chip count is getting high, and I am thinking about making more
> >>>> of these and selling them if I can write a computer program to resolve
> >>>> wave sound files.
> >>>> Therefore, since I am not very familiar with micro controllers, I was
> >>>> not planning on using one.  However, I remember an engineer friend of
> >>>> mine mentioning the BASIC stamp.  I have dabbled in BASIC so, I might
> >>>> approach the problem with this as a solution, especially if I can do
> >>>> it with one or two chips.
> >>>> I would think that I could sample the 24Hz side for one second.  Take
> >>>> that number and use it to divide a  much higher frequency quartz
> >>>> reference by some large value of N so that I can get it back down to
> >>>> 60Hz.  Therefore my lock time would be one second.  I can have an ea=
> >> sy
> >>>> lock indication and a fairly fast response to any changes in
> >>>> frequency.
> >>>> What do you guys/gals think?
> >>>> Regards,
> >>>> Chris Maness
> >>> Years ago I posted a PIC 50 Hz PLL asm code here.
> >>> Or maybe it was 25 Hz.
> >>> I would not bother with BASIC, likely way too slow, and way too much reso=
> >> urces hungry.
> >>> A 1$50 12 pin PIC should do...
> >> What are some models that would be good for that application.  I see
> >> some 8 pin models that are only $2.  The only problem is that I have
> >> NO clue how to start programming them.
>
> >> Regards,
> >> Chris
>
> > I dunno, how many I/O pins, what clock speed,
> > do you need any thing else like an ADC or comparators, EEPROM?
> > I used a 12F629.
> > You need a programmer, can be made yourself for a few $,
> > or buy one for a lot of dollars, like 50$ even.
> > Then you need MPLAB from Microchip, the PC software development environment.
> >  I do no tuse that either, I wrote my own programmer software and use Linux and gpasm.
> > You DO need an oscilloscope in my opinion, else no clue what PIC does.
>
> But then you need an oscilloscope for an analog PLL, or no clue what
> it's doing.
>
> --
> Tim Wescott
> Control system and signal processing consultingwww.wescottdesign.com

I have a Scope and Frequency Counter. I had the scope, but I bought
the the freq. counter for this project.

Chris
From: Jon Kirwan on
On Fri, 5 Mar 2010 11:11:38 -0800 (PST), Chris
<christopher.maness(a)gmail.com> wrote:

>I have posted several threads about converting 24Hz pulses to 60Hz
>basically a 5/2 ratio. I tried a phase locked loop, it sorta works,
>but my chip count is getting high, and I am thinking about making more
>of these and selling them if I can write a computer program to resolve
>wave sound files.
>
>Therefore, since I am not very familiar with micro controllers, I was
>not planning on using one. However, I remember an engineer friend of
>mine mentioning the BASIC stamp. I have dabbled in BASIC so, I might
>approach the problem with this as a solution, especially if I can do
>it with one or two chips.
>
>I would think that I could sample the 24Hz side for one second. Take
>that number and use it to divide a much higher frequency quartz
>reference by some large value of N so that I can get it back down to
>60Hz. Therefore my lock time would be one second. I can have an easy
>lock indication and a fairly fast response to any changes in
>frequency.
>
>What do you guys/gals think?

Doable. There is a nice capability in the MSP430 to tweak
it's internal clock around over quite a range. I've used
this (and you need to do some sit-down time to work though
the details, well) to synchronize the internal cpu clock rate
to an external 60Hz zero-cross detector. It would lock quite
well. The CPU rate might be operating at quite a high clock,
by comparison -- say 6 to 8 MHz, but if you do this right
that DCO will be very closely locked to your 24Hz signal and
will track it extremely closely. You can anticipate when and
calculate a phase value that is used to make small
adjustments to the DCO so that it continues to predict
extremely well and thus provides you with a very easily
dividable high frequency clock source that is tied directly
so that you know exactly how many counts there are between
24Hz events and can set your timers for precise relative
phases. Which means an easy shot at generating 60Hz tied
tightly to the 24Hz. They are cheap and small and do not
need an external crystal for this, either. And will power
off of almost nothing.

If you want, I'd be happy to program one up for you. I've
already paid the price of learning how to make all this work
pretty well and would just steal that code and make some
mods. I'd probably take on of the small FET boards (they
cost me about $3.50 each and include an LED, a processor,
2-wire programming interface, and some plated through holes
for wiring to them, and you could use that as a test fixture
to try out the idea.

Your call.

Jon