SAA1057 test pin help??

Everything technical about radio can be discussed here, whether it's transmitting or receiving. Guides, charts, diagrams, etc. are all welcome.
User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

SAA1057 test pin help??

Post by sinus trouble » Mon Apr 06, 2015 10:21 pm

Hello all! :) Its been a while!
ive built many Pira PLLs and they have always worked perfect everytime! :)
i decided to experiment to see if i could incorporate a lock indicator into my project? the datasheet shows that pin 18 (test) can be configured to show this and many other functions by accessing 'data word B'?? lol im not too sh*t hot on the code but testing the output on pin 18 seems to show that it is configured as an 'In lock' indicator?? but also shows some strange square wave results??
Im getting to the point where i dont know where the problem could be?? maybe the code??
or the type of oscillator im using?? (half frequency which is highly not recommended)
maybe im just wasting my time lol
if anyone can help? id be most gratefull :)
I am as stupid as I look! :|

shuffy
tower block dreamin
tower block dreamin
Posts: 309
Joined: Sun Oct 05, 2014 3:55 pm

Re: SAA1057 test pin help??

Post by shuffy » Tue Apr 07, 2015 1:37 am

Sinus have a look at the datasheet. There are 2 phase detectors in the SAA1057. A digital one does the fast lock and lock is maintained with the second (sample and hold) phase detector which has the lock detect signal on its output. This is what you will see on the test pin when you set bits T3 - T0 of word B to 0101 (respectively).

I'm guessing you're using Jan's code for the SAA1057 - I think (I haven't checked) that he configures the test output to show the output of this "in lock" counter, with those 4 junior bits of "word B" set to 0101.

Your mileage will vary however. This is an output from a counter. You will get pulses when it's not in lock, which is probably the weird stuff you're seeing. The code is pretty straightforward, just those 4 test bits. There may be a slight difference in performance depending on how you're using the chip (more of that later) but I think it's probably just the fact that this is not a black and white in-lock/out of lock indicator. I'm aware that many people don't trust using this as a lock indicator. Force your loop in and out of lock and look at the output of the pin on a scope - as I recall when in lock it should be high more rather than less of the time. You could try smoothing the output with a capacitor and follow it with a comparator and see how you get on.

Over the years I've built shed loads of exciters with this chip. I never use "on frequency" VCO designs for reasons which have been done to death here. Inconveniently, the SAA1057 is not designed to be used with an input frequency around 50MHz so I tended to run my VCO at a quarter frequency and use the AM input of the chip (which has a limit according to the datasheet of 32MHz). A variation is running the VCO at half frequency and then using a flip flop (like Steve Moss does) to get your 25MHz signal which then feeds the AM input of the chip.

You say you're using a half frequency oscillator. So, assuming you're using Jan's code unmodified, does this mean you're feeding your half frequency VCO output into the FM input of the SAA1057 (you've got to tell the SAA1057 which input you're using by setting a flag in word B) and using the divide ratio you would use for an input frequency of 100MHz and hoping for the best? Or does it let you use "exotic" divide ratios... I can't remember what Jan's code does with the dip switches. Are you doing something funky like using a reference crystal of half the recommended frequency?

Depending on exactly what you're doing here, it might affect the behaviour of the lock test pin, but generally that behaviour will be in line with what you'd get by using a 100MHz input with a standard reference crystal (4MHz or whatever). In other words you'll still get pulses.

Don't forget (you might recall a few "discussions" with Jan, Chris and others about this) that the frequency responses of the SAA1057 input circuits and FM prescaler are physical limitations, nothing to do with the crystal frequency - they are however alleged to vary by manufacturer. So, despite reference crystal frequency, you might have problems feeding 50MHz into either AM or FM pins on that chip.

Hope some of this rambling helps - I would be inclined to select a PLL chip which has a proper lock output and has 50MHz within it's allowed input frequency range! (e.g. MC145170).

Shedbuilt
no manz can test innit
no manz can test innit
Posts: 227
Joined: Tue Dec 02, 2014 11:03 am

