Sunday 21 December 2014

27MHz PLL Frequency Synthesizer and ASK Modulator


New 27MHz, PLL Frequency Synthesizer and ASK Modulator, , for RC car remote transmitter, replacing the DDS RF signal source, for lower power consumption and higher tunning frequency range. The circuits consist of ADF4002 PLL IC, PIC16F1716 MCU, op-amp active filter for pulse shaping filter and RMS-2 diode-ring mixer as modulator.

Sunday 14 December 2014

Remote control receiver ver 2014 integrated field test

Remote control receiver, version 2014, which has been went through a whole year of development, is put to the field test with a hobby RC car as a testing platform. The test is successful. When the car is come in very close range of transmitter, it still welly controlled without any issue, which is a great improvement from previous version.


The changes for version 2014 is to replace the previous dsPIC30F6014 microcontroller, with the lower cost PIC16F1716, this sound's like a minor modification, and it turns out not like that, the 16F microcontroller is 8-bit and 33F is 16-bit, which means the computation of all 16 bit variables would takes much more cycle and the maximum clock of 16F is 32MHz which is a lot slower than the 120MHz 30F controller. MCU code have to be speed optimized to make the old algorithm running in the new 16F controller.

The 16F comes with a advantage of having a 8-bit digital to analog converter (DAC) which is handy for controlling the gain of analog variable gain amplifier, in 33F MCU there are no such modules, the old DAC is constructed externally by resister ladder, just messy. 8-bit embedded DAC is nice, however in earlier version of PCB, it is found that the output current of the DAC is insufficient to drive the variable gain amplifier (20mA), as the result an OPAMP buffer is added to boost the current up.

The 10-bits Analog to digital converter (ADC) of 16F MCU is also a downside, when the 30F MCU ADC is 12-bits, the 16F analog sample is 4 times less resolution than 33F, which cause problem when receiving signal level is small, additional input scaling is applied to scale the sample value up so to improve the quantization error in amplitude estimation filtering.

There are some other difficulties such as servo pulse resolution and they have been mostly investigated and overcome.


Thursday 11 December 2014

Baseband decoding - PIC16F1716 MCU coding work

The remote control car receiver 2014 version is almost complete, analog circuit is done, after finished analog part, now is the MCU programming part. 
MCU is 16F1716, the point of this MCU is having a 8-bit DAC, which is vital to generate analog voltage to control the variable gain amplifier, and the drawback is, this is a 8-bit MCU, making 16-bit variables calculation a bit painful, and the ADC is only 10-bit, i hope this resolution is OK for sampling the received baseband signal.
Data coding method is switched to Manchester code, which looks like solving the problem of threshold floating issue in the previous NRZ coding method. Bitrate is shorten to 500uS, data length keep 8 bits for each of two channel.


Using two probe is very rare in here. But this is digital debugging, the more probe the better.


Generating a narrow but high resolution pulse for interface with RC servos and ESC(electronics speed controller). The difficulties is the control pulse required a narrow(1-2ms) and high-res short burst and same time having a long period (~20ms). 


Friday 5 December 2014

Rescursive digital filter quantization error

In ASK decoding, a narrow band lowpass filter is used to estimate the amplitude of carrier so the decision threshold  can be set to the average carrier amplitude. In integer arithmetic digital filter, When signal is numerically small or the bandwidth of a filter is narrow, quantization error become severe. But how severe? Some Matlab simulation is carried out to demonstrate the effect of quantization error on small number and different bandwidth of lowpass filter.

Small input 
Final filter output is very departed from the expected value

Larger input
Final filter output is less departed from the expected value

Even larger input
Final filter output is quite close to the expected value





Thursday 4 December 2014

Amplitude estimation

In ASK demodulation, the amplitude of received baseband signal is varying, the fluctuation is caused  by various factor such as path loss, obstacle in the path and multipath fading. In such way, the threshold of 1/0 decision must be adaptive to the dynamic changing amplitude, a digital lowpass filter  is needed. and the bandwidth needed to be narrow compare with the symbol rate, because the symbol is random. for the computational efficiency reason, power of 2 coefficient is chosen.
The proposed filter is consist of two stage, first stage is a recursive filter running at 8x of symbol rate

