fab Lab Logo



Input Devices
Git Fork Logo cc-by Andrejs Kirma at NOUN PROJECT

Input Devices - 2 level Moisture Probe

Goals




I want to design a Moisture Probe with two sensors, aimed at measuring the moisture at the bottom and top a tiny nursery vase unit. To design the board, I will include here I will want to use the tiniest possible Fab Inventory available AVR - The Attiny45 (shifted to 85 later on).

This board was studied as a simple input device, but some communication features where introduced as part of Week 14 - Networking and Communications. Nevertheless, they are negligible for this purpose.



This will support two sensors each built from 2 electrodes and a resistor:

  1. The first will measure in a dilated period the moisture on the bottom of a tiny vase;
  2. and if a certain threshold is achieved, it will trigger communication and quicker measurements;
  3. This wake up will be obtained through the use of interrupts;
  4. This process will also trigger the measurement of the top level;
  5. Once a certain threshold of humidity is obtained on the top level, which means the entire vase achieved an optimal level of moisture, a message will be sent by RF, and we get back to 1.

Design

I’m planning to integrate two very simple conductivity probes. To do so, I will have to design a custom part in eagle: Two 6 mm pads with a 2,5mm hole in the middle. A Square and a rounded one to distinguish - and + poles. This will allow me to set up a regular distance, which is also essential for calibration purposes.


Prototyping

Programming the Attiny45 outside the board, with the purpose of avoiding extra components usage:

Programming ATtiny85 with Arduino Uno - Arduino Project Hub



Using a _ see aliexpress thing to hold the attiny45 sop-8.


Using Arduino as ISP


Input Device itself



This work follows the work done previously when adding the moisture probe directly to the ESP8266 sensor board. Now it was time to bring modularization even further and added two levels of moisture probing to a simpler (node) board.


Code:


//test code for Analog Moisture Probe (W11 - Input Devices)

//define a Serial Port
#include  //call software serial for attiny

//choose RX and TX pins
SoftwareSerial testSerial(3,1);  //rx, tx

int SIG1 = A1;
int SIG2 = A2;

void setup() {
  testSerial.begin(9600);

}

void loop() {
  testSerial.print("SurfaceMoist: ");
  testSerial.print(analogRead(SIG1));
  testSerial.print(" || DeepMoist: ");
  testSerial.println(analogRead(SIG2));

}