MMoazam
Posts: 6
Joined: Sat Feb 09, 2019 9:05 pm

RPI Zero W multiple sensors

Sat Feb 09, 2019 10:07 pm

Hello there,
this is my first project with Raspberry pi.
i want to make a Testing chamber for growing micro greens(small plants).

What this chamber does is following:

1- weigh the growing pods (pods picture is attached) - load-cell and HX711 (four of each of them)

2- control Humidity and temperature with DHT22 attached to relay board to turn on or off the heater and humidifier (one DHT22) and also turn off and on the exhaust fan.

3- Control light hours (turn on and of in specific time) with relay

4- control growing medium moisture with capacitive moisture sensor (CSMO v1.2) - sensor control the solenoid valve to water the pod with relay board whenever medium is got dry. since out pot signal is analog i use MCP3008 to convert it to digital

5- each pod has flow meter attached to its watering pipes to measure how much water is used


to be short i have the following sensors that i want to control with RPI zero W:

4 * Load cells (YZC-133) with 4 HX711 for each one
4 * Solenoid valves
4 * Capacitive moisture sensors (CSMO v1.2) with 1 MCP3008
4 * Flow meters
1 * Humidifier
1 * DHT22
1 * Exhaust Fan
1 * Heater
1 * Light
2 * 4 Channel relay board
(schematic wiring is attached )



So here are my questions:
1 - could R PI zero W handle the processing load of controlling these sensors?
2- is it possible to do this project with ESP32 and MCP23017 (for GPIO port expansion) ? could ESP32 handle these sensor's processing load?


i appreciate any suggestion for doing this project.


schematic wiring:
http://uupload.ir/files/ke1t_schematic_wiring.jpg

Growing pod:
http://s8.picofile.com/file/8351761018/ ... Pod_01.jpg
http://s9.picofile.com/file/8351761050/ ... Pod_02.jpg

Thank you all in advance.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Mon Feb 11, 2019 2:18 pm

MMoazam wrote:
Sat Feb 09, 2019 10:07 pm
1. weigh growing pods - load-cell and HX711 (four of each of them)
2. control Humidity and temperature with DHT22 attached to relay board
3. to turn on or off the heater and humidifier and exhaust fan.
4. control light hours with relay
5. control growing medium moisture with capacitive moisture sensor (CSMO v1.2) -
6. sensor control the solenoid valve to water the pod with relay
7. MCP3008 to convert it to digital
8. each pod has flow meter attached to its watering pipes

I have the following sensors that i want to control with RPI zero W:
Load cells (YZC-133), HX711, Solenoid valves, moisture sensors (CSMO), MCP3008
Flow meters, Humidifier, DHT22, Exhaust Fan, Heater, Light, 4 Channel relay board


So here are my questions:
1. could R PI zero W handle the processing load of controlling these sensors?
2. is it possible to do this project with ESP32 and MCP23017
3. could ESP32 handle these sensor's processing load?

Short Reply

1. Yes, RpiZW is powerful enough to handle the sensing and control, But I strongly suggest you to use Rpi3B+ for development, because 3B is much faster than ZW.

2. Rpi3B+ and MCP23017 can work together.

3. ESP8266-12/32 is strong in WiFi, but much weaker than RpiZ otherwise. NodeMCU for 32 is still in development. NodeMCU Lua has a very steep learning curve. ESP8266-12 microPython is OK for beginners.

If you tell me your hardware and software experience, I can estimate your project time.

You can search the forum for my relevant old posts using the keywords "tlfong01" + "hx711" + "mcp23017" + "esp3266" + "lua" etc. Or you can skim the 400+ posts backwards starting from this one:

RELAY MODULE KY-019 5V by tlfong01 2019Jan22
https://www.raspberrypi.org/forums/view ... #p1419852

Warning: Yours is a very long project and definitely not for faint of heart newbies. :mrgreen:
Last edited by tlfong01 on Mon Feb 11, 2019 2:36 pm, edited 3 times in total.
I am an electronics and smart home hobbyist.

User avatar
bensimmo
Posts: 4162
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: RPI Zero W multiple sensors

Mon Feb 11, 2019 2:27 pm

If you are constantly weighing the pods, do you really need the flow meters?
You know how much water you have let in to the pod from the sudden increase in weight.

Yes should be given with both setups.

