Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Variation on Ian's KD8CEC uBitx software (based on his 1.04 release for now) and ATU sketch.
#ubitx
John
I have implemented the following changes in this software targeted at /P, /PM operations (software is in the files section):
?
1. Options for various features which can be turned on or off. Key objective is to be able to customise the rig based on your needs and unfortunately on the restricted memory size of the Nano. So not all features can be selected at once. Choices, choices...
?
2. ATU control. A servo-based L-Network ATU. The communication between the Raduino and the ATU Arduino is via I2C. There is a separate sketch for the ATU Arduino (Nano or Pro-mini). ATU operating mode can be set to OFF, Manual as in on-demand, or auto-RX meaning that it pre-tunes based on historical data on a change of band and after first change of dial frequency (for a quick scan of the bands). It uses the EEPROM data of the closest stored frequency for pre-tune or tune on-demand to accelerate the tuning process.
?
3. Handsfree microphone/headphone. Using an Android style 3 rings (TTRS) handsfree earpieces/mic combination, with 1 or 3 buttons (Play/Pause, +, -), the PTT is controlled by Play/Pause as toggle, and I use long presses on + and - as respectively pre-tune and smarttune of the ATU. Short + or - presses could be used for frequency up and down. Requires a very simple hardware mod to free-up A6 (see below).
?
4. SWR measure and display, using analogue input A7 from an 2N7002 based AGC or a MAX9814 circuit or any other for that matter.
?
5. Software based AGC range extender to augment (as in double or triple) the dynamic range of an audio AGC. This uses the slope of the 1st If filter at 45Mhz to attenuate the Rx signal when the audio AGC reaches its limit. Adds over 50dB of dynamic range.
?
6. Forward power and SWR measure and display. Currently assumes that th ATU is providing that info over I2C. Otherwise could be adapted with a pair of analogue inputs for measure. See the excellent NT6D design on the wiki.?
?
7. An option to display the S-Meter, SWR and forward power in either easy to see "fat" bars with no number, or "skinny" bars with more text and numbers.
?
8. An option to enable a "Memory mode", selectable by menu, which cycles through all the populated memories (channels). Dial lock also locks the change of channels.
?
9. Made some rarely used or once-off functions as options to recover program memory after initial tuning and allow for more options to be selected.
?
10. Fixed some issues with the IF-shift option. Ian has resolved these in his new V1.06 and later releases. Two issues were present: IF-shift in USB would change the receive frequency and it was applied to TX as well. Now applies to Rx only.
?
The only required hardware mod is to connect the CW key input to the PTT. Since in Ian's software we select the mode by menu, there is no need to have a separate analogue input tied-up for the CW key. This frees-up analogue input 6 for use by other functions like the handsfree option above.
?
To-Do: apply Ian's improvements in 1.06, especially CW transmit frequency option and if possible the WSPR beacon mode.
?
Usage: download the zip files, unzip in your Arduino sketches folder. Edit the ubitx_20 options sections, using #define for enabled and #undef for disabled. Perform a CTRL-R to compile and check how much memory is used. If you go over the limit, a warning is issued. Upload to the Arduino.
I have uploaded both the Raduino as well as the Arduino sketch for the ATU and SWR measurement. They can be found in the folder "Variations on Ian Lee's Software (by VK2ETA) + ATU sketch".
?
All software in under GPL V3.?
?
All the best,73, John (VK2ETA) |
John
Hello Hidheiko-san,
The S-Meter display needs to read the level? of AGC or an audio level from pin A7 on the Raduino (the unused pin on the Raduino connector). In the program it is shown in file ubitx_20.ino as: //To read the AGC voltage on the MAX9814
#define ANALOG_SMETER (A7)
An example of a circuit that would give you a signal strength value is shown in the diagram below, using the 2nd audio amplifier channel of the TDA2822. I show in the blue part what is required. This was part of the pre-production uBitx diagram but was not implemented in the production version. The 2N7002 is used as an automatic gain control and can be used or not for that application.? You would need to insert a trim-potentiometer (10KOhms is good) between ping 6 of the TDA2822 and the VOL-H connection to adjust the sensitivity, plus (VERY IMPORTANT) a voltage divider between the kathode of the diode and the ground to limit the voltage to under 5VDC for the analogue input of the Raduino. I would use 330KOhms in series with 100KOhms to the ground, and connect A7 to the junction of the twe resistors. Tell me if you need me to draw a full diagram. Further adjustments are available in the software if required as we define the 9 stages of the S-meter display (first stage is zero, then 6 stages for growing bars, 1 stage showing "+" and one stage showing the custom "++" symbol). In ubitx_20.ino? it shows as: int sMeterLevels[] = {0, 5, 17, 41, 74, 140, 255, 365, 470};
?
The values in the array are the measured values on the analogue input (defined as A7 above) at which we step into a higher "stage" and can go from zero for zero volts to 1023 for a 5V DC value.? Hope this helps Hidheiko-san, 73, John (VK2ETA) |
Any chance of getting an option for an I2C display or a non-I2C display?
tim ab0wr On Sun, 01 Apr 2018 01:19:47 -0700 "John" <passionfruit88@...> wrote: I have implemented the following changes in this software targeted |
Ya know this is really easy to do with "#If defined" statements in just a
toggle quoted message
Show quoted text
single sketch... if you uncomment a symbol like "#define I2C_Display" and comment out the "#define Parallel_Display" (or vice versa) it could automatically switch libraries... depending upon what print libraries are used, the print/write calls are the same so those don't have to change. Just the two variables. Dr. William J. Schmidt - K9HZ J68HZ 8P6HK ZF2HZ PJ4/K9HZ VP5/K9HZ PJ2/K9HZ Owner - Operator Big Signal Ranch – K9ZC Staunton, Illinois Owner – Operator Villa Grand Piton – J68HZ Soufriere, St. Lucia W.I. Rent it: www.VillaGrandPiton.com Like us on Facebook! Moderator – North American QRO Yahoo Group. email:? bill@... -----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tim Gorman Sent: Saturday, April 7, 2018 11:54 AM To: [email protected] Subject: Re: [BITX20] Variation on Ian's KD8CEC uBitx software (based on his 1.04 release for now) and ATU sketch. #ubitx Any chance of getting an option for an I2C display or a non-I2C display? tim ab0wr On Sun, 01 Apr 2018 01:19:47 -0700 "John" <passionfruit88@...> wrote: I have implemented the following changes in this software targeted at --- This email has been checked for viruses by AVG. |
You also need to know the I2C address rOn From: John <passionfruit88@...> To: [email protected] Sent: Saturday, April 7, 2018 8:42 PM Subject: Re: [BITX20] Variation on Ian's KD8CEC uBitx software (based on his 1.04 release for now) and ATU sketch. #ubitx Hello Tim, If I remember well it is only a one liner or so. I will add it as an option. 73, John? (VK2ETA) |
I don't think it is going to be that easy to do. I'm afraid the I2C
libraries are large enough they will make the compile too big for the nano. tim ab0wr On Sat, 7 Apr 2018 12:28:14 -0500 "K9HZ" <bill@...> wrote: Ya know this is really easy to do with "#If defined" statements in |
If you can do it with a one-liner and keep the program size small
enough to fit into the nano then it will be an easy fix. What I2C library are you going to use? The adafruit one creates a lot of overhead. tim ab0wr On Sat, 07 Apr 2018 17:42:21 -0700 "John" <passionfruit88@...> wrote: Hello Tim, |
You can figure out the address with an I2C scanner program uploaded
into the nano. You can then include the address before you compile along with your defines. tim ab0wr On Sun, 8 Apr 2018 00:44:53 +0000 (UTC) "Ronald Pfeiffer via Groups.Io" <w2ctx@...> wrote: You also need to know the I2C address |
Nope. Done. Works. Remember the I2C libraries are already there for the Si5351 chip. My code actually gets smaller.
toggle quoted message
Show quoted text
Dr. William J. Schmidt - K9HZ J68HZ 8P6HK ZF2HZ PJ4/K9HZ VP5/K9HZ PJ2/K9HZ Owner - Operator Big Signal Ranch – K9ZC Staunton, Illinois Owner – Operator Villa Grand Piton – J68HZ Soufriere, St. Lucia W.I. Rent it: www.VillaGrandPiton.com Like us on Facebook! Moderator – North American QRO Yahoo Group. email: bill@... -----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tim Gorman Sent: Saturday, April 7, 2018 8:35 PM To: [email protected] Subject: Re: [BITX20] Variation on Ian's KD8CEC uBitx software (based on his 1.04 release for now) and ATU sketch. #ubitx I don't think it is going to be that easy to do. I'm afraid the I2C libraries are large enough they will make the compile too big for the nano. tim ab0wr On Sat, 7 Apr 2018 12:28:14 -0500 "K9HZ" <bill@...> wrote: Ya know this is really easy to do with "#If defined" statements in --- This email has been checked for viruses by AVG. |
I think the SI5351 stuff is done using the wire libraries, not the
LiquidCrystal_I2C library. At least I can't find where the LiquidCrystal_I2C header file is ever included. I could be wrong. I'm just learning Arduino programming. tim ab0wr On Sat, 7 Apr 2018 21:17:03 -0500 "K9HZ" <bill@...> wrote: Nope. Done. Works. Remember the I2C libraries are already there |
chronos@localhost ~/Downloads/lq/LiquidCrystal_I2C-1.1.2 $ grep Wire *
LiquidCrystal_I2C.cpp:#define printIIC(args)? ? Wire.write(args)
LiquidCrystal_I2C.cpp:#define printIIC(args)? ? Wire.send(args)
LiquidCrystal_I2C.cpp:#include "Wire.h"
LiquidCrystal_I2C.cpp:? Wire.begin();
LiquidCrystal_I2C.cpp:? Wire.beginTransmission(_Addr);
LiquidCrystal_I2C.cpp:? Wire.endTransmission();? ?
LiquidCrystal_I2C.h:#include <Wire.h>
Binary file LiquidCrystal_I2C.o matches
?
On Sat, Apr 7, 2018 at 07:30 pm, Tim Gorman wrote:
I think the SI5351 stuff is done using the wire libraries, not the |
John,
I commented out the lines #include <LiquidCrystal.h> LiquidCrystal lcd(8, 9, 10, 11, 12, 13); and added #include <LiquidCrystal_I2C.h> // Set the pins on the I2C chip used for LCD connections: // addr, en,rw,rs,d4,d5,d6,d7,bl,blpol LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); I also excluded almost all options except the one for the memory mode. It compiles. I'm headed for bed so it will be tomorrow before I get to try it. Someone will have to check to see how many other options can be added back in before the code gets too big. tim ab0wr On Sat, 07 Apr 2018 17:42:21 -0700 "John" <passionfruit88@...> wrote: Hello Tim, |
Perhaps that's a different library, and you have to specify pin numbers
toggle quoted message
Show quoted text
on a part on the little i2c backpack soldered to the back of your lcd display? But what's that zero doing in there? The way most code examples on the web kick it off is as follows: ??LiquidCrystal_I2C lcd(0x27, 16, 2); That's for an i2c device address of 0x27, 16 characters per line, 2 lines. The library assumes you are using the only pins with hardware support for i2c on the Nano, so you don't have to specify pin numbers. You still have to find the i2c device address for your display (0x27 here), which can vary between LCD displays. And you should remove the display's 5v pullup resistors on SDA and SCL. ? ??/g/BITX20/message/39966 Here's a complete "Hello World":from? ? ? ? #include <Wire.h>?
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()? {
lcd.begin();
lcd.backlight();
lcd.print("Hello, world!");
}
void loop()? { }
Jerry, KE7ER On Sat, Apr 7, 2018 at 07:41 pm, Tim Gorman wrote: // Set the pins on the I2C chip used for LCD connections: |
John
I have just uploaded a test version for I2C LCD display (16x2 size). It has the option of two libraries, with the smallest one beind teh default.
In fact if this library works, it is smaller than the original digital output wired library. The file is?uBitx-Raduino-KD8CEC based-VK2ETA-Variation - I2C_Display_test-v0.1.zip in the same folder as my original post. I can't test it so any feedback will be great. All the best, 73, John (VK2ETA) |
You've given me all the LiquidCrystal_I2C code stuff.
But where does #include <LiquidCrystal_I2C.h> appear in the any of the KD8CEC code? The ubitx_si5351 code uses functions like "Wire.beginTransmission()" not LCD_write(). That's why you see #include <wire.h> in the code. I added the #include <LiquidCrystal_I2C.h> statement in ubitx_20 along with a line for setting up the I2C LCD and it compiled small enough after taking out almost all options. I'll test it tomorrow to see if it worked. tim ab0wr On Sat, 07 Apr 2018 19:35:38 -0700 "Jerry Gaffke via Groups.Io" <jgaffke@...> wrote: chronos@localhost ~/Downloads/lq/LiquidCrystal_I2C-1.1.2 $ grep Wire * |
to navigate to use esc to dismiss