Jun 18

Temporary Weather Station at the beach thru June 26, 2017

I’ve temporarily set up one of the IoT Kits weather stations in Bethany Beach, Delaware while here on vacation for the next week and a half. Follow it at:
and
73 Karl W4KRL

Permanent link to this article: http://w4krl.com/temporary-weather-station-at-the-beach-thru-june-26-2017/

Jun 18

Important Weather Kit Update 16 June 2017

IMPORTANT NOTE FOR WEATHER STATION BUILDERS
Some builders have noted that the markings on the XH 2-pin connector leads do not conform to the instructions.  It appears that every pair has a different set of markings. Getting the polarity of the connectors wrong, particularly for the LiPo cell connector, can damage the TP4056 charger and D1 Mini microcontroller.
It is important to note the markings on the leads and identify the positive and negative leads when the connectors are mated. It is best to write down the markings and refer to your notes when soldering the leads to the solar panel and LiPo cell. You may wish to take an extra step and use a DMM to confirm that the positive and negative connections are correct before mating the connectors.
The latest assembly manual (Version 2.2 16 June 2017) has revised instructions for the cell and panel connectors:

Permanent link to this article: http://w4krl.com/important-weather-kit-update-16-june-2017/

May 21

Power supply measurements

Most electronic projects operate on low voltage direct current. This is often provided by a USB connection or a battery. There are several possibilities to power a project from the 120 Vac power line. A common way is to use a wall adapter (wall wart) and feed low voltage direct current to your project through a power connector. A good feature of this approach is that the project enclosure is smaller because it does not need to house a power supply.

If you have a project that controls line power, like a Wi-Fi controlled receptacle, it is more convenient to incorporate the power supply in the project enclosure so that you do not need to connect to both the power line and a wall adapter. The solution is to include the guts of a wall adapter into the project enclosure.

Rather than taking apart a wall adapter, you can buy a phone charger kit from eBay vendors. Try searching for “diy training phone charger kit”.

According to the eBay listings, the specification is 5 Vdc at 350 mA to 500 mA with an input of 100-220 V 50//60Hz 0.3 A. This should be adequate for many Arduino and ESP8266 projects. Sadly, the supply can barely meet 170 mA.

Next step is to modify the circuit to see if the output can be raised. Short out R7 and play around with R2, R3, and C2.

Permanent link to this article: http://w4krl.com/power-supply-measurements/

Apr 16

ThingSpeak Addins

Here is a selection of MATLAB Visualizations

ThingSpeak Addins

 

Permanent link to this article: http://w4krl.com/thingspeak-addins/

Apr 04

HacDC/W3HAC Meeting Presentation Announcement – April 12, 2017 at 7:30 pm

Some of our members recently purchased a solar powered, Arduino programmable, weather station kit from Karl, W4KRL at the Winterfest in Annandale, VA. Due to the popularity of this kit, I invited Karl to come to our next club meeting to give a presentation all about its development, how the station works, etc. Karl has graciously accepted the invitation.

You may be surprised to learn that this is a new venture for Karl. For most of his career, as an electrical engineer, he designed large power electronics converters for rapid transit car propulsion systems. The Arduino project is the crossover between these two ventures. Planned areas of discussion include a presentation that focuses on the origin of the development of the kit, the challenge of designing a circuit board, and some of the unique technical issues involved with the design of this project.

Because of the content of this meeting, this should be of interest to not just the members of the HacDC Amateur Radio Club, but also to the general “Hackerspace”, “builder” and “maker” communities as well. All are invited and encouraged to attend.

As is the case with all of our events, there is no cost to attend. We look forward to seeing you at the meeting.

Posted on by jeff dahn

http://www.w3hac.org/

Permanent link to this article: http://w4krl.com/hacdcw3hac-meeting-presentation-announcement-april-12-2017-at-730-pm/

Apr 02

Di Mini (ESP8266) Wi-Fi Status Codes

The ESP8266 using the Arduino Core reports Wi-Fi status with the WiFi.status() function. The D1M-WX1 Weather Station attempts to connect to Wi-Fi every 250 milliseconds until the “Connect” status is found. If this does not happen after 15 attempts, it prints the status to the Serial Monitor.

Normally, the LED on the ESP8266 flashes five or six times until the connection is made. The LED will be dark during the six or seven seconds it takes to post the weather data on the Internet.  It will flash three times before the station goes to sleep for 10 minutes. The code is in the logonToRouter() function of the weather station sketches.

If a Wi-Fi connection can not be made, the LED will flash 16 times and the exit code will appear on the Serial Monitor. The status codes are:

0 = Idle Status – WiFi.begin() is called and remains active until the number of attempts expires (resulting in CONNECT_FAILED) or a connection is established (resulting in CONNECTED)

1 = No SSID Available – Unit is too far from the Wi-Fi access point, the SSID and/or password is incorrect, or the SSID is for a 5GHz-band access point.

2 = Scan Completed – Scanning for available networks is completed.

3 = Connected – Success.

4 = Connection Failed – The opposite of success.

5 = Connection Lost

6 = Disconnected

255 = No Shield – Used for compatibility with the Arduino WiFi Shield – not relevant to the ESP8266.