MMoazam
Posts: 6
Joined: Sat Feb 09, 2019 9:05 pm

Re: RPI Zero W multiple sensors

Mon Feb 11, 2019 4:26 pm

Short Reply

1. Yes, RpiZW is powerful enough to handle the sensing and control, But I strongly suggest you to use Rpi3B+ for development, because 3B is much faster than ZW.

2. Rpi3B+ and MCP23017 can work together.

3. ESP8266-12/32 is strong in WiFi, but much weaker than RpiZ otherwise. NodeMCU for 32 is still in development. NodeMCU Lua has a very steep learning curve. ESP8266-12 microPython is OK for beginners.

If you tell me your hardware and software experience, I can estimate your project time.

You can search the forum for my relevant old posts using the keywords "tlfong01" + "hx711" + "mcp23017" + "esp3266" + "lua" etc. Or you can skim the 400+ posts backwards starting from this one:

RELAY MODULE KY-019 5V by tlfong01 2019Jan22
https://www.raspberrypi.org/forums/view ... #p1419852

Warning: Yours is a very long project and definitely not for faint of heart newbies. :mrgreen:

first of all, thank you for your response.

choosing Rpi Zero W over Rpi3B+ in about budget. because i need 4 chamber and each chamber needs it's own Rpi, so 4 RPi zero is much more cheaper for me than 4 Rpi3B+.

choosing beetwin RPI zero w and esp32 is also about budget. i live in Iran, here you can get esp32 devkit in half of the price of RPI zero w
in it's important to me to do this project as cheap as possible.



about my experience, i know how to code with python but i used it for data science, not for programming sensors and hardwares
but for hardware i have to tell you that i am new to this field.

and thank for the heads up. :D

MMoazam
Posts: 6
Joined: Sat Feb 09, 2019 9:05 pm

Re: RPI Zero W multiple sensors

Mon Feb 11, 2019 4:30 pm

bensimmo wrote:
Mon Feb 11, 2019 2:27 pm
If you are constantly weighing the pods, do you really need the flow meters?
You know how much water you have let in to the pod from the sudden increase in weight.

Yes should be given with both setups.
thanks for you suggestion.
yes, you are right,
but the sensors only work in schedule, 2 to 6 times a day, every day,they are not constantly measuring.
but the solenoid valve and flow meters are control by grow medium moisture sensors.
weight measuring and watering cycles are not aligned .

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Tue Feb 12, 2019 6:07 am

MMoazam wrote:
Mon Feb 11, 2019 4:26 pm
choosing Rpi Zero W over Rpi3B+ in about budget. because i need 4 chamber and each chamber needs it's own Rpi, so 4 RPi zero is much more cheaper for me than 4 Rpi3B+.

choosing beetwin RPI zero w and esp32 is also about budget. i live in Iran, here you can get esp32 devkit in half of the price of RPI zero w in it's important to me to do this project as cheap as possible.

As cheap as possible, but not cheaper- Part 1

Thank you for your reply. Now that I know your project's functional specification, user requirements and constraints, I can give a longer answer.

Below are just random, brainstorming comments. I am more or less talking aloud to myself, as a selfie walk through of my own smart garden project.

Choosing Rpi3 or RpiZ is doing an engineering trade-off or cost-benefit analysis.

Let me do some arithmetic. In my place, the minimum hourly wage is HK$37.5, or roughly 4.8 ~= US$5. In other words, Rp3B+ = US35 = 7 hours work, while RpiZW = US$10 = 2 hours of work. The difference is 5 hours.

Now if using Rpi3B+ to do development work is only 10% faster (my rough guess estimate) than RpiZW, in the long run of say, >100 hours, Rpi3B+ is more time/cost effective.

If after R&D, you want to produce 4 sets of products, of course RpiZW is more cost effective, because the software running in Rpi3 can run in RpiZ almost immediately.

And if you make your project open, say in GitHub, then everybody benefits, the cost benefit is huge, ...

In short, Rpi3B+ x 1 for development and RpiZW x 4 for production is much more time/cost effective. In other words, Rpi3 x 1 + RpiZW x 4 is "cheaper" than all RpiZWs!
...
Last edited by tlfong01 on Tue Feb 12, 2019 2:55 pm, edited 7 times in total.
I am an electronics and smart home hobbyist.

User avatar
Gavinmc42
Posts: 3646
Joined: Wed Aug 28, 2013 3:31 am

