2024-11-03 18:35:39 +00:00
2024-09-07 00:03:53 -07:00
2024-09-13 15:15:47 -07:00
2024-09-17 10:17:25 -07:00
2024-10-11 23:17:13 +01:00
2024-11-03 18:35:39 +00:00
2024-07-22 16:17:04 -07:00
2024-09-16 22:10:43 +02:00
2024-11-03 18:35:39 +00:00
2024-09-10 19:31:26 -07:00
2024-09-17 10:17:25 -07:00
2024-08-08 22:21:08 -07:00
2024-11-03 18:35:39 +00:00
2024-07-30 20:24:33 -07:00
2024-10-11 23:17:13 +01:00
2024-09-30 13:03:24 +02:00
2024-11-03 18:35:39 +00:00
2024-11-03 18:35:39 +00:00

Lora SA(Spectrum Analyzer)

Supportted boards:

  • Heltec Lora V3 128 x 64 OLED
  • Heltec Wireless Stick V3 64 x 32 (Not tested)
  • Heltec Wireless Stick Lite V3 No Display (Not Tested)
  • Heltec Vision Master E290 - e-Ink 296 x 128 (No OSD)
  • Heltec Vision MAster T190 - color TFT 320X170 (No OSD)
  • LilyGo Radio Lora T3S3 V.2 SX1262
  • LilyGo Radio Lora T3S3 V.2 SX1280
  • LilyGo Radio Lora T3_V1.6.1 SX1276 (Not Tested)

RF Spectrum Analyzer using Lora Radio

LORA hardware

Based on RadioLib SX126x Spectrum Scan.

Perform a spectrum power scan using SX126x. The output is in the form of scan lines; each line has 33 power bins. The first power bin corresponds to -11 dBm, the second to -15 dBm, and so on. The higher number of samples in a bin corresponds to more power received at that level.

N in Bin / dBm
(0)1 -11
2 -15
3 -19
4 -23
5 -27
6 -31
7 -35
8 -39
9 -43
10 -47
11 -51
12 -55
13 -59
14 -63
15 -67
16 -71
17 -75
18 -79
19 -83
20 -87
21 -91
22 -95
23 -99
24 -103
25 -107
26 -111
27 -115
28 -119
29 -123
30 -127
31 -131
32 -135
33 -139

Example:

step-13 Frequency:816.25
Power Bins: 0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0400,  0000,0000,0000,0000,0000,0000,0006,001B,000E,0005,0006,0002,0000

The spectrum analyzer performs power measurements in the configured bandwidth.

The X-axis represents frequency in MHz, and the Y-axis displays actually received power. In the example above, the frequency span goes from 850 MHz to 950 MHz (that is a 100MHz range), and the visual amplitude goes from -11 dBm to -110(-139) according to the datasheet (High sensitivity: down to -148dBm) dBm.

To show the results in a plot, run the Python script RadioLib/extras/SX126x_Spectrum_Scan/SpectrumScan.py

Features

Multiple Ranges Scan

Disabled By Default

// Feature to scan diapazones. Other frequency settings will be ignored.
int SCAN_DIAPAZONES[] = {};
//int SCAN_DIAPAZONES[] = {850890, 920950};

To Enable Add/ uncomment an array of the frequencies

int SCAN_DIAPAZONES[] = {850890, 920950};

where 850890 stands for 950-890Mhz range 920950 - 920-890Mhz Other settings will be ignored if Multiple Ranges Scan is enabled.

Waterfall

Waterfall showed only on One Page Scan to disable - uncomment this line

#define WATERFALL_ENABLED true

Waterfall shows the last N = SCREEN_HEIGHT (64) - WATERFALL_START(37) - 8 (part of the ROW_STATUS_TEXT) = 19 signal detection that excited set signal level

RSSI Method of scan

By default, we are using the spectralScan method of the RadioLib Library: https://jgromes.github.io/RadioLib/class_s_x126x.html#a8a3ad4e12df862ab18b326d9dba26d66 This method works only with Sx1262 modules. We implemented a scan using the getRSSI method, which has more flexibility and supports sx1276 and other modules. Using this method, we also receive the signal's dB values, not just the O-33 number. To enable this method, set the value of the RSSI_METHOD to true.

Multi Screen Scan

Single screen scan for now has RANGE / 128 resolution. Multi-page scan can be adjusted to how many MHz per page you wanna scan

// frequency range in MHz to scan
#define FREQ_BEGIN 850
// TODO: if % RANGE_PER_PAGE  != 0
#define FREQ_END 950

// Feature to scan diapazones. Other frequency settings will be ignored.
int SCAN_DIAPAZONES[] = {};
// int SCAN_DIAPAZONES[] = {850890, 920950};

// MHZ per page
//To put everything into one page set RANGE_PER_PAGE = FREQ_END - 800
unsigned int RANGE_PER_PAGE = FREQ_END - FREQ_BEGIN; // FREQ_END - FREQ_BEGIN
//To Enable Multi Screen scan
// unsigned int RANGE_PER_PAGE = 50;
// Default Range on Menu Button Switch 
#define DEFAULT_RANGE_PER_PAGE = 50;

To enable Multi-page by default set RANGE_PER_PAGE less than FREQ_END - FREQ_BEGIN; Switch to multi-page during regular One Screen application run. Restart the ESP32 on screen after the logo press the P button.

Mute Audio Notifications

Restart ESP32, and on the logo display, press the P button.

