Trying to drive the Codan MCP145159 PLLs direct.

V

VK3ZYZ

Guest
I still want to drive the Codan PLLs directly from the Arduino, or better, the ESP32 "VFO Delux".
The first PLL calculations were not the problem, with 2Khz steps, but I could not figure out the second as it has 10Hz steps.
So, a SR sniffer program (fixed up bu my son Daniel) was pressed into service.
Thanks to ray for lending me a Codan remote control, as the 8528A I'm working on did not have one, let me log this.


“Clarifier”​
R divider​
N divider​
A divider​
VCO Frequ​
\​
4264​
437​
40​
43.351970​
4848​
497​
36​
43.351980​
5578​
572​
31​
43.351990​
4125​
423​
23​
43.352000​
4030​
413​
39​
43.352010​
5198​
533​
31​
43.352020​
5541​
568​
44​
43.452030​
5884​
603​
57​
43.352039​

There is no way I could have figured the above out!
I would like to have more steps, so maybe there is someone out there that can figure out a way to work this out.

Now, I can proceed with this part of the project.
I'll still need the Si5351 to generate the LSB signal as this set does not have the crystal fitted.

The 8525B has an NJ8822 for the first VFO, and the MCP145159 for the second, while the 8525A has the MCP145159 for both.
Here is the sniffer.
I think I may modify the program to also display the frequencies, calculated from the PLL data. That is unless someone else would like to try.

Here are the Arduino sketch and the PLL calculation spreadsheet.
Just note, spreadsheets are not one of my strengths.
 

Attachments

Last edited by a moderator:
V

VK3ZYZ

Guest
Here is a program that I'm running on an STM32 board..
This program is running through all the permutations of the register numbers.
It is producing some results I will filter later.
If this all works ok, the second PLL will use a table to set the frequency over 2khz in 10 Hz steps (or close to it anyway).

A small sample of the print out of just numbers between 43.3519 Mhz and 43.3529Mhz.

r=1131 n=115 a=69 Frq=43352256.00 1256
r=1138 n=116 a=51 Frq=43352372.00 1372
r=1138 n=115 a=115 Frq=43352372.00 1372
r=1145 n=117 a=33 Frq=43352492.00 1492
r=1145 n=116 a=97 Frq=43352492.00 1492
r=1152 n=118 a=15 Frq=43352604.00 1604
r=1152 n=117 a=79 Frq=43352604.00 1604
r=1159 n=118 a=61 Frq=43352720.00 1720
r=1161 n=119 a=10 Frq=43351936.00 936

The last number is the reading above 43.351000Mhz, so if I can find a group that covers 2Hkz with close to 10Hz steps, I'll use that.
If not, I'll run it again with a different range to hope for a suitable set.
 

Attachments

V

VK3ZYZ

Guest
After running the PLL_calc code for ages, I have selected a set of numbers to use. It turns out to be 100hZ steps over a 2Khz range.
Then, I used an on line decimal to hex converter to get me these values below...

// r n a offset
0x26b3, 0x3f8, 0x2f, 0, // actually 16 is as close to 000 as it gets
0x05df, 0x09a, 0x10, 100,
0x08ad, 0x0e3, 0x3c, 200,
0x05ed, 0x09b, 0x2c, 300,
0x075b, 0x0c1, 0x10, 400,
0x0385, 0x05c, 0x1e, 500,
0x03e4, 0x066, 0x0e, 600,
0x5dd, 0x09a, 0x03, 700,
0x752, 0x0c0, 0x15, 800,
0x534, 0x088, 0x2d, 900,
0x258, 0x03d, 0x25, 1000,
0x884, 0x0df, 0x2f, 1100,
0x949, 0x0f3, 0x3d, 1200,
0x5db, 0x099, 0x36, 1300,
0x499, 0x078, 0x33, 1400,
0x6a7, 0x0ae, 0x32, 1500,
0xaf6, 0x11f, 0x3f, 1600,
0x47b, 0x075, 0x2e, 1700,
0x630, 0x0a2, 0x2b, 1800,
0x93e, 0x0f2, 0x35, 1900,

