Forum Replies Created

Viewing 25 posts - 26 through 50 (of 76 total)
  • Author
    Posts
  • in reply to: Opensprinkler on ESP8266 #46583

    pbecchi
    Participant

    Not sure it can be done! Let me see what I can do but buttons and i2c must be defined!

    in reply to: Opensprinkler on ESP8266 #46579

    pbecchi
    Participant

    I am afraid you need to consider that you have to leave 3 GPio for input buttons and you may want to have 2 GPio for i2c for example for a LCD.
    As a consequence you have only 3 pin available for valve control. You better use an i2c expander PCF8274 to drive the 8 output relay!

    in reply to: Opensprinkler on ESP8266 #46577

    pbecchi
    Participant

    Take out
    Pins.cpp but leave pins.h

    Sorry…..having left all those unused files create confusion!

    Once you compile and build you have to define the configuration of your HW and change pins.h accordingly!
    Tell me your HW and I will tell you how to do it!

    Paolo

    in reply to: Opensprinkler on ESP8266 #46573

    pbecchi
    Participant

    It always​ the same problem there are files that should not be part of the compilation: this generate double definitions.
    Provide me a list of all files in your compilation. I will tell you the ones that need to be taken out!

    in reply to: Opensprinkler on ESP8266 #46557

    pbecchi
    Participant

    @komoya You specify the MCU at the time of compilation in the Arduino IDE menu: board Esp….

    in reply to: Opensprinkler on ESP8266 #46546

    pbecchi
    Participant

    I told you…it a trivial error! Just remove EthercardW5100_o files from directory they should not be part of the compilation……..
    I will take it out of the GitHub!

    If you have all library available it should compile!
    Have a try!

    Paolo

    in reply to: Opensprinkler on ESP8266 #46541

    pbecchi
    Participant

    Hi
    I will try to help you!

    I am sure it is a trivial error since a lot of people compile the code with no errors, but trivial errors are difficult to trace!

    First I need to know what files you are trying to compile and from what branch are they coming?
    Second I need to see if you have all library available.
    Third I need to have a full compilation print out.

    Paolo


    pbecchi
    Participant

    Hi Raul

    With the wemos D1 , little expensive but good ESP8266 choise, have you received the ultrasonic module and the relay module? You can try to connect it to your Wemos d1 following the schematics that i previously have given to you. Pay attention to the voltage : Esp 8266 GPIO are 3.3v while most of the boards are 5v. You can use the 5v out of the Wemos board for the v+ connection but you have to convert voltage on Esp Gpio input lines; the few components in the schematics are for that function.
    For the relay (normally 5v) with the appropriate driver transistor may be directly connected, pay also attention that relay contact are rated to the pump current and voltage.

    I will try to answer ASAP your post but I am afraid we are in 12h time difference.

    Paolo


    pbecchi
    Participant

    Hi Raul

    If you don’t have experience on Arduino IDE for Esp8266 , you should follow the installation instructions of GitHub.com/esp8266/Arduino.
    If you find difficulties may be the best will be that you tell me your configuration and the type components you want to use and I will compile and build the firmware for you. You will have only to flash the firmware and the config.txt file on the Esp8266 .

    Regarding Raspberry Pi it is possible to Port my code to it but it is going to be a long difficult work. I strongly suggest you buy another Esp8266 that will cost only few dollars! Or if is possible to use one of the OpenSprinkler IO to drive your relay pump, then you may use a single Esp8266 connected to the Ultrasonic sensor on tank 1.

    Today there is no possible connection of an Ultrasonic sensor to a OpenSprinkler unit!

    Keep in touch!

    Paolo


    pbecchi
    Participant

    Hi

    This is the list 9f what you need for your Hw:

  • 2 Esp8266 ,better 2 NodeMCU 1.2 with 4mB flash
    1 or 2 HC SR04 Ultrasonic sensors
    2 1k resistors and 1 3.3v zener
    1 relay module rated to your pump power
  • Using nodeMcu have the advantage of having all USB interface IC onboard, this way you can just connect to your PC for firmware upload.
    To power the unit any simple USB power converter will go.
    For connection of the HC SR04 you can follow the schematic of the wiki
    https://github.com/pbecchi/SensorServer/wiki/SENSOR-SERVER-Wiki.
    You can route the sensor signal to any Esp Gpio,. The second sensor is for the second unit if you want to measure also tank 2 !
    The second unit should be connected to a relay board: this device should be rated to your pump need and be capable to be driven by a 3.3v signal!
    Again any GPio can be used.

    The connections are so few and simple that you can do it with any breadboard board!

    Software

    One you get one NodeMcu try to compile and upload the Sensor server code, you need to have Arduino 1.6.8 Ice installed in your PC with Esp8266 Arduino Code libraries. You have to download also the driver libraries for the various devices ( I will add a list to the Sensor server Readme)!

    If you are successfully then you will have to just modify the config.txt file to define how sensors are connected to the unit and to add a couple of “rules” that will define how to control your relay.

    When you are ready I will tell you how to do it !