Re: SAA1057 test pin help??

Post by Shedbuilt » Tue Apr 07, 2015 10:49 am

Sinus, did you change your PLL sampling point ?
If I remember rightly, you were previously taking the sample from the strapped collectors of the oscillator transistors. This means that your main sample frequency should be the output frequency - not the 1/2f of each oscillator. If you're taking it from there, you should be able to use the Pira PLL circuit in the normal way.
Regardless of this, as Shuffy described, I don't think you'll ever get a straightforward, steady state phase detect signal from pin 18 of the SAA1057.

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Post by pjeva » Tue Apr 07, 2015 10:21 pm

If he is still using his combo of nrg/pira, he is using full frequency. Test pin in pira original code is showing in lock state, but you must use few resistors, capacitor and transistor to make it work correctly. I did it with mine test exciter but i am unable to draw schematic now. As i remember you need pull up resistor to +V at the base of transistor so you can get nice signal and not led blinker :-)

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Tue Apr 07, 2015 10:52 pm

Thankyou both for your time! much appreciated! :)
youve pretty much summed up what i suspected, pin 18 goes high when its way out of lock but just not precise enough to be usable! :/ which is a shame really because its a great lil bit of kit! :) and as you both said it does work a treat on a 1/2 frequency oscillator as long as its tapped from the correct point!
anyways ive been through the ASM file a million times! i understand most of the commands and its driving me crazy!! lol but im not giving up until i understand it fully lol
the code is unchanged from jans original version! but i might give it a lil tickle in places? see if i get any errors? lol :D
il post some pics of the newest VFO/Pll ive built soon! :)
I am as stupid as I look! :|

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Tue Apr 07, 2015 11:06 pm

Yess Mr Pjeva! Long time!
I did try a 10k resistor from the +5v rail to pin 18 to invert to drive a BC547 because it seems to go unstable when a certain load is breached? (10uA i think?) it just mirrored the output i was measuring from pin 18 already? but i havent tried a cap to smooth the signal?
I am as stupid as I look! :|

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Tue Apr 07, 2015 11:14 pm

20150405_155656.jpg
20150405_155710.jpg
You do not have the required permissions to view the files attached to this post.
I am as stupid as I look! :|

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Re: SAA1057 test pin help??

Post by pjeva » Tue Apr 07, 2015 11:22 pm

Nice work Sinus!
Try something like this on image bellow. But add 10k pull up to +Vcc... cannot remember correctly but i think it goes similar to this...
saa with led lock.jpg
You do not have the required permissions to view the files attached to this post.

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Re: SAA1057 test pin help??

Post by pjeva » Tue Apr 07, 2015 11:24 pm

And by the way, how much output you get from this? It's 2N4427 right?

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Tue Apr 07, 2015 11:45 pm

Cheers Geez! :)
Looks very similar to the configuration i used but with a PNP and a cap! :)
the difference on this version is that ive used a motorola copy 2n4427 instead of a CEN type and i had to change the RFC on the base pin! it wasnt quite right!
im getting nearly 1.5w @13.8v with just them small changes! :D
I am as stupid as I look! :|

shuffy
tower block dreamin
tower block dreamin
Posts: 309
Joined: Sun Oct 05, 2014 3:55 pm

Re: SAA1057 test pin help??

Post by shuffy » Wed Apr 08, 2015 12:18 am