Re: RPI Zero W multiple sensors

Tue Feb 12, 2019 7:21 am

I want a micro greens factory, growing just enough for daily consumption.

Grew some lettuce once, they all grew at the same rate.
You just cannot eat 20 lettuce a week, unless you are rabbit?
And they don't keep or freeze :(
And if you don't pick them they shrivel or go to seed.

A sprout factory, conveyor belt style?
Just enough for one or two sandwichs a day.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Tue Feb 12, 2019 11:39 am

tlfong01 wrote:
Tue Feb 12, 2019 6:07 am
In other words, one R3 and four ZWs is "cheaper" than four ZWs

As cheap as possible, but not cheaper- Part 2

In the above consideration, I am assuming that after completing the project, you still need the Rpi3 to do maintenance and enhancement. This brings up another thing - time planning.

If you have a almost fixed budget and a rigid deadline, then you might need to consider whether to use familiar components which saves your time. For example, if you or your team already know Arduino very well, and the schedule is tight, then it might be better to start with Arduino, use system independent devices such as I2C or SPI, and avoid GPIO, which is not that transferable to Rpi.

In my previous projects using Arudino, PyBoard, MicroBit, I almost never use GPIOs but rely on SPI, I2C, UART, BlueTooth devices. I gave up Arduino because their C++ and OO, interrupts, etc, are not easy to move from Arduino to Rpi.

I also stick to Python for similar reasons. One important reason for using Python and functional programming and not object oriented programming because Google and their AI tools prefer python.

I started learning how to do home automation as a hobby 6 months ago and I did not have any deadline, so I can do Problem Based Learning on many things which I know will be useful later.

My freelance contract work is flexible, so I can do both work and hobby on and off, ...

And that is why I have the time luxury to stall ESP8266-12 and wait for NodeMCU ESP32 Lua to mature.

I also paused Rpi3 I2C MCP23017 because I got stuck by the low fixed I2C speed of 100kHz. I am waiting for 2020 Q1 Rpi4 which I hope can run 400 kHz I2C, ...

So if you can indicate your time constraint or long term learning goal, say 1 year or 3 years, then I can suggest more things accordingly.

I am thinking aloud - sorry for the typos.

/ to continue, ...


Last edited by tlfong01 on Wed Feb 13, 2019 12:53 am, edited 3 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Tue Feb 12, 2019 1:53 pm

tlfong01 wrote:
Mon Feb 11, 2019 2:18 pm
MMoazam wrote:
Sat Feb 09, 2019 10:07 pm
7. MCP3008 to convert it to digital

ADS1015 ADC Learning Notes

I once tried SPI MCP3008 and found it OK. Then I found MCP3208 and found it better. However, the things I learnt in MCP3008 sadly cannot be transferred to MCP3208.

Now I am thinking of I2C ADS1015. The main reason is that it is I2C. I am googling some references, and listed below, in case you are interested to know more about ADC.


Purple GY-ADS1015 ultra-small 12-bit precision analog-digital converter ADC development board module Winder - US$4
https://fr.aliexpress.com/item/Purple-G ... 46503.html

ADS101x Ultra-Small, Low-Power, I2C-Compatible, 3.3-kSPS, 12-Bit ADCs With Internal Reference, Oscillator, and Programmable Comparator
http://www.ti.com/lit/ds/symlink/ads1015.pdf

ADS015 Breakouts - Adafruit
https://cdn-learn.adafruit.com/download ... akouts.pdf
Last edited by tlfong01 on Wed Feb 13, 2019 1:10 am, edited 4 times in total.
I am an electronics and smart home hobbyist.

MMoazam
Posts: 6
Joined: Sat Feb 09, 2019 9:05 pm

Re: RPI Zero W multiple sensors

Tue Feb 12, 2019 5:36 pm

tlfong01 wrote:
Tue Feb 12, 2019 11:39 am
tlfong01 wrote:
Tue Feb 12, 2019 6:07 am
In other words, one R3 and four ZWs is "cheaper" than four ZWs

As cheap as possible, but not cheaper- Part 2

In the above consideration, I am assuming that after completing the project, you still need the Rpi3 to do maintenance and enhancement. This brings up another thing - time planning.