pbecchi
Participant

Hi Raul

I know that my wiki is somehow difficult to understand and that description of Sensor Server features is cryptic and obscure!
I have tried my best but I am not very good on explanations!
I believe that SensorServer is a very powerful code and have hundreds of potential utilisations. but it may not be so user friendly and detail explanations very every application is very time consuming!
I look forward to find some help and to get people , like you , involved on using the code and find possible examples!

Coming to your application:

In the attachment you can see how I understand your needs!

Sensor 1 measure level of Tank 1 and send commands to Sensor2 that control a Pump to fill Tank1 from Tank2.
Note : all area must be WiFi covered ( you can use any external WiFi repeater like TP-LINK CP210).

I assume you can install sensor1 in top of tank1, since a ultrasonic sensor is used to measure the water surface distance, and that you have power lines for all units. Sensor 2 can be mounted on top of tank2 (if you want to measure level of tank2) or everywhere near to the pump,since it will be controlled by a relay of Sensor2.

If this is correct , I can send you schematics of the 2 SensorServer units and a components list.
I will also tell you how to customise the SW for you application.

paolo

Attachments:

pbecchi
Participant

Hey guys

I know i am popping in this discussion a little late, ….but i may have what you are looking for!

Regarding ET0 , have a look to this thread https://opensprinkler.com/forums/topic/opensensor-logger-controller-for-opensprinkler-networks/ .

Sensor Server is a SW that run on ESP8266 and can log sensor data , does local computations like ET0 and control Opensprinkler units.
This way you can have a separate unit that using Hygro Temperature sensor and a small solar panel compute ET0 based on local values or, if you prefer, on WU datas. I have a unit like that that run im my garden since last july : ET0 calculated values are correct and reliable. The unit also run an interpreter like language (bitlash derived) and , with it, you can fully customise it to control local or remote GPIO lines and/or send API commands to a OpenSprinkler unit.

Regarding Flux detection and OpenSprinkler supervision I have also started a code that read pulses from a water flow sensor mounted on the main water line. The code read from OpenSprinkler units ( it is running with 5 units now) all watering schedules and measure flow used by each zone.
This flow is checked then for all following operations to be as the one recorded; if not a warning is issued so that you can check that zone or if all zone of a OS unit are not working the OpenSprinkler itself. So with a single unit a can check watering of all units!
This flow values are also very useful for ET based valve control : it is sufficient to know the zone surface to derive the equivalent mm of rain!

This OpenSprinkler WaterManager SW will be available soon or as an addition to OpenSensor or as a separate code!

in reply to: Opensprinkler on ESP8266 #46146

pbecchi
Participant

I have uploaded in https://github.com/pbecchi/OpenESP8266_Sprinkler/tree/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6
A release of a new branch of Open Esp8266 Sprinkler! This new release contain several improvements and also run on OS Bee 2.0 ,on OpenSprinkler 3.0 and in OpenSprinkler Solar.
Changes from previous releases are identified and described in https://github.com/pbecchi/OpenESP8266_Sprinkler/blob/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6/OpenSprinkler%20SW%20new%20features.md.
Please consider that the code is still under test (on OS Bee 2.0 and OS 3.0) and will need a deep cleanup at the end of testing,
The SW is now really multiplatform and it is compatible with a large variety of HW components! All you need to do is to configure you prototype configuration in the Pins.h file!

Detail instructions for installation and definition of pins.h file will come soon!


pbecchi
Participant

Porting of Open Esp8266 Sprinkler code to OS Bee 2.0 has been done!

I have uploaded in https://github.com/pbecchi/OpenESP8266_Sprinkler/tree/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6
A new release of Open Esp8266 Sprinkler! This new release contain several improvements and also run on OS Bee 2.0 ,on OpenSprinkler 3.0 and in OpenSprinkler Solar.
Changes from previous releases are identified and described in https://github.com/pbecchi/OpenESP8266_Sprinkler/blob/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6/OpenSprinkler%20SW%20new%20features.md.

