Open celadoor opened 7 months ago
To reverse Rotary Encoder direction in arduino IDE line 235 should be g_encoderCount = (encoderStatus == DIR_CW) ? -1 : 1;
Hi, Many thanks to Vincent for this excellent update for the ATS-20/ATS-20+. The feature in SSB using the BFO to provide a smooth tuning experience over a 32 kHz span is a great addition.
It would be nice to have a remote capability, maybe with an internal BT/BLE to serial module. I did disable the RDS feature, which freed up enough program memory to allow for a simple volume up/down, frequency step up/down and output of the tuned frequency (g_currentFrequency and g_currentBFO). I guess if a remote option is required, it would be better to have a separate version supporting a standard radio protocol, allowing use of existing PC control programs and/or a Phone/Tablet App.
For the ATS-20+, I also changed the definition for the “BATTERY_VOLTAGE_PIN” to “A1” instead of the default “A2”. The default settings for the rotary encoder worked correctly on the ATS-20+. If the direction is wrong, it would perhaps be better to make the change in the defs.h file, rather than the main code.
For programming using the Mini-USB connector, I made a VBUS isolator to avoid any conflict between the 5V (BUS) and the 3V3 regulator on the ATS-20+. PC USB-A (M) <> Micro-USB (M) [ISOLATOR] USB-A (M) <> Mini-USB (M) ATS
The ATS-20+ version I received appeared to have the 115200 baud rate bootloader on the Arduino Nano.
73, Dave
Hi, As an experiment, I managed to create a very basic Bluetooth interface with a simple Android App.
Hardware: Using a JDY31 Bluetooth module with a few additional components. The firmware can also be uploaded over Bluetooth with the Arduino IDE.
Firmware: Minor modification to add compile directives to reduce program memory to allow for remote additions.
Added code to send information out over the serial interface to the BT module.
Added code to extract serial data from the BT module and mimic the buttons and rotary encoder.
Android App: Created using MIT App Inventor. This recreates most of the display information and allows very basic control.
73, Dave
Hi, A minor updated. I added three additional flags over the ATS-20+ to BT serial interface to allow the remote GUI to show when parameters are in change mode.
PS: Apologies for the rather large screenshots on the previous post, I should have reduced the size down before uploading. 73, Dave
Hi, A minor point on the battery meter. The ATmega328 ADC is using the ‘AVCC’ pin for Vref. This is connected to the ‘+5V’ on the Arduino Nano, which is connected to the ATS-20 3V3 LDO regulator output as shown below).
The voltage calculation is based on V_BAT = 2 [ADC Vref/1024] The firmware assumes that Vref is fixed at 3.3V. This is valid for V_BAT >= 3.3V + (LDO drop-out). At lower battery voltages, the reading will be invalid. On the ATS-20+ that I have, the reported battery percentage does not fall below 17%, corresponding to a battery voltage of approximately 3.4V.
It would be possible to use either the internal band gap reference (1.1V) or the 'AREF' pin (with external reference). This would require adjusting voltage divider feeding the analogue 'A1' pin. The potential divider resistors are under the Nano, so it would be easier to switch to a different analogue pin.
Since the the battery monitoring is accurate down to 3.4V, no modifications are proposed at the moment. 73, Dave
Буду писать по русски, извините. Действительно, замерить разряд батареи ниже 17% не получается. На этой цифре процессор зависает. Решений данной проблемы может быть несколько
Hi, Yes, all agreed. It would be possible to improve the battery monitoring, but I think once the voltage is down at 3.4V, it is probably a good idea to recharge anyway, so no need to make any changes. 73, Dave
This works fine on my ATS20+ but the battery divider is already installed to pin A1 on ATS20+ and not pin A2, changed in defs.h to _"#define BATTERY_VOLTAGEPIN A1" and the charging indicator works now, you might want to mention this in the readme.