If you have a almost fixed budget and a rigid deadline, then you might need to consider whether to use familiar components which saves your time. For example, if you or your team already know Arduino very well, and the schedule is tight, then it might be better to start with Arduino, use system independent devices such as I2C or SPI, and avoid GPIO, which is not that transferable to Rpi.

In my previous projects using Arudino, PyBoard, MicroBit, I almost never use GPIOs but rely on SPI, I2C, UART, BlueTooth devices. I gave up Arduino because their C++ and OO, interrupts, etc, are not easy to move from Arduino to Rpi.

I also stick to Python for similar reasons. One important reason for using Python and functional programming and not object oriented programming because Google and their AI tools prefer python.

I started learning how to do home automation as a hobby 6 months ago and I did not have any deadline, so I can do Problem Based Learning on many things which I know will be useful later.

My freelance contract work is flexible, so I can do both work and hobby on and off, ...

And that is why I have the time luxury to stall ESP8266-12 and wait for NodeMCU ESP32 Lua to mature.

I also paused Rpi3 I2C MCP23017 because I got stuck by the low fixed I2C speed of 100kHz. I am waiting for 2010 Q1 Rpi4 which I hope can run 400 kHz I2C, ...

So if you can indicate your time constraint or long term learning goal, say 1 year or 3 years, then I can suggest more things accordingly.

I am thinking aloud - sorry for the typos.

/ to continue, ...

thank for all the information that you share with me. i really appreciate it.
i want to tell you what exactly i'm going to do.

i want to start a business for planting MicroGreens,
the thing is each seed and kind of plant has it's own grow circumstances.
some of them need 50% humidity while other need 60%, some need warm environment and some need cooler.

so i searched the internet about growing circumstances for each one and gathered some information.
but as you may know, the information that you find in internet is not complete or not much viable.

the other thing is that every one that share this information, gathered them according to what seed they plant and in my area i cant buy the same seed as them.

so after all of this, i decided to build a test chamber, that helps me to test each seed and grow them under specific circumstances to reach best growing circumstance for each seed.

each chamber has 4 pods.

each pod looks like this:
http://s9.picofile.com/file/8351945284/004_P_002.png
http://s8.picofile.com/file/8351761018/ ... Pod_01.jpg
http://s9.picofile.com/file/8351761050/ ... Pod_02.jpg

chambers look like this:
http://s8.picofile.com/file/8352045768/Chamber_001.jpg

so all this chambers does. is to give me information and insight to design a bigger greenhouse that want to build.
i use this information to bring up efficiency as much as possible.

and there is no team involved, it's only me.
my time frame is as soon as possible. the faster i get this thing going the faster i can start my business.

you may say that i can out source this project to someone else but i have other projects that i want to see them come to life. so i looking for learning this field so i can build my other projects.

again. thank you for your information.

User avatar
ptimlin
Posts: 88
Joined: Tue Jan 08, 2019 7:44 pm

Re: RPI Zero W multiple sensors

Tue Feb 12, 2019 8:26 pm

One suggestion is to look into the use of multiplexers (mux) and de-multiplexers (de-mux), both usually can be found in DIP package ICs so easy to breadboard, to allow your Pi to access more sensors with less pins.

As an example, right now you have four load cells with each one requiring two of your Pi's GPIO pins. So four cells use up a total of 8 Pi GPIO pins. If you instead used a 4:1 mux and a 1:4 de-mux you would have two pins for selecting which sensor you want to read (00, 01, 10, & 11) and then two pins for your data and clock. So HALF the pins to read the same 4 load cells.

You will have to read each load cell separately, but I am guessing that reading the four load cells in not time critical that they have to be monitored simultaneously and don't have to be read except for a few times a day.

Same with the solenoids to water the plants. Another 4:1 mux, using the same select pins used to read the load cells, to pick which bin to water. Again, I am guessing you don't need to water them at the same time so instead of 4 pins to turn on the solenoids you only need one control pin (because you are selecting using the same selection pins you use with the load cells).

So here is how I envision it. Your Pi monitors the soil moisture sensors. When one reads low, say #3, the Pi then selects #3 with the selector two selector pins. It can now read the load cell on tray #3 (save to file). Still selecting #3 it can now water and keep reading the load cell. Once the weight is reached, turn off the solenoid shutting off the water. Now go back to waiting for the next tray to read low for moisture. And since you are already taking weights when the moisture sensor reads low (& after you are done filling), just be sure to record that somewhere so that you can keep track of the growth always measuring the trays at their low or high moisture point so the weights are always measured at roughly the same water weight (assuming you have the same amount of soil in each tray so the same amount of moisture holding capacity).

