jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Sept 20, 2020 22:02:55 GMT -8
I bought the SolarMax Lead Acid Kit. When testing via sudo python testWXLink.pyI get the same output as in the previous post : unknown or non-configured protocol received. protocol_ID= 0Also, when connecting the assembly, everything seems to work - Solar Controller USB output is 5V for both USB's - the other outputs as expected - Mini Pro LP has the blue LED with every 30 seconds or so the amber LED blinking but no power output on the other side of the USB PowerCentral I tripple-checked all the wiring, re-seated it, etc. The only discrepancy I found was on page 21 step W7 in addition to the black/red wire it also shows a white connection not mentioned anywhere else. My guess is that the software may not be correct/corrupted on the Mini Pro and thought that I 'just' need to re-upload github.com/switchdoclabs/SDL_Arduino_SolarMAX_LoRa_TxIs that a correct assumption or what else could I check? If a software refresh is sensible to do, I need some guidance - never did anything with Arduino before - I tried to connect my Mac USB to the Mini Pro USB, but nothing shows in the IDE Tools > Ports. Cheers, Jorg
|
|
|
Post by SDL on Sept 21, 2020 17:52:47 GMT -8
Protocol zero (0) is detected when something is not right with the SolarMax wiring. Specifically with the INA3221 board. The computer is reading 0V or less than 0V from the battery and has no idea what kind of a battery you have so it sends out a 0 protocol.
You can modify the testWXLink.py to receive protocol 0 and see what you are sending (if you can't figure it out, let me know) and that should pinpoint the wiring error with the INA3221.
To program or see the serial stream on the MiniPro LP you need an FTDI cable for the Mac. If you get one, you can see exactly what the Mini Pro is detecting.
BP
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Sept 22, 2020 12:18:28 GMT -8
I ordered the FTDI cable.
Where does the Mini LP read the 0V from?
One thing I noticed that in some pictures of the documentation the cabling of the INA3221 is reversed. According to the doc, the red ones (i.e. Solar) go to the middle connector IN2 - and the yellow ones (i.e. Battery) to IN1 Some pictures show that reversed. My current wiring of the INA3221: - Grove I2C --w1-- I2C Hub - IN1 - (+) -- yellow -- Battery (+) - (-) -- yellow -- SPM BatIn (+) - IN2 - (+) -- red -- MC4 (+) - (-) -- red -- SPM SolarIn (+) - IN3 - (+) - (-)
Also, what is the purpose/other end of the white connector mentioned in the initial post?
|
|
|
Post by SDL on Sept 25, 2020 16:49:24 GMT -8
The key one is the Battery In and Out for detecting the protocol. Make sure you have that the correct way with the IN1+ to the battery output.
Don't follow the colors. Follow the wires.
Show me a picture of the white connector that you are talking about.
Best,
BP
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Sept 26, 2020 21:11:16 GMT -8
Hi PB, The white cable - page 24: www.switchdoc.com/wp-content/uploads/2020/03/SolarMaxLeadAcidAssemblyAndOperation.1.5.pdfThe IN1(+) is to the Battery (+) The IN1(-) is to the SPM Battery In (+) If that connection were not correct, the Solar Power Manager would not be working. But all voltages on the Solar Power Manager are fine - the two USB's, as well as OUT1/2 The I2C bus has 5V too and the Mini Pro LP has the steady blue and blinking amber. Cheers, Jorg
|
|
|
Post by SDL on Sept 29, 2020 10:16:36 GMT -8
I figured the white wire out. From the Errata page of the manual: Version 1.3 - Removed single jumper pin from LIPOBATIN to 5V. Added Grove cable from Arduino Mini Pro LP to USB PowerCentral Enable/Control port to implement hysteresis during low power conditions. See article on www.switchdoc.comNot needed anymore. Now, your problem. Do you have an FTDI cable? I'm wondering if you have a bad INA3221 board. If you plug the FTDI cable into the Mini Pro LP, you can see all the voltages. You can also modify the TestWXLink program to accept protocol 0. If you can't quite figure that out, let me know and I will post the changes when I get back to the lab. BP
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Sept 29, 2020 14:03:20 GMT -8
Unfortunately, no luck with both approaches: (1) Got the cable and - installed the VPC driver www.ftdichip.com/Drivers/VCP.htm for MacOS - 2.4.4 - not sure if is the correct driver - connected the cable and in the Arduino IDE I saw under ports -- dev/cu.usbserial-6 -- dev/cu.usbserial-A104D5H2 - when trying to view the Serial monitor, it only worked with the second one ... but the content was scrambled - using Baud rate of 9600 (2) Modified the python code to create the info (prefixed it with x to indicate 'wrong protocol' and added some debug info: Starting readWXLink - block1 length= 32 - block2 length= 31 - Reversed received CRC= 6972 - length of stb1+sb2= 59 ab6600e81100000000000000000000000000000000f6ee7f3f00000000000000 000000000000000000000020c00000000000000000000000001900 - calculatedCRC = 6972 Good CRC Received - protocol_ID= , 0, wxLink=, 3, solar=, 10 - protocol_software_version=, 0 - solarMax=, True, dualMax=, False unknown or non-configured protocol received. protocol_ID=, 0 x ITemperature from SolarMAX: 0.0C, block1[25:29], \x00\x00\x00\x00 x SMOTFloat=0000 x IHumidity from SolarMAX: 0.0%, outHByte, \x00\x00\x00\x00 x SolarMax batteryVoltage = 0.00, block2[1:5], \x00\x00\x00\x00 x SolarMax batteryCurrent = -0.00, block2[5:9], \x00\x00\x00\x00 x SolarMax loadVoltage = 1.00, block1[21:25], \xf6\xee\x7f? x SolarMax loadCurrent = -2.50, block2[9:13], \x00\x00 \xc0 x SolarMax solarPanelVoltage = 0.00, block2[13:17], \x00\x00\x00\x00 x SolarMax solarPanelCurrent = -0.00, block2[17:21], \x00\x00\x00\x00 x SolarMax auxA = 0.00, block2[21:25], \x00\x00\x00\x00 x SolarMax batteryPower = -0.00 x SolarMax solarPower = -0.00 x SolarMax loadPower = -0.00 x SolarMax batteryCharge = 0.00 x SolarMax Message ID 25, block2[25:29]
|
|
|
Post by SDL on Oct 2, 2020 8:13:47 GMT -8
Baud rate should be 115200. This should really help clear things up.
Hmm. Looks like you have all zeros from the debug protocol data. We were looking for battery voltage specifically, but your temperature isn't working either. Makes me think it is wiring error having to do with the I2C.
BP
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Oct 3, 2020 16:08:03 GMT -8
After using the right Baud rate, I got --- SolarMAX WXLink Tx Software Version:6 DS3231 Not Present RTC_STATUS=1001000 RTC_CONTROL=1001000 Manuf ID: 0xFFFFFFFF INA3221 Not Present Battery Load Voltage: 0.00 V USB PowerCentral NOT turned on USBPowerCentral Status:0 INA219 Config: 0x399F USB PowerCentral Present USBPowerCentral Bus Voltage: 1.00 V Shunt Voltage: -0.24 mV Load Voltage: 1.00 V Current: -2.60 mA Power: 4.00 mW ... ---
I happened to have another INA3221 for another project and after replacing it - I got --- SB PowerCentral OFF SolarMAX WXLink Tx Software Version:6 DS3231 Not Present RTC_STATUS=1001000 RTC_CONTROL=1001000 Manuf ID: 0x5449
Battery Load Voltage: 13.63 V Battery Current: 8.00 mA
Solar Panel Voltage: 19.93 V Solar Panel Current: -54.00 mA
Wireless ID:10
Battery Load Voltage: 13.63 V Battery Load Voltage: 13.63 V USB PowerCentral ON USBPowerCentral Status:1 INA219 Config: 0x399F USB PowerCentral Present USBPowerCentral Bus Voltage: 5.15 V Shunt Voltage: 12.22 mV Load Voltage: 5.16 V Current: 91.30 mA Power: 446.00 mW
Device ID ID=0x1050 HDC1080 Present T=33.84C, RH=32.91% wakeState=6 timeBeforeSleep=5112 Awake now: timeAfterSleep=19754 SleepTime = 14642 Millis Time: 19.75 2wakeState=2 Watchdog1 Reset - Patted the Dog wakeState=2 MessageCount=0 Inside Temperature (C): 33.72 Inside Humidity (%RH): 33.90
LIPO_Battery Load Voltage: 13.61 V LIPO_Battery Current: 40.00 mA
Solar Panel Voltage: 19.88 V Solar Panel Current: -138.00 mA
USBPowerCentral Load Voltage: 5.06 V Current: 418.90 mA
------- 0 0 ------ crc = 0x9274 ----------Sending packet---------- ----------After Sending packet---------- ----------Packet Sent. Sleeping Now---------- ----------After Wait Sending packet---------- freeMemory()=499 bufferlength=63 AB 66 6A C7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E4 DF A1 40 80 DF 06 42 80 98 07 42 5F BA 59 41 00 00 20 42 33 73 D1 43 3E 0A 9F 41 00 00 0A C3 00 00 00 00 00 00 00 00 92 74 USB PowerUp Check - Wireless ID:10 Battery Load Voltage: 13.61 V Solar Current: -138.00 mA Battery Load Voltage: 13.61 V USB PowerCentral ON USBPowerCentral Status:1 timeBeforeSleep=22685 Awake now: timeAfterSleep=37328 SleepTime = 14643 Millis Time: 37.33 2wakeState=2 Watchdog1 Reset - Patted the Dog wakeState=2 MessageCount=1 Inside Temperature (C): 33.94 Inside Humidity (%RH): 33.59
LIPO_Battery Load Voltage: 13.60 V LIPO_Battery Current: 8.00 mA
Solar Panel Voltage: 19.83 V Solar Panel Current: -198.00 mA
USBPowerCentral Load Voltage: 5.10 V Current: 421.60 mA
... --- The good thing is that the info also now shows in the Weather station.
Issue (1) The odd thing is the negative Solar Panel Current. I checked the wires (the nth time) and based on the text in the pdf, IN1+ --y-- Battery (+) IN1- --y-- SolarPower BatteryIn(+) IN2+ --r-- Solar Panel (+) IN2- --r-- SolarPower SolarIn (+)
Note that some pictures in the pdf show different wiring (e.g. p7 which has the solar on IN1 and reversed)
Issue(2) When idle, it shows 5.1V output - with a 0.3A test load, it drops to 4.98V.
When connecting to a WeatherStation with a Pi4 - it dropped down to 4.8V and sometimes 4.68V with a current of 0.8-0.9A - and it would not even boot !
When connecting the WeatherStation to a power source, it is around 4.94V with 0.6-0.73A with some spikes up to 0.85A during boot.
As Battery, I use the EXP-1270, which alone should be able to handle it that load
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Oct 4, 2020 12:16:02 GMT -8
Here is the current wiring based in the pdf text: app.lucidchart.com/documents/view/378adc41-41f7-4463-8470-2ebdbc980eff/0_0#?folder_id=home&browser=iconNote that page 27 shows the INA3221 terminal IN1/IN2 reversed and in addition to that the +/- also reversed. Page 29 shows it as in the text and my current wiring - but page 29 also shows different wiring for the USB Power central. As a minor side note, why are you using the GND pin on the OFF/ON connector of the Solar Power Manager - rather than the GND1 pins? (the latter is actually in the description in the connection table w7) ... and why not using the OUT1 connector with the screws itself?
|
|
|
Post by SDL on Oct 5, 2020 17:09:28 GMT -8
No particular reason for using GND1 pins - either will work, provided you set the jumpers up correctly. OUT1 would work too. Love your diagram. Assuming your wiring meets your diagram, it should work. The negative value is wrong. What are you getting on the computer side? OK, the Pi4 will take spikes of current very high and may not boot. It exceeds the startup current It spikes higher than you are measuring. Take a look at this article: www.switchdoc.com/2019/10/raspberry-pi-3b-4b-startup-currents-examined/We have seen this too on Lead Acid systems. We are prototyping a different charger and we think we have got it solved in the laboratory. We will release the design as soon as we finish the control software. The battery voltage is quite different than the current solar controller, so we have to make adjustments. Another thing you can try is putting several (maybe up to 4) 10V 4700uF capacitors on the 5V output. That may get you enough to supply the current spikes. www.adafruit.com/product/1589BP
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Oct 5, 2020 20:37:05 GMT -8
Well, something is certainly wrong. There is currently no load at all and now (dark for a few hours), the values are via LoRa:
Battery V = 12.6560001373 Battery mA = 26.0 Solar V = 0.0960000008345 Solar mA = 0.0 Load V = 5.17587995529 Load mA = -1.29999995232 Battery Power = 0.329056003571 Solar Power = 0.0 Load Power = -0.00672864369507 Battery Charge = 63.6923129742
The values displayed on the Pi are the same as on the Mini LP debug part - so that works :-) Without any load, it should show around 98% battery charge after 2-3 hours of darkness.
Well, I learned electronics in the '70 (in software since then) - but the values do not make sense - other than that there is some short somewhere. This is the second INA3221 - could it be that the first one damaged something? How can I find the short?
|
|
|
Post by SDL on Oct 8, 2020 9:51:21 GMT -8
This looks good to me!
The value on the Load is negative what it should be. Sign in the software to fix that. All the numbers look pretty good. Your 12 V battery is driving the MiniPro, LoRa and stuff (through the controller board), so that makes sense.
Only a single LED on the USB PowerController so that makes sense too (except for the sign).
No shorts that I see.
BP
|
|
jorg
New Member
Posts: 15
Raspberry Pi: Yes
|
Post by jorg on Oct 18, 2020 22:11:00 GMT -8
Ok, came a bit closer, but can't find the reason:
(1) Got another Solar Power Manager and connected it directly to solar panel and battery. This worked fine. The battery was ~ 50% charged in the morning.
(2) When connecting the other bits in the SolarMax and to the weather station, the same situation as described above: output voltage dropped well below 5v with > 1A load. The weather station would not boot.
Then I removed the USB Power Central - and it seems to work. The power did not drop below 5V with peaks ~1A during boot. As that then worked for a while, I tried backing up the SD card which resulted in up to 1.4A draw while above 5V, which worked for ~5 minutes, but eventually, the Weather station crashed (and saw the voltage drop below 5V). After that, I could not get it to work (and it got dark).
According to the Solar Power Management spec, the limit on the USB ports is 2.5A each, so a draw of ~1.4A with 20V on the Solar panel should not be an issue.
Questions: a) is it correct that when the voltage drops just below 5V, the RPi4 "has issues"? b) with the USB Power Central, the power immediately dropped below 5V when connecting the WeatherStation. what drop is expected? c) Is it expected that when the Solar Power Management is charging, that the voltage on the solar port is about 12.5V but when the battery is fully charged that the voltage on the port goes up (e.g. ~20V) d) Is it expected that when there is "too much" power draw on the 5V USB and the Solar is insufficient, the Power Management draws from the Battery? e) I have a 100W panel and if not full sun, it shows ~20V - isn't that insufficient for a ~1.5A draw on the USB?
|
|
|
Post by SDL on Oct 21, 2020 13:18:53 GMT -8
Jorg, First of all, SolarMAX Lead is right on the edge of supplying enough current to startup a Raspberry Pi 4. Here's an article about startup and what you might be able to do about it with. www.switchdoc.com/2019/10/raspberry-pi-3b-4b-startup-currents-examined/The USB PowerCentral unit does drop some voltage and it makes a marginal situation even more marginal. We replaced it with a physical relay in our modified unit for testing with a Pi4. I agree with on the spec issue. It's on our list to take a look at. I'm wondering if a lot of the data I was seeing from the Solar Manager was due to the USB Power Central board. 1) What did you use? 2) That is consistent with the RPi4 issues. a) Yes, the Pi4 will have problems with less than 5V. The spec says 4.75V is the minimum. But the startup currents could bring it below 4.75V and you might miss it. b) We aren't sure. Depends on the current of course. If you plug a PiZero in it, it will work fine. c) Yes, that makes perfect sense the the Solar Power voltage goes up to 20V when charging is done. d) Yes. That is the way it works. But, you still are converting from 12-5V and I think that is where the issue is in combination with the USB PowerCentral Unit. e) Should be fine. The problem is in the 5V current and voltage spike during boot up supply I believe. Adding Capacitors to the 5V may help. See the above article. BP
|
|