maandag 30 november 2009

latest news

Frequency regulation works. Its range has to be reduced though. Now the signals jitter around the setpoint value. The course setting is just too rough. 50 MHz error is no exception. The course setting is simply 500MHz/24Volt * Voltage.I have measured frequency vs Voltage of the VCO it, it is not lineair at the low range and at the high end.

I will make a hardware linearizer. I may store correction values in EEPROM if the linearizer doesn't solve the problem entirely.

vrijdag 27 november 2009

blanking works

I have just added blanking. It was needed to remove spurious images during fly-back of the sweep signal.

The Blanking device is a 74HC4066 switch. It is controlled by the micro controller.
The micro controller generates the sweep so it knows exactly when to blank.
It works perfectly. The ghost images are gone.

This weekend I will try to make the center frequency regulator work.

maandag 23 november 2009

some improvements

This weekend I did not spend much time on the project.
However I was able to make a few improvements.

-Spectrum is not inverted anymore. I have added an inverter using an opamp. I have
changed the software to stop inverting the Sweep signal.
-Added blanking output signal in software. One of the IO pins provides a blank
signal. It is needed for the flyback.

I discovered that the 24 V power supply has a ripple. This caused the spectrum to
jump around a bit. The 24 transformer can not provide enough current.

donderdag 19 november 2009

signals visible

I was able to display the spectrum from a few MHz to more than 440 MHz. A lot of improvements are needed though.
-signal is not stable on x axis. It jumps around. Probably caused by flyback of sweep.
-Signal strength out of tuner is low
-Sweep is inverted. Highest frequency is on the left of the screen.
These are the worst problems. I hope I can fix them in the weekend.

woensdag 18 november 2009

All Modules ready

I just finished the power board. I was mostly straight forward.
The only problem was the -12V. I used a separate 12V transformer.
The output of this transformer was 20V AC. After rectifying it The DC was too high for the 7912. It turned out that this little transformer needs to be loaded.
The 30V for the varicap does not work. The voltage out of the 24V transformer is too low for the zenerdiode wich is actually a 32V zenerdiode. I will use 24 instead. It should be enough as I have tested the tuner using 24Volt.

I build the 38 MHz receiver in a tin can. In fact I have built it on the bottom of this box. I just built the rest of the can around it.

Now all modules are ready. I am trying to connect them and fix the interface problems. I hope that I can display a spectrum tonight.

donderdag 12 november 2009

Power board

yesterday I bought some parts for the power board. Fortunately I had most of the parts in the junkbox.

I need several voltages.
5V for the microprocessor and the divider in the tuner.
12V for the opamps.
-12V for the opamps.
24V for the tuner.
30V for the opamp that drives the varicap in the tuner.

Last night I added to the power board 5V, 12V and 24V.

input impedance counter

Counting the frequency of the tuner worked. However the counter input required a lot of current. I build some amplifiers to boos the signal but is was not enough.

I found out that when the counter was stopped the counter input pin was configured as output. This messesd up signal. PORT A was configured as output. Turning on the counter overrides this setting. However when the counter was stopped the port was set to output again. My codes starts and stops the counter 50 times a second.

My port A has been configured correctly in my startup code. However the HITEC LCD software reconfigured it.

I fixed it, now the counter works fine.

dinsdag 10 november 2009

tuner tests

I ran some tests on the UDT-401 tuner. It seems to be pretty stable. It drifts 200KHz. after startup. It drifts slowely so I thing the regulator can keep up with it.

Over the frequency/tuning voltage is a straight line. Only at the high end >21 volt its the MHz/PerVolt is less. So I probably need a compensator.

vrijdag 6 november 2009

some pictures

I made some pictures to show the progress.


The red swich selects the function of the rotary encoder. Up selects the center frequency, Down selects the span. Pressing white button icreases the tuning speed.



Software updates implemented today:
-make the encoder more responsive.
-invert the sweep signal.
-reverse the function of the white button.
-increase the sweep frequency.

I have connected the analog board to the digital board. This caused an interface problem. The output of the PWM output is filtered. This filter needs to see a high impedance. The input impedance of the analog boar was too low. I added an emitter follower to take care of that problem. It works but it clips the output signal as the signal out of the PWM can be lower than 0.6 Volt. I think I can fix it by conneting the emitter resistor to -12 V instead of 0V.

dinsdag 3 november 2009

Software

