-
Notifications
You must be signed in to change notification settings - Fork 9
TTGO LoRa32-OLED V1 Configuration #38
Comments
Hi Matt, actually you do not have do change anything in the code - just follow this description: (Yes, this should be added to the TTN project, too!) Regards |
ok, an update !
as yet the esp32 has not been registered on TTN as my gateway will arrive to tomorrow, but is this error to be expected if there is no lorawan connection? Also, my board has a jumper from spio12 to the LORA chip, as described in Ulrich's post on Hackaday: https://hackaday.io/project/186339-lora-for-bresser-5-in1-weather-station-make-iot and shown here: Cheers Matt |
Hi,
|
You can have a look if a TTN or Helium gateway is within reach: |
Let's see if we get the voltage measurements for your board to work. |
No, I haven't managed to connect with Ulrich to ask! with your amendment to
Edit: i removed the jumper and it still fails in with the same message |
Did you see that the pin configuration has to be done in two places? Maybe this thread also helps:
|
BTW: Did you check that none of the required pins is assigned for other purposes? |
I followed your link :https://github.com/matthias-bs/BresserWeatherSensorTTN#configure-the-rf-transceiver-gpio-wiring |
No, the you mentioned configuration above is just fine. It is used for the sensor reception based on the BresserWeatherSensorReceiver library which in turn uses RadioLib. Now you additionally have to modify the pin configuration to be used for LoRaWAN by BresserWeatherSensorTTN, which is based on MCCI Arduino LoRaWAN Library. In
Since the SPI configuration worked without changes for the sensor receiver, I assume it will also work out-of-the-box for the LoRaWAN transceiver. And in
This sets a board specific define, avoids a conflict of GPIO5 used for the LoRa radio and the OneWire bus at the same time and hopefully selects the correct ADC input for battery voltage measurement. There actually seems to be no connection of the supply voltage to an ADC. |
ok, i think i've made the changes correctly, but now get this:
i also now have a ttn gateway, so should see if the ttgo tries to connect |
O.k. Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\hal.cpp:
The last line is line 36. The execution stops there, because DIO1 may not be unconnected. The problem is, there is no official definition
The only clue I currently have is this circuit diagram: So please try this in BresserWeatherSensorTTN.ino:
If this does not work, you have to find out the connection otherwise - maybe you can check it with a multimeter, toggle one pin after another until you see the signal arriving at the required pin or try to google it. |
Maybe this is where the red wire comes into play: If we do not know the on-board connection, we create our own...
Would you please do me a favor and try both variants? |
is that with the wire connected? |
Which antenna are you going to use? According to the circuit diagram, the large one (SMA) is connected (via R29 - 0 Ohms), while the small one (uFL) is unconnected (R28 - not assembled). You can change this if required (a solder bridge works well). An antenna should be connected, otherwise the transmitter RF front end could be destroyed! |
i'm using the antenna provided |
Damn, its now failing to compile with the error :
I'm losing the will to live!!! |
Keep cool! ;-) Did you apply the fixed mentioned in this section? |
Yes, I re downloaded all the files and tried again with verbose debugging off. It seems that it was treating warnings as errors and not compiling. I think I just need to sort out the payload formatter now! |
To be clear, you should fix these mentioned bugs as described: |
Does that mean the code seems to work now? With which pin config? |
Yes, the red wire is the connection between the radio module pin 10 (DIO1) and the ESP32 GPIO pin 12. |
Using |
as far as i can see the two fixes are done in the current code, I've uploaded the payload formatter to ttn.
if i leave it it just repeats the last line and there is no messages recieved on ttn |
Did you configure your
Besides, this looks good! Normally you have to wait a while (several minutes for a public network is quite normal) until the node has joined the network. After the first join, the connection details are saved and the next join will be much faster (~2...3 minutes). And the supply voltage measurement seems to be valid, too. |
If you have a decent multimeter, it would be great to have a current measurement for this board in deep sleep mode. For this, we need the current drawn from the battery input, not the USB port. In fact, the USB may not be connected for this. |
aaaarg, i'm getting the mqtt out of ttn, but it doesn't show the wind! |
??? |
I've used the ttn mqtt integration to publish the mqtt message, and am subscribing with node-red. |
Maybe there is a way to increase a buffer size for MQTT messages in node-red? The JSON string from TTN is quite big! |
what are the topic names in the decoder, maybe i can just subscribe to the topics i need? |
Presumably, you only need "decoded_payload". I'm always using https://mqtt-explorer.com/ for debugging. |
just trying mqtt decoder, can't get past the 'up' topic, and nodered mqtt in node wont accept v3/bresserttn@ttn/devices/bresseresp32/up |
D'oh, forgot to tell the Node-red mqtt in node to output parsed Jason! |
Cool! Mission completed! |
Some interesting information/discussion regarding the TTGO LoRa32 board: |
For you, maybe! For which I and my PhD project are eternally grateful! 😁🙏😁. |
What is the subject of your project? |
I'm developing a model to predict how much rainfall gets through forest canopies to become groundwater (and later floodwater) so I have off grid weather stations and rainfall gauges connecting via iot. My weather station was connected to a pi and a gateway in an enclosure in a forest, but the enclosure leaked, and the pi was pulling to much current. That's why I've moved to the esp32. It should be going live next week, thanks in no small part to you! |
⁹Good luck! From what I've read, the TTGO LoRa32 is not optimal regarding standby (deep sleep) current consumption and LoRaWAN range. You might consider https://github.com/matthias-bs/LoRaWAN_Node if any of this proves to be a concern. |
We have developed our own lora node for the rain gauges, and hopefully the ttgo will work. |
Hi again, unfortunately it seems we have another issue :( |
That is easy: just replace The reason for this was that I cannot set the number of decimals in my MQTT panel and therefore converted it in the decoder to a string with one decimal. The MQTT panel does not care it it's a string or a float. |
that seems to have changed them to 'int' - no decimal places, can we make it a float? |
From the oldest version I kept:
It seems I snipped the previous example from rawfloat. |
hmm, at line 37? |
copied that code into ttn. tested it and it gives :
so still no decimals for wind or rain, and a seemingly random value for rain_hr_mm! |
It's up to the application how to display floating point numbers. If the value is 0, it might well display it as 0 instead of 0.0. https://stackoverflow.com/questions/19554972/json-standard-floating-point-numbers So apparently, you can not have both a machine readable floating point value and a nice, human-friendly display. |
Unfortunately i think there is a bit of an issue with the decoder! I decided to test the device by adding a little water to the rain counter, I made it tip four times. the 'rain_mm' value went from 910.0mm to 910,7999 (perfectly normal), the others ...... not sure whats going on here!, maybe you can shed a little light? |
I do not have Twitter, but chances are that you can find me on LinkedIn. Or is there a way to start a private conversation in GitHub? For sure I can join a zoom call if you set up one. Maybe on Friday? |
I don't think you can pm on github, I'll find you on linkedin. Friday might be difficult, hopefully I'll be installing the esp32 in the field! |
Finally I found the purpose of this wire: Big ESP32 + SX127x topic part 2 has an excellent section about the different versions of the TTGO LoRa32 OLED boards. According to this, V2 lacks an on-board connection between the ESP and the LoRa radio chip! In general, the version numbering/documentation of these boards is confusing and a schematic is not even available for most of them. |
Hi Matthias - me again!
I have complied and uploaded this code to my esp32 (TTGO LoRa32-OLED V1 with
defined, but am not seeing anything in the serial monitor.
how can i check that the board is recieving the data from the bresser?
Cheers
Matt
The text was updated successfully, but these errors were encountered: