How to develop and debug C++ code for Arduino in Visual Studio if you are tired of the Arduino IDE

The Arduino platform has gained a fantastic popularity over the past ten years. For small quick and dirty projects, the .ino files and the standard IDE is OK. However, for professional development projects and for developers that want control over the .hpp and .cpp files the standard Arduino IDE is somewhat regarded like a toy. Furthermore there is no proper debugger in the Arduino IDE  (whaaat?, you gotta be kidding?)

Well, this has changed as Visual Micro has developed a plugin to Microsoft Visual Studio. You can write code the normal way you do it with .cpp and .hpp files. You can also run the GDB debugger. The IDE has support for the regular .INO files and Arduino libraries. Here is how both .cpp and .ino files are handled: http://www.visualmicro.com/page/User-Guide.aspx?doc=INOs-and-CPPs.html

There is a free version of Visual Micro and it works against the free versions of Microsoft Visual Studio 2017 Community Edition. All you need is a Microsoft account to be able to download and install Visual Studio 2017 Community edition. Then in MSVC 2017, go to tools, Extensions and Updates and enter a search for Arduino in the search bar. It will will offer to automatically install the Arduino tools and the GDB debugger. Click install and you are on the right path.

Links:
http://www.visualmicro.com/
https://marketplace.visualstudio.com/items?itemName=VisualMicro.ArduinoIDEforVisualStudio

If you find this tip useful, please share on facebook and share the link. Also, feel free to report your experiences in the comment field.

How to find all Brandmeister DMR repeaters in your country

Sometimes it is good to know what DMR repeaters are available in a certain country. The Brandmeister repeater listing at https://brandmeister.network/?page=repeaters doesn’t seem to have this per country overview easily available (disclaimer -> I may be wrong 🙂 ).
I have found that by knowing your country master code you can search for that in the repeater page of Brandmeister and all repeaters registered in your country will be shown. For example the country code for norway is 241 and the master code is 2421 so if I enter 2421 I will get all the repeaters in Norway.

Show repeaters in your county

Designing L and T antenna tuners for HF on the Smith chart

The Smith chart is a tool used a lot by professional RF engineers for solving transmission line stub matching problems and all sorts of quick calculations.

The Smith chart can also be used for quick back of the envelope L and T antenna tuner engineering calculations.

I have on the picture above plotted a T configuration antenna tuner with the first capacitor set to a so big value that it is shorted as seen by the RF voltage (large C – low |Z|). Then the configuration becomes a L tuner in practice with a shunt L followed by a series C when seen from the load in towards the generator.

I measured the Z in the shack end of the ladder line feeding my doublet antenna to be Z = (24.1 – j35) ohms at 14.200 MHz by a Vector Network analyzer. That can be plotted as a point in the lower part of the Smith chart (capacitive Z).

(1) Since we have now first an inductor (in the tuner to ground) as observed from the load towards the generator, we can use this inductance to move along a constant Conductance curve in the Y plane (upwards in the Z plane). The conductance is constant but the Susceptance varies. (We remember from the RF engineering classes at engineering school that Y = 1/Z – of course).

(2) Then we use a series capacitor to move down inside the 1.25:1 SWR circle. We dont have to hit the center because anything inside the inner 1.25:1 circle is good enough. (We move while the R part of R + jX is constant, while the X part is changing to become more negative. This means we move on a constant resistance circle in the Z plane).

Determination of component values can be done easily by hand in a tool like this while still retaining an intuitive understanding of what is going on.

Black magic! Especially with a digital smith Chart tool.

Why you should choose a lowpass configuration on your L antenna tuner

K6JCA has analyzed the needed components values for matching a load while moving on a constant reflection coefficient circle. The plot below shows that in case you select the high-pass configuration for your tuner, certain angles of the reflection coefficient will give you skyrocketing component values.

Component values for the highpass and lowpass configurations

Above you can see that the LsCp &CpLs configuration keeps the max component values quite flat. LsCp and CpLS  are therefore the best engineering choices based on cost and realistic component values.
http://k6jca.blogspot.no/2015/04/notes-on-antenna-tuners-t-network-part-1.html

Repeaterlist for Oslo area, Norway (repeaterliste Oslo området)

I have made a repeaterlist for the Oslo area in Norway. This list can be saved as CSV from Excel and is then after saving as CSV compatible with Chirp.

Make sure to check that the CSV files uses commas (,) as separators and NOT semicolon (;). This can be set in the meny you see below. Goto Start menu and type locale. Click the change date, time, number format.

Thanks to Alf LA2NTA for the data I used in this list. See another posting for the direct link to Alf’s list that is located in the cloud. My list here will not be frequently updated, but per April 2017 it should give a good starting point.

repeaterliste_eksport_XLS_XLS_sortert

How to do export and import of Excel files with CSV firmat in Chirp

  • Program a couple of memory channels in your radio (in my case Icom Ic-2725) from the RADIO menus
  • Connect chirp to the radio
  • DOWNLOAD the data from the radio
  • Export from Chirp to a CSV file
  • Study this CSV file and use it as a template
  • Copy paste frequency and ctcss and offset info ++ from ANOTHER XLS file to the CSV file you made above!
  • Save as CSV from Excel (this is now your frequency list to import to the radio)
  • Check with Notepad ++ that there is COMMA (not semicolon) separation saved when you save as CSV from Excel. If this is not the case, go to regional settings / additional and set list separator as , (as opposed to ;). Start and stop Exel and a reboot wont hurt to make the settings take effect
  • Now you import this CSV list into Chirp
  • Upload to the radio
  • If you get error message that Chirp cant convert floating point in the tone settings, make sure to format EVERYTHING in your Excel sheet as GENERAL (not text, not number)

 

MD-390 DMR UHF radio. Modified firmware.

I updated my MD-390 with the modified firmware. This fw. gives among others, these new functions:

  • Promiscuous mode. Listen to all voice groups on one timeslot. Even if you havent programmed the VG in a channel.
  • See last heard on the display on all VGs on the time slot you have assigned to the channel regardless if you have enabled that VG
  • VU meter for TX audio
  • Updated contact list database
  • Display dimming timer and intensity adjustable
  • Lower beep audio on transmit not allowed etc
  • List of last heard
  • Channel info on display: tx freq, rx freq, timeslot, TG, sender ID, repeater ID etc

Norwegian repeaterlist / Norsk repeaterliste (unofficial / uoffisiell)

Alf LA2NTA has made an excellent repeaterlist covering norwegian repeater that are updated quite frequently.

Alf edits the document straight at Google Drive. You can check out the most updated version on this link: https://docs.google.com/spreadsheets/d/1tPHd2HDnkHOPJrQkDUpCRH00zhCIOoMiAMqaustzqsk/edit#gid=1

 

Tytera TYT-390 GPS setup

To set up GPS on the TYT-390, make an own contact with name GPS and call ID 5057

 

 

 

 

 

Then set up Destination ID: GPS under GPS settings. Set the interval to 60s or more. (Not too often as GPS packets take repeater capacity)

 

 

 

 

 

 

 

Now select “GPS system 1” under the channels you want GPS enabled on. I have made a set of channels with GPS on and a set of channels with GPS off.

 

 

 

 

 

 

In Brandmeister dashboard, go to Services/Self Care and select chinese radio. Check that your call and your name looks OK (you need an account at Brandmeister).

 

 

 

Then program your radio with the codeplug with the radio settings above.

Set your radio outside for several minutes to achieve GPS lock (can take quite some time).

You should see a globe symbol show up without the red ring (red ring means no GPS lock).

Then you can check aprs.fi for your callsign.