I spend a lot of time refactoring the software. It was getting a bit messy.
After cleaning up I added some functionality.

Now the frequency counter works. It can measure the center frequency. It is suppossed to work even when a sweep is in progress. This has to be tested.
I also made a regulator for the center frequency. It compares the actual frequency with the setpoint. I case of an error the software integrator is increased or decreased. This integrator value is send to a DAC. It works but I have to test it with the real tuner to be sure.

In the meantime I found an enclosure for the analyzer. I also drilled some holes for the controls.

maandag 19 oktober 2009

restart

I took a building break. I wanted to finish my CB to 40 meter transverter.
Now this project has finished so I will continue building the spectrum analyzer.

I made the connection between the analog board and the microcontroller. Now I can control the sweep amplitude and the DC offset. I also added a switch to speed up tuning. When pressed the tuning speed is 5 MHz per click instead of 1 MHz per click.

Next task is to improve the software. I want to prevent impossible situations. For example: center frequency is 10 MHz and the span is 20 MHz/ division. That would suggest negative frequencies on the left of the screen.

After that I will make a frequency counter in software. Then I can display the actual center frequency. I could use this counter to adjust the center frequency as described in my previous logs.

donderdag 24 september 2009

analog board

As explained before, the analog board scales the sweep signal and adds the offset voltage(for center frequency). See the picture in my previous post.

In order to be able to use 5V control signal I had to replace the 4016 IC's. Now I use 74HCT4066 chips. They are pin compatible.

The board works. I have one concern though. I had to add A DC component to the sweep signal. This was done in order to keep the voltages over the 4016 switches in range. A high pass filter removes that DC voltage. So far so good. However, while switching between ranges (MHz/div) it may take a few seconds for the filter to go to the new steady state. This will cause some unwanted visual effects.

woensdag 23 september 2009

woensdag 9 september 2009

4016 switches

I built and tested one of the programmable amplifiers. They consist of an opamp and a 4016 switch. It works but I found out that the 4016 don't like to switch negative voltages. The datasheet was not clear about this. So I added an offset. This solves the problem. Later I need to get rid of this offset by using a highpass filter.

Looking through several datasheet I found out that the 4016 can only be used when input or output is in the range of -0.5 V .. VCC. So I need to keep the amplification low. An opamp with fixed amplification will amplify the signal to the needed level.

I use 2 inverting programmable amplifiers. In this setup the voltages over the switches can be negative. To solve this I will use an inverter behind each programming amplifier. The TL-082 are dual opamps so I van use one of them as inverter. No extra chips are needed as I already planned to use 2 IC's.

So no fundamental changes are needed in my design. I just have change the gain distribution and add 2 inverters.

maandag 7 september 2009

Analog board

I was on holiday so I did not do much work on the project.

Currently I am working on the analog board. This board must scale the sweep signal according to the span setting (MHz/V).

I use TL-084 opamps to amplify/attenuate the sweep signal. The microcontroller sets the amplification. I made an inverting amplifier that uses selectable feedback ressistors. Those resistors can be selected by a voltage controlled switch (4016).
The PIC controls these switches.

The selectable resistors are potentiometer trimmers so I can allign the gain.

vrijdag 14 augustus 2009

PIC board working again

The PIC16F887A chips arrived yesterday.

I had to change some things as this chip is the A version. The broken chip is not an A version. After changing those settings the board worked again. Unfortunately this new chip does not solve the programming errors I sometimes get when using the Winpic programing software. Anyway I can continue working on the digital board.

I have changed the port for the switch. I try to use a port for either input or output. I don't want to mix input and output. In the previous configuration It was mixed. That may have destroyed the PIC.

Dependig on the switch setting I can change the center frequency or the frequency span. For each span setting a different sweep frequency must be used.
I use the PWM output to generate this sweep signal. I managed to make this frequency controllable. It now changes when the span setting changes.I am not satisfied yet. I can see the sweep signal make small jumps when a low sweep frequency is used. I want it to be smooth. I will adapt the software improve this behaviour.

Currently the software delays each output increase. this delay is adjustable. Effect is that the sample rate depends on this delay. So for low frequencies the lowpasfilter is not sufficient. I don't want switchable filters as it would require additional hardware. So I will try the approach used by a DDS. I will increase the output of the DAC starting at 0 to max using an adjustable stepsize. That way the sample rate will be fixed. Tonight I will try to implement this.

