-1

I am a web developer and I am starting to learn about the world of IoT.

Because of the vaccines arrival to my country (Argentina) I got asked to build 80 temperature sensors to monitor them and I have some questions about it.

What would be the best way to connect all of them to the cloud?

  1. If I use for example aws iot platform, do you know how much it would cost monthly for just sending and storing temperature logs for each sensor (remember, there are 80 of them)?

  2. Is there any language/environment/protocol that works better for IoT? Because it's a constant flow of lightweight data...

  3. Is there a better way to connect them to the internet besides using esp32 modules for each?(I saw a tutorial that said it's possible to connect some more to a single esp32 module)

If you have any advice I'd love to hear it. I know how to code but when it comes to backend and specially server stuff I have a lot to learn.

SurixOne
  • 39
  • 1
  • 3
  • 1
    You could have multiple temprature beacons recording temps and reporting them to a single device (raspberry Pi) and that device could be transmitting the data to a MQTT box and recording. – Chris Catignani Jan 15 '21 at 05:04
  • What kind of temperature sensor are you using? Digital, analog, I2C, SPI? – ChristianYami Jan 15 '21 at 11:01
  • 1
    @ChristianYami I have a working code that gets me the data from the sensors, The problem is how to send them to the cloud so that the data can be accessed and used from anywhere – SurixOne Jan 16 '21 at 06:18

1 Answers1

2

Costs are directly related to the amount of data you send, process and store. You'd have to check the price lists for each cloud service you plan to use. If we assume that you'll be sending 1 temperature reading (with associated data such as timestamp, device id, ...) every 10 minutes using reasonable protocols (MQTT, JSON) then the total costs for all 80 devices would be perhaps a few dollars per month. The total database storage will accumulate over time and you'll be charged more, but honestly the amount of data under these conditions is ridiculously low.

An ESP32 is cheap, has WiFi and enough performance to send data to cloud. You can connect this micro to AWS IoT or Google Cloud IoT using the relevant libraries from either: AWS library or Google IoT library. These libraries decide the questions of language and protocol on the microcontroller side - it's C and MQTT/HTTPS (but avoid the HTTPS, MQTT is much more practial). You can use JSON for the actual temperature data message. The microcontroller development takes place with either ESP IDF (a bit lower-level C environment) or Arduino (a bit higher-level C/C++ environment). Those use FreeRTOS as the OS on micro (note that the IoT libraries work on almost anything).

A practical alternative to ESP IDF and Arduino (especially for a web dev) is Mongoose OS where you can do much of the development work in JavaScript (not all, though). It has high-level libraries for both AWS and Google IoT (which still use the same underlying MQTT/HTTPS client, I assume).

By far the easiest way to connect the ESP32 modules to Internet is to have each connect to a WiFi AP. If the single WiFi AP doesn't cover all devices, add more until they do. ESP32 does have a mesh networking library, but I would hesitate to recommend it to newbies.

Tarmo
  • 3,728
  • 1
  • 8
  • 25