Friday, June 4, 2021

Lora APRS IGATE using T-beam ESP32 with GPS

Setting up a  LoRa APRS iGate on 433Mhz.

I need to build a Igate for LORA on 433Mhz and I hate two options to consider.

Options

Option 1 RTL-SDR dongle with LORA software as an gateway.

Option 2 using the same TTGO-T-Beam ESP32 with GPS and Lora 433Mhz module that will be the same as my Lora tracker board.

In this Description I will be using the Option 2, I will attempt the RTL-SDR rout later.

Setting up a Lora APRS tracker using the ESP32 Lora32 TTGO-T T-Beam 433/470Mhz Module

Example of Lora signal

I was looking for a low power battery backup APRS Lora system to track Balloons and cars.

I then got the TTGO-T T-Beam witch has ESP32 with WIFI and Bluetooth.
It also has a GPS Ublock and a Lora32 TTGO 433/470Mhz and USB port.

This module is available from Giga Technology here

I found a project on Github https://github.com/lora-aprs/LoRa_APRS_iGate
It seems to be strate foreword replacing the default firmware in the SP32

So lets get Started

Lets download the project from github here

On your pc run the following

git clone https://github.com/antonjan/LoRa_APRS_iGate

cd LoRa_APRS_iGate/

I Recommend installing Code editor with PlatformIO plugin.

PlatformIO can be downloaded directly from the PlatformIO website. There you just have to press the green button with “Install PlatformIO now”. Then just install it. If you have already installed Visual Studio Code, the PlatformIO Module can also be installed via the Plugin Manager. Now the source code can be opened in Visual Studio Code.

Start your Code editor

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Then select Extensions and search for Platformio and install it. 






 
 
 
 
 
 
 
 
 
 
 
 
 
Select platformio plugin
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 The instillation can take a while We now need to select the LoRa_APRS_iGate folder where you have cloned the github project above. There will be a directory LoRa_APRS_iGate
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
We can now edit the
 
 
Here is a copy of my platformio.ini

[platformio]
default_envs = lora_board

[env]
platform = espressif32 @ 3.0.0
framework = arduino
lib_ldf_mode = deep+
monitor_speed = 115200
lib_deps =
bblanchon/ArduinoJson @ 6.17.0
lewisxhe/AXP202X_Library @ 1.1.2
peterus/APRS-Decoder-Lib @ 0.0.6
peterus/APRS-IS-Lib @ 0.0.8
peterus/esp-logger @ 0.0.1
peterus/ESP-FTP-Server-Lib @ 0.9.5
check_tool = cppcheck
check_flags =
cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK --force lib -ilib/TimeLib -ilib/LoRa -ilib/NTPClient
check_skip_packages = yes
#monitor_flags = --raw
# activate for OTA Update, use the CALLSIGN from is-cfg.json as upload_port:
#upload_protocol = espota
#upload_port = <CALLSIGN>.local

[env:lora_board]
board = esp32doit-devkit-v1
#board = ttgo-t-beam-v1
build_flags = -Werror -Wall -DNO_GLOBAL_INSTANCES
upload_port = /dev/ttyUSB*
[env:lora_board_debug]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DNO_GLOBAL_INSTANCES
build_type = debug
monitor_filters = esp32_exception_decoder


  
The following things can be done quickly in the status bar: Compile the firmware Flashing the firmware Cleaning up the temporary and compiled data Serial monitor  
 

Compilation and upload steps

git clone https://github.com/antonjan/LoRa_APRS_iGate Install The development environment VS Code from here https://code.visualstudio.com/download Start Code and click on the botom Gear icon to install Platformio.

 Then select the tracker.json and edit with the following information. 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Edit the tracker.json file in the data directory to look like this changing your callsign and save the file. [CTRL-s]
 