in reply to: Announcement OpenSprinkler Solar #46144

pbecchi
Participant

I have uploaded in https://github.com/pbecchi/OpenESP8266_Sprinkler/tree/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6
A new release of Open Esp8266 Sprinkler! This new release contain several improvements and also run on OS Bee 2.0 ,on OpenSprinkler 3.0 and in OpenSprinkler Solar.
Changes from previous releases are identified and described in https://github.com/pbecchi/OpenESP8266_Sprinkler/blob/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6/OpenSprinkler%20SW%20new%20features.md.

in reply to: Running: Esp8266 Open Sprinkler on OS Bee 2.0 hardware? #45635

pbecchi
Participant

Thanks Ray
I appreciate your offer. If you give me a mail address I will be glad to send you my private address in Italy or if you prefer a US address where you can ship the unit.
That way I can test the code on your hardware!
Right now I have done most of the software and I am concentrating on the breadboard.
I have discovered that latching can be done with only 7 volts but the current is more then I had expected and consequently I fried some components and I am progressing slowly!
On the other side I have some good news regarding the battery duration :
With the Opensprikler Esp8266 and the new OLED display I find a 50 to 60 ma average consumption that lead to about 80 to 100 hours with 2 2600mAh batteries. With a 5w solar panel I can get the battery recharged in a full sunny day and I get 100 to 200 mA in a cloudy day …Therefore the actual total duration will be much more the 4 5 days with unfavourable weather conditions.

in reply to: Running: Esp8266 Open Sprinkler on OS Bee 2.0 hardware? #45529

pbecchi
Participant

Ray

I am progressing with my work and I want to discuss some of the changes that I want to make to Esp8266 Open Sprinkler code.

Using open and close routines from OS Bee code has not been a problem.
More work for adaptation of LCD output to SSD1306 OLED with option to include more informations on lower lines.
With a single button all option input output screens are not available…… Any way out?
OS firmware continuously send commands to valve’s pin, this behaviour I think need to be modified for OS Bee , opening and closing command should be sent only once…..Am I right?

I start testing the settings on a prototype I have built with 2 lipo batteries and a 8 relay board , the 2 lipos are in parallel to power the Esp8266 are switched in series for actuation of the latching valves. I have checked: 8 volts are enough to switch!
I will be glad if somebody could test it on a real OS Bee 2.0!

in reply to: Running: Esp8266 Open Sprinkler on OS Bee 2.0 hardware? #45457

pbecchi
Participant

Thanks Ray

I have started working on this ESP8266 OpenSprinkler code mod.

A couple of questions:

-I believe that using Adafruit libraries should not be a problem to simply transfer all 20×2 characters outputs to the 0.96 Graphic Display:do you agree?

-One single button should be enough for basic operations (I think that options need to be modified only from the web.)

-Since I don’t have an OSBee2.0 I am using a relay board and I take the valve switching power from a 9v battery(I hope is enough!)

When the code will be ready , I will appreciate if somebody can test it on a real OS Bee 2.0!!

in reply to: OpenSensor: logger & controller for OpenSprinkler networks. #45293

pbecchi
Participant

I have uploaded in github.com/pbecchi/sensorserver/wiki the detailed description of few application examples:

Example 1 . Measure of the water level in a tank or pool to control a local or remote refilling valve or pump.
Example 2 . Computation of hourly and daily ET0 from Weather Underground meteo data and/or local sensors
Example 3 . Glass house control from in/out Temperature Humidity for watering & climatic control(in preparation)

Any idea for other possible applications? Suggestions are welcome!

in reply to: OpenSensor: logger & controller for OpenSprinkler networks. #45214

pbecchi
Participant

Interesting application Mike!

If I understand correctely you need to measure ground moisture far from your home network and control an OpenSprinkler unit connected to your home network.
Keep in mind that with a cheap external repeater you can connect an ESP8266 at 300ft to 1000ft from your home and that for powering it you can simply use one of the several phone USB solar power supply available in the market.
The ESP8266 is consuming only power when is awaike , during sleep consumption is negligeable, and I presume your measurement can be done only few time a day.
Total cost cost be in the range 20 to 40 $ ;this is much less than the cost of a couple of XBee transmitter + MCU + solarpower supply.

In addition once you are connected to the nework used by OS units it is very simple to send API commands to conrol those units.

I am preparing in the github wiki a description of few example of the OpenSensor possible application:
one is a unit located inside a glass house that read internal temperature and humidity and ground moisture sensors and control en Open Sprinkler for spraying and operation of a blower and of a heater.

