|
Post by Danae Wnuk on May 2, 2020 18:23:39 GMT -8
LoRa tx installed on the weather station and the solar panel box. Ran the "sudo python testWXLink.py" from the command prompt and got the following response:
('HW-Version: ', 18) Starting readWXLink Tick! The time is: 2020-05-02 15:18:11.557071 Starting readWXLink Tick! The time is: 2020-05-02 15:18:16.564471 after WXLink waitRX ----------- block1= [171, 102, 0, 201, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 137, 161, 64, 0, 0, 0, 0, 0, 0, 0] block2= [0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 153, 25, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 250, 175] ----------- block 1 ab6600c93200000000000000000000000000000000b689a14000000000000000 block 2 0000000000000000009a99193f00000000000000000000000049000000faaf ----------- ('>>>>>>>>>>>>protocolblock=', 0) Starting readWXLink ('block1 length=', 32) ('block2 length=', 31) ReversedreceivedCRC= faaf length of stb1+sb2= 59 ab6600c93200000000000000000000000000000000b689a14000000000000000 0000000000000000009a99193f0000000000000000000000004900 calculatedCRC = faaf Good CRC Recived ('protocol_ID = ', 0) ('protocol_software_version = ', 0) unknown or non-configured protocol received. Protocol = 0 Tick! The time is: 2020-05-02 15:18:18.424699 ^CTraceback (most recent call last): File "testWXLink.py", line 67, in <module> readLoRa.readRawWXLink() File "/home/pi/SDL_Pi_SkyWeather/readLoRa.py", line 300, in readRawWXLink if state.ll.waitRX(timeout=5): File "./pyRFM/lib/ll/ll_rfm9x.py", line 407, in waitRX time.sleep(0.01)
Any ideas what could be wrong or how to proceed? Thanks.
|
|
|
Post by SDL on May 5, 2020 9:24:00 GMT -8
Good news is you are getting stuff. Bad news, is I don't see any data. This makes me think it is on the Tx end. Can you see what is being put out on the Serial on the Arduino? Requires an FTDI cable and the Arduino IDE.
BP
|
|
|
Post by Danae Wnuk on Aug 24, 2020 6:49:24 GMT -8
Been busy all summer final got to hooking up a FTDI cable to the Arduino (Grove Mini Pro LP JP1/FTDI) and was getting data off the serial.
Get the following data ( didn't have solar panel connect or the weather modual hooked up at the time but was definitly getting data.
Awake now: timeAfterSleep=2036461 SleepTime = 14642 Millis Time: 2036.46 2wakeState=2 Watchdog1 Reset - Patted the Dog wakeState=2 MessageCount=115 USBPowerCentral Load Voltage: 5.05 V Current: 0.60 mA ------- 0 0 ------ crc = 0x2C8 ----------Sending packet---------- ----------After Sending packet---------- ----------Packet Sent. Sleeping Now---------- ----------After Wait Sending packet---------- freeMemory()=499 bufferlength=63 AB 66 00 8E 4F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8C 89 A1 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9A 99 19 3F 00 00 00 00 00 00 00 00 00 00 00 00 73 00 00 00 02 C8 USB PowerUp Check - Wireless ID:8 Battery Load Voltage: 0.00 V Solar Current: 0.00 mA USB PowerCentral NOT turned on USBPowerCentral Status:0 timeBeforeSleep=2039356
Is there any way to check and make sure the LoRa 433 is getting data? And also the LoRa in the Weather module is connected to a serial (Serial connector on thePi2Grover Board) the LoRa 433 in the Solar module is connected to a Digital (D6/D7 connector on the Grove Mini Pro LP)
|
|
|
Post by SDL on Aug 25, 2020 14:10:45 GMT -8
|
|
|
Post by Danae Wnuk on Aug 29, 2020 15:44:46 GMT -8
Sent AB 66 00 76 AF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CB 89 A1 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CD CC 4C 3F 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 F4 C1 Recieved ab 66 00 76 af 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cb 89 a1 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cd cc 4c 3f 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 f4 c1
All that is set up right.
the LoRa 433(434.0MHz) is transmitting from the SolarMax and the data received on the Raspberrry Pi side matches.
Sent From the SolarMax Arduino: AB 66 00 76 AF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CB 89 A1 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CD CC 4C 3F 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 F4 C1
Received on Raspberry Pi side ab 66 00 76 af 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cb 89 a1 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cd cc 4c 3f 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 f4 c1
The Issue is the Third HEX which is the protocol_byte = 00 protocol_byte = block1[2] = 0 #protocol_byte = struct.unpack('B', str(block1[2:2]))[0] protocol_ID = protocol_byte / 10 = 0 protocol_software_version = protocol_byte - protocol_ID*10 = 0 if (config.SWDEBUG): print("protocol_ID = ", protocol_ID) = 0 print("protocol_software_version = ", protocol_software_version) = 0 which prints ('protocol_ID = ', 0) ('protocol_software_version = ', 0)
Causing it to fall through to the code that prints unknown or non-configured protocol received. Protocol = 0
Is there a setting on the solar max I am missing or do I need to download the latest code for the solarmax and update the Grove Mini Pro LP?
I did reset the Variable SOLARMAXPROTOCOL = 0 and changed a few more lines of code so all conditional statements refered to the variable and not to 8 or 10 Got this back after that so it is receiving the data and decoding properly.
Tick! The time is: 2020-08-29 17:34:19.861642 ('Block1 Length: ', 0) Starting readWXLink Tick! The time is: 2020-08-29 17:34:24.866400 ('Block1 Length: ', 0) Starting readWXLink Tick! The time is: 2020-08-29 17:34:29.874627 ('Block1 Length: ', 0) Starting readWXLink Tick! The time is: 2020-08-29 17:34:34.878171 after WXLink waitRX ----------- block1= [171, 102, 0, 58, 122, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 137, 161, 64, 0, 0, 0, 0, 0, 0, 0] block2= [0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 2, 0, 0, 29, 3] ----------- block 1 ab66003a7a01000000000000000000000000000000cb89a14000000000000000 block 2 0000000000000000003333333f000000000000000000000000270200001d03 ----------- ('>>>>>>>>>>>>protocolblock=', 0) ('Block1 Length: ', 32) Starting readWXLink ('block1 length=', 32) ('block2 length=', 31) ReversedreceivedCRC= 1d03 length of stb1+sb2= 59 ab66003a7a01000000000000000000000000000000cb89a14000000000000000 0000000000000000003333333f0000000000000000000000002702 calculatedCRC = 1d03 Good CRC Recived ('protocol_ID = ', 0) ('protocol_software_version = ', 0) protocol 0 SolarMAX received SMOTFloat=0000 ITemperature from SolarMAX temperature: 0.0C IHumidity from SolarMAX humidity: 0.0% SolarMax batteryVoltage = 0.00 SolarMax batteryCurrent = -0.00 SolarMax loadVoltage = 5.05 SolarMax loadCurrent = 0.70 SolarMax solarPanelVoltage = 0.00 SolarMax solarPanelCurrent = -0.00 SolarMax auxA = 0.00 SolarMax Message ID 551 Tick! The time is: 2020-08-29 17:34:39.163009
I am curious the SolarMax batteryVoltage = 0.00 and solarPanelVoltage = 0.00 even with the solar panel hooked up. I am getting 18v off the solar panel and 4.06 off the batteries. I am also not getting Temperature or Humidity it is almost as if the Arduino isn't reading the I2C Bus.
|
|
|
Post by SDL on Aug 30, 2020 8:52:59 GMT -8
First of all, let's download the latest software for the Arduino mini pro lp. Please capture the version number (from the code start) of the Arduino Mini Pro LP before you reprogram. That gives us some evidence. github.com/switchdoclabs/SDL_Arduino_SolarMAX_LoRa_TxRegarding the protocol setup. The SolarMAX code uses the battery voltage to determine whether it is a LiPo or Lead version. It should pick protocol 8. Here is the code: // Now Set Wireless ID
if (BatteryVoltage < 8.0) { WirelessID = 8; // SolarMAX LiPo } else { WirelessID = 10; // SolarMAX Lead Acid (12V Battery) } Protocol = WirelessID * 10 + SOFTWAREVERSION;
I don't see how it could pick zero even if you didn't have a battery connected. I'm thinking this is a software version problem. BP
|
|
|
Post by Danae Wnuk on Aug 30, 2020 10:52:45 GMT -8
I think I confused the issue since I only was looking at the PI side (receive side). Got a look at the arduino side of the code (Send side) and that is showing:
* USB PowerUp Check - Wireless ID:8
It is showing Version 6. Here is the complete data from bootup till the first data sent over LoRa 433
USB PowerCentral OFF
SolarMAX WXLink Tx
Software Version:6
DS3231 Not Present //the function to get the time from the RTC
RTC_STATUS=1001000
RTC_CONTROL=1001000
Manuf ID: 0xFFFFFFFF
INA3221 Not Present` // the three channels of the INA3221 named for INA3221 Solar Power Controller channels (www.switchdoc.com)
Battery Load Voltage: 0.00 V
USB PowerCentral NOT turned on
USBPowerCentral Status:0
INA219 Config: 0x399F
USB PowerCentral Present
USBPowerCentral
Bus Voltage: 1.01 V
Shunt Voltage: -0.06 mV
Load Voltage: 1.01 V
Current: -0.70 mA
Power: 0.00 mW
Device ID ID=0x1000
HDC1080 Not Present // 0x5449 ID of Texas Instruments Temperature Humidity
wakeState=6
timeBeforeSleep=5076
Awake now: timeAfterSleep=19718
SleepTime = 14642
Millis Time: 19.72
2wakeState=2
Watchdog1 Reset - Patted the Dog
wakeState=2
MessageCount=0
USBPowerCentral
Load Voltage: 1.00 V
Current: -0.90 mA
-------
0
0
------
crc = 0xC3C2
----------Sending packet----------
----------After Sending packet----------
----------Packet Sent. Sleeping Now----------
----------After Wait Sending packet----------
freeMemory()=499
bufferlength=63
AB 66 00 C7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 74 80 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66 66 66 BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C3 C2
USB PowerUp Check - Wireless ID:8
Battery Load Voltage: 0.00 V
Solar Current: 0.00 mA
USB PowerCentral NOT turned on
USBPowerCentral Status:0
timeBeforeSleep=22611
Awake now: timeAfterSleep=37253
SleepTime = 14642
Millis Time: 37.25
2wakeState=2
Watchdog1 Reset - Patted the Dog
wakeState=2
MessageCount=1
USBPowerCentral
Load Voltage: 1.00 V
Current: -0.70 mA
|
|
|
Post by Danae Wnuk on Sept 1, 2020 9:10:35 GMT -8
I unplugged the INA3221 and started getting temperature data. My question is on the INA3221 board the SJ1 is unsoldered and the SJ2 is still intact giving it an address of 0x40 which is the same as the HDC1080 board. I'm assuming I need to cut the SJ2 and solder the SJ1 to give it an 0x41 address which I see in the SDL_Arduino_INA3221.h file? Also How do you upload to the Grove Pro Mini LP I tried the FTDI but got and error: avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x35
USB doesn't register as a com port I was reading about the ISP and mini do I need to get an ISP device to program from the arduino IDE progrom? I am new to arduino's so not sure how it all works. Previous ardiunos where straight forward just plug in the usb to the computer and program, I am assuming there is a different process with this one. Thanks for all the help, so far.
|
|
|
Post by Danae Wnuk on Sept 1, 2020 13:48:00 GMT -8
Solved it!
In the end it was the INA3221 Terminal Board. The default address 0x40 conflicted with the HDC108 Breakout Board 0x40 once I changed the address to 0x41 and replaced the R10 shunt resistor on the INA3221, I burned out by accident, the protocol started transmitting in the string, and there was Battery, Solar, Temperature, and Humidity readings.
Thanks everyone for your help.
PS: The DS3231 RTC is still not being detected but that doesn't seem to affect how it works so I am ignoring that for now.
|
|
|
Post by SDL on Sept 2, 2020 14:31:59 GMT -8
The next question from me was going to be the wiring and checking what was on the I2C bus. Glad you solved it.
BP
|
|