y = (31y + x)/32
x is input and y is output

The second stage is another recursive filter running at 2x of symbol rate
g = (31g+y)/32

Green trace is the output of first filter and red trace is the output of the second filter. It produce a quite smooth amplitude smoothing despite the symbol is random with equal chance of 1 and 0.

Saturday 22 November 2014

AD9851 DDS ASK Modulation linearity test


It was suspected that the AD9851 DDS (Direct Digital Synthesizer) output voltage was not linear varying with the input DC control voltage, if so, that may contribute to the problem of the pulse distortion that was previously discussing, a test is done to verify this.



DC voltage is applied to the current reference input. The RSet pin is holding a 1.26V voltage, so when applying a 1.26V in DC input point, there would be no current flow in/out, that gives zero output. when DC input is 0V it's the maximum output, which is around 0dBm.

34 data points is recorded and the data is plot in DC control voltage VS RMS voltage of RF output of DDS. The conclusion is, well, the relationship IS linear. 

When bypassing the power amplifier stage, so that the DDS is feeding to the antenna directly, that gives the receiver a nice waveform, with almost no overshoot. 

The overshoot problem is narrowed down to the power amplifier stage.



Monday 17 November 2014

Overshoot issue investigation

The overshoot issue is improved by reducing output power. This add one more evident that the nonlinearity of power amplifier stage contribute mostly to the rise/fall time asymmetry issue.


Left : Receiving waveform from full power transmitter
    Right : Receiving waveform from ~half power transmitter (overshoot is reduced)

The Bessel filter could not yet solve overshoot issue

The Bessel pulse shaping filter is patched to the 27MHz, AD9851 DDS remote control transmitter.
The pulse shape looks OK when after shaping filter, but the modulating waveform envelop rise time not matched with shaping filter output. The rise time of envelop is a lot faster than fall time, it contribute to the overshoot in receiving waveform.

The ASK demodulator in receiver also have an old issue of envelop rise time faster than fall time. This makes the issue getting even more serious.

Demodulated waveform in receiver, sadly it has ~10% overshoot, it is highly suspected that this is caused by nonlinear phase response in 455kHz ceramic IF filter, the issue still not yet improved by adding transmit pulse shaping filter. The problem looks like from the AD9851 current reference input having asymmetry in rise time and fall time. Or power amplifier stage amplitude nonlinearity. This overshoot issue must be resolved.



Saturday 15 November 2014

Search for ways to reduce pulse distortion

The goal is SAY NO TO FIRST ORDER RC FILTER , may be start with analog filter approach. The Bessel filter and Gaussian filter both have good phase characteristic, that should improve the time domain response, make them suitable for pulse shaping application. There's are good filter design tools out there, Analog devices/TI both provide web based tools, but TI required account login. 

The Analog Devices ANALOG FILTER WIZARD hided some filter terminology such as Butterworth/Chebyshev/Bessel filter type, in another words, they use Fewest stage/Fastest settling to abstract out the optimization goal. Low pass filter with 5kHz cutoff frequency specification is picked.


It's a very relax frequency response specification, so it only takes 1 stage of opamp, it also give option for optimize for noise or optimize for power. Low noise is chosen in this test. Sallen key topology is default.

Simulation in LTSpice, using LT1797 opamp.


The filter was firstly implemented using LM358 general purpose opamp, but it give weird spike in the rising of the pulse, then it is replaced by LMH6646, which give a nice waveform, the reason why LM358 is not working is not yet understood. The waveform match with the simulation. The waveform is more symmetric than a first order RC filter, nice.




Wednesday 12 November 2014

The ugly face of first order RC filter

In digital radio transmitter, the baseband waveform needed to be filtered, need to be lowpass filtered, because the bandwidth of a rectangular pulse is infinite and modulating an carrier with an infinite bandwidth baseband waveform producing infinite bandwidth signal, that cause interference to near channels. 

The first order RC filter, which is the simplest lowpass filter, and we using it just everywhere. It has cut-off frequency at fc = 1/(2piRC), but it roll-off at -20dB per decade which is very gentle, so it actually not "cut-off" after fc, it just slowly taking out the high frequency component inside a signal.

But now what make me even more frustrated, is the response of first order RC filter, in time domain.

