Archive for the ESP8266 Category

Short cuts

Posted in ESP8266, MQTT, NodeMCU, OpenSprinklette on December 18, 2016 by asteriondaedalus

The chappy doing OpenSprinkler gave me the best idea yet for the 24VAC to 5VDC to power the OpenSprinklette stack (Wemos D1 R2, fiddly bits including VAC2VDC and pullups, relay board).

Rather involves using a LM2596S-5.

I have in my bits drawers 10 LM2596S-ADJ based modules that go for US$2 a pop in packs of 10 so I will start with that for the prototype.

lm2596-psu-01-a-450x450

For the VAC2VDC the secret is to add a 3A diode (cathode to +ve volts input) of the PSU board.  It then likely passes for the circuit at the OpenSprinklette blog.

In fact, if you solder the pullups onto the two naughty GPIO pins you need to, either on WEMOS D1 R2 or the relay board, you could get by without an intermediate board.  There is still the conditioning circuits for the flow meters, but again, since we are using mqtt there is the option of a separate system for that.  I think we are already convinced that the rain gauge can twerp to an mqtt topic for example.  Although, there may be traction in a shield board for people who want no more than four zones and one unit – at least with the rain gauge input and 24VAC to 5VDC … oh and those pesky pullups.

Note we still need do something like string all the relay commons together now don’t we.

I guess the more interesting thing going on with the rain input of the OpenSprinkler is the use of a surge protection across the rain gauge input that has a Transient Voltage Suppression diode.  The selected value appears to be 48V which seems a lot but the gadget is used for ESD threats to the board (aka lightning – not strike likely but nearby EM field, up to a point).

This is actually necessary especially when there is  likely a long “antenna” from the rain gauge to the unit.

Might be less need if an ESP8266 is connected at the gauge and the solar panel and charger (we’ll need a battery to run at night time) are similarly “close by”.  Already solved in any event.  

Hmmm.  Lightning detection

Ah ha! Digital rain gauge spare parts!

Posted in ESP8266, MQTT, NodeMCU, Wifi on December 17, 2016 by asteriondaedalus
rain-gauge

Rock it to me baby!

So, get this, for US$15 you can get a rain gauge that does naught but yep, still yep and yep, then maybe nope.

That is, the cover has a funnel and water drips in and cycles the rocker!

 

simple

Simple tich?!

 

That likely needs nothing more than one of the ESP littlins …

esp8266

… to chirp tich/toch onto a mqtt topic.

Almost there

Posted in ESP8266, OpenSprinklette, Wifi on December 17, 2016 by asteriondaedalus

I got a prototype shield today to sit between my WEMOS D1 R2 and the quad relay board to work on my OpenSprinklette design.  I will get a PCB made once I debug the design.  It will need a 24VAC to 5VDC on it to power the WEMOS and the relay board.  The 24VAC will come from the wall plug from the old sprinkler system.

Not to mention a couple of pesky pullup resistors and an input for flow meters, though that will take some thought, and of cause ports.  So the flow meters might sit on a WEMOS mini as an afterthought.  Still brainstorming that aspect.

I am still setting up one of my ODROID-C1 to be the mqtt and red-node server.

I will buzz out the system with my PC install of red-node in any event – for the moment at least.

I decided I will add a dip switch to allow for 15 modules.  I will keep one for a broadcast so all on/off.  Most people can get by with 1 or two modules in any event.  So yes, module ID will be 1..15.  Software will sort the zone to module story – of course.

The use of google calendar will mean using NTP protocol isn’t as important but it might serve as a network alive function.  I will need think about response to network down.  All relays open circuit is good general response.

Still, I think we need a watchdog to catch other issues, like the google calendar connection down, so maybe a timer that shuts the zone off after 45min and then calendar events can be set at 1/2 hour increments.  You just set two 30min back to back to get an hour.

I am also playing with options for zones.  The broadcast to all zone can be the calendar entry without title.  Otherwise, a comma delimited set of zone numbers in the title of the calendar entry can be used to set individual zones on/off.

The various weather gadgets are great for prediction but I will need look at moisture and rain sensors.  I found you can get shields for the D1 mini that are lipo battery chargers so I am thinking of a set up with solar power for on house and gazebo roofs for reporting rain and then same in garden for moisture.

Though, the moisture ones would need to be dog proof.  Hmmm.  Bury them, but would the wifi reach the surface?

