ddodge
Junior Member
Posts: 75
|
Post by ddodge on Mar 11, 2019 17:09:21 GMT -8
NOVEMBER 2017 I decided to go ahead and make a bunch of blog type entries talking about my own experiences while working on this project. I’ve been absorbing the writings of Trigger, Lannie, Ibendlin and others so I figured it was my turn to “share”. My overall goal was to have a self contained wireless & solar powered weather station for my home publishing data out to Weather Underground. I actually started this adventure in 2017 after my neighbor asked if I wanted to work together with him building a weather station from scratch. He ended up changing direction and doing an ESP8266 based wireless security system for his house. I kept focused on a weather station. I purchased an Arduino starter kit on Amazon based on an Uno R3 board and went thru all the examples of all the sensors and such that came with the kit. Now I was thinking I was ready to jump into the big project…. During the winter of 2017/2018 I purchased a weather rack, an AM2315, a weather board from Switchdoc along with a few other sensors. I was using the SW library from Switchdoc for Aduino that was in with the WeatherPi project. It was painful. I didn’t understand how the libraries worked. Didn’t understand I2C or Grove. Then I picked up an external WiFi card and never did get it interfaced with the Uno board. Spring approached and I put away the weather station to go build an outdoor BBQ island.
DECEMBER 2018 During the summer and fall of 2018, I studied up on the Arduino IDE and other aspects of Arduino architecture and brought the project out of storage. This time I picked up an ESP8266 board: WeMos D1. I could talk to the board but could not figure out I2C so I picked up an I2C shield to attach to the WeMos board. However, I could not get the system to recognize anything attached to the I2C shield. Moving the I2C shield over to the original Uno R3 board – it worked and was able to “see” all the I2C devices attached to it. Doing some more digging I found that my WeMos D1 board was not compatible with the I2C shield. Lesson learned: RESEARCH before spending cash! I then discovered the OurWeather kit from Switchdoc and tossed some more cash over to them and bought one.
JANUARY 2019 The OurWeather board from SwitchDoc worked like a champ! Just remember to ALSO purchase the FTDI board and cable so you can connect it up to your computer for serial interface and to program it. (more $$ and time spent….) I was pleasantly surprised to see that the OurWeather board came with V35 of the SW preloaded so it started running immediately. Setup was a snap. Lights started flashing, words rolled up screens, data was being collected. Hurray! At this point I saw light at the end of some tunnel and gave SwitchDoc some more cash.
At this point, I have: - The OurWeather ESP8266 board - Weather Rack - 80422 - AM2315 temp/humidity sensor - The OurWeather Solar Extension kit – INA3221 - Grove 128x62 I2C OLED board - A SwitchDoc Labs Digital Extender Board - A bucket of Grove cables
Since I am a retired SW engineer, I decided I needed to do some planning. How do you know you have reached your destination unless you have a plan to get there…..
- How to add and test components to the “system” - How to validate that the data I was receiving was indeed accurate - How to know if any addresses were in conflict - How to know if the solar panels could provide enough juice to keep the station running all day - How to construct the components box, solar panel mount, mast, etc.
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Mar 11, 2019 17:10:00 GMT -8
FEBRUARY 2019 Plans being made, I decided to toss some more cash over to SwitchDoc and Amazon and purchase some more toys. I then added:
- 4-channel I2C MUX to resolve I2C addressing conflicts - A Thunderboard AS3935 - An Air Quality Sensor & A2D converter MP503 / ADS1115 - A SunLite UV/IR Light sensor Si1145 - A WatchDog board
By this time I had (I think..) started to understand how libraries worked within the Arduino IDE. I totally wiped out the IDE installation on my Windows 10 laptop and reinstalled from scratch. I then downloaded the OurWeather V35 software library and installed it into the ..\Adruino directory. Since the SW was already pre-loaded on the OurWeather card I was pretty nervous about wiping that out with a fresh binary. So I compiled the V35 OurWeather SW as it was. It did not compile clean. There were some errors. I had to install the BLYNK library. However – it did compile and it did upload. Lights flashed, numbers rolled up the screen.
I’m going to start writing about the details of setting up and testing each component of the weather station. Stay tuned…….
|
|
|
Post by SDL on Mar 12, 2019 6:47:55 GMT -8
Sounds like great progress. You are doing in the best way to learn what is going on with all the components and software.
BP
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Mar 19, 2019 10:39:36 GMT -8
|
|
|
Post by SDL on Mar 20, 2019 14:07:40 GMT -8
Dan,
The I2C addresses of the BMP280 and the SunAirPlus board are not the same. Something else is going on.
You have the Mux wired up wrong. The yellow wire needs to go to SCL not SDA and white to SDA not SCL.
BP
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Mar 20, 2019 14:28:47 GMT -8
Thanks for feedback. I had taken out the individual wires and replaced with standard Grove at both ends. Nada..... but when I hook up SinAir Plus to I2C bus, barametric pressure readings stop. Temp grom the BMP280 reads like like -125
|
|
|
Post by SDL on Mar 23, 2019 6:50:58 GMT -8
Dan,
Post another picture and I'll look again. I'm now wondering if you have a bad SunAirPlus board.
BP
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Apr 1, 2019 16:25:26 GMT -8
SDL: Per your request, I have sent photos of SunAirPlus board to: customerservice@switchdoc.zendesk.com Don’t know if I did everything correctly or not but, here is an explanation of what has transpired:
1. Solar panels AND an external power supply were able to charge the battery. (Adafruit 6600 maH Lithum Ion battery). Everything seemed to be working except the little power control board that came with the SunAirPlus. I got the battery up to 99.5% full (per Blynk).
2. It took a very long time for the SunAirPlus to trigger the power control board (at 3.7v??) to turn on the OurWeather board. I would wait most of the day for that to happen. So, I removed the power control board. As soon as the battery had enough charge, SunAirPlus would send power to OurWeather and the system would run. Currently, that little power control board is NOT part of the system
3. I was going on vacation for a couple of weeks and wanted to put the weather station outside as an initial test of all systems. I got it all put together and temporarily mounted it outside. Weather station was working and running off the battery AND solar panels. I did NOT have the SunAirPlus hooked up to an I2C bus for monitoring since it had conflict with the BMP280 built into the OurWeather board. IE: Whenever I hooked up the SunAirPlus to I2C, the BMP280 barometric pressure stopped reporting and the internal temp returned weird numbers.
4. After about 3 days, which unfortunately were cloudy, the weather station stopped reporting. I had a neighbor put the OurWeather reset button but got no results. Again – I did not know the status of my power situation.
5. Once I got home, I connected an external power supply to OurWeather AND connected the SunAirPlus to I2C. Again, the BMP280 stopped reporting. What I noticed was that, per Blynk screens, my battery was at 0%. Battery voltage was reporting at about 2.4v with a battery current of 0. I left the system like this overnight – no change.
6. Meanwhile, I ordered a new battery from Adafruit. New battery arrived today. I swapped out the battery and noticed, per Blynk screens, that the battery was at 87% with battery voltage at 4.1v and current at 57.6mA. I “believe” this means that my battery is dead because it got too low. (?). I have no idea if it can be revived or not. I am going to go back and read the SunAirPlus datasheet but I was under the understanding that the SunAirPlus board would protect the battery from being fully discharged. Am I wrong?
7. I am going to send some Blynk screen shots of the solar readings for your pleasure as well.
So, do we think the SunAirPlus is bad?
Should I put the little power control board back in?
Can I get my battery charged back up again?
Thanks for your help and support
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Apr 1, 2019 16:32:54 GMT -8
Dan, The I2C addresses of the BMP280 and the SunAirPlus board are not the same. Something else is going on. You have the Mux wired up wrong. The yellow wire needs to go to SCL not SDA and white to SDA not SCL. BPSDL: I did as requested - Connected a Grove cable from my I2C bus to the computer side of the MUX using female pin connectors. Yellow is on SCL, white is on SDA. JP1 now has BLACK (GND), RED (VCC), WHITE(SDA), YELLOW(SCL). No Grove connector in J1 of the MUX. SunAirPlus Grove cable moved to J5 on the MUX and my UV Light board is on J2 (Grove). After hooking it up I reset OurWeather. There is a green LED lit on the board. Neither SunAirPlus or the Sunlight boards were found. I am going back to double check my code...... On the positive side, my BMP280 is working again....
|
|
|
Post by SDL on Apr 2, 2019 6:01:12 GMT -8
Dan,
I'm getting confused, which shouldn't surprise you. IF SunAirPlus is not reporting how is Blynk getting the solar data? That is where it comes from.
As far as the BMP280 problem, try removing the Red Power wire from your connection from OurWeather to SunAirPlus and see if that makes a difference.
Your battery sounds just fine at 4.1V.
OK, to help more, I need to see a schematic showing how and what you have hooked up. Since this is isn't a standard system, iI can't tell what is going on.
The USB PowerControl board is designed to keep the system from experiencing a brown out and continuously rebooting. There is hysteresis built into the board such that the battery has to recover substantially before turning back on.
BP
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Apr 2, 2019 7:56:56 GMT -8
The metrics for SunAirPlus were obtains prior to me moving it's Grove connection from the I2C bus to the MUX board. I will try removing the Red Power wire. It will be tomorrow - it's raining right now... I will generate a schematic for you to help with wiring. Also, I am considering putting the USB PowerControlBoard back in as well.
|
|
|
Post by SDL on Apr 2, 2019 12:03:06 GMT -8
OK. That was confusing me. Looking forward to the wiring so I can help you out!
BP
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Apr 5, 2019 8:53:00 GMT -8
Sent you diagrams via email.
ACTION: Removed red-wire - Grove connection from SunAirPlus to I2C bus RESULT: Barometric pressure from BMP280 had been very erratic. Seemed to settle down. Internal temp from BMP280 still way off (Values like -127 or +320).
ACTION: Totally disconnected SunAirPlus from I2C bus & Rebooted OurWeather RESULT: Barometric pressure seems more stable. Internal temp changed to a realistic value. Outdoor Temperature: 62.96 F Outdoor Humidity: 97.1 % Indoor Temperature: 70.16 F Barometric Pressure: 22.82 in Current Wind Speed : 1.81 mph Current Wind Gust: 4.51 mph Current Wind Direction: 45 Degrees Rain Total: 0.02 in AQS Quality: Fresh Air AQS Quan Value: 318
|
|
|
Post by SDL on Apr 5, 2019 9:06:00 GMT -8
I ***would guess** that there is an I2C pullup loading problem. Can you move the AM2315 to a different I2C bus segment?
BP
|
|
ddodge
Junior Member
Posts: 75
|
Post by ddodge on Apr 6, 2019 6:23:07 GMT -8
Latest actions: 1. Could not move AM2315 - not enough cable so I moved other devices to other segments 2. Plugged Si1145 into I2C bus (moved from mux) & rebooted. Result was that the BMP280 values disappeared. 3. Moved Si1145 back to the mux & rebooted, BMP280 values came back 4. Plugged SunAirPlus back into I2C bus and rebooted. I can see all the SunAirPlus values PLUS BMP280 values
So I am still trying to figure out why the 4-channel mux is not working. Right now, I can only think that it is in the SW?
---> Results with SunAirPlus connected to I2C bus. Si1145 connected to MUX but MUX still not working: Visible Light 0 Infra Red Light 0 UV Light 0 OurWeatherTime "2019-04-06 10:14:16" FullDataString "16.90,99.90,21.46,102409.00,36.92,2.12,5.37,0.00,0.28,1.99,2.14,4.31,5.37,0.00,0.00,0,2019-04-06 10:14:16,DodgeWS,505,4,3.95,-96.00,4.67,97.20,4.98,1.60,0.00,0.00,0.00,0.00,0.00,0.00,V:1,WXLMB ,0,,,0,,,0" FirmwareVersion "035" IndoorTemperature 21.46 BarometricPressure 102409 Altitude 36.92 OutdoorTemperature 16.9 OutdoorHumidity 99.9 CurrentWindSpeed 2.12 CurrentWindGust 5.37 CurrentWindDirection 0 EnglishOrMetric 0 RainTotal 0.28 WindSpeedMin 1.99 WindSpeedMax 2.14 WindGustMin 4.31 WindGustMax 5.37 WindDirectionMin 0 WindDirectionMax 0 AirQualitySensor 505 ThunderBoardLast ",,0,,,0" ThunderBoardParams "2,1,7,0,3,3" ESP8266HeapSize 29168 id "1" name "OurWeather" hardware "esp8266" connected true
{"variables": {"Visible Light": 0.00, "Infra Red Light": 0.00, "UV Light": 0.00, "OurWeatherTime": "2019-04-06 10:14:16", "FullDataString": "16.90,99.90,21.46,102409.00,36.92,2.12,5.37,0.00,0.28,1.99,2.14,4.31,5.37,0.00,0.00,0,2019-04-06 10:14:16,DodgeWS,505,4,3.95,-96.00,4.67,97.20,4.98,1.60,0.00,0.00,0.00,0.00,0.00,0.00,V:1,WXLMB ,0,,,0,,,0", "FirmwareVersion": "035", "IndoorTemperature": 21.46, "BarometricPressure": 102409.00, "Altitude": 36.92, "OutdoorTemperature": 16.90, "OutdoorHumidity": 99.90, "CurrentWindSpeed": 2.12, "CurrentWindGust": 5.37, "CurrentWindDirection": 0.00, "EnglishOrMetric": 0, "RainTotal": 0.28, "WindSpeedMin": 1.99, "WindSpeedMax": 2.14, "WindGustMin": 4.31, "WindGustMax": 5.37, "WindDirectionMin": 0.00, "WindDirectionMax": 0.00, "AirQualitySensor": 505, "ThunderBoardLast": ",,0,,,0", "ThunderBoardParams": "2,1,7,0,3,3", "ESP8266HeapSize": 29168}, "id": "1", "name": "OurWeather", "hardware": "esp8266", "connected": true}
|
|