{
	"callsign":"NOCALL-7",
	"debug": false,
	"beacon":
	{
		"message":"LoRa Tracker",
		"timeout": 1,
		"symbol": "[",
		"overlay": "/"
	},
	"smart_beacon":
	{
		"active":true,
		"turn_min":25,
		"slow_rate":300,
		"slow_speed":10,
		"fast_rate":60,
		"fast_speed":100,
		"min_tx_dist":100,
		"min_bcn":5
	},
	"lora":
	{
		"frequency_rx":433775000,
		"frequency_tx":433775000,
		"power":20,
		"spreading_factor":12,
		"signal_bandwidth":125000,
		"coding_rate4":5
	}
} 
 

We now need to compile the program. This can be done by Clicking on the icon belo red 1 on the botom toolbaar.


 
 Now connect your LORA-APRS board to usb port of you computer. We now need to upload the compeld ferware.bi fie to the Board Click on the icon below red 2 to upload the file to your board. You should see details in the log terminal if all was sucess
 

Blog posts and Youtube videos from other Hams

feel free to add yours or create a ticket if you want to be added.

Supported boards

You can use one of the Lora32 boards without changings:

  • Heltec WiFi LoRa 32 V1 (433MHz SX1278)
  • Heltec WiFi LoRa 32 V2 (433MHz SX1278)
  • TTGO LoRa32 V1 (433MHz SX1278)
  • TTGO LoRa32 V2 (433MHz SX1278)
  • TTGO LoRa32 V2.1 (433MHz SX1278)
  • TTGO T-Beam V0.7 (433MHz SX1278)
  • TTGO T-Beam V1 (433MHz SX1278)
  • Tracker D from OE1ACM and OE1CGC
  • and sure many more...

Here are some amazon-de links for some example boards:

This boards cost around 20 Euros, they are very cheap and perfect for an LoRa iGate. Keep in minde: you need a 433MHz version!

 

Monday, May 31, 2021

Setting up your Tasmota on Sonoff Pow R2 or R1 to measure your Solar and wind power generation

Setting up your Tasmota on Sonoff Pow R2 or R1 to measure your Solar and wind power generation

Sonoff POW R1 and R2 Tasmota 4M memory. 


 

(Reading Power and sending the info to MQTT and Node-red) 

Pres button on Sonoff POW R2 when Connecting to device in programmer to put device in programming mode.

/home/dir/anaconda3/lib/python3.7/site-packages/tasmotizer_esptool.py 

Write_flash -fs 4MB -fm dout 0x0 tasmota.bin

Reading the existing Sonoff POW R2 file for backup using the esptool https://github.com/espressif/esptool/releases/tag/v3.0
esptool.py read_flash 0x00000 0x100000 fwbackup.bin 

Tasmotize the Sonoff POW R2 /home/anton/anaconda3/bin/tasmotizer.py
Download the bin file from Tasmota for Sonoff
Create config template for Sonoff POW R2


{"NAME":"Sonoff Pow R2","GPIO":[17,145,0,146,0,0,0,0,21,56,0,0,0],"FLAG":0,"BASE":43}

Set TelePeriod 10 for MQtt message every 10S in console

Console output

Download the Tasmota binaries from here http://ota.tasmota.com/tasmota/release/
or here https://github.com/arendst/Tasmota/releases/

Node-red grap of data

Some of the Configurations screens on The Tasmota Sonoff Device

Main Config Page

  

 

 

 

 

 

 

 

 

 

 

Sub config Page

IO pin configuration of ESP8266

 

 

 

 

 

 

 

 

 

 

 

 

Timer config screen

 

 

 

 

 

 

 

 

 

 

 

 

Example of Node-Red Dashboard

 

 

 

 

 

 

 

 

 

 

 

 

Example of Node-Red Dashboard

 

 

 

 

 

 

 

 

 

 

 

 

Example of Node-Red Dashboard














Grafana Graf of the measurements saved in influx db


Friday, June 21, 2019

Setting up your DBV-S2 Decoder for QO-100 (Eshail-2) on Linux

Setting up your DBV-S2 Decoder for QO-100 (Eshail-2) on Linux.