dinsdag 11 augustus 2009

Dac Driver ready


This picture shows the pic 16F877 board. It worked till I tried to reprogram it. The PIC is dead since.

Software development continues on a 16F84 board. I put one of the DAC chips on that board. Then I wrote a driver for it. This was not hard to do.

The DAC uses a 3 wire serial bus. The protocol is simple. I uses 4 control bits, 10 databits and 2 don't care bits. Sending these bits to the Dac can be done fast. I made a sawtooth generator as test project . The resolution is 10 bits the period is 2Hz. If the PWM sawtooth generator won't met the expectations I can fall back to this one.

I have to wait for the arrival of the new 16F877 chips. Until then I will work on the analog board. That board will adjust the amplitude of the sweep signal. It will also add the center frequency offset and the centerfrequency regulation voltages.
I may put a linearization circuit on this board.

woensdag 5 augustus 2009

DAC chips arrived

The DAC chips LTC1799 have arrived. They will be used to set the center frequency.
Unfortunately my PIC16F877 has been destroyed. I don't know why. Some new ones have been ordered. In the mean time I will use a 16f84 to develop a driver for this chip.

My DAC chips are dual DAC chips. I am considering to use the 2nd DAC for the center frequency control loop. The original plan was use an external integrator in the control loop but I may as well do it in software. New plan: use one 10 bit DAC's to set the center frequency. A lookup table will be used. The actual center frequency will be measured and corrected by a control loop. De 2nd DAC will output the control signal.

maandag 3 augustus 2009

The rotary encoder works. I used interrupts on pin state change to track movements. This works great. In previous projects I used polling. This caused problems for fast rotations.

It is possible to make the sweep (Sawtooth) using the PWM output. Just increase the duty cycle starting at 0% until the maximum is reached. Then filter the signal using a low pass filter. I have used a simple low pass RC filter at the PWM output. The signal looks good for slow sweep frequencies. For higher frequencies the ramp is not a straight line. I think it can be solved by using a higher order filter.

I have added a switch to select the function of the rotary encoder. Two modes are foreseen. Center frequency and span (MHz/division). In span mode the sweep frequency has to be adapted. Next step is to make this possible. I will try to clean up the ramp signal as well.
I bought some switches (4013) and opamps (TL072) to make a voltage divider for the sweep signal.

I have just ordered DA converters. They will be used to set the center frequency. I hope they will arrive soon.

maandag 27 juli 2009

Hello world on LCD

Last weekend I was able to display 'hello world' on the LCD screen using the LCD library provided by the Hitec C compiler. This library is for a LCD that uses the Hitachi 44780 controller.

The first attempt resulted in lots of rubbish on the screen. Reseting the processor resulted in different rubbish. It was not 100% rubbish though. Some parts of the words were readable. For example I saw 'wrd' it should have been 'world'. That was interesting, it seemed that some of the characters were skipped. That indicates a timing problem. So I added some additional delays in the Hitec LCD code. This solved the problem.

The code should be independent of the xtal frequency. Apparently it is not. My xtal is 18 MHz the xtal in the Hitec example is 4 MHz. Delays in the code take in account the clock frequency.
However, I found that some operations are not proceeded by a delay. That may be the problem or My LCD is just slow.

Thats good news. The bad news is that 33% of the programming attempts fail. The Winpic programmer frequently reports verification errors. Most errors are at high addresses. My PIC may be unstable. Maybe I 'll buy another one to check.

current activity:
Currently I am investigating the use of the PWM modulator to generate the ramp signal. I found an application note about using PWM as digital analog converter. It would be great to generate the ramp in software.

donderdag 23 juli 2009

Hello World

Last night I managed to execute the PIC version of hello world (blinking led) .
It runs on a PIC16F877.

I had to adapt the 16F84 code a bit. It would not run on the 877 without modifications but that was to be expected. The configuration word is different. The xtal frequency is different too.

Anyway I am ready to move to the next step. That would be adding the LCD display.

woensdag 22 juli 2009

small update

Not much progress to report.
I am building the micro controller board. It is ready for the first test. I'll try to make a led blink.
This time the 16F877 is used instead of the 16F84. I suppose it will work. Tonight I will try.
Meanwhile I found a LCD driver suitable for my LCD .Controlling a display will be the next step.
After that I'll add the rotary encoder.