And now you have freed up a total 7 GPIO pins to expand, improve, etc. as needed without having to add more Pi's.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 2:04 am

ptimlin wrote:
Tue Feb 12, 2019 8:26 pm
1. mux and de-mux to access more sensors with less pins.
2. 4:1 mux and 1:4 de-mux
3. to read each load cell separately
4. same with the solenoids to water the plants
5. 7 GPIO pins to expand more Pi's.

Using MCP23017 for Recursive Demuxing

1. I am not sure if you are talking about HC137/HC151 MUX/DEMUX. I did once used 1/8 HC137/HC138 to demux TSX012/0104/0108 for upshifting Rpi I2C/SPI/UART channels.

2. I also had quad analog mux/demux chips like HX4136/HC4351 etc to entertain analog signals.

3. It was more than 5 years ago when I did the above 1/8, 1/16 demux chip projects. But now MCP3208 etc has 1/4 demux differential channels built in, only low tech guys are still talking about demux chips using which might damage the high tech Rpi guys's reputation.

4. I am using I2C PWM/IOX to do the demuxing. For example the master IOX GPIOs demux which of 3 TSX0104 I2C or 4 TSX0104 SPI channel to select. So it is sort of "recursive" demuxing, which lets me handle at least 512 GPIO pins, ... :mrgreen:

5. I am using a loosely coupled quad Rpi3B+ gang to non stop monitor a couple of old sick cats doing ECG. Each cat has 12 electrodes, ...

You may like to take a look of my current ECG test setup, showing 7 demux TSX0104 up level shifters, and 2 PWM (PCM9685) and 8 IOX (MCP23017) modules, with a total of 160 PWM/nonPWM GPIO pins, ...


https://penzu.com/p/478664cf

https://www.raspberrypi.org/forums/view ... 9#p1416955
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 3:22 am

Gavinmc42 wrote:
Tue Feb 12, 2019 7:21 am
I want a micro greens factory, growing just enough for daily consumption.
A sprout factory, conveyor belt style?
Just enough for one or two sandwichs a day.

MicroGreens vs Soybean Sprouts

I have never heard of microgreens. So I googled and now I know why I never heard of it, because it is usually in the fine dining menu, for high class guys.

I am a root class guy, so all my life I only eat roots of soy beans. But youtube says it is easy to grow microgreens. So perhaps I should try growing that, to help me climb up the social ladder a bit faster, at least to the lower middle class, ... :mrgreen:


How to Grow Microgreens at Home - 234,213 views
https://www.youtube.com/watch?v=w3RXQkh73yg

How to grow Soybean Sprouts - 3,351,282 views
https://www.youtube.com/watch?v=fkZKGX9VIfc

TaoBao Home Garden
https://laizhongcai.world.taobao.com/in ... b084xkpxAG
Last edited by tlfong01 on Sun Feb 17, 2019 2:16 am, edited 3 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 3:49 am

Gavinmc42 wrote:
Tue Feb 12, 2019 7:21 am
Grew some lettuce once, they all grew at the same rate.
You just cannot eat 20 lettuce a week, unless you are rabbit?

Smart MicroGreens Studio

