HF Antenna Analyser With Arduino and DDS Module

41,606

231

77

Hi

In this Instructable I'll show you how I built a low-cost antenna analyser which can measure an antenna and display its VSWR over any or all of the HF frequency bands. It will find the minimum VSWR and corresponding frequency for each band but also will display a realtime VSWR for a user-selected frequency to facilitate antenna adjustment. If sweeping a single frequency band, it will display a graph of VSWR versus frequency. It also has a USB port on the back for outputting frequency and VSWR data, to allow more refined graph-plotting on a PC. The USB port can also be used to reflash the firmware if needed.

I recently got into amateur radio (because I liked the idea of peer-to-peer communication over huge distances without infrastructure) and rapidly made the following observations:

1. All of the worldwide communications that interested me take place on the HF bands (3-30 MHz)

2. HF transceivers are very expensive and will break if you don't drive them into a reasonably well-matched antenna

3. You are generally expected to rig up your own HF antenna from bits of wire strung across the garden (unless you want to spend even more money than you spent in 2).

4. Your antenna might be a bad match but you won't know till you try it.

Now a purist would probably say that one should first test the antenna on very low power at the frequency of interest and check the VSWR on the rig's meter to assess the quality of the match. I don't really have the time to muck about with that sort of thing for every frequency I might want to use. What I really wanted was an antenna analyser. These devices can test the quality of the antenna match at any frequency over the HF bands. Unfortunately they are also very expensive, so I set about considering whether I could make my own. I stumbled upon the excellent work carried out by K6BEZ (see http://www.hamstack.com/project_antenna_analyzer.html), who investigated the use of an Arduino to control a cheap direct digital synthesiser module (DDS). He soon abandoned the Arduino on cost grounds, preferring to use a PIC. Well, in 2017 you can buy an Arduino Nano for about £3.50, so I thought it was time to revisit his work, pick up where he left off and see what I could come up with (note that I'm not the only one who has done this: there are some very nice examples to be found on the internet).

Update (29/7/2018) - this work has been built upon considerably by bi3qwq, from China, who has made some really nice improvements to the user interface, which he has kindly shared. He's designed a very professional PCB (with a great calibration resistor feature) and done a really good looking build. To top it all he has prepared a schematic, which I know will delight many of those who have commented previously. Please see the comments section for more information.

Update - I've been getting into 60 m recently, which the original sketch didn't cover. So now I've uploaded firmware version 7, which adds the 160 m and 60 m bands. These aren't add-ons; they are fully integrated into the operation of the analyser. It was fortunate that I could find an u8glib font that was still legible but allowed me to display ten bands simultaneously on that little screen (although it wasn't monospace, which caused some grief). I have estimated calibration values for the new bands, based on interpolation / extrapolation of the existing calibration values. I then checked these out with fixed resistors and they give pretty good results.

Update - as several people have asked about schematics, the fundamental Arduino / DDS / VSWR bridge circuit is largely unaltered from K6BEZ's original work. Please check out the above URL for his original schematic on which I based this project. I've added an encoder, an OLED screen and fully developed firmware to make for an effortless user experience.

Update - This system uses a very low voltage DDS signal source in conjunction with a resistive bridge containing diode detectors. Thus the diodes are operating in their non-linear regions and my first version of this system tended to under-read VSWR. As an example, a 16 ohm or 160 ohm impedance load should show a VSWR of about 3 in a 50 ohm system; this meter indicated a VSWR closer to 2 in this situation. I therefore carried out a software calibration using known loads which seems to be an effective fix for this problem. This is described in the penultimate step of this instructable and a revised sketch has been uploaded.

Update - on-board graphing facility added to single sweeps as it was too useful to leave out, particularly when tuning antenna lengths for minimum VSWR : a graph gives you an instantly visible trend.

Step 1: Buy Your Stuff

You will need the following items. Most of them can be obtained cheaply from Ebay. The most expensive single item was the box, at close on £10! It might be possible to substitute some items (I used 47 Rs instead of 50 Rs, for example). The diodes were rather unusual (I had to buy 5 off from Italy) and would be worth substituting for more readily available items if you know what you are doing.

  • Arduino Nano
  • DDS module (DDS AD9850 Signal Generator Module HC-SR08 Signal Sine Square Wave 0-40MHz)
  • 1.3" i2c OLED display
  • MCP6002 op-amp (8 pin)
  • 2 off AA143 diode
  • Ceramic capacitors: 2 off 100 nF, 3 off 10 nF
  • 1 uF electrolytic capacitor
  • Resistors: 3 off 50 R, 2 off 10 K, 2 off 100 K, 2 off 5 K, 2 off 648 R
  • 2.54 mm pitch screw terminal blocks: 3 off 2-pin, 2 off 4-pin
  • Single-core hook-up wire
  • 702 or similar hook-up wire
  • Stripboard
  • Square header strip (female) for plugging the Arduino and DDS into - don't buy the round socket stuff by mistake!
  • SO-239 chassis-mount socket
  • Rotary encoder (15 position, 30 detent) with push switch and knob
  • Cheap rotary encoder 'module' (optional)
  • Project box
  • Toggle switch
  • Right-angle mini-usb to USB B bulkhead mount lead (50 cm)
  • PP3 and battery clip / holder
  • Self-adhesive PCB mounting posts / standoffs

You'll also need a soldering iron and electronics tools. A 3D printer and a pillar drill are helpful for the enclosure, although if you wanted you could probably assemble the whole thing on the stripboard and not bother with a box.

Naturally you undertake this work and exploit the results generated at your own risk.

Step 2: Lay Out the Stripboard

Plan out how you are going to arrange the components on the stripboard. You can either do it yourself, referring to K6BEZ's original schematic (which lacks an encoder or screen - see Page 7 of http://www.hamstack.com/hs_projects/antenna_analyzer_docs.pdf), or you can save a load of time and copy my layout.

I do these layouts the simple way, using squared paper and a pencil. Every intersection represents a stripboard hole. The copper tracks go horizontally. A cross represents a broken track (use a 6 mm drill or the proper tool if you have one). Lines of circles with a box round them represent headers. Large boxes with screws denote the connector blocks. Note that in my diagram there is an extra line which runs horizontally through the middle of the board. Leave this out when you are putting it together (it's marked 'omit this line').

Some of the components may appear to be laid out strangely. This is because the design evolved once I'd got the basic hardware working (particularly when I realised that the encoder needed hardware interrupts, for example).

When soldering components onto the board, I use Blu-Tak to hold them in firmly in place while I turn the board over to solder the legs.

I tried to minimise the amount of wire I used by aligning the Arduino and the DDS module and just using the stripboard to connect key pins. I didn't realise at the time that the hardware interrupts needed to read the encoder only work on pins D2 and D3, so I had to move DDS RESET from its original D3 connection with a bit of wire:

DDS RESET - Arduino D7

DDS SDAT - Arduino D4

DDS FQ.UD - Arduino D5

DDS SCLK - Arduino D6

Arduino D2 & D3 are used for the encoder inputs A & B. D11 is used for the encoder switch input. D12 isn't used but I thought I'd make a screw terminal for it anyway, for future expansion.

Arduino A4 & A5 provide the SDA & SCL (I2C) signals for the OLED screen.

Arduino A0 & A1 take the inputs from the VSWR bridge (via the OPAMP).

Step 3: Install the Modules, Attach the Peripherals and Flash the Code

It's worth testing the board before going to the trouble of mounting it into an enclosure. Attach the following components using flexible wire to the board using the screw terminal blocks:

  • 1.3" OLED display (SDA and SCL are connected to Arduino pin A4 and A5 respectively; ground and Vcc go to Arduino GND and +5V, obviously)
  • Rotary encoder (this needs a ground, two signal lines and a switch line - you might need to flip the switch lines round if the encoder works the wrong way - connect these to Arduino ground, D2,D3 & D11 respectively). Note that for my prototyping work I mounted the 15/30 encoder onto a KH-XXX encoder module board, as the pins on the bare encoders are very flimsy. For the final job I soldered wires straight onto the encoder.
  • 9V battery
  • SO-239 socket - solder the centre pin to the antenna signal line and use an M3 ring terminal and screw for the antenna ground

Flash the following sketch onto the Arduino. Also make sure you have included the very good OLED driver library from Oli Kraus, or the complilation will crash and burn : https://github.com/olikraus/u8glib/

If your OLED display is slightly different you may need a different configuration setting in u8glib; this is well documented in Oli's example code.

Step 4: Put It All in a Nice Box (optional)

I seriously considered leaving the analyser as a bare board, as it was only likely to be used occasionally. On reflection though, I thought that if I was doing a lot of work on a single antenna, it might end up getting damaged. So everything went in a box. There's no point going into details about how this was done, as your box will likely be different, but some key features are worth mentioning:

1. Use self-adhesive PCB standoffs for mounting the stripboard. They make life really easy.

2. Use a short USB adaptor lead to bring out the Arduino USB port to the rear of the enclosure. Then it's easy to access the serial port to obtain frequency vs. VSWR data and also to reflash the Arduino without taking the lid off.

3. I developed a custom 3D-printed part to support the OLED display, as I couldn't find anything on the web. This has a recess to allow one to insert a 2 mm piece of acrylic to protect the fragile screen. It can either be mounted using double-sided tape or self tapping screws (with the tabs on either side). Once the display has been fitted, you can use a hot wire (think paperclip and blowlamp) to melt the PLA pins onto the back of the circuit board to secure everything. Here's the STL file for anyone who's interested:

Step 5: Calibration

Originally I didn't do any calibration but discovered that the VSWR meter was consistently reading low. This meant that although an antenna appeared to be okay, my rig's autotuner wasn't able to match to it. This problem arises because the DDS module gives out a very low amplitude signal (about 0.5 Vpp at 3.5 MHz, rolling off as frequency increases). The detector diodes in the VSWR bridge are therefore operating in their non-linear region.

There are two possible fixes for this. The first is to fit an broadband amplifier to the output of the DDS. Potentially suitable devices are available cheaply from China and they will boost the output to about 2 V pp. I have ordered one of these but have yet to try it. My feeling is that even this amplitude will be a bit marginal and some non-linearity will remain. The second method is to put known loads on the output of the existing meter and to record the displayed VSWR at each frequency band. This allows you to construct correction curves for actual versus reported VSWR, which can then be put into the Arduino sketch to apply correction on the fly.

I adopted the second method as it was easy to do. Just get hold of the following resistors: 50, 100, 150 and 200 ohms. On this 50 ohm instrument these will correspond to VSWRs of 1,2,3 and 4 by definition. In the sketch there is a switch 'use_calibration'. Set this to LOW and upload the sketch (which will display a warning on the splash screen). Then carry out measurements at the centre of each frequency band for each resistor. Use a spreadsheet to plot expected versus displayed VSWR. You can then do a logarithmic curve fit for each frequency band, which gives a multiplier and intercept of the form TrueVSWR=m.ln(MeasuredVSWR)+c. These values should be loaded into the swr_results array in the last two columns (see the preceding comment statement in the sketch). This is an odd place to put them but I was in a hurry and as this array stores floats it seemed like a sensible choice at the time. Then put the use_calibration switch back to HIGH, reflash the Arduino and off you go.

Note that when doing the spot frequency measurements, the calibration is applied for the initial choice of band. This won't be updated if you make gross changes in frequency.

Now the meter reads as expected for the fixed loads and seems to make sense when measuring my antennas! I suspect I may not bother trying that broadband amp out when it arrives...

Step 6: Using the Analyser

Attach an antenna via a PL-259 lead and switch the device on. It will display a splash screen then automatically perform a sweep of all the main HF bands. The display shows the frequency under test, the current VSWR reading, the minimum VSWR reading and the frequency at which it occurred. In order to reduce measurement noise, five measurements are taken of VSWR at every frequency point; the mean value of these five readings is then passed through a nine-point moving average filter with respect to frequency before the final value is displayed.

If you want to stop this all-bands sweep, just press the encoder knob. The sweep will stop and a summary of all the band data gathered will be displayed (with nulls for those bands not yet swept). A second press will bring up the main menu. Choices are made by rotating the encoder and then pressing it at the appropriate point. There are three choices in the main menu:

Sweep all bands will restart the sweep of all the main HF bands. When it finishes, it will display the summary screen described above. Write this down or take a photo if you want to keep it.

Sweep single band will allow you to select a single band with the encoder then sweep it. Both the wavelength and frequency range are displayed while making the selection. When the sweep has finished, a second press of the encoder will display a simple VSWR versus frequency graph of the band just swept, with a numerical indication of minimum VSWR and the frequency that it occurred. This is very handy if you want to know whether to shorten or lengthen your dipole arms, as it shows the VSWR trend with frequency; this is lost with the simple numeric report.

Single frequency allows you to choose a single fixed frequency and then continuously updates a live VSWR measurement, for antenna tuning purposes in real time. First select the relevant frequency band; the display will then show the centre frequency of the chosen band and a live VSWR reading. The relevant band calibration is applied at this point. One of the digits of the frequency will be underlined. This can be moved left and right with the encoder. Pressing the encoder emboldens the line; then rotating the encoder will reduce or increase the digit (0-9 with no wrap or carry). Press the encoder again to fix the digit, then go on to the next one. You can access pretty much any frequency across the entire HF spectrum using this facility - the band selection at the start just helps to get you close to where you probably want to be. There's a caveat though: the calibration for the selected band is loaded at the start. If you move too far away from the selected band by changing the digits the calibration will become less valid, so try to stay within the chosen band. When you have finished with this mode, move the underscore all the way to the right until it's under 'exit', then press the encoder to return to the main menu.

If you connect your PC to the USB socket on the rear of the analyser (i.e. into the Arduino), you can use the Arduino serial monitor to collect frequency versus VSWR values during any sweep operation (it's currently set to 9600 but you can change that easily by editing my sketch). The values can then be put into a spreadsheet so you can plot more permanent graphs etc.

The screenshot shows the VSWR summary for my 7.6 m fishing pole vertical antenna with 9:1 UNUN. My rig can accommodate a 3:1 max SWR with its internal auto-tuner unit. You can see that I will be able to tune it over all bands except 80 m and 17 m. So now I can relax in the knowledge that I've got a passable multi-band antenna and I'm not going to break anything expensive when transmitting on the majority of bands.

Good luck and I hope you find this useful.

3 People Made This Project!

Recommendations

  • Big and Small Contest

    Big and Small Contest
  • First Time Author

    First Time Author
  • Toys Contest

    Toys Contest

77 Discussions

0
None
dr_phil

4 months ago

Hi bi3qwq. I had some problems getting your sketch to fit on my Nano
(max 30720 bytes). I had to go through it trimming out lots of text etc.
before I could get it to fit. Now it's installed, I can have a proper
play.

* The display looks great, although the bar graph and figures overflow when the antenna port is open circuit.

* The encoder button and DDS module use different pins on my hardware, but this was easily changed in your sketch.

* I think there is definitely a problem with the calibration routine, as
your screen (for example) reads an SWR of about 7 for a measured
resistance of about 150 ohms. The actual value should be around 3.

* Does the graph feature only store a limited number of points? I found that the graph 'tailed off' if I let the scan run for too long.

I think if you can revisit the SWR calculation and calibration aspect,
and perhaps investigate why it doesn't fit on some Nanos (this could be a
problem with my set-up, admittedly), then it all looks really good. The
bar display and the graph zooming feature are cool, and it's much
easier to pick an operating frequency than on mine. Nice work...

Cheers
dr_phil

11 replies
0
None
bi3qwqdr_phil

Reply 2 months ago

hi dr_phil,i've been very busy recently,frequent business trips.i wrote coe when i have free time,and i diy 5 band inverted V antenna,i'll goto my roadside this afternoon,to fixed antenna.now,i get a report to u,about the new program about arduino.i take some pic to u.if u have some question,u can replay me.

[Program Mode]

1、Config Mode(Cailibration、Freq Range、Reset System

2、RealTime Mode

3、Band Mode

cheers...

bi3qwq

1.jpg2.jpg3.jpg4.jpg5.jpg6.jpg7.jpg8.jpg9.jpg10.jpg
0
None
dr_philbi3qwq

Reply 2 months ago

Hi again bi3qwq. You have done a really nice job on the improvements to your user interface and I notice that 66 ohms gives an SWR of 1.33, so the algorithm seems to be working fine. Are you willing to share your code with the community please? I for one would love to try it out.

I liked the antenna pictures, but I guess this is a temporary installation? There must be a lot of neighbours to worry about!

Cheers

0
None
bi3qwqdr_phil

Reply 2 months ago

hi,im very happy to tell u,im finished all functions.now,i upload new source file.i write Instructions to u.when u download souce code file,u should change PIN.

----------------------------------------

[Mode]

1、Config Mode(Cailibration、Freq Range、Reset、Exit)

turn off system,and always hold down the button.then,turn on system,will have tip "Config Mode".

at the config mode,u can cailibration,change freq range,reset system rom,and exit mode to Realtime mode.

2、RealTime Mode

u can change any freq,rotate button left or right to change freq.

click button <500ms,u can change freq step,is 1.0、0.1、0.01、0.001.when u roate very fast,the setp will x10 speed.

press button <2s,system will auto scaning freq,the step is by you set step,u can roate button very fast,scan freq will be x10 speed.roate slow will normal speed.when u click button or overflow max freq,will stop scaning,and auto enter graphic mode,u can watch the scan result by line chart.

press button >2s,will enter graphic,the center freq is u selected,the step is u set step .at the graphic mode,program will autoscanning total freq.click button can stop scaning.

3、Band Mode

when u rotate button and change freq on <1.000Mhz,will enter Band Mode,roate freq >1.000Mhz will enter RealTime Mode.

click button <500ms,u can change freq step,is 0.001 or 0.005

press button >2s,will auto scanning system default band(3.8-3.86,5.32-5.38,7.0-7.08,14.150-14.35,21.37-21.43,29.57-29.63).

when u click button or overflow total band,will stop scaning,and auto enter graphic mode,u can watch the scan result by line chart.

4、Graphic Mode

this mode have new function,it's autoscaning total freq all the time,when u click button one times,or press button <2s.

realtime mode or band mode finished word,will auto enter this mode.

click button <500ms:stop autoscaning,change roate mode max SWR or move cursor.

press button <2s:exit mode,and return last mode,for realtime mode or band mode.

press button >2s:will aoto scan total freq all times.

-----------------------------------------

[Question]

if startup system have tip is "Need Calibration!" and RealTime mode have "SWR!",it's need calibration res.enter config mode to cailibration.it's will be ok.

------------------------------------------

73

bi3qwq

1.jpg2.jpg3.jpg
0
None
dr_philbi3qwq

Reply 2 months ago

Dear bi3qwq - this looks really good and thanks for sharing. Have you had problems with people misusing your code? This is a real shame if true but I'm sure amateurs visiting this page really appreciate your generosity.

I haven't had time to try loading your script onto my machine yet. Do I need to reduce the size of the font library, as you described previously, or does it all fit onto the nano without adjustment now?

0
None
bi3qwqdr_phil

Reply 2 months ago

download this rar file,copy to "Arduino\libraries\U8glib\utility\u8g_font_data.c",it's will be ok!

0
None
dr_philbi3qwq

Reply 2 months ago

Thanks for that - I'll give it a try as soon as I get chance!

0
None
bi3qwqdr_phil

Reply 2 months ago

dr_phil

yes,just temp installtion for test ant,and fix ant.im not at home,i triping for business,about one week.

the new program have a bug and i have new idea.

[one bug]now,when u fast trun left or right button,the button value is snake,not smooth,i need fix it.

[new idea]yestoday,i got a new idea,will add a new mode,it is waterfall.it will be vector.look like line chart.default freq will at center,left and right freq will step by step sub or add.the vector is realtime geting.when u turn left one step,the waterfall will move one step,turn fast step x10.

---------------------

dr_phil,can u leave a email addr for me?because someone got my source code for business in china.i don't expect that.u leave a emaill,i will send source to u when i have new version.

73!

bi3qwq

0
None
bi3qwqdr_phil

Reply 4 months ago

haha,lol,dr_phil,i'm in Shanghai now,i travel in Shanghai about 3-4 days,i saw u reply me,and have some qustions about new program.

1、about arduino max code size(32k),i spend about 1 day to fixed source code,i found u8g using the font file is very big,it's using about 50% program space,just on font size,then,i had to optimization the source code about u8g font file.for example "u8g_font_helvB18",this font famliy have 0-9,a-z,A-Z, but we only need 0-9,then delete a-z and A-Z font model.so,in my upload Source.rar file has a new u8g font file,u must delete old font file,and copy new file to directory,u should read Source.rar->readme.txt,u will get a surprised.

2、about SWR,maby exactly has somethins wrong about source code,when i go back Beijing,i'm going to fix it.if i cant fix,i will tell u,and u help me fixing it,together.

3、about Config function,when i go back home,i will writeing new function,it's about Cofig sytem,for example,EC11 pins,direction(turn right or left),callsign,scan step,calibrated resistance size(50r 100r 150r 200r 250r 300r etc..) ,and more function if we need.

4、about graph limited points,i set max size is 118,because the screen width is 128,sub font size and X onle have 118.so,max is 118.if u scaning freq big then 118,the program will merger comparison,the new size is will be 118/2.for example:

-------old array------------

0=7.050 ,1.5swr //will saved

1=7.060,1.6swr //remove

2=7.070,1.8swr //will save

3=7.080,2.0swr //remove

....

118=16.110,8.0

-----new array-------

0=7.050,1.5swr

1=7.070,1.8swr

.....

59=......

u understand?

now,i will have a sleep....

73 dr_phil

good night!

0
None
dr_philbi3qwq

Reply 3 months ago

Ah - that makes sense. I'm happy to help with debugging the SWR calc, but I'm sure you've got it covered. I still don't understand the graph data storage though. Because your code will just sweep the frequency until you tell it to stop, the code doesn't know in advance how often to sample the SWR reading to generate the graph array. Or am I misunderstanding?

Cheers

0
None
bi3qwqdr_phil

Reply 3 months ago

I find that the standing SWR value formula in your source code is:

Temp_VSWR = (FWD + REV) / (FWD - REV);

However, I noticed that the formula for other technical articles is:

Temp_VSWR = (1.0+sqrt (REV/FWD)) / (1.0-sqrt (REV/FWD));

After testing, the result of your formula is smaller than the following result.

i try test 10times,comparison of two algorithms SWR value.

[times--------other------your]

1 1.00 1.00

2 1.48 1.08

3 1.75 1.16

4 2.00 1.25

5 2.25 1.35

6 2.51 1.45

7 2.78 1.57

8 3.07 1.70

9 3.39 1.84

10 3.73 2.00

And about calibration of resistance,if you follow your algorithm.

SWR=1,50R

SWR=2,100R

SWR=3,150R

SWR=4,200R

......

R=SWR*50

but,i get other algorithm.it's:

R=sqrt(SWR)*50

[swr--------other------your]

1 50 50

2 70.71 100

3 86.6 150

4 100 200

......

Are you sure there is no problem with your formula?

thk dr_phil.

0
None
dr_philbi3qwq

Reply 3 months ago

Hi again. The core of this system is based on a resistive bridge circuit and firmware developed by Beric Dunn. The calculation is taken directly from his code. If you look at Wikipedia, under VSWR, you'll see that:

VSWR = |Vmax| / |Vmin| = (|Vf|+|Vr|) / (|Vf|-|Vr|)

The Arduino sketch uses the second part of this formula. I think Beric's resistive bridge uses diodes and low pass filters to
obtain the modulus (magnitude) of the forward and reverse voltages (FWD and REV respectively), then calculates:

VSWR = (FWD+REV) / (FWD-REV).

I'd need to check this on LTSPICE to satisfy myself 100%, but I think this is what is happening in the circuit. The Dunn circuit and code is very widely used by amateurs.

Wikipedia also reports that for a purely resistive load,

VSWR = (Rload/Zline) ^ (+/- 1),

with the sign of the exponent selected such that VSWR>1. So a 200 ohm resistor presented to the analyser should show a reading of (200/50) ^ (+1) = 4. A 12.5 ohm resistor should give the same answer (using an exponent of -1).

If you have access to a commercial antenna analyser it would be very interesting to carry out a comparison with a real antenna and report back. I don't, so I have to rely on fixed resistors. I know that my rig's ATU won't work above about 3:1 SWR, and this is consistent with the results shown on my analyser.

I hope this helps :-)

0
None
GaryB121

Question 2 months ago on Step 6

Hi can the antenna analyser use a 16x2 lcd instead of a 1.3" oled and also can you use a arduino mega to run the sketch on. Any help or advice will be greatly appreciated.

Thanks in advance

1 more answer
0
None
dr_philGaryB121

Answer 2 months ago

Hi - yes I suppose you could use a 16x2 LCD, but you will have to completely rewrite those parts of the code that address the screen. I used the OLED screen because it has high resolution, good visibility and viewing angle and uses I2C. The LCD screen (if I recall correctly) uses many wires to the Arduino, which I probably didn't have spare. Oh, and forget the graphing.

Other than that, I can't see why it wouldn't work on a Mega. Some of the pins might need to be changed for SPI / I2C / interrupts etc.

Good luck and please post when you've finished...

0
None
hadgee

4 months ago

Hi, Great job.

I have included an schematic image of the circuit with a DDS Si5351 with the 1.3 oled. Now can you help....do you think this would work or have I missed something?. secondly I am quite new to the Arduino and was wandering how to change your code for the DDS Si5351 instead of the DDS AD9850 ?. It may be straight forward to some but not to me.....

Thank you for any assistance.

ATB

Antenna Analyzer SI5351_schem.jpg
2 replies
0
None
dr_philhadgee

Reply 3 months ago

Thanks - it seems still to be generating a lot of interest. I think you could use the clock generator you suggest, but you may wish to add some sort of filter as the output will be closer to a square wave and thus will be rich in harmonics. The AD9850 just does the job 'out of the box' and doesn't cost that much.
It will take me a while to check your schematic, particularly as I don't know much about the Si5351. Thanks for sharing it though.
The AD9850 module is controlled via four pins in the current design: FQ_UD, SCLK, SDAT and RESET. The module uses SPI comms. The subroutines SetDDSFreq and send_byte send the frequency information to the module. I can't help you with the specifics of your clock generator I'm afraid - I know nothing about it. Unless money is very tight, I would recommend using the AD9850 which does exactly what you need - what's your time worth?

Good luck...

0
None
hadgeedr_phil

Reply 3 months ago

Thanks for the reply dr_phil, there is some use of the si5351 in this application. Mine is a i2c controlled, it's a great learning curve so I will see if I can get it up and running. I will also get hold of a AD9850 in case I don't succeed. Like you said it works and the code is there. I think I got a few designs mixed up and ordered parts for two separate designs. One uses si5351 and tft screen and yours. I have an si5351 and oled so thought I could combine as they both work in different adaptations of the analyzer. I also like your output screens and menu.

Thanks again for sharing your project.

All the best

2
None
bi3qwq

4 months ago

hi,friend,my callsign is BI3QWQ,im from Beijing,China.last month,i saw you'r article,it's very great project,because ,if i buy a HF Antenna Analyser is very expensive,about $192.but,if i will do it by myself,i will need about $40.i search some about DIY for HF antena analyser article,i found your project,i was try do it by your schematic,i experience about three weeks for drawing pcb and make it.last,it's worked.Before,three weeks ago,i was try Integrating on one pcb(Ateml328、AD9850's chip),but,its no worked,im fail.so,i was try using DDS Model and Arduino Nano Model.last,it's worked.

4.jpg5.jpg6.jpg7.jpg8.jpg9.jpg11.jpg12.jpg3.jpg2.jpg1.jpgQQ&#25130;&#22270;20180723084808.jpg
2 replies
0
None
dr_philbi3qwq

Reply 4 months ago

Hi BI3QWQ. I think you have done a beautiful job. There must have been at least $192 of labour in there, but the end result looks great. I hope it meets your needs as an analyser. I am sure a few of the people who have previously commented will be queuing up to get your schematic and PCB! I like using modules because much of the hard stuff is already done for me and they are easy to replace if I blow them up.

You mentioned that you were going to rewrite the code. Which areas did you think needed changing? Please post when you are done so we can all try it out.

Cheers
dr_phil

0
None
bi3qwqdr_phil

Reply 4 months ago

dear dr_phil,im very happy see u replayd me,now,i rewrite program will be finished,yestoday,i wrote a lot of code,it's too long,so,the arduino can't buring,i had to reduce code,now,i upload some new program screen,u can see it.

dr_phil,i have a question,how to calibration ?u can see the picture ,i deisgined four resistance (50R、100R、150R and 200R) on this pcb board.can u tell me how to geting the Value at the sheet of u'r calibration's picture.can u tell how to calibration,step by step.

i have video for this new program,it's for my friend,now ,i upload to youtube: https://youtu.be/3-xcrDwTMpw

if u need Arduion source code,leave u'r email,i will sending to u.

tks u very much.

QQ&#25130;&#22270;20180725213105.jpg5.jpg4.jpg3.jpg2.jpg1.jpg1111111111.jpg