March 11, 2016 at 6:49 pm #41723
OK, I’ll start building and help you debug as soon as you post your design.March 12, 2016 at 1:37 pm #41724
HARDWARE for OpenSprinkler with ESP8266.
The code is compatible for several different hardware configurations:
MCU: ESP8266 or ARDUINO MEGA
VALVE CONTROL: SHIFT REGISTER (like 74HC575 …. ) or I2C EXPANDER (like PCF8574)
RTC DS1307 or DS3231 breadbords with I2C epproms (like AT24C32 )
LCD LCD1602 or 2004 with parallel or I2C interface (or driven with a PCF8574)
BUTTONS on ANALOG or DIGITAL Inputs Lines (or trough a PCF8574).
So to start debugging it will be necessary to have at least one ESP8266 (better a NodeMCU v1.0 ) a RTC clock board (with EEPROM) and an LCD (better with I2c interface).
It will be good to have or a SHIFT register chip (like 74HC575) or a PCF8574 : leds can be used for debugging ,
later we can go with relay boards or with a simple Triac circuit.
Remember that voltage level for ESP8266 is 3.3V and this apply to all pin (5V is no good) better to verify that I2C components are 3.3V level compatibles…..
or to have a level shifter!
I am preparing a Fritzing project for components connection that can be done easily on a standard breadboard.March 12, 2016 at 4:00 pm #41725
That’s great! Can you upload the code?March 16, 2016 at 11:06 am #41750
@pbecchi: regarding storing wtopt.txt SPIFFS, it might have to do with the parameters you used when calling the SPIFFS.open function. There are a number of different options, like ‘w’, ‘r+’, ‘a’, ‘a+’. If you are reading from an existing file and modifying it, use ‘r+’; the ‘w’ parameter will cause the file to be overwritten.
I just finished and posted my OpenGarage project:
if you go to the Github repository:
you can find the code relevant to the configuration files (config.txt). The code is able to create a new file if it doesn’t exist, modify it or delete it upon factory reset.
March 19, 2016 at 5:56 am #41772
- This reply was modified 3 years, 3 months ago by Ray.
Thanks Ray for your suggestions!
I want to inform you and everybody interested that
you can find first beta release of OPENSPRINKLER ported to ESP8266
Look forward to your comments and suggestions!
March 20, 2016 at 10:27 pm #41810
- This reply was modified 3 years, 3 months ago by pbecchi.
Cool, very impressed with the level of details you have provided. I have bookmarked it and will check it out in a few days.March 21, 2016 at 6:20 pm #41825
I didn’t have enough time to build the project but I was able to compile it. I had problems with (#include ../) statements. I fixed this by moving all files to the same folder and get rid of (../). Also the LiquidCrystal-I2C-library that you linked didn’t compile and I used this one https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip
I will probably build the proto 2 circuit tomorrow but I couldn’t figure out where you declare the I2C addresses. It would be helpful if you can post a circuit schematic.
Thank you for your effort, great job!March 22, 2016 at 1:18 am #41828
I am glad you could get already there! As I told you I need to complete documentation:
yes , if you are using Arduino IDE you need to have all files in the same directory and to delete “../” from include statements.
about lcd i2c library….. there is a large choise
Declaration of all pins are in pins.h file for i2c use standard D2,D1 orchange it to your needs
Anyhow…… today I will add documentation for compile and build and the sckematicsMarch 23, 2016 at 6:16 am #41837
I’ve build the circuit lcd and opensprinkler work but it doesn’t recognize the PCF8574 so no output.This is the serial output `wire begin
I2C device found at address 0x21 unknown
I2C device found at address 0x27 unknown
I2C device found at address 0x57 AT24Cxx
I2C device found at address 0x68 DS3231
Setting software MAC
Using http port 80
Reading password file….
6 networks found
0: home_No_internet (-46)* passw. available
1: Pargas_Distillery_Amicos_f&bar (-75)
2: home_No_internet (-77)* passw. available
3: Pargas_Distillery_Amicos_f&bar (-45)
4: 01.EpavliVeneti (-89)*
5: Test (-66)*
Connecting to home_No_internet
Server started IP=192.168.1.4
Local IP: 192.168.1.4
Gateway IP: 192.168.1.39
DNS IP: 192.168.1.39
DHCP IP setup successful
Ethernet setup complete
`March 23, 2016 at 7:19 am #41838
I am impressed ………………..you are really fast:
-this is a bug in ScanI2C() already corrected : look at the new branch I have uploaded yesterday!
-remember that as the code stand now the I2C LCD has his own library
so his address should be given with #define LCD_ADDR 0xnn otherwise is will be considered an expander.
Web Server works? No other bugs? Logging doesn’t work am working on it!
Since your so fast… I will try to answer ASAP….but consider time zone (I am in Europe!)March 23, 2016 at 10:48 am #41840
The new branch works like a charm!
I also had trouble logging into the web server(it didn’t accept the default password). Fixed it by deleting stored data on Mozilla.
I’m using a relay board for the output which is active low, so I had to reverse the output logic. Posted some changes on github.
Don’t worry about the time zone I’m also in Europe Greece.
Thank you for your quick reply!March 24, 2016 at 4:57 am #41850
I am interested:
-it your breadboard working OK?
-have you tested most of the OS features?
Most of the bugs I know have been corrected…. I am waiting for new issues… to try to complete debugging!
Then I want to start putting new features in the code of OS.
PaoloMarch 24, 2016 at 10:41 am #41852
My breadboard is working and I have tested most of the OS features. Today I also added buttons. I used buttons on ESP GPIOs pins(12,14,16 on a NODEMCU 0.9) they need pull-up resistors to properly work but everything works fine.Tried also the ADC buttons on a DFrobot(freetronics) shield but they didn’t work first try but I didn’t put much effort in it. Do you need me to check any future or specific hardware configuration?March 24, 2016 at 4:02 pm #41855
I can also confirm the flow sensor is working. The only think that doesn’t work as you already mentioned is logging. Getting Error retrieving log data. Please refresh to try again.March 24, 2016 at 4:19 pm #41856
AdC buttons worked on my first prototype but control of the unit require double pressing that is not possible with 3 ADC buttons.
Yesterday I have fixed the logging that wasn’t working….all other OS features seams to work but I have just tested only 2 Hw configurations!
So please do all the test you want I just let me know if everything is OK!
Then we can go on and think about improvements :
-I want to bring the weather routines inside the code so that it could be possible to change the algorithms and take into account local sensors.
-It should be also feasible to change the display and buttons (Now the local control of the unit is really complex and “unfriendly”):may be a touch screen display…should do the work much better!
I want also to write a code to run in a remote master unit for control and coordination of several OpenSprinklers!
If you have time,and wish to participate……….there is a lot to do!
You must be logged in to reply to this topic.