First order RC Filter ! Why you are NONLINEAR PHASE ?

The pulse became asymmetric, it jump rapidly in beginning and settle slowly at the end, and the long tail extended to next symbol, that means some energy is leaked to the next symbol, sometime we call it Inter Symbol Interference - A bad guy. The problem of asymmetric waveform is caused by unequal delay of different frequency component inside the rectangular pulse, with lower frequency delay more and high frequency exit faster, textbook call it nonlinear phase, I call it ugly.

It's wont work, something have to be done.



Sunday 2 November 2014

Analog Devices AD605 X-AMP test

Introduction from Analog Devices AD605 Datasheet:

"The AD605 is a low noise, accurate, dual-channel, linear-in-dB
variable gain amplifier (VGA), optimized for any application
requiring high performance, wide bandwidth variable gain
control. Operating from a single 5 V supply, the AD605 provides
differential inputs and unipolar gain control for ease of use.
Added flexibility is achieved with a user-determined gain range
and an external reference input that provide user-determined
gain scaling (dB/V)."

It sound's very powerful, if this can replace the discrete transistor version of VGA in my receiver projects, it save a lots of board spaces and greatly improve the dynamic range. Let's make a evaluation board to try try.

Setup:
The AD605 evaluation board, a 68 ohm resistor is loaded with the input to make up of a near 50 ohm input impedance.


Test setup: Gain control voltage is from adjustable power supply. From 0.1V to 3.0V.
Signal source is from signal generator, 455KHz, -60dBm, quite a small signal.

Output power is measured from spectrum analyzer, it's dynamic range way better than an oscilloscope.


Gain-Control voltage plot from AD605 datasheet. In this test, FBK(open) configuration is using.


Result:
Gain-Control voltage plot from actual test, which is very closed to the plot in datasheet. A nearly linear-in-db curve between 0.1V to 2.5V control voltage. and tuning range of about 45dB. Certainly a very respectable figure.

45dB of gain is not enough for a typical receiver, there are another amplifier unit in the AD605 package, may be I could cascade them and put a ceramic filter in between them, and share same control voltage.





Tuesday 28 October 2014

AM/ASK Envelope Detector in-output voltage relationship



Test circuit, the sensitivities of this test receiver unit is about -73dBm, a low gain configuration.

The signal generator specifying output power in dBm, in this way the raw data for input is in dBm

X-Axis converted to RMS voltage

Converted to mV for input, the plot is quite linear at first and later saturated after input raised to 1mV , corresponded to output voltage of 2.9V. The saturation is caused by the voltage supply of final opamp stage is limited to 7.4V battery voltage.

The linear range of the IF amp-detector circuit is about 25dB. AGC circuit must control the signal level fall within this range.

Sunday 26 October 2014

Long range challenge 2

 In the previous long range challenge in Plover Cove Reservoir main dam, the transmitter was using two parallel PN2222A as the final stage, that give 500mW output, this time, a new lot of BLT50 transistor was brought from another online store, it's rating is 1.5W, but can it really gives 1.5W? let's try to see the result.

with class B bias (= no bias) and power supply of 10V, 27MHz, the output power could be obtained is 31dBm. (28dBm showing in spectrum analyzer and counting -3 dB additional attenuator), this is a little bit more than 1W, but certainly less than the rated 1.5W as datasheet mentioned. May be the input power is not enough or output matching not good enough.
more than 1W output power, it's quite satisfying.

adjusted the instrument's stop frequency to ~250MHz, it shows quite many higher harmonics, well of cause, it's class B operation and not much output filtering.

Anyway, the transmitter is now upgraded from 500mW to 1W,  it's time for outdoor range test. The selected transmitter location is Ma Liu Shui Ferry Pier, and receiver location in Ma On Shan, they are about 800 meters apart. The previous attempt in this site was failed, because the receiver sensitivities was  just about -60dBm, obviously not enough. In this time the receiver sensitivities is increased to -90dBm. And the antenna of both side is 10cm longer than last attempt.

The bicycle trip

Transmitter is firstly placed near the pier, then I took the receiver and ride along the path shown, when riding along to the target receiving site, some signal (about 3 RSSI LEDs) could still be detected, even on the bridge, when riding closer and closer to the target receive site, the signal become very strong.