If you give me more detail on your application I can try to study better your case and develop a example, detailing HW and SW, that I will put in the wiki pages


pbecchi
Participant

I have finally uploaded to github.com/pbecchi/sensorserver OpenSensor that run on ESP8266 .
The code compute hourly ET0 based on data from nearby WU meteo station and use solar radiation from another station 40Km away. The ET0 are also computed from my house solar panels. Both value are very similar and correlate quite well.
The code read also the rainfall and can directely control OpenSprinkler water delay.
I use it now since 4 month with good results.
If you want more info on the code visit github.com/pbecchi/sensorserver or the topic https://opensprinkler.com/forums/topic/opensensor-logger-controller-for-opensprinkler-networks/

in reply to: OpenSensor: logger & controller for OpenSprinkler networks. #45188

pbecchi
Participant

//github.com/pbecchi/SensorServer is now online!

Remenber that it is still under development and not all features as been tested!

Your comments and suggestions are welcome!!

Enjoy!!

Paolo


pbecchi
Participant

I will upload the OpenSensor software on github very soon ;it will be available in github.com/pbecchi/SensorServer.

The software is in very early deploiement stage , it is under testing and it will need to be cleaned up and better organized

I am preparing a simple user manual that you will find in the github README file.

Regarding hardware the project is very open….. as long as you start with a local WiFi network and an ESP8266 ( I use Nodemcu boards in order to use any usb power supply!)
…you can select the setup you prefer connecting your sensors to any available pin: you will specify your HW setup at run time with a few simple commands!
Data can be logged locally on the internal flash memory (4MB) using a SPIFFS file: /logs.txt.This file can be read remotely by a web query.You can also send data to Thingspeak channels that you can read from everywhere.
The type of sensors that OpenSensor supports can be extended very easily including their libraries and adding few lines of code, the ones available right now are:
-ultrasonic distance sensor like HC SR04
-temperature humidity sensor like RHT 03 or DHT0xx
-one wire family sensors like ds18b20 temp probes
-any other GPIO input reading
-input data can be also optained by Web Query :e.g. data from another unit and Weather Undergroud Stations Data……
-you can also compute your data to be recorded

Output commands can go to any available output pin and control any compatible device :like relay, leds, alarms …whatsoever! or can be sent to another unit or to an Open Sprinkler station.

The number of available pin can be extended easily using PCF8574 multiplexer unit that you can connect with I2c.

The unit SW has been made only for remote control so ,at the moment, no local User Interface is forseen (buttons inputs and LCD could be easily added later!)

For debug and unit control a TELNET server line is available and you can follow the data stream as well as the internal computations.Flash from ESP8266 internal led are used to interpret possible errors at setup stage (like boot loop).

To control the unit at run time you will have to define a number of RULES and LOGRULES that can be added and modified remotely by an API command, the language is very powerfull and easy to understand is based on a simplified Bitlash interpreter(github.com/billroy/bitlash) that has been ported to ESP8266 with the addition of functions to access remote units pins. This way you can control any output line anywhere in the network1

For better understanding of the unit capabilities I will later provide examples on the github wiki.

Since SW is in very early stage and still under development , I look forward to have comments and suggestions from you guys!!!

Paolo


pbecchi
Participant

I am back with some encouraging results!

This is what I have done:
-I have solar panels in the roof of my house and an Arduino measure the KWh produced
-I have a swimming pool of 95 m2 and with expansion tank of 8 m2.

-I have a ESP8266 connected to an ultrasonic meter HC SR04 that:
measure the level of the expansion tank
get temp, humidity wind and solar radiation from 2 WeatherUnderground stations.
get KWh produced from home solar panels
calculate hourly ET0 with WU solar radiation and with solar radiation derived from Solar Panel
all data are recorded every 5 min. in a log file (in json format)

Results shows good agreement (in a stable weather day) between Solar panels and WU solar radiation data.
There is also a good correlation between the daily pool level change and daily ET0 values.

If anybody is interested I can provide log file printouts in Json format and additional details.

The code of this ESP8266 “Pool, Weather and ET0 logging station” will be on github soon.

Paolo

in reply to: Opensprinkler on ESP8266 #43525

pbecchi
Participant

Please!
Look at the main code…… include “SPIFFSsdfat.h” is commented out!
Last time I tell you, it is not part of the compilation !

Viewing 25 posts - 26 through 50 (of 76 total)