It wasn't until later that I thought it would have been better to write a program to do the decimal to HEX conversion. So, to finish building the table to be used, I've written a program to run on the Arduino, actually I'm using an STM32 board to do this.
It produces a decimal and HEX version.
This is the output result for the HEX one....

long int FineTuneHEX []
{
0x9ACFF85F, // +0
0x177C9A21, // +100
0x22B4E379, // +200
0x17B49B59, // +300
0x1D6CC121, // +400
0x0E145C3D, // +500
0x0F90661D, // +600
0x17749A07, // +700
0x1D48C02B, // +800
0x14D0885B, // +900
0x09603D4B, // +1000
0x2210DF5F, // +1100
0x2524F37B, // +1200
0x176C996D, // +1300
0x12647867, // +1400
0x1A9CAE65, // +1500
0x2BD91F7F, // +1600
0x11EC755D, // +1700
0x18C0A257, // +1800
0x24F8F26B, // +1900
};


It makes the complete code definition ready to copy into the Arduino IDE sketch.
There is still lots to do. It is not helped by me not being able to find where I have put the circuits for the 8525A CPU and Dual VFO/PLL boards.
I have the 8525B circuits, but the 8525A uses 2 x MC145159 PLL chips, and SAA1061 chips.
As I've got Arduino code already written that has the pin functions defined, it is not really an issue, just very annoying!
 

Attachments

Last edited by a moderator:
V

VK3ZYZ

Guest
I built a level bi-directional shifter board to translate the 3.3V i/os to 5V, and it is very simple. Just a FET and a resistor for each line.
But it would not work! This really had me perplexed as there is nothing to it, and exactly the same circuit on the PCB works fine.
3.3to5V level shifter.jpg

A number of days and times going over and over the add on board still did not find the problem. Then, yesterday, I plugged it in again and this time it worked!!!
Well, as it turns out, the problem was quite simple.
The header socket I was using to fit into the white connectors is only half the width of the available space. It fits neatly beside the pins!
Socket Oops.jpg

How embarrassing to waste a couple of days on that!

So, now I am continuing the testing.
 
V

VK3YNV

Guest
Hi Denys, Yep, gotta use the right plug. :) In related news, the JST 2.54 mm connector assortment I ordered months ago turned up today.

Now I can get back to the 828 packet radio conversion.
 
V

VK3YNV

Guest
Just looked at the fine tuning array, you should delete the comma after the last entry in the table.
 
V

VK3ZYZ

Guest
I made another discovery that had me stumped for a while.
With the adapter board plugged in, I could not upload new code to the board. It turns out the additional board has pull up resistors on it and if port IO12 is pulled up. it switches the EEPROM supply to 1.8V in stead of 3.3V and it will not program. Normally, IO12 has a pull down on board (or internally?).
So, a push button switch has been added between 0V and IO12 that will need to be held down while the code is being updated and also the board restarts or is reset.
What I have not tried yet is to remove the pull up resistor on the add on board, then select internal pull up as a setup option. That would be worth investigating.
As in my case, the port pin is an output, the external pull up may be removed anyway. But, as it is driving the level shifter with a pull up to 5V on the output, it may still interfere.
But this is just another gotya that I've learned about the ESP32 board, and will be worth remembering if one wants to use IO12 for external devices.
 
V

VK3ZYZ

Guest
Earlier, I replaced the faulty 10V regulator, and that caused a few Tants to smoke. I think the reg failure may have resulted from the set being plugged in backwards some time. But the RX audio would not work.
There was yet another Tant cap that had died. This was shorting the audio amp enable to 0V. It is replaced so now the RX audio works.
But it looks like there is an intermittent fault in the first PLL. The oscillator stops and starts. It was removed and re soldered but that did not fix it. So, the Codan 8525A is now stashed away.
Maybe I will get to it next year, or do the Si5351 mod. That sounds better as this set does not have a LSB crystal.
All I need to do is use the existing Arduino VFO, but I really would like to use the 'Deluxe' version. So, I'll look again at getting the Si5351 code to work on all 3 outputs independently.
I think most of the other Codan 8525A hardware driving works ok on the ESP32 board.
 
Last edited by a moderator:
B

BillC

Guest
How frustrating Denys .So much to go wrong with a PLL .Suggest change all tantas and electros both chemically reactive and unstable good luck .See you down the track.
 
Top