Well, I am day dreaming to start up a microgreens studio (I won't call it "factory" which sounds cheap! :mrgreen: )

The studio would consist of 4 computers (Rpi4B), 16 Wifi Controlers (ESP32), 64 IOX (MCP23017, PCM9685), 16 real time timers (DS3231), 512 senors (too many types to list here), 32 ADCs (HX711, ADS1510), 64 cameras, 128 LED lamps, ...

There will be 24+ pods in the rooftop garden, my neigbours (there are 6 x 28 families in my building) can use an android app to book a pod to grow what they like, and schedule their harvest times which will be taken care by the RTC scheduling lighting and watering, ...

Ah, I almost missed the appointment, day dream broken, see you later, ... :mrgreen:

TaoBao Home Garden (MicroGreen?)
https://laizhongcai.world.taobao.com/in ... b084xkpxAG

Last edited by tlfong01 on Thu Feb 14, 2019 5:24 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 5:16 am

tlfong01 wrote:
Wed Feb 13, 2019 3:49 am
The studio would consist 512 senors (too many types to list here), 32 ADCs (HX711, ADS1510), 64 cameras, 128 LED lamps, ...

Soil Moisture Sensing and Watering - Distributing Processing Brainstorming Ideas

Now I am brainstorming talking to myself aloud, writing and thinking at the same time, so there should be unstructured, unconnected, random ideas, and of course a lot of typo errors. I am highlighting things in purple important things I don't wish to forget.

I am thinking of two related things: (1) soil moisture sensing,(2) distributed processing.

The idea is that the the Rpi does not do all the low level sensing, recording, watering work. Many of the sensing and watering can be delegated to individual hardware, for example the LM393 dual comparator.

The penzu journal entry shows some basic ideas.


https://penzu.com/p/a5d82ab8
...
Attachments
soil_humid_sensor_2019feb1301s.jpg
soil_humid_sensor_2019feb1301s.jpg (150.54 KiB) Viewed 1864 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 6:51 am

tlfong01 wrote:
Wed Feb 13, 2019 5:16 am
tlfong01 wrote:
Wed Feb 13, 2019 3:49 am
[url/]https://penzu.com/p/a5d82ab8[/url]

Moisture sensor, MCP3008/ADS1115 Tutorial

The video below is good because it shows how to use water sensor, SPI MCP3008 and I2C ADS1115.

Raspberry Pi Analog Water Sensors ADC Tutorial (mcp3008, ADS1115, level shifter) - 2016oct11 201635,815 views
https://www.youtube.com/watch?time_cont ... JgyszOSoQU

Tutorial demonstrating how to connect analog sensors to the Raspberry Pi using SPI and I2C analog-to-digital converter chips such as the MCP3002 and the ADS1115.

Examples include low cost analog water level/detection and water pressure sensors. All code, schematics, notes and updates are available on my website:

https://www.rototron.info/raspberry-pi- ... -tutorial/
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 8:32 am

tlfong01 wrote:
Wed Feb 13, 2019 6:51 am
Moisture sensor, MCP3008/ADS1115 Tutorial
Raspberry Pi Analog Water Sensors ADC Tutorial (mcp3008, ADS1115, level shifter) - 2016oct11 201635,815 views
https://www.youtube.com/watch?time_cont ... JgyszOSoQU
https://www.rototron.info/raspberry-pi- ... -tutorial/

Xinda Moisture Sensor Test Results

I found the Xinda moisture sensor OK.

Test Results
20% = 2.61V
40% = 3.08V
60% = 3.19V
80% = 3.23V full


https://penzu.com/p/a5d82ab8

...
Attachments
moisture_sensing_2019feb1304.jpg
moisture_sensing_2019feb1304.jpg (184.67 KiB) Viewed 1832 times
I am an electronics and smart home hobbyist.

MMoazam
Posts: 6
Joined: Sat Feb 09, 2019 9:05 pm

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 11:38 am

tlfong01 wrote:
Wed Feb 13, 2019 8:32 am
tlfong01 wrote:
Wed Feb 13, 2019 6:51 am
Moisture sensor, MCP3008/ADS1115 Tutorial
Raspberry Pi Analog Water Sensors ADC Tutorial (mcp3008, ADS1115, level shifter) - 2016oct11 201635,815 views
https://www.youtube.com/watch?time_cont ... JgyszOSoQU
https://www.rototron.info/raspberry-pi- ... -tutorial/

Xinda Moisture Sensor Test Results

I found the Xinda moisture sensor OK.

Test Results
20% = 2.61V
40% = 3.08V
60% = 3.19V
80% = 3.23V full


https://penzu.com/p/a5d82ab8

...


i researched a lot about soil moisture sensors, most of them will broke after time because of the direct contact of their probe legs with water.
https://www.youtube.com/watch?v=udmJyncDvw0
(very good soil moisture sensors demonstration and explain about why sensors broke after time)

the best solution that i fine is : Capacitive Soil Moisture Sensor v1.2
Sensor introduction:
https://www.youtube.com/watch?v=94G7iTvlkBM&vl=en
of course you need to seal it's edge with some water prof material.


out put signal is analog so it needs ADS1115 or MCP3008

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Wed Feb 13, 2019 1:17 pm

MMoazam wrote:
Wed Feb 13, 2019 11:38 am
1. about soil moisture sensors, most of them will broke after time because of the direct contact of their probe legs with water.
https://www.youtube.com/watch?v=udmJyncDvw0
2. the best solution that i fine is : Capacitive Soil Moisture Sensor v1.2
https://www.youtube.com/watch?v=94G7iTvlkBM&vl=en
of course you need to seal it's edge with some water prof material.
3. out put signal is analog so it needs ADS1115 or MCP3008

Smart Moisture Sensors

Update 2019feb15hkt1028

I have tidied up the messy brainstorming ideas into the following summary. I will expand some of the ideas into real projects, for example sensor chain, ADS1510 in later posts.

Our senors are smart, I2C and WiFi, DS3231 RTC (Osc, EEPROM, and temperature sensor), ESP8266/32, NodeMCU Lua, capacitve, demux to ADC, insulation coating, immersable in water, HX7111 50/60Hz mains noise free, programmable gain, standard also for weight sensing, open hardware and software (ob GitHub), welcome copying, update very often, to stay ahead of copiers, hardware system intergration (smd modules instead of through hole chips), software NodeMCU/Rpi Lua, (FP, DP, OO), Rpi multitasking python, non stop quad Rpi cluster.

ESP32 WiFi Blue Tooth Battery DHT11 Soil Moisture/Temperature - ¥85
https://item.taobao.com/item.htm?spm=a2 ... t=6#detail

Soil Moisture/Temperature Sensor (Nickel plated, no corrosion problem) - ¥23
https://item.taobao.com/item.htm?spm=a2 ... t=6#detail

TaoBao Home Garden (MicroGreen?)
https://laizhongcai.world.taobao.com/in ... b084xkpxAG
...
Attachments
quad_moisture_sensor_2019feb1302.jpg
quad_moisture_sensor_2019feb1302.jpg (167.92 KiB) Viewed 1788 times
Last edited by tlfong01 on Fri Feb 15, 2019 2:33 am, edited 3 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Thu Feb 14, 2019 5:17 am

MMoazam wrote:
Wed Feb 13, 2019 11:38 am
i researched a lot about soil moisture sensors, most of them will broke after time because of the direct contact of their probe legs with water.
https://www.youtube.com/watch?v=udmJyncDvw0
(very good soil moisture sensors demonstration and explain about why sensors broke after time)
the best solution that i fine is : Capacitive Soil Moisture Sensor v1.2
Sensor introduction:
https://www.youtube.com/watch?v=94G7iTvlkBM&vl=en
of course you need to seal it's edge with some water prof material.
out put signal is analog so it needs ADS1115 or MCP3008

Made in China Cheapy Resistive Soil Moisture Sensor Corrosion Experiment

Now I am checking out if made in China fake cheapy no brand moisture sensors are cheapy enough for a cheapy hobbyist like me. :mrgreen:

Remark: The tuhao on the left is 14k gold plated, middle class silver plated, leftist nickel plated. Testing water is home tap water, Philips AquaSure filtered. :geek:
...
Attachments
corrosion_test_2019feb1402s.jpg
corrosion_test_2019feb1402s.jpg (81.76 KiB) Viewed 1771 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Thu Feb 14, 2019 1:00 pm

tlfong01 wrote:
Tue Feb 12, 2019 1:53 pm
I once tried SPI MCP3008 and found it OK. Then I found MCP3208 and found it better. However, the things I learnt in MCP3008 sadly cannot be transferred to MCP3208.
Now I am thinking of I2C ADS1015. The main reason is that it is I2C.

ADS101x Ultra-Small, Low-Power, I2C-Compatible, 3.3-kSPS, 12-Bit ADCs With Internal Reference, Oscillator, and Programmable Comparator
http://www.ti.com/lit/ds/symlink/ads1015.pdf

ADS1015 12bit ADC Module

Now I am starting ADS1015. Another advantage of ADS1015 over MCP3208 is that SMD modules are cheap and small.

GY-ADS1015 12bit ADC Module CN¥8 (US$1)
https://item.taobao.com/item.htm?spm=a1 ... 1295955830
/ to continue, ...
Attachments
ads1015_2019feb2301.jpg
ads1015_2019feb2301.jpg (101 KiB) Viewed 1561 times
Last edited by tlfong01 on Sat Feb 23, 2019 6:13 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Tue Feb 19, 2019 3:13 am

MMoazam wrote:
Tue Feb 12, 2019 5:36 pm
tlfong01 wrote:
Tue Feb 12, 2019 11:39 am
So if you can indicate your time constraint or long term learning goal, say 1 year or 3 years, then I can suggest more things accordingly.

i want to tell you what exactly i'm going to do.
i want to start a business for planting MicroGreens,
and there is no team involved, it's only me.
my time frame is as soon as possible. the faster i get this thing going the faster i can start my business.


My 3 Year Learning Goal

I also day dream of Starting Up something one day. Now I am setting up a learning goal. But there are too many things I need to learn, so I hope to learn enough in 3 years. You might also need 3 years. :mrgreen: See my post below for more details.

What to learn to Start Up
https://www.raspberrypi.org/forums/view ... 8#p1431708
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Fri Feb 22, 2019 12:12 pm

tlfong01 wrote:
Tue Feb 19, 2019 3:13 am
I also day dream of Starting Up something one day. Now I am setting up a learning goal. But there are too many things I need to learn, so I hope to learn enough in 3 years. You might also need 3 years.


Three Year Learning Plan

One thing you need to know is how other guys compete or succeed in startups. Piece Future's startup competition which I learnt today might also interest you.

.....https://www.iphatchday.com/hongkong

Are you in mid-career making your first venture into the startup world? Or are you a fresh graduate or an ambitious student brimming with fresh ideas with an eye for execution? Maybe you're part of an innovative company seeking to unlock new markets and revenue streams? We are searching for ... inventive ideas or a team of like minded individuals to participate this competition. -- iphatchday.com
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Sat Feb 23, 2019 2:08 am

tlfong01 wrote:
Fri Feb 22, 2019 12:12 pm
tlfong01 wrote:
Tue Feb 19, 2019 3:13 am
I also day dream of Starting Up something one day. I am setting up a learning goal. ... to learn enough in 3 years. You might also need 3 years.
One thing you need to know is how other guys compete or succeed in startups.

Element14 Project Ideas on Motors, Solenoids, and WiFi

I said you need to know how other guys succeed in startups, and not starting up now, because I read that 99.99% of the startup day dreamers fail! :(

So I have a much humble goal: learn in 3 years, and for now perhaps show off my project ideas (and failure experiences! :mrgreen: ) in forums such as Rpi org or stackexchange, or hobbyists project competitions, such as by E14 and RS.

In case your microgreen project makes use of water solenoid valves and ESP8266 WiFi, you might like to read the following invitation from the Element 14 community. These competitions are much easier than those A/B/C Got Talent competitions and it is relatively not that difficult (though still depends on your talent! :mrgreen: ) to win US$100 electronic components to build your projects.


Appendix - Element 14 Projects - Element14 Community

Element 14 Project: The Force of Electromagnetism: Anything from Solenoids, Motors, to Wireless Transfer! - Element14 Community 2019feb12
https://www.element14.com/community/doc ... ectro-HERO

Let Us Know Your Project Ideas, ...


Appendix - Electromagnetism Videos

Maxwell, The history of Electromagnetism - 4,966 views
https://www.youtube.com/watch?time_cont ... Ousl55nTZk

Electromagnetism and Optics: Maxwell's Equations - 14,663 views
https://www.youtube.com/watch?time_cont ... y6gZPSUeFc
...00 min Introduction
...23 min Lecture starts
...41 min Two minute revision on Curl and Divergence


The Science of The Force - 6,386 views
https://www.youtube.com/watch?time_cont ... 5O-gMAjen8

Obi-Wan explains the Force - 129,328 views
https://www.youtube.com/watch?time_cont ... 2YQJsbbWNA
...
Attachments
Element14_project_idea_2019feb2303.jpg
Element14_project_idea_2019feb2303.jpg (196.73 KiB) Viewed 1569 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: RPI Zero W multiple sensors

Mon Mar 11, 2019 4:57 am

tlfong01 wrote:
Thu Feb 14, 2019 5:17 am

Moisture Sensor Corrusion Test Results

After 4 weeks, water dried out, sensors got a bit rusty.
...
Attachments
rusty_moisture_sensor_2019mar1101s.jpg
rusty_moisture_sensor_2019mar1101s.jpg (170.61 KiB) Viewed 1398 times
I am an electronics and smart home hobbyist.

Return to “Beginners”