I need help with a diy project

Hey guys,I’m a high school student that wants to do a diy project to measure and record the temperature (and ph if possible) of a body of water every four hours, then upload it to a cloud so I can access the results from my phone or PC. What components would I need and how would I connect them and code it, some sort of tutorial would be really helpful but any response is appreciated. I have a raspberry pi3 with the NOOBS card, but I am willing to buy a different board if its necessary. I am really new at this so sorry if it seems simple to some people, thank you

Hey,

Raspberry Pi is a bit of an overkill for this type of project.
You can use this tutorial as a reference - https://openhomeautomation.net/cloud-temperature-logger-esp8266. He used Dweet.io as a cloud service and Freeboard for the GUI, but you can also use other services.
Also, you’ll need to replace the DHT11 with the DS18B20 which has a waterproof version.
Good luck with your project.
Anat from circuito.io

1 Like

@anat beat me to it! I was waiting to get onto my laptop (usually use my smart phone) but wanted to do some research into which components to use.

The DS18B20 looks like an ideal waterproof temperature sensor. Characteristics include:

Power supply range : 3.0V to 5.5V
Operating temperature range : -55°C to +125°C (-67°F to +257°F)
Storage temperature range : -55°C to +125°C (-67°F to +257°F)
Accuracy over the range of -10°C to +85°C : ±0.5°C

These are the sort of things you’ll want to research before you buy a sensor. The datasheets are worth reading to make sure you can supply the necessary voltage and current, have sufficient pins to interact with it, and that it will work in the expected conditions (waterproof, temperature range, etc.) Here’s the datasheet: https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

As @anat said, the Raspberry Pi3 is overkill for this project, but it’ll certainly work if you’re already comfortable programming that. The advantages of switching to a microcontroller (such as Arduino, MSP430, ESP8266, etc.) is that they have no operating system. You program them via your computer and they run the program almost immediately when they’re powered on. They also typically draw far less current, making them more suitable for battery powered projects. You didn’t say whether this project was going to run off mains supply or battery, but it might be worth considering if you want to run off battery power.

You asked how to code it and connect things up so I assume this is a first project for you. I’d recommend trying a few really simple projects to start with like getting an LED to blink - sounds stupidly simple, but it’ll teach you the process of programming the Pi or microcontroller as well as how to connect things to the IO pins (don’t forget the resistor if you use an LED or you’ll fry the LED in a fraction of a second :cry:).

Here’s a simple circuit using a Node MCU (which is WiFi capable for your cloud storage) and an LED.
https://www.circuito.io/app?components=513,9590,360216

You’ll see there’s a resistor in there to protect the LED. If you head over to the code tab, you’ll see circuito.io generates sample code for you to use in the Arduino IDE. There’s a big red button at the bottom of the left hand panel that’ll download all the code you need in one ZIP file. Just extract all of those files to your computer and open the .ino file in Arduino to get started.

You can read more about the MCU in one of the blog posts: https://www.circuito.io/blog/nodemcu-esp8266/

There are lots of other blogs with interesting information and insights that might help you get started and understand some of the complexities you should consider before you start. https://www.circuito.io/blog/

Please let us know how you get on and what you decide regarding using the Pi or something like the Node MCU, but most of all… HAVE FUN! :smile:

1 Like

Thank you so much for your reply, its really helpful, I finally feel like I’m making some progress. I’ve decided that I’m going to play around with the micro controller (ESP8266) and then later use it to control the temperature sensor (DS18B20) It is going to be connected to a mains outlet but I am planning on running it 24/7 if its possible (not doing research), so using as little power as possible is ideal.

Thank you again for all the helpful information, its really appreciated, I will get back to you when I’m done or when I get stuck.

1 Like

I have found an ESP8266 board from a supplier, but I just want to confirm that it is indeed correct, here’s the link for a lot more information on the product

I live in South Africa so suppliers are difficult to come by, even amazon takes months to deliver
Thank you
Regards, Gerard

1 Like

That looks like the same thing to me. Give @anat a chance to check it out; I think she’s more clued up on these things.

Have fun boet - I’m originally from Cape Town :smile: