Where Project is At

The Arduino Code/version I used is located at this GitHub location. See Firmware Tests below for more info.

Moisture Puck

Here’s some Fusion 360 images of the Moisture Puck:

In my excitement, I forgot to take a picture of the insides of the Moisture Puck that is situated in Strawberry Swirl. Here is an image of the Strawberry Swirl Moisture Puck:

Radio and micro controller: I am using Adafruit’s Feather M0 RFM69HCW – 915 MHz for communication between the controller and the Moisture Pucks (Note the green dot. This means 900 MHz. I’ve had others with a red dot on the RM69 chip. The red dot means it’s 433 MHz).

Moisture sensor: I’m using Funduino moisture sensors I had from last year.

I bought several of these:

While the Funduino sensors are readily available and inexpensive, they are not robust and the “sensor legs” are short The moisture sensor should be taking readings at the root level. I could go the expensive/accurate route and explore using the Vegetronix VH-400 sensor. But – whoa $40? Given accuracy is not required, for now I will continue to use the Funduino sensors and replace them each season.

Firmware Tests

Something that made testing easier was opening two separate copies of the Arduino IDE. This way, each copy can use a different serial port. This way, I can open a serial monitor for both feathers while I built the code. To do this, I opened up a terminal and entered:

open -n -a /Applications/Arduino.app

Once the Feathers came in from Adafruit, I quickly wrote up some Arduino code to get a better understanding of communications between the Controller and one Moisture Puck. I changed RFM69 libraries from using Felix’s to RadioHead’s. I did this based on Adafruit’s recommendation. My reasoning is I will be going to Adafruit for support. It helps to use the same 3rd party libraries they use / recommend.

First Readings

I have included the First Readings I am basing these comments on at the end of this post

Prior to watering, the moisture reading from the Strawberry Swirl moisture puck was 293. After 8 minute watering, it was 382. Reading and watering was taken around 7AM.

The weather forecast for today (weather.com): Some clouds this morning will give way to generally sunny skies for the afternoon. High 78F. Winds W at 5 to 10 mph.

A question of interest: What is the moisture reading later in the day? Given the difference in reading, how should the amount of watering time be adjusted (if at all)?

One thing that makes it difficult to answer this question is I did not include the Time of Day with the hourly logging of each reading. I was able to backtrack and figure out the reading was slightly above 300. This means there wouldn’t be a PM reading, but there would be an AM reading. This seems a bit right, perhaps a bit on the low end. I will update the plan I have for the amount of time to water to 10 minutes from 8 minutes.

Waterproof Enclosure

A concern I had was if the container was enclosed enough to be waterproof. While I haven’t opened up the enclosure to check, I was relieved to get a reading after watering. If water is detected inside the enclosure when I open it up, I’ll see about adding a gasket or some other seal.

Temperature

Another concern of mine was whether it got too hot within the enclosure. I’m using the temperature of the radio since this was easy for me to use. The temperature values returned went from a low of 69˚F to a high of 104˚F. While this range is acceptable – and it “feels” about right – I should heed the documentation made by Mike McCauley in the RH_RF69.h file:

/// Reads the on-chip temperature sensor.

/// The RF69 must be in Idle mode (= RF69 Standby) to measure temperature.

/// The measurement is uncalibrated and without calibration, you can expect it to be far from

/// correct.

/// \return The measured temperature, in degrees C from -40 to 85 (uncalibrated)

int8_ttemperatureRead();

I’m not sure the RFM69 is in standby mode when I’m taking the measurement. I will figure this out and correct if needed. Perhaps when temperatureRead() is called it puts the radio into standby mode? Dunno right now….

return166 – spiRead(RH_RF69_REG_4F_TEMP2); // Very approximate, based on observation

}

hmm…I assume setModeIdle(); puts the RF69 into standby mode? If so why is it commented out? According to the Doxygen documentation: If current mode is Rx or Tx changes it to Idle. If the transmitter or receiver is running, disables them.

What I am currently doing is documented in MoisturePuck2017.ino.

Calibrate? How do I do that? Not sure…and perhaps “unprofessional” of me, I’m ignoring the calibration comment since the readings look “about right.”

Battery Life

Ideally, the batteries would never have to be recharged. Right now I’m not using solar power – although I’ll explore this….the focus here is on power management.

Power Management

The firmware currently running on the Moisture Puck has no power management optimizations. Without power management, the battery needs to be recharged after about 40 hours.

show the battery should be recharged as discussed in Adafruit’s documentation: Lipoly batteries are ‘maxed out’ at 4.2V and stick around 3.7V for much of the battery life, then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly tell when you’re heading below 3.7V.

Code Additions

Things I’ll add to the code in an attempt to maximize the battery life:

Call RH_RF69::sleep() . See the Doxygen documentation. Also Adafruit’s documentation notes: If you put the radio to sleep after transmitting with radio.sleep(); rather than just sitting in receive mode, you can save more current, after transmit is complete, the average current drops to ~10mA which is just for the microcontroller. I added code into the Moisture Puck Arduino code.