diff --git a/stuff/LoRa(WAN) airtime calculator.ods b/stuff/LoRa(WAN) airtime calculator.ods new file mode 100644 index 0000000..e2b4805 Binary files /dev/null and b/stuff/LoRa(WAN) airtime calculator.ods differ diff --git a/stuff/LoRa(WAN) airtime calculator.xlsx b/stuff/LoRa(WAN) airtime calculator.xlsx new file mode 100644 index 0000000..fc5846f Binary files /dev/null and b/stuff/LoRa(WAN) airtime calculator.xlsx differ diff --git a/stuff/LoraWAN_ABP.txt b/stuff/LoraWAN_ABP.txt new file mode 100644 index 0000000..f4a8392 --- /dev/null +++ b/stuff/LoraWAN_ABP.txt @@ -0,0 +1 @@ +see here: https://docs.pycom.io/tutorials/lora/lorawan-abp/ diff --git a/stuff/an-00501.pdf b/stuff/an-00501.pdf new file mode 100644 index 0000000..21301e4 Binary files /dev/null and b/stuff/an-00501.pdf differ diff --git a/stuff/docu/40001784B.pdf b/stuff/docu/40001784B.pdf new file mode 100644 index 0000000..a40f132 Binary files /dev/null and b/stuff/docu/40001784B.pdf differ diff --git a/stuff/docu/rp_2-1.0.0_final_release.pdf b/stuff/docu/rp_2-1.0.0_final_release.pdf new file mode 100644 index 0000000..6f2814d Binary files /dev/null and b/stuff/docu/rp_2-1.0.0_final_release.pdf differ diff --git a/stuff/docu/sx1276_77_78_79.pdf b/stuff/docu/sx1276_77_78_79.pdf new file mode 100644 index 0000000..6317cdd Binary files /dev/null and b/stuff/docu/sx1276_77_78_79.pdf differ diff --git a/stuff/notes.txt b/stuff/notes.txt new file mode 100644 index 0000000..a76ae38 --- /dev/null +++ b/stuff/notes.txt @@ -0,0 +1,33 @@ +https://www.thethingsnetwork.org/labs/story/build-the-cheapest-possible-node-yourself + +https://www.thethingsnetwork.org/community/berlin/post/how-to-build-a-simple-and-very-cheap-lorawan-node-with-arduino + +https://www.thethingsnetwork.org/forum/t/cheap-and-simple-lora-node-for-schoolproject/22364/5 + +https://forum.iot-usergroup.de/t/nucleonbasenode328-arduino-328-pro-mini-lora-gehaeuse-antenne/287 + +Wahrscheinlich dieses hier: +--------------------------- +https://forum.iot-usergroup.de/t/wijnand-s-iot-battery-sensor-board-weiterentwicklung/339/2 + +http://alf4all.demon.nl/engineering/topics/digital_system_design/targets/Arduino-Pro-Mini_RFM95/index.htm + +################################################# + +Ended up buying these: +---------------------- +https://www.banggood.com/2Pcs-LILYGO-TTGO-LORA32-868Mhz-ESP32-LoRa-OLED-0_96-Inch-Blue-Display-bluetooth-WIFI-ESP-32-Development-Board-Module-With-Antenna-p-1507044.html?utm_design=41&utm_source=emarsys&utm_medium=Neworder171109&utm_campaign=trigger-emarsys&utm_content=winna&sc_src=email_2675773&sc_eh=4a6c1db81031fa671&sc_llid=15150285&sc_lid=105229698&sc_uid=OCFpZipIvn&cur_warehouse=CN + +Repo: +----- +https://github.com/lemariva/uPyLora + +Tutorial: +--------- +https://lemariva.com/blog/2018/10/micropython-esp32-sending-data-using-lora + +https://primalcortex.wordpress.com/2017/11/24/the-esp32-oled-lora-ttgo-lora32-board-and-connecting-it-to-ttn/ + +Demodulation: +------------- +https://electronics.stackexchange.com/questions/278192/understanding-the-relationship-between-lora-chips-chirps-symbols-and-bits diff --git a/stuff/rfm9x_breakout_board b/stuff/rfm9x_breakout_board new file mode 160000 index 0000000..16ed9b3 --- /dev/null +++ b/stuff/rfm9x_breakout_board @@ -0,0 +1 @@ +Subproject commit 16ed9b331d846d54407bd3d7641588471c2dbcb0 diff --git a/stuff/setup.txt b/stuff/setup.txt new file mode 100644 index 0000000..3058aa7 --- /dev/null +++ b/stuff/setup.txt @@ -0,0 +1,91 @@ +0. Clone the uPyLora github repository: + git clone https://github.com/lemariva/uPyLora.git + Also download the files 'ssd1306_i2c.py' and 'ssd1306.py' from https://github.com/lemariva/uPySensors.git and put them in the uPySensors subdirectory of the uPyLora repo + +1. Install esptool + $ pip install esptool + +2. Flashing: + esptool.py --port /dev/ttyUSB0 erase_flash + esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20190708-v1.11-132-gc24d81119.bin + +3. Setting up webrepl: + Connect using picocom: + $ picocom /dev/ttyUSB0 -b115200 + + >>> import webrepl_setup + -> enable, set password and reboot + PW for Lora Workshop: lorawork + + Connect to local wifi: + >>> import network + >>> sta_if = network.WLAN(network.STA_IF) + >>> sta_if.active(True) + >>> sta_if.connect("", "") + >>> sta_if.ifconfig() # this prints the IP + + Use access point to connect: + >>> import network + >>> ap_if = network.WLAN(network.AP_IF) + >>> ap_if.active(True) + >>> ap_if.ifconfig() # this prints the IP + +4. Download WebREPL html from http://micropython.org/webrepl + Connect to the access point of the ESP and then connect to the ESP via online Webrepl: + -> Enter IP from above and click connect. Login with password 'lorawork' + +5. Upload the files via the WebREPL (using the 'Send a file' dialog): + LoRaDuplexCallback.py + LoRaPingPong.py + LoRAReceiver.py + LoRaSender.py + config_lora.py + controller.py + controller_esp32.py + pymakr.conf + sx127x.py +Also upload the files in the uPySensors subdirectory (in a moment we will create a subdirectory on the ESP32 and move the files there): + ssd1306_i2c.py + ssd1306.py +Note that we did not upload the file main.py at this point! The reason is that this file would get executed each time the ESP32 is reset. We will instead create our own main file soon. + In the WebREPL prompt do the following to create a subfolder and move the ssd* files we just uploaded there: +>>> import os +>>> os.mkdir('uPySensors') +>>> os.rename('ssd1306.py', 'uPySensors/ssd1306.py') +>>> os.rename('ssd1306_i2c.py', 'uPySensors/ssd1306_i2c.py') + +6. Test sending/receiving: + Enter the following code in the WepREPL prompt: + import LoRaSender + import config_lora + from sx127x import SX127x + from controller_esp32 import ESP32Controller + + controller = ESP32Controller() + lora = controller.add_transceiver(SX127x(name = 'LoRa'), + pin_id_ss = ESP32Controller.PIN_ID_FOR_LORA_SS, + pin_id_RxDone = ESP32Controller.PIN_ID_FOR_LORA_DIO0) + + Then repeat steps 1 through 5 with a second LoRa module (but replace /tty/USB0 by /ttyUSB1) + + For the second LoRa module enter the following code + import LoRaReceiver + import config_lora + from sx127x import SX127x + from controller_esp32 import ESP32Controller + controller = ESP32Controller() + lora = controller.add_transceiver(SX127x(name = 'LoRa'), + pin_id_ss = ESP32Controller.PIN_ID_FOR_LORA_SS, + pin_id_RxDone = ESP32Controller.PIN_ID_FOR_LORA_DIO0) + + On the python prompt of the first module enter: + LoRaSender.send(lora) + + On the second module enter: + LoRaReceiver.receive(lora) + + The display of the first module should then display an output like the following: + Hello (0) RSSI: -157 + The number should be counting up (starting from 0) + + The second module should output the same text, but the RSSI will be different (RSSI = received signal strength indicator; this indicates how good the connection is diff --git a/stuff/shopping_list.txt b/stuff/shopping_list.txt new file mode 100644 index 0000000..da2fe5c --- /dev/null +++ b/stuff/shopping_list.txt @@ -0,0 +1,16 @@ +Arduino pro mini 3.3 V Version! 1,57 € + -- alternative 328P: 1,36 € +RFM 95 W 4,72 € +Ublox NEO-6M GPS Module GY-GPS6MV2 NEO6MV2 6.19 € + -- alternative ? 2,16 € +Ein / Ausschalter 0,08 € +Battery LiPo 3.7 V 1200 mAh 5,30 € + -- alternative: 4,61 € +3D enclosure (Thingiverse) + + + total costs as of today, cheapest variant: 1,36 + 4,72 + 2,16 + 0,08 + 4,61 = 12,93 € + and some cables and board + +Antenna for base station: +https://de.aliexpress.com/store/product/Glass-Fiber-Antenna-Gain-8dbm-Transmission-range-is-further-LoRa-Gateway-Antenna-with-433-470-868/2805180_32852314761.html diff --git a/stuff/waterfall/sdr.wav b/stuff/waterfall/sdr.wav new file mode 100644 index 0000000..a896aeb Binary files /dev/null and b/stuff/waterfall/sdr.wav differ