OK, so it's the NRG oscillator feeding the FM input of the SAA1057 with the doubled output signal (100 MHz). Sounds like you've got the right idea, as the others have said you do need to pull pin 18 high (to the chip's supply), 10K will do. You know the rest.

I've never used this circuit but if you're getting that much welly at 13.8V I'm impressed Sinus. What's your base bias on that 4427 consist of now, looks like you're using a choke wound on a ferrite bead in parallel with a resistor (is it 22R?) And looks like you've changed the load coil on the collector too?

registered_user
ne guy
ne guy
Posts: 3
Joined: Tue Mar 24, 2015 6:49 pm

Re: SAA1057 test pin help??

Post by registered_user » Wed Apr 08, 2015 1:22 pm

Not half frequency in its truest sense but Ok. Have you tried the test pin with a 4.7 - 10k pull up resistor and a capacitor? Or better still those with a pnp to pull your pic pin low/ light an led?

registered_user
ne guy
ne guy
Posts: 3
Joined: Tue Mar 24, 2015 6:49 pm

Re: SAA1057 test pin help??

Post by registered_user » Wed Apr 08, 2015 1:26 pm

Bear in mind the original pira code includes no lock test and refires word a and b into the pll every 30 min. This isn't ideal as sometimes tuning noise is heard so getting the test features up and running is a bonus.

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Post by pjeva » Wed Apr 08, 2015 8:28 pm

I put code which you can download now on pira site. Test pin works ok and no tuning noise...

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Wed Apr 08, 2015 11:46 pm

shuffy wrote:OK, so it's the NRG oscillator feeding the FM input of the SAA1057 with the doubled output signal (100 MHz). Sounds like you've got the right idea, as the others have said you do need to pull pin 18 high (to the chip's supply), 10K will do. You know the rest.

I've never used this circuit but if you're getting that much welly at 13.8V I'm impressed Sinus. What's your base bias on that 4427 consist of now, looks like you're using a choke wound on a ferrite bead in parallel with a resistor (is it 22R?) And looks like you've changed the load coil on the collector too?
It is indeed a complete copy of the NRG 1watt VFO (with a very small adjustment) the feed to the 2n4427 is via a 22r resistor and a choke in parallel! i just changed the grade type of the ferrite, used a proper motorla style transistor and added a couple more turns to the collector coil to allow me to adjust to best suit! 1.5watt was a bit optimistic? my wattmeter is not great lol but its defo doing over a watt now! :D
I am as stupid as I look! :|

shuffy
tower block dreamin
tower block dreamin
Posts: 309
Joined: Sun Oct 05, 2014 3:55 pm

Re: SAA1057 test pin help??

Post by shuffy » Wed Apr 08, 2015 11:56 pm

Cool. And are those BF199s or BF494's you're using in the oscillator? I'd guess you'll get marginally more welly with the 199s.

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Thu Apr 09, 2015 12:00 am

registered_user wrote:Bear in mind the original pira code includes no lock test and refires word a and b into the pll every 30 min. This isn't ideal as sometimes tuning noise is heard so getting the test features up and running is a bonus.
you are spot on! ive noticed on the ASM file that alot of the commands are repeated! (GO TO) i assume this is to reset the system making sure it stays locked? ive never experienced any severe noise tho?? ive only noticed a very high pitch noise at high volume like an EEEEEEEEE sound? lol
and the usual PURRRR as it it comes into lock lol :)
I am as stupid as I look! :|

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Thu Apr 09, 2015 12:03 am

shuffy wrote:Cool. And are those BF199s or BF494's you're using in the oscillator? I'd guess you'll get marginally more welly with the 199s.
Lol Yeah im using the original BF199s! the PLL steals a lil power off the osciilator for sampling but its negligable!
I am as stupid as I look! :|

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re:

Post by sinus trouble » Thu Apr 09, 2015 12:06 am

pjeva wrote:I put code which you can download now on pira site. Test pin works ok and no tuning noise...
Pjeva! have you modifed the ASM code?? id like to give that a go??
I am as stupid as I look! :|

User avatar
sinus trouble
proppa neck!
proppa neck!
Posts: 1410
Joined: Fri Aug 22, 2014 11:34 pm

Re: SAA1057 test pin help??

Post by sinus trouble » Thu Apr 09, 2015 12:24 am

registered_user wrote:Not half frequency in its truest sense but Ok. Have you tried the test pin with a 4.7 - 10k pull up resistor and a capacitor? Or better still those with a pnp to pull your pic pin low/ light an led?
i have tried driving a transistor via pin 18 and it seems to reproduce the same square wave type signal? i havent tried a cap because i thought it would cause the transistor to delay in switching?
I am as stupid as I look! :|

Post Reply