We ( @AkashCastelino ) are doing a Smart City IoT Project where we aim to count cars passing by on a bi-lane street. This is our hardware setup powered by an Anker 20,100 mAh PowerBank:
- Arduino Mega
- DS3231 RTC
- SHARP IR GP2Y0A710K0F Sensor
- 16 x 02 - I2C LCD Display
- Dragino LoRa Shield v1.4
- Dragino LG-01 LoRa Gateway
We tested our hardware setup on the Laptop Serial monitor and it is able to count vehicles decently. We also setup our TTN packet exporter sketch and this is where we are currently encountering problems of 2 packets getting lost. We ran this TTN_node test sketch where we export packets every 30 seconds. In our TTN Device Settings we have disabled Frame Counter Checks as we are currently testing the assembly and not deployed it in the field. You can see my sketch in the link below and in the video below you can see the packet count and the timestamp of every packet sent on the LCD Display.
However in both the TTN Application Date Console and also in the TTN Swagger API we see 2/4 packets getting lost, as you can see in the screenshot below.
Even setting the TX_INTERVAL = 60 in our sketch (i.e sending packet ~ once every min) is still resulting in 2 packet loss, as you can see in the screenshot below:
We looked at the limitations of the LoRaWAN but we saw in one video in your youtube channel that it is possible to send data to the TTN every 5 seconds, however for us, we only receive packets on the TTN once every ~ 2 minutes. Obviously this is a problem for us because sometimes cars move in front of our sensor every 10 seconds once during peak traffic hours and if we want to send a timestamp of that event it is not possible and that packet may get lost. Can someone kindly tell us whether the problem lies in:
- TTN BackEnd
- TTN Console or Application or Device Settings
- Dragino LG-01 LoRA Gateway
- or any other hardware/firmware issue?
If the problem is irresolvable either from a hardware or software point of you, Can someone also kindly give us an expert opinion on what is the best approach for our project to send data to the TTN?
Instead of sending epoch timestamps of vehicle traffic as and when it happens, Should we perhaps send vehicle count data every 60 or 300 seconds, reset the vehicle count and then send the next packet ?