I wanted to decode DBV-S2 signals on my Ubuntu Linux and here is my instillation details to make it work.

Here is a 333k DBV-S2 signal decoding Video (MSI sdr)

rx_sdr -f 747007200 -g 19 -s 2400000 - |./leandvb  --gui --inpipe 32000000 --nhelpers 6 --sr 333e3 --sampler rrc --rrc-rej 30 --standard DVB-S2 --ldpc-helper ldpc_tool -v -d | vlc -

What hardware do you need.

1) 1.2M Dish.
2)  Horizontal polarized LNB.
3) Power injector (13 or 18V)
4) MSI SDR dongle 12bit 10M Sampling.
5) Laptop.
6) Software to decode DBV-S2 signal from Satellite.

Hardware required for DBV-S2 from QO-100 Satellite

Software Required for DBV-S2 decoding on Linux (Ubuntu)

MSI SDR driver, Leansdr, vlc


This Project has working script for the different Bit rates.

250K,333K,500K and 2M bit rate
Changing the -sr 2000e3 parameter for your bit rate as seen on the https://eshail.batc.org.uk/wb// page.
Changing the -f 742307200 to adjust to center frequency to be in the middle using --gui flag to see spectrum
Remove the --guid when you have the frequency centered as it uses too much CPU if you have a slow PC or Laptop
Example of 2M Beacon decoder. 
rx_sdr -f 742307200 -g 19 -s 2400000 - |./leandvb --inpipe 32000000 --nhelpers 6 --sr 2000e3 --sampler rrc --rrc-rej 30 --standard DVB-S2 --ldpc-helper ldpc_tool -v -d | vlc -

Software Installation procedure.

Dependency software

Soapysdr
MSI api driver
rx_sdr
rtl_sdr
DVB-S2 Software
Download the Leansdr from  github https://github.com/pabr/leansdr.git
Download and install the SDRPlay API driver https://www.sdrplay.com/windl.php
Download and install the rsp_tcp server not neseitie but handy when testing https://github.com/SDRplay/RSPTCPServer
Download and install GQRX follow the instructions here http://gqrx.dk/download/install-ubuntu
DVB-S2 Software.
Install VLC sudo apt-get install vlc
git clone http://github.com/pabr/leansdr.git
cd leansdr/src/apps

