January 26, 2017 at 7:29 am #45302
I was thinking to run Esp8266 Open Sprinkler on OS Bee 2.0 hardware.
I imagine that I will need to do some minor modifications for buttons and TFT display!
Most of the code should be compatible with new hw including the DC Valves control code…is’nt true?
PaoloFebruary 5, 2017 at 11:42 pm #45361
Yes it should be fairly easy to modify your ESP8266 based OpenSprinkler code to run on OSBee 2.0. Here are the main differences I can think of:
– OSBee uses a universal solenoid design, so the control is slightly different from standard OpenSprinkler. In non-latching mode, it’s almost the same, except that the logic is active low (i.e. a low turns on the valve); in latching mode, the COM and zone pins are controlled in pairs to allow voltage to be applied to each zone valve in positive polarity or negative polarity. The OSBee source code (specifically osbeewifi.h and .cpp) obviously shows how this is done. I suggest just following the OSBee code.
– OSBee 2.0 uses 128×64 OLED (SSD1306) display, and it has only one button. Also, it uses PCF8563 RTC (OpenSprinkler uses DS1307), but if you just copy the i2crtc.h and .cpp that is designed to handle with both types of RTCs.February 23, 2017 at 12:27 pm #45457
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!!March 10, 2017 at 8:46 am #45529
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!March 15, 2017 at 10:14 am #45578
“With a single button all option input output screens are not available…… Any way out?” –> I think the simplest solution is to ignore using buttons to adjust option values — since most options are adjustable through the web interface, it’s not common to use buttons to adjust the values. Another option, which is more complicated, is to use button press of different lengths or different number of clicks to simulate different buttons. For example, short click, long press, double click, triple click etc. But this require some code to detect these different patterns.
Regarding the ‘continuously send commands to valve’s pin’ — you are right: on the OS, this is done to make sure the pin is synchronized with the controller status (there have been rare occasions where the shift register incorrectly flips the pin value, possibly due to signal interference, so it’s necessary for the microcontroller to refresh the shift register once in a while). For latching solenoid valve, you don’t need to do so.
Some latching valves, like Hunter’s, can be activated or deactivated with 9V battery. Orbit valves require at least 16 to 17 volt, I believe.
I will be glad to send you an OSBee as a gift if you send me an email with your shipping address. Thanks.March 19, 2017 at 4:59 pm #45635
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.March 22, 2017 at 11:34 am #45656
Sure, send an email to [email protected] and we will ship one to you.
Latching valves generally have a coil resistance of only a few ohms (like 3 to 5 ohm). So upon activating or deactivating, it really draws a high impulse current (several amps). The good thing is that it only needs such high impulse current for 25 to 100 milliseconds. That’s why using a large capacitor to provide this impulse current is the best solution, that can avoid depleting the battery or power adapter, or trigger a power reset.May 6, 2017 at 3:50 pm #46145
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.May 20, 2017 at 6:38 pm #46321
Cool, thank you very much!March 30, 2018 at 12:25 am #49442
Hi, just wondering what board selection to use in your Pins.h file for a stock standard OSBee ? Trying to compile your code to run on this while waiting for the unified OS to be extended to this model.
Found my answer by further reading the Pins.h file.April 13, 2018 at 5:54 pm #49560
I managed to get your code to compile however I need a bit of help on the Pins.h for non-latching valves as I’m using on OSBee 2.0 hardware.
What options do I need to have set below ? I tried removing the // from the //#define OSBEE_NOLATCH line the code fails to compile and complains
OpenSprinkler.cpp:1207: error: ‘options’ was not declared in this scope
if (options[OPTION_SOT].ival != OSB_SOT_LATCH)
///////////////////////defines for OS Bee////////////////////////////////////////////////////
#define PIN_COM 0x23 //pin for valves return line
#define MAX_NUMBER_ZONES 3 //num.of zones_______________________needed
#define st_pins OpenSprinkler::station_pins //pins used for attached Zones
#define PIN_BST_PWR 14 //pin boost power____________________needed //for OS Bee 2.0
#define PIN_BST_EN 0x24 //bin boost enable___________________needed
#define OSB_SOT_LATCH 0 //value of option for non latching valves___for OS Bee 2.0
#define PIN_COM 02 //pin for valves return line
#define PIN_BST_PWR 15 //pin boost power____________________needed //for OS Bee 2.0
#define PIN_BST_EN 16 //bin boost enable___________________needed
#endifApril 14, 2018 at 12:54 am #49562
I am afraid that my code work only for latching valves!
To add non latching option it require now a non trivial change of the code .
I am busy now on SmartSolenoid, a battery wireless controller, and I have very little time available…..sorry!March 19, 2019 at 3:33 am #59390
I am trying to compile your code via Visual Studio, but constantly getting errors on missing “Arduino.h” file, etc.
Do you have a compiled firmware.bin for latching OSBee board? (to avoid trying to figure out what’s wrong with my setup as post of the names are in Italian and I don’t understand half of it :-))
ThxMay 15, 2019 at 9:19 am #60367
I’ve honestly never used VS to compile firmware code. You can either use Arduino directly to compile it (you do have to follow the instructions to install the ESP8266 core etc) or use the makefile.
- You must be logged in to reply to this topic.