Reference: https://www.arduino.cc/en/Reference/WiFiStatus

Permanent link to this article: http://w4krl.com/di-mini-esp8266-wi-fi-status-codes/

Mar 31

Use 2.4GHz Wi-Fi for weather station

The weather station kit and other Wi-Fi-based projects use the ESP8266 system on a chip. This chip supports 2.4GHz Wi-Fi but not 5GHz. If your Wi-Fi works on both bands you probably have two SSIDs. The 5GHz band SSID often ends in 5G like this – “BlackCat-5G”. When you set up the config.h file for the D1M-WX1 weather station make sure you choose the SSID for the 2.4GHz band.

Permanent link to this article: http://w4krl.com/use-2-4ghz-wi-fi-for-weather-station/

Mar 21

Suggested list of tools

Our first kit, the D1M-WX1 Solar Powered Weather Station, is very easy to build because it uses only “through hole” components. Although the breakout or daughter boards mounted to the printed circuit board do contain surface mount devices (SMDs), they are all pre-soldered. Only a few basic electronic shop tools are needed to assemble the kit. You probably have all the suggested tools if you have built kits before. For the new kit builder, this list is a good place to start acquiring the tools you will be using time and again when you build more kits. See the list at Tools Needed on the D1M-WX1 projects page.

Permanent link to this article: http://w4krl.com/suggested-list-of-tools/

Dec 11

Sleep Mode for the Wemos D1 Mini

The key to using solar power in an Internet of Things project is to put the microcontroller unit into sleep modeafter the sensors are read and the data posted to your IoT server. The NodeMCU and the Wemos D1 WiFi, a larger profile that mimics the Arduino UNO form, reliably woke from deep sleep. So far, the Adafruit HUZZAH fails to wake after 20 or 30 sleep cycles. I’m still working on the HUZZAH but the letter carrier just brought a package with three Wemos D1 Mini ESP8266 devkits and an OLED display shield.

Would the D1 Mini also work well with deep sleep? Answering that question had to wait until I checked out the OLED display.

The D1 Mini devkits are supplied with both male and female headers. You must install the female headers if you want to use the OLED shield as a plug-in unit. Make sure you install the headers on the correct side so that the shields will stack with correct connections.

Both Adafruit and Sparkfun have Arduino libraries for this display. The Sparkfun library loaded easily and the examples brought up bright, clear images.

The next step was to make a DIY shield to mount BMP180 and HT21D sensors. The BMP180 measures atmospheric pressure and temperature. The HTU21D measures temperature and humidity. [I will post some photos in a week.] It makes a nice compact little cube with the sensor shield stacked between the D1 Mini and the OLED.

Having proven the OLED display, I removed it and set about to put the D1 Mini and sensor shield into deep sleep. There were some problems doing this. When the ESP8266 wakes up, it needs to be reset to restart execution of the firmware. The ESP8266 provides a signal on pin D0 to do this so D0 must be connected to the Reset pin. However, this connection sometimes interferes with putting the ESP8288 into programming mode and must be opened to reprogram the chip.

I also ran into some problems when power was removed while the chip was in deep sleep.

After getting the chip to sleep and wake up I ran some current tests. The D1 Mini drew an average of 80mA when awake and 2.4mA when asleep. The D1 Mini has a small red LED that lights when the board is powered. I pulled the LED off the board with a pair of pliers. That dropped the sleep current down to 70µA.  This makes the D1 Mini look like a very good choice for solar powered IoT projects.

 

 

 

 

 

Permanent link to this article: http://w4krl.com/sleep-mode-for-the-wemos-d1-mini/

Dec 06

External sensors for weather station

Recently the local Institute of Electrical and Electronic Engineers (IEEE) held two “hands on” sessions to build an Internet of Things (IoT) weather station. We built it on a breadboard so that the attendees would not have to solder wires. Several of the participants have kept their stations on-line and two have placed the unit outdoors.

Finding a suitable outdoor enclosure for the sensors is difficult. There are several available for relatively large sensors with costs from $30 to hundreds. Fortunately, a scrounging mission to Walmart turned up a nice little box for 88¢!

The box is 88 x 60 x 50mm (3.25 x 2.38 x 2.00-in). The box is transparent and has a lid the fits over the sides of the box. There is some play between the lid and the box so it allows some air movement. This can be “enhanced” by drilling four 6mm (1/4-inch) holes in the bottom of the box.

The box neatly holds a BME280 barometric pressure/temperature/humidity sensor and a BH1750 light intensity sensor. A piece of stripboard mounts the sensor breakout boards. Since the sensors are I2C devices they need four wires (two I2C and 2 power) to connect to the “control unit”. I cut the ends off a flat USB cable from the dollar store. It requires a lot of careful patience to solder the very small wires to the stripboard. I am looking for a better method.

My box is mounted to a second-floor window frame with clear packing tape. The window is above a small shingled roof. This is not an ideal location because solar heating of the roof probably affects the temperature reading. In practice, the temperature accurately tracks the local WeatherBug station reading.

The unit has been outside since 10 November 2016. It has been through several rain storms with no problems.

Permanent link to this article: http://w4krl.com/external-sensors-for-weather-station/

Older posts «