It’s getting REAL!

Posted in ESP8266, Lua, MQTT, node-red, OpenSprinklette, Wifi on July 12, 2016 by asteriondaedalus

20160712_183121

So the four-4-US$12 flow sensors have turned up.  The minimum measurable flow rate appears to be 1 litre a minute.  To put this in perspective Bob Hawke (ex Australian Prime Minister) sculled a yard glass (1.4 litre) of beer in a record (for the time) 12 seconds.

In comparison irrigation “emitters” tend to be in the ranges of:

  • 2,0 liters/hour – 1/2 gallon per hour
  • 4,0 liters/hour – 1 gallon per hour
  • 8,0 liters/hour – 2 gallons per hour

Now this will be per emitter so you will need around 8 times 8,0 liters/hour “emitter” in a line to get a 1 liter/minute flow by napkin scribbles.  A whopping 30! 2,0 liters/hour “emitter” will be needed to get a 1 litre/minute flow in a line.  Note, there may well be more than enough “emitter” to turn the paddle but that will depend upon the individual installations.

Not really a problem as the intention was to use this as a leak detector as the rate will be driven up but the leak, especially if your dog has dug up and chewed through a hidden hose, as evidenced by …

20160617_083246

… mind you that one didn’t need a leak detector to find.

These sensors are advertised as low precision in any event so really not a problem.  So this won’t be of use to meter your water usage.

I am playing with the idea of higher precision flow sensors – to set time-versus-budget constraints  – but I will roll that in as a separate option as such a flow meter can likely go on the input rather than output lines, and as we are using MQTT the high precision flow-sensor can also be separate unit to the valve controller/line flow sensor.

All the signal integration will occur in the main host.

Differences between WeMOS and UNO pin numbering

Posted in Embedded, ESP8266, IOT, Lua, OpenSprinklette on June 29, 2016 by asteriondaedalus

The table below shows the mapping between the UNO pins, the pins on generic 4 relay shields, the ESP8266, and the WeMOS UNO clone for you info.

UNO Relay on Shield ESP8266 IO Index ESP8266 Pin WeMOS IOL/IOL1
PD4 4 2 GPIO4 D2
PD5 3 3 GPIO0 D3
PD6 2 4 GPIO2 D4
PD7 1 5 GPIO14 D5

 

OpenSprinklette

Posted in Embedded, ESP8266, IOT, Lua, MQTT, Networking on June 29, 2016 by asteriondaedalus

So, just got delivery of my 5 WeMOS uno clones …

 

arduino killer

… and 5 …

5v 4 Channel Relay Shield Module For Arduino

… we are now ready for OpenSprinklette!  All up AUS$11.00.  Only four channels but add a second unit for sum total of AUS$22.00!

So, a little work as we need to convert the 12volt AC to DC, should work a treat as the WeMOS board is happy to take 9-24V and also provides the 5V the relay board needs (apparently the 3.3V outputs should be okay *whimper*).

Now, since the “leak” (and the $3K water bill for the quarter) I will fit flow sensors to ensure flow is within expected range – so the unit can raise alarms.  Got 4 from Aliexpress for US$12 (or US$3 per sensor) which is better than the AUS$15 per sensor LittleBird is pinging people for similar devices.  Just needs a 3.3V zener and a 220 ohm resistor to adapt the 5V output of the sensor to the 3.3V inputs on the WeMOS.  Will build that onto a protoshield. (Anyone know what the connector type is from the photo below?)

flow

The NodeMCU provides NTP so I can run timers on WeMOS.  MQTT to the ODROID-W server (in the house) to pick up the watering times, weather off internet to decide upon whether or not to water etc.

A second two will be used for remote control of back and front yard lighting.  So remote ON/OFF and IR triggered to boot.

 

Arduino Killer!

Posted in Arduino, ESP8266 on February 20, 2016 by asteriondaedalus

And voila!

arduino killer

ESP8266 based. Uno form factor.  $6!!

Now along with something like this for $4 …

relay shield

You can have an OpenSprinkler killer for $10 instead of $155!!!

Still my old BlackWidow is fine for my home use but I have a backlog of family and friends wanting a wireless sprinkler controller.  Just takes a pickoff of the 12volt AC used to drive the sprinkler valves to create the voltages for the board.  A rectifier and few capacitors into a voltage regulator et cetera.

Goodbuy OpenSprinkler *sniff* so sad to see you go.