Tiny garden sensors/board - New to IoT

Hi all,

I am very very very new to the IoT. Let alone experienced tinkering with electronics. So will need a lot of time, thinking and making mistakes. In other words, bear with me. I would prefer a build with a solid user base, but also proved and tested. Arduino seems to fit that bill.

I would like to make a portable and very small board with sensors for humidity, gas, temperature and pressure (cf. weight). It would be battery powered, and all should fit in a cylinder of length 65mm/2,5'' (or slightly larger) and diameter less then 25mm/1''. Goal is to connect with an android app and iPhone over BLE (or other protocols, suggestions are welcome).
Will be used in a small glass house to trigger events (aka open a window).

I assume (and this is where I might be mistaken) that for it to work I need a board with BLE built in, sensors and an app reading in the data from the BLE (do smartphone connect with BLE?). But you see them come and go. If so, would there be a 'safe' bet on what brand to choose?

Would it also be right to assume that there are some boards that would be able to send over the data recorded by these sensors? I don't need it to do anything else then sending data, for I would prefer the app to simply read in the temp, humidity... and then act upon these. Or would there even be sensors which can send over data 'directly' to the smartphone? Btw, it has to be wireless.

In other words:

  1. are there any boards I should take a look at?
  2. can such a board send data over to a smartphone?

Or to conclude: would be very grateful if one could point me to a direction so I can purchase the sensors and boards, so I can start working on the project (which will take ages).

Cheers.

Ultimately, you're going to need a small arduino (nano, teensy or the like) and if you insist on BLE, a bluetooth modem. I'd suggest that to start with though, you need to gain some experience with arduino, which usually means getting an uno and a starter kit. Add a DS18B20, a DHT11 and you can start sensing your environment. You'll be better placed to build your final project later on.

Perhaps this link will give you some ideas.

Ratphy:
I would like to make a portable and very small board with sensors for humidity, gas, temperature and pressure (cf. weight). It would be battery powered, and all should fit in a cylinder of length 65mm/2,5’’ (or slightly larger) and diameter less then 25mm/1’’.

That’s going to be tough - I hope you’re anything but new to soldering and building using wire sculptures. A PCB is going to be hard,

Processor: get an ESP8266 (as ESP-12 module; 18x24 mm). Then you have your microprocessor part settled. It’s got WiFi built in so there you got your Android connectivity. Now the problem: the ESP-12 breakout board doesn’t fit in your container and the module itself doesn’t fit on protoboard either (2 mm pitch). However as you need just a few pins, you can get away with an ESP-01 module. It’s 14.3x24.8 mm so fits in your tube and is much easier for soldering wires to.

DHT11: not a good idea. They’re not very accurate, limited range, and rather big at 12x15.5x5.5 mm, without connecting wires. Get a BME280 instead, even on breakout board they are much smaller. Temperature, humidity and atmospheric pressure all in one tiny package (the sensor itself is 3x3 mm).

Opening window: here is a problem. You need serious power to open the window, so you need some control electronics. No way to do this wireless without yet another microprocessor so this you’ll have to do wired. Now you’re wiring anyway, why bother with battery power? Just add power to that wiring. You need just three cores: power, ground and a signal wire. The power switch can be at the window you want to open and close.

Thanks all for the reply. Much appreciated.

So making it small is probably a hard problem. So maybe we would make it work with a larger design, and get some practice in it. If it works, we could start scaling down as much as possible.

So I would best off starting with a starter kit such as the 'Starter Pack for Arduino'.

And with the starter pack + sensors, I would be able (aka have all the required hardware) to test whether I can make it work, before moving to the real final 'product'.

Suppose I get familiar with it all, I could start moving into the ESP8266 chip. Thanks all for the reply.

Why not just buy what you actually need?

Nodemcu or WEMOS board for the esp8266 processor, sensors, breadboard, wiring. You can also find great resistor and capacitor kits for cheap out there - then at least you have some different values to work with.