ON4AIO suggested to use the AFC input of the tuner for small sweeps. The 1st LO must be at a steady at a fixed frequency. This is a good idea. I was a bit worried about small sweeps <1 MHz/div. The stability may be insufficient after all the tuning sensitivity (MHz/V) is large. Using the AFC for small sweeps relaxes some of the requirements. I'll give it a try but I will build start with the large sweeps first.

zaterdag 11 juli 2009

PIC programmer working?


I hope this is the last post about the programmer. It seems to work now.

The SERPIC has a connection between the programming voltage and the read data.
I suppose this was meant to test the presence of the programmer. However no other PIC programmers seem to support this. So I removed it.
After this modification I was able to program the PIC using Winpic. However the program did not execute. I don't think the modification was needed after all.

Reading back data from the PIC revealed that the first 4 words were missing. I also found out that those words were written correctly when the default configuration settings were used. That means watchdog on and RC oscillator. My hardware uses an xtal so that won't be usefull. Changing these setting by hand did not work. Winpic seems to use the first 4 words for the configuration. i will look in the PIC datasheet to find out if my assumptions are correct.

My program does not set the configuration bits Spp took care of that. So I did not set those bits. I don't even know how to do that using my old compiler.
The Hitec compiler can set those bits though. I made a program that turns on/off a led. The first instruction is to set the configuration bits. Finally I was able to program the PIC and execute my program.
The only disadvantage is that sometimes Winpic can not control the serial port.
Starting Winpic800 once solves this.

Winpic800 does not work. It can set the serial port pins but it just won't read data from the PIC. I might look into that problem once.

Now I will start making the microcontroller board.

dinsdag 7 juli 2009

more programmer problems

Those PIC programmer problems start to irritate me.

Last night I tried to program my PIC using an XP computer. The stuff I used:
Pentium 3 500 MHz PC
Windows XP no service pack.
SERPIC programmer , design David Tait
JDM programmer.
Winpic programming software.

The combination JDM programmer and Winpic worked fine. So the serial port can be used for programming PIC's Thats is a relief. I read that some people have encountered problems when using serial port PC programmers. So far so good.

Unfortunately the SERPIC was not supported by Winpic. The programmer can be selected but Winpic thinks it is a programmer that uses the parallel port. Winpic also supports PARPIC which is a programmer that uses the parallel port. PARPIC is also designed by David Tait. So I guess something is wrong in Winpic. The program is not maintained anymore so no updates can be expected. Fortunately the programmers can be defined by the user. So I defined SERPIC myself.

No luck, The programmer was not recognized by Winpic. Nevertheless I could manipulate the programming pins using Winpic so I gave it a try. No luck of course. Then I tried to find out how a programmer is detected. It is simply a loopback of dataout to data in. My programmer should be able to do that so I had another look at the hardware. I found a short circuit. After fixing that I was able to program the PIC. Unfortunately some instability issues popped up. Sometimes the RS232 pins don't work after starting Winpic. Sometimes the polarity of these pins are inverted.
Another issue is that Winpic hangs when a mouse is clicked during programming.

I have found another more recent program called Winpic800. Tonight I will give it a try.

I thought about using the JDM programmer for in circuit programming. It should be possible but it is tricky. Especially when an external power supply is used. The risk of destroying the serial port or the programmer is high. I could use relays to switch the PIC pins between programming mode and run mode. I may do that if I can not fix the problems with SERPIC.

dinsdag 30 juni 2009

sweep generator

I am renovating my house so I have not much time to work on the project.
Nevertheless I am thinking about the design of sweep generator.

The span (MHz/division) must be controlled by the microcontroller. So I think I make a sawtooth wave generator followed by a programmable attenuator. I found some cheap digital potentiometer chips that should do the trick.
They have 64 taps. This is not enough. I need more resolution as I want the following spans:
500 KHz/div
1 Mhz/div
2 Mhz/div
5 MHz/div
10 Mhz/div
20 MHz/div
50 MHz/div
and 500 MHz full screen.

I think it can be done by cascading two of those potentiometers. Then I get 64*64 different spans. Resolution will be 500/(64*64) = 122 KHz. That should be enough.

maandag 29 juni 2009

Programmer issues

I built a PIC programmer for in circuit programming. As mentioned earlier in the blog it is the SERPIC programmer. It caused me a headache because it did not work properly. It took me an evening to pinpoint the problem.

I have also built a small PIC target board to test the programmer. It contains a 16F84 and one led. It can be used to send my call sign in Morse code.