Mission accomplished. All 16 RSSI LEDs is on, showing full signal strength. The transmitter is on the opposite of the harbor. Which is more than 850 meters apart.

Sadly, I have to ride back to take back the transmitter.

Lesson learnt
Before deploying a radio, the output power and receiving sensitivities must be measured clearly using equipment.


Monday 20 October 2014

Aluminium foil shielding box

In recent 2.4GHz measurement, I suspect the WIFI around here is interfering, to get rid of these annoying WIFI or other 2.4GHz source, a shielding box is made, using aluminium foil, it is found that the top cover need to be in tightly contact with the lower box body, otherwise it's not shielded enough for this bluetooth speaker to shut up. 

Bluetooth speaker as a test sample.

Measuring antenna is insert from the top little hole. Speaker and mobile phone inside.


Friday 17 October 2014

Active RFID tag spectrum shape and burst time casual measurement

The ADVANTEST R3463 spectrum analyzer is just arrived, it frequency range reached 3GHz and it's a synthesizer type of spectrum analyzer so it get rid of many problem for example frequency drift off the view, ofcause a 3GHz analyzer enabled measuring of abundant 2.4GHz radio systems, including WIFI, bluetooth, zigbee and also this one: 2.4GHz Active RFID Tag.


This little 2.4GHz radio tag is powered by CR2302 battery, firing a short burst of signal in 1 sec time interval. May be it could be used to locate a pet cat.


Because there are many WIFI routers nearby as interference and the tag is very low power (~0dBm), the tag have to put closely to the antenna.

The spectrum view of tag signal, using long time peak hold, because it firing a burst every second, which is quite infrequent. The center frequency is measured 2.457GHz and power -13.5dBm.
As we can see the SPAN setting of this screenshot is 10MHz, and every grid equal 1MHz, the -6dB bandwidth of the spectrum is roughly 1MHz (for compliance to FCC rule for non-frequency hoping system in 2.4GHz ISM band, the -6dB bandwidth should be wider than 500KHz).


One feature of this R3463 spectrum analyzer is Transient analysis, which is a power vs time measurement mode, by using this mode, we can obtain the power envelop of the signal burst, the burst time is 180uS, that's translate to 1/5555 duty cycle.



Sunday 12 October 2014

HP 8590D spectrum analyzer CRT repair attempt

Well, the CRT of HP 8590D spectrum analyzer has been malfunctioned for a few months, a while before i was trying to hook up an external monitor to the machine, hope that i can still make use of this machine for a little while more, however i found this way inconvenient because the context button next to the original screen is far away to the external monitor and I also have to turn on the external monitor and video converter whenever i want to use the spectrum analyzer.
As I know the CRT is actually working quite independently to the spectrum analyzer core, i hope that i can open up the analyzer to check if there are some burnt component to replace or some tuning knob i can adjust so to save back the CRT.
May be it's time to start this exploration journey.

This CRT have been looking like this for a few months, too bad.

Amazing looking, what a sophisticated high tech stuff in 90s, 
as a conventional electronics testing instrument design, it's heavy but, not difficult to take off the cover. As I expected the internal of the machine is highly modularized.

CRT, mixer and various of RF modules are shown, many SMB connectors, RF modules are heavy shielded and connected with semi-rigid cables, the CRT shielding could not be open, may be need to tear apart more module before i can take out the CRT.

The A5 second converter module, and a stuff in the middle of a rigid cable looks like common mode filter.

The bottom side contains an unshielded logic board, may be it's the computer, (90s computer)

Marking on the RF modules shows "LOG AMPL", "BW FILTER", "AMPLITUDE CONTROL" and "THIRD CONVERTER", exciting!

Carefully removed the front cover and power supply module, so the CRT could be extract out.

The extracted cute looking CRT, shielding was removed. I can see some knob showing "Vertical Line", "Horizontal line" and so, may be I could try to adjust these knob.

There we go! after tuning the "Vertical line" knob, the screen is backed to normal. I could also tuning the "Vertical size" knob to make the graphics fully using the whole screen size.



Reassemble the stuff back to the position.



It looks better than before, say goodbye to the external monitor.