Skip to main content

Posts

Showing posts with the label nodemcu

And now for something completely...not plants...

After reading a neat little project by Nick Sypteras where he hacked a Staples "Easy" button to send him an alert when someone was at his cube entrance ( Blog post is here ), I was inspired. I borrowed Nick's Micropython code from his Github (link is in his article) and modified it. My goal was to create a quick notification tool for my team. I work in a fast-paced job where I will often need to leave my desk for meetings or for other urgent reasons, leaving my remote team members talking to an absent person in Slack. A person who often needs to approve their current actions. Most of my meetings require around an hour of time, so my focus was on that duration. As such, I modified Nick's code to have three buttons: Green - I am back from wherever I've been. Yellow - I will be away for up to an hour. Red - I will be away for over an hour. I like traffic light systems. My thinking was that green is a "go" for questions/comms; yellow is a "s...

Some redemption

I finally got my watering to work consistently. All it took was replacing the MOSFET with a switch relay and some persistence in getting the damn ESP8266 to connect to the network for more than 5 minutes. I also had my first crop: green beans (or as they seem to be called in the US, string beans). Still waiting on the tomatoes, but I fear the aphids may have undone the good work so far. So, here's the setup: Two window boxes featuring, from left to right, carrots, green/string beans, tomatoes, and strawberry. The white PVC pipe has drill holes to provide water with a length of flexible tubing entering it on the left, supplying the pipe, and the right end of the pipe emptying back into the reservoir. A design issue with this simple setup is that the pipe is too high - it can easily erode un-mulched soil. In a better-designed setup, I would have the reservoir lower than the return so that the pipe can sit on the soil. The reservoir: Nothing fancy here. A 12v DC pump su...

Watering woes continue

Nothing is as easy as it seems. A new attempt at making the watering system operate via a web interface hit a snag. I purchased, and soldered, a new NodeMCU unit. This unit has only 16 pins, as well as the expected ESP8266 chip, but unlike my other two units it also has a 5v pin. I was excited, hoping that, like an Arduino, the 5v would be available through the signal pins. No such luck. The 5v pin is the only pin with 5v logic; all other pins operate at 3.3v, which is insufficient for the N-channel MOSFET used to control the water pump. Anyway, a new attempt: using the new NodeMCU unit with a switch relay. The other NodeMCU units couldn't do this as they were entirely 3.3v; the relay requiring 5v to flip the switch, but only needing 3.3v for the signal telling it to do so. Whether my relay works with 12v logic is another matter - I bought it for mains electric control, so it's only ever worked with AC. Wish me luck.

Watering problems...

So, I have been having issues with my automated watering system. I had built a moisture sensor from metal screws held in a plastic lid. Using nuts and washers I could hold wires in place rather than trying to solder on to such thick metal. To prevent surface water completing a circuit, I sealed the heads of the screws with waterproof caulk. However, after two weeks of good performance, the sensor went doolally and emptied the water source in one go. I had avoided the usual issue of electrolysis by powering the sensor circuit no more than four times an hour for a few seconds each time. The screws do not appear to be damaged, but readings are consistently showing high resistance, even in waterlogged soil. Rather than leave my plants at the mercy of the weather, or a malicious water sensor, I have decided to move to an ESP8266-driven setup. This setup uses and ESP8266 to trigger the arduino controlling the pump. Why two microcontrollers? The ESP8266 board only has 3.3v out, but has...