After I built it it seemed to work. The SERPIC programming software verifies the program by reading it back. No problem was reported. Nevertheless, the program would not run at all. I used the JDM programmer to read the contents. It looked fine. Then I programmed the PIC using the JDM programmer. Now the software runs fine.After erasing the PIC I was able to program the PIC correctly. The next programming attempt failed.

So it seems necessary to erase the PIC first. This was a surprise to me. I have used a simple programmer (direct connection) and this programming software (spp) for years. Erasing was not needed. At least it was not done explicitly. I changed the batch file to erase first then program. Now it works.

I may not be out of the woods yet. One of my PIC seems to be protected although I did not protect it . Another one is not programmable. Writing fails at the first word. Those processors could be damaged. Or the programmer still has issues . Anyway, now I have a target board that I can program over and over again.

Validation of the programmer was done on an old win98 PC using old programming software. I did this to test the SERPIC programmer in a familiar environment. For the software development I will use different software and a more modern PC.

maandag 15 juni 2009

Update frequency regulator



After doing some calculation I decided to make a change to the concept.

The integration time of the integrator must be long. After all the frequency measurement is slow, especially for slow sweeps. It takes at least one period of the sweep signal to measure the frequency. During that time the output of the integrator should not change much. This implies a slow loop. Beside that the gain of the voltage/frequency converter is high. It is 500 MHz/24Volt. So a small ripple or noise will cause a big frequency change. To suppress this a large integration time is needed. Maybe some additional filters are needed as well.

A slow loop makes frequency changes very slow, this is not convenient. My solution is to add a DAC to set the course frequency. The integrator Will be used for fine tuning. The DAC is an 8 bit one so the course frequency step is 500MHz/256 = 2 MHz. Now the influence of the integrator is way less that it was before. It needs to be able to change the frequency only 2 MHz maximum instead of 500 MHz. So the ripple is reduced by a factor 250. The filter requirements can be relaxed because of this. Open loop gain is reduced as well. This decreases the complexity of the regulator algorithm.

vrijdag 5 juni 2009

Arrival of NE604 chips

Those NE604 chips are expensive. They cost 8 euro a piece.So I bought some on Ebay. Ten of them for 30 euro including postage, that is a good deal. They have arrived this week. It is the smd version so using them will pose a challenge. Nothing I can't handle though.

PIC programmer works

I managed to install XP on the old PC. It had to be the oldest version of XP I could find. The latest version won't install on a 1.2 Giga Byte hard disk. I won't connect the PC to the web so it is save to use.

I was afraid it would be hard to make the PIC JDM programmer work on XP. Fortunately it worked fine. The program I use is WIN PIC. It can be configured to use win API calls for accessing the serial port so I won't get port access problems. However I had to set win98 compatibility mode. Without this setting I got system errors.

I'll make a in circuit programmer. It will be the SERPIC programmer designed by David Tait. This programmer is also supported by WINPIC.

woensdag 3 juni 2009

spectrum analyser frequency control


The picture shows the control part of the spectrum analyser.
I try to make it a bit more sophisticated than the control I found in several designs.
Most designs use a potentiometer to set the center frequency, the sweep speed and the amplitude of the sweep signal. The better onces include a frequency counter.

The concept:
The Sawtooth generator is started by the PIC micorcontroller. If one cycle has finished it notifies the PIC. This way the PIC can calculate the sweep frequency accurately.
During the sweep the PIC counts the LO/256 frequency it receives from the tuner. Now the PIC is able to calculate the center frequency. This frequency is compared with the intended center frequency. Depending on this comparison an up or a down signal is send to the integrator. The integrator provides a DC offset voltage that sets the center frequency. The signal from the sawtooth generator is added to the offset voltage. Usually the VCO in the tuner is not linear. To compensate this non linearity a linearizer is added.

I am not sure the concept will work. It may be too slow. The regulation may be too crude.Experimentation is needed to find out.

dinsdag 2 juni 2009

Microcontroller development environment

In my daily job I develop software. I like my job but I don't want to spend my free time programming. So I chose a extremely simple c compiler and build environment for my electronics projects. It runs on a Pentium 1 system. The compiler is DOS turbo vision application for those old enough to remember it.