Edit the Make file with your text editor, I use vi and un comment the following line
vi Makefile
Uncoment the following line(remove #)
# For DVB-S2, find and uncomment LEANSDR_EXTENSIONS<br>
make
Set the buffer size
echo 32000000 > /proc/sys/fs/pipe-max-size
cd leansdr/test
make leandvb-ft
Stay in the test directory
git clone -b ldpc_tool http://github.com/pabr/xdsopl-LDPC-pabr
cd xdsopl-LDPC-pabr make CXX=g++ ldpc_tool
cd ldpc_test
make leandvb-snr
If all worked ok we now need to copy the ldpc_tool in the apps directory
cd ../src/app/
cp -R ../../test/ldpc_tool ./
There should now be an ldpc_tool directory in the leansdr/src/app/ directory
We are now ready to start testing.

Example of testing signal.

Please make sure you have at least 7 to 8 db S/N (signal to Noise signal of the DVB signal from your Dish by checking it on normal SDR software like gqrx)
This script for this project can be downloaded from github here https://github.com/antonjan/qo-100-dbv-s2

rx_sdr -f 742307200 -g 19 -s 2400000 - |./leandvb --inpipe 32000000 --nhelpers 6 --sr 2000e3 --sampler rrc --rrc-rej 30 --standard DVB-S2 --ldpc-helper ldpc_tool -v -d | vlc -rx_sdr can be replaced  by rtl_sdr if you are using a normal dongle



Important command line Parameters to consider
  • --drift track for Oscillator drift 
  • --decim N Decimation if you over sample this could improve the S/N (Signal to noise ratio) 
  • --sampler --rrc-rej add additional filter. 
  • --inpipe BYTES add bigger buffer if your CPU is very busy this could help to resolve the gaps when CPU is busy (E.G. 32000000). 
  • -f HZ Specifies the sampling rate of the I/Q stream on standard input ( I am using RX_sdr and not RTL_tcp witch alow me to use SDRPLAY MSI chipset devicess that can sample upto 10Mhz) -sr HZ (2e6, 1e6, 500e3, 333e3, 250e3). 
  • --tune HZ For example a signal at 397.1 MHz can be received either with rx_sdr -f 397100000 | leandvb or with rx_sdr -f 397000000 | leandvb 
  • --tune 100e3 --ldpc-helper ldpc_tool (allow U to use external tools to decode DVB E.G ldpc_tool 
  • --standard DVB-S2 (Spesify the Decoding to be done)

Hardware required.

Please note all the hardware is avalable from Giga Technology http://www.giga.co.za
Linux (Ubuntu)
MSI (MSI chipset rtl dongle 12bit 10Mhz sampleing
Power injector for LNB
18V Powersupply 1.2M dish preferd to get proper Signal to noise ration to get stable reception.
LNB and coaxle cable with connectors.

Possible problems.

ldpc_tool is not in apps directory.
Signal to Noise is at least 7-8db (S/N).
Laptop or PC do not have enough CPU available.
Disable --guid and pre processing options to reduce CPU usage.
Computer / Laptop do not have an enough CPU.

 

Screen Shots of some of the decoded Video's. https://eshail.batc.org.uk/wb/

250khz DBV-S2
333Khz DBV-S2
2Mhz DBV-S2

I will create a blog post how to setup DBV-decoding for windows.

here is an sample image.
Windows software is available here  http://v.1337team.tk/dvb-s_gui_amsat.zip
more details to come

more details to come


1: Select SDR and start Device.
2: Select correct Frequency.
3: Tune into the middle of the stream, every little bit counts with the bandwidth from the SDR.
4: Select correct Symbolrate.
5: Select mueller and muller filter (for all lower symbolrates use the gardner filter).
6: Check box Carrier recovery Enabled, if you do this right, you should see more symbols inside the IQ plot.

Play with the Carrier Recovery Loop Gain and Damping Sliders until you can see a circle inside the IQ plot and set appropriate Baseband-Gain Settings without overdriving.
A valid QPSK constellation should also appear.
For weak signals, increasing gain and damping can be necessary.

If you see the QPSK constellation (4 dots), you can decrease the gain again.
Keep also your eyes on actual symbolrate (right under).
When symbolrate is going higher, slightly go 1 symbolrate up and down, the symbolrate must stay around 1500 or the chosen value.
 

Then Open up VLC and let it connect to your AMSAT_DBV_Guid Application Listeniing on Port 8888


MPEG-TS output is localhost, UDP at port 8888.
Open VLC and insert Network Stream: udp://@:8888

Sunday, June 2, 2019

The Ellies Dual Port LNB modification for QO-100

The Ellies Dual Port LNB modification.

I want to modify the Ellies Dual Port LNB so that the output frequency would be ether on 70cm 435Mhz or 2M 145Mhz so that it can be used on the QO-100 Satellite directly to VHF/UHF SSB rigs.

Here is an opened LNB.

Opend LNB

Here you can see the two local filters to the two ports.

The Main Mixer and PLL LO seem to be Rafael Micro RT320n
Top View
The Mixer and LO and PLL seem to be Rafael Micro RT320n
Rafael Micro RT320n

It seem Like the Local Crystal is 25Mhz
Crystal is 25Mhz



What this mean if I change the LO Crystal frequency I should be able to force the IF to the required Output to ether on 70cm 435Mhz or 2M 145Mhz


I have created a Spreadsheet to calculate the required IF frequencies so you can listen to QO-100 on the required Ham band.

I did some calculations and the LO to Crystal frequency = LO / 390
see calculated values

Blue / Red is crystal frequency for your LO in LNB