Build it on your breadboard, make it work. Solder it onto a protoboard, install in your warehouse, make that work. After that it's time to miniaturise and design your custom PCB.

Thanks for the reply.

I think that would make sense. I might want to ask some raspberry pi guys. For it would be handy if I could pull in the data directly in a database/website. Process it to my liking and go from there.

It seems that getting the sensors connected to an arduino would require about the same effort on a raspberry.

Again, my thoughts based on little to none expertise on the subject.

sunilkumarsk:
How to find out the links?

Sorry, did not quite understand your question

An ESP-01 (ESP8266) programmed directly using the Arduino IDE and with a BME280 will give you temperature, humidity & pressure in a small package (not including battery) but only connects using Wi-Fi and not Bluetooth. You could setup a Raspberry Pi as an MQTT broker to capture/record readings or publish them to an online system like Cayenne.

The ESP can also connect directly to a MySQL database server using the database connector library.

Hi,

So making it small is probably a hard problem. So maybe we would make it work with a larger design, and get some practice in it. If it works, we could start scaling down as much as possible.

Why do you want to make it that small?

A lot of people design their projects and think being as small as possible is good, THEN something goes wrong and they find out that making it small has made it virtually impossible to fix or troubleshoot.

As you setup your component and senors keep in mind you may have to replace/fix some of it at sometime and it needs to be SERVICEABLE.

Thanks.. Tom.. :slight_smile:
(I fix electronic equipment and it can be so frustrating when you have to disassemble 75% of a bit of gear, then completely reassemble it just to see if you have fixed it)

PaulRB:
Perhaps this link will give you some ideas.

great project. any chance you will add an mini OLED ?

I vote for the ESP8266 as well.
I made a few of these weather monitors. About 50mmx50mm.
You could drop the ATTiny85...I put it on there so it could deal with the anemometer and a few other bits and pieces.
That would save a lot of space.

I have it on a pack of 4AAs with no solar panel (but that could be easily added) and it lasts a good few months with 4 readings an hour. Uploads to an online server and puts data in a mySQL database.

Or…
Microchip have this in production at the moment:
Microchip RN4020

A BLE v4 IC module with I2C and a UART (serial) port.

dave-in-nj:
great project. any chance you will add an mini OLED ?

No, recharging the battery every 3 weeks is more often than I would prefer. Adding an oled would make matters worse. If there were some small & inexpensive e-paper or memory-lcd, that could be an option.

Johnny010:
I vote for the ESP8266 as well.

Just looking at that PCB: what are you doing with GPIO9 & 10? Those are linked to the internal flash.

wvmarle:
Just looking at that PCB: what are you doing with GPIO9 & 10? Those are linked to the internal flash.

Ah yeah. forgot to mention. I didn't know that when I made the module so only one of the pins is usable...

Before making a PCB I'll always first build a complete prototype soldered on protoboard (with the exact components/values as the final should be - albeit generally larger packages - and often sensors on breakout boards instead of direct on the PCB). Then at least you know all connections work as intended. Unfortunately that still allows for issues when you get back the assembled PCB...

Surprised that you can even put one of those GPIO to work, as I thought all those are unusable, as they are being used internally. It may work - but be very careful with what you're doing with those pins.

Yeah, that was the irony. Worked on the protoboard. Pin 10 basically sends a pulse to wake the ATtiny85 and then ATtiny85 sends a couple of bytes back down the line.

It wasn't till I modified the code later (to try use GPIO 9 and 10 as a 2 line TX/RX) that I ran in to issues.

Do some more research in that.

I've just been reading about those pins, they're indeed related to the internal flash. If you set it to DIO mode (Dual IO) then they should be available, if set to QIO mode (Quad IO - default) the flash uses them.

But it seems that's not the complete picture either, as many people report being able to use GPIO10 as input but not as output, and GPIO9 not at all, even in DIO mode. It also seems pulling them high during boot affects the boot process.

Quite typical for this chip: lack of documentation from the manufacturer so it's a lot of trial and error.