Unfortunately I can not use it for this project. It can not handle the PIC 16F877. So I have to switch to something modern. I found the HI-TEC compiler on the net. HI-TEC a free version without memory limits. Only the optimization is limited. So I will use this compiler together with MPLAB
from microchip. To program the PIC I can use the JDM programmer I bought on Ebay some time ago. However I want to program it in circuit. Fortunately the PIC16F877 can be programmed via the serial port. I found a bootloader for that. I think will try this approach.

In know the PIC can be programmed serially using 2 pins. I used them in previous 16F84 projects.
The programming software I know of uses either the serial port or the parallel port. I a afraid It won't run on XP because XP forbids low level access to the ports. Maybe I can find programming software that works under XP . Alternatively I can use the crack to enable access to the ports.

Of course I need a better PC than the Pentium 1 machine. Fortunately I have a few Pentium 3 PC's that can run XP. I hope I will be able to setup the development environment quickly. Because I want to concentrate on the application.

zondag 24 mei 2009

NE604 detector and micro controller

Fortunately I was able to get a NE604. I replace the AN7222 with the ne604. This device really works great. The dynamic range of the 38 MHZ receiver looks good. I measured 30 mV and .2 micro µV that would be 50 db dynamic range. My RF generator can not produce more than 30 mV so I van not verify that the the dynamic range is 60-70 db. It looks good though.

I am going to control the analyzer using a micro controller. This is quite a challenge. One of the problems is the generation of the sawtooth signal that sweeps the LO frequency. It could be done using a DAC. Then the micro controller knows the relationship between voltage and center frequency. It can display this frequency. So far so good. However this DAC needs a lot of bits. 12 bits are needed for 100 KHz steps (500/0.1). For 25 KHz 15 bits are needed. The output has to be very stable and without noise. After all 48mV drift means 1 MHz drift. It may be possible to use this concept but it is too difficult.

dinsdag 19 mei 2009

AN7222 Log detector not good enough

I found addition information about the log detector in the AN7222 AM/FM radio ic. The dynamic range just is not big enough for myb application. It can detect levels between 60 and 100 dbuV. That is just 40 db dynamic range. I had those AN7222 ic's in the junkbox so I used them. If I had no such ic's then I would have bought NE604 chips .This is a FM IF ic. I have used the NE604 in serveral projects. They work great.
So today I'll try to buy some. I hope they are still in stock.

maandag 18 mei 2009

38 MHz receiver

The tuner has an IF of 38 MHz so I need a receiver for 38 MHz for a fixed frequency.
The specs:
2 bandwidths 100 KHz and 25 KHz.
Log output.
Optional lineair output.
Dynamic range at least 70 db.

Design :

Building this should not be difficult. It is a straight forward superhetrodyne radio.
The 38 MHZ IF signal from the tuner is filtered by a bandpass filter. The Bandpass consists of three tuned circuits.
Then the signal is mixed in a ne612 with a 27 MHz signal out of a xtal oscillator.
This creates a 10.7 MHz signal which is filtered by a ceramic 10.7 IF filter.
An An7222 AM/FM receiver chip will be used as log detector.
The Ne 612 has two outputs. They can be used to make a balanced output signal. I use only one.
The other output is connected to another 10.7 MHz filter and log detector.
So I will have 2 bandwidths. It is experimental I have not seen this configuration before.

Last night I was working on it. The bandpass filter , mixer , one 10.7 Filter were build and tested.
One of the log detectors was build but I had no time to test it.

zondag 17 mei 2009

Start building spectrum analyser

I need a spectrum analyzer to test my home brew transceivers.
Unfortunately those things are expensive so I Will try to build one myself.

I may build more than one. The first one will be simple. just to check if my creations are performing according to the rules.
The other one will be more advanced. It will include a tracking generator and synthesizer control.
But that is for the future.

I found a TV tuner UDT-401 those things are hard to find. I was lucky to find one.
They can be used from 1 to 500 MHz. That is just what I need. It is enough to check the 2nd and third harmonic of a 144 MHz transmitter.

The tuner UDT-401
The UDT-401 has a few advantages over other tuners. These are.
1-500 MHz frequency range.
No range switching required
Flat response over the frequency range.
IF output at 38 MHZ.
1st LO frequency/256 available.
It has a few disadvantages though.
Hard to find.
2nd LO is free running. No control or output is availability.

Several spectrum analyzer designs exist that use this tuner. I have studied those designs. I can use some parts of those designs. However I want to use a micro controller to control it.
This part I have to design myself.