Pause Execution

Press P for more than 2 seconds. Execution will pause, and the scan's current Mhz position will be shown on the display. If less, ESP32 will turn off. Fast pressing(less than 0.5 second) P button changes the notification level

VSCode Platform.IO development env installation

  1. Install VSCode

  2. install Platform.IO extension image

  3. Connect ESP32 to USB. Install USB CP2101 drivers for Windows or other OS https://docs.heltec.org/general/establish_serial_connection.html#for-windows https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads

    NOTE: MACOS Heltec USB driver

    https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
    I used legacy driver

  4. Clone this Git Repo or download zip of the sources image

    git clone https://github.com/Genaker/LoraSA.git
    

    NOTE: in you case name will be Just LoraSA. I have LoraSA2 because I already have LoraSA folder

  5. Open the Project with the VS code Platform.IO image image

  6. Select Proper Environment image


    Important note: If using a Heltec V3 board, make sure your ESP32 Expressif catalog is up to date before selecting environment, otherwise might get a build time error such as: Error: Unknown board ID 'heltec_wifi_lora_32_V3' when trying to select the environment.

    Open a PlatformIO CLI: https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-core-cli

    Run: pio pkg update -g -p espressif32

  7. Select ESP32 USB Device to program image Note: It is theoretically possible to program via WiFi and BTH.

  8. Program your ESP32 image

  9. Wait until you are done with the compilation and upload. Usually takes 1 minute. The first run is slower. It needs to compile all libraries. image You will have the UCOG SA logo and spectrum analyzing scanning screen when done. image

Hardware

Heltec ESP32 Lora V3: https://www.amazon.com/Heltec-Development-863-870MHz-ESP32-S3FN8-902-928MHz/dp/B0D1H1FN9Y/ https://heltec.org/project/wifi-lora-32-v3/ https://www.aliexpress.us/item/3256807037422978.html

Or Heltec Wireless Stick. The same hardware but without or with a smaller display https://heltec.org/project/wireless-stick-v3/ https://heltec.org/project/wireless-stick-lite-v2/

Heltec Vision Master E290 - With large e-ink display 293x128:

https://heltec.org/project/vision-master-e290/ https://www.aliexpress.us/item/3256807048047234.html NOTE: to upload a new code, you need to press BOOT + RESET button

Battery with Wire JT connector : https://www.amazon.com/EEMB-2000mAh-Battery-Rechargeable-Connector/dp/B08214DJLJ

3D printed case

image https://www.printables.com/model/118750-heltec-lora-32-case-for-meshtastic https://www.thingiverse.com/thing:3125854 https://thangs.com/designer/Snake0017/3d-model/Heltec%20LoRa%2032%20Desktop%20%26%20Vehicle%20Enclosure-40844 or buy : https://www.amazon.com/DIYmalls-ESP32-OLED-WiFi-Type-C/dp/B0BR3MQ9BG

https://www.thingiverse.com/thing:6522462

Heltec ESP32 Lora v3 Pin Map

image We are using pin 41 as a Buzzer trigger. Connect buzzer + leg with pin 41 and - leg with the ground (GND). You can change the buzzer pin in the code.

Analog FPV OSD (ON SCREEN DISPLAY)

To Enable OSD, Uncomment these lines

//  #define OSD_ENABLED true

OSD sidebar enabled/disable comment or uncomment this line

#define OSD_SIDE_BAR true

Or you can set this and other variables as a build parameter:

build_flags = 
	-DOSD_ENABLED

DFRobot OSD Wiring

Heltec V3 -> DFRobot OSD
GND -> GND
3V3 -> 3V3
26 -> SCK
34 ->MOSI
33 ->MISO
47 -> D3

More photos you can see there:
https://github.com/Genaker/LoraSA/issues/11

image

Camera to DF robot Wiring

Camera -> DFRobotOSD
Video out -> In
GND -> GND
3v3 -> 3V3 Heltec or some 3v on FPV

DFRobot to Drone or VTX(video transmitter)

DF Robot -> VTX or
Video Out - Video IN

// SPI pins
#define OSD_CS 47
#define OSD_MISO 33
#define OSD_MOSI 34
#define OSD_SCK 26

Joystick Wiring

https://www.aliexpress.us/item/2251832815289133.html https://www.amazon.com/dp/B00P7QBGD2

Loystic -> Heltec V3
SW -> 46
VRX -> 19
VRY -> X has not been implemented yet
+5v -> 5V
GND -> GND

Buzzer/Beeper Wiring

TMB12A03 - in my case. Low voltage is better.
Buzzer -> Heltec V3
(+) -> 41
GND (another) -> GND

Select Board to build

Select Visual Code environment: image

Edit paltformio.io uncommenting/selecting your sources

[platformio]
; for env:vision-master-e190
; src_dir = tft_src
; for env:vision-master-e290
; src_dir = eink_src
; for env:heltec_wifi_lora_32_V3
; src_dir = src ;;Default

for LilyGo use env:heltec_wifi_lora_32_V3

WiFi and Bluetooth BT Scanning

Works only with OSD enabled
Uncomment this lines

//  #define OSD_ENABLED true
//  #define WIFI_SCANNING_ENABLED true
//  #define BT_SCANNING_ENABLED true
Description
No description provided
Readme 1,015 KiB
Languages
C++ 74.5%
C 11.4%
HTML 7.8%
Python 6%
CSS 0.3%