Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Remote BLE Temperature and humidity measurement with ESP32 and Cypress Solar Beacons

Status
Not open for further replies.

DrG

Active Member
Warning up front - this is a basic show-and-tell post...and long at that.

119063


A couple of years ago, I investigated some . These disks transmit temperature and humidity measurements in the beacon advertisement. While about the size of a US quarter, they include a solar cell and a storage capacitor and can also be attached to a coin cell battery.

I built an to use them which utilized an HM-10/11 BLE board and a 16 X 4 display . That project worked fine, but I had it in my head to make it better. While the HM-10/11 has its place, I find them tedious to say the least. I was anxious to use better BLE firmware that was not anchored to that serial protocol mess.

At the time, off-the-shelf boards for this sort of thing were not common or inexpensive. Remember, to use the beacons as I am describing, you need to have a central BLE device capability. The Arduino 101, after they advanced the firmware, fit the bill nicely, but around this time, it was dumped by Intel.

Since then, I have been impressed by the Linkit 7697, but I wanted a reason to get into BLE with the ESP32. Consequently, I used an inexpensive DOIT Esp32 DevKit v1 for the current project.

I used a .47 uf capacitor from EN to GND. I read about this somewhere online and took the recommendation and it makes uploading code smoother. There is a .1 uf cap across 5V and GND. Two pullup resistors for the I2C (see below) and LCD display - that is the circuit.

I used a standard/generic 20 X 4 LCD display with an I2C board (PCF8574) slapped on – these are all over the place. I used the standard hardware I2C pins for the ESP32 - GPIO 22 (SCL) and GPIO 21 (SDA). There is quite a lot of discussion about whether the ESP32 has 5V tolerant pins. I did not care to use any level converters, so I tried two things. First, I used 4.7K pull ups via 3.3V, and the display worked just fine. I also used those same pullups via 5V and the display also worked fine. Here is a good discussion about the matter.

The display uses 5V and I used 3.3V pull ups on the I2C lines and it works and it has been tested extensively. I am not completely comfortable with this, but it may simply be that the PCF8574 works with 3.3v/5v signals. Since I built this as a personal project, I am not overly concerned.

119064


The program was written while the circuit was on a breadboard. Once I had the code worked out, I started to think about an enclosure. This is a sensitive area for me as I am woefully deficient and making such items. I would like to get better, but I am not going to go get a 3D printer anytime soon, so I am trying to develop a few basic skills with a few basic tools (I like my Dremel).

I looked around and found **broken link removed** specifically for a 4 X 20 LCD and an Arduino (UNO or Mega) . It looked good, so I bought one. This is not a trivial assembly – it is almost entirely tongue and groove or friction fit or slots or whatever you call it….you need to read the directions carefully and they are extensive (see here ). Nevertheless, my hat is off to this fellow, he designed a nice enclosure.

I then moved the ESP32 off of the breadboard and onto a circuit board cut to the dimensions of a Mega and with those same mounting holes.

119065


Everything fit and everything works and I am happy.

119066


I have to mount batteries on two solar beacons and I have my eye on something like a Stevenson cage for outdoor monitoring. These beacons are not for outdoor use, but, I have used them outdoors, in enclosures – with one fatality [see that 100% humidity on the screen? I drenched that sensor long ago and it is not coming back – and, yes, I know about baking].

If anyone is interested, I can post the code (Arduino-ESP32-C).

Now, on to the next thing
 
Nice work, well done.

JimB
 
A small update...

I very much wanted to use one of these outdoors. This is challenging to me in a couple of ways:

If the sensor gets wet, it gets trashed (I proved that ;)).

If the sensor is in bright sunlight, the solar cell will charge the large cap well enough to keep transmitting throughout the night, but during the day you are reading the temp in bright sunlight, which is not what I want to measure.

Further, if the sensor is blocked from a sufficient amount of airflow, humidity values will remain high for too long (after a rain for example) resulting in an inaccurate measurement during that time and also facilitating saturation of the sensor.

Real weather people use something like a Stevenson screen which is designed for this kind of situation.


I ended up using something commercially available, but relatively cheap ($18US on Amazon):


With the sensor sitting inside, there is still enough bright light on a sunny day for transmissions, but not enough to charge the big cap so it stops transmitting at night.

The solution was to attach the sensor to a CR2032 battery (which they are designed to accommodate). Subsequently, when the big cap is not charged sufficiently, it goes to the battery. I mounted the sensor and battery using a little 'L' bracket and some perf board as a platform.
119363


Now I get outside readings throughout the day and night.
119364


It has made it through several serious rainstorms without difficulty. I'm ot sure how long the battery will last, but it has already been a couple of weeks. All-in-all, a good deal and the project is finished- a phrase that I do not often write ;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top