Forum Replies Created
-
AuthorPosts
-
pbParticipantI am finally getting around to installing my water meter. Going through the maths and firmware for determining the best divider to use from my sensor, I have hit a bit of an issue. In this thread @Ray states the maximum rate of pulse accepted is 200 pulses/sec, however, looking through the firmware the debounce period seems to be 50ms which would only allow 20 pulses/sec?
The only practical issue I can imagine is that this sensor can send very high frequency pulses which may exceed the maximum frequency the firmware accepts (200 pulses per second).
ulong curr = millis(); if(curr-os.flowcount_time_ms < 50) return; // debounce threshold: 50ms flow_count++; os.flowcount_time_ms = curr;
For my application this isn’t a huge issue since my flow meter far exceeds the max rate so will need a divider anyway. If I divide by 270 rather than 27 I should end up with a single pulse per liter giving a maximum rate of 2 pulses/sec at full flow of 120 l/min. Or perhaps divide by 135 to give max of 4 pulses/dec.
pbParticipantI am about to install a hall effect flow meter into my mains line, my sensor is rated 1-120 l/m with Q=4.5. Therefore, at full flow it will produce 540 pulses per second, in excess of the maximum of 200 stated by Ray. I see a few options to solving this:
1. Assume the flow wont go above ~45 l/m (poor option)
2. Modify the firmware to allow 540 pulses per second
3. Introduce hardware to reduce the pulse rate by some factorOption 2 is likely the easiest, although changes like this always have downstream maintenance issues with future firmware updates. The micro would also have to deal with 540 interrupts per second, although the isr overhead would be low since all it does is increment a counter.
I think option 3 might be the best solution here with a divisor of 27 to give 10 pulses per litre and a maximum pulse rate of 20/sec. A regulator, Attiny85 and transistor should fit the bill here nicely. Configuring the transistor as an open-drain allows for voltage level matching using pin1 of the flow sensor on OpenSprinkler with its built in pull-up resistor. This setup might even fit into the head of the flow meter, or perhaps as a daughter board within OpenSprinkler.
Anyone have any comments?
pbParticipantThe file
EtherCardW5100_o.cpp
seems like the problem. What is that file? A google search of that file reveals this thread as the only reference. Is it perhaps a copy of an old file (‘_o’ == ‘orig’ perhaps?).Also, why is the code compiling stuff for a W5100 anyway, I presume you don’t have a wired ethernet connection on your ESP? I guess it might just be compiled because of the Ethernet #include, then not used by the linker.
pbParticipantThanks @Ray. I assumed it could be checked out into the sketchbook directory rather than the libraries folder. Once it is in the library folder it compiles as expected. Now to see if I can integrate MQTT…
pbParticipantI am still struggling to get the unified firmware to compile. The instructions linked by Ray appear to be out of date and apply to the pre-unified firmware.
Steps I am performing using Windows 10:
– Install Arduino 1.0.6
– Install SdFat library from GitHub into$HOME\Arduino\libraries\SdFat
– Checkout OS hardware definitions from GitHub OS
– Copyaopensprinkler
into$HOME\Arduino\hardware\
– Checkout OS-Fimrware from GitHub OS-Firmware into$HOME\Arduino\
– Change directory name of firmware tomainArduino
– Open Arduino and change board target to HW2.3
– Open .ino file$HOME\Arduino\mainArduino\mainArduino.ino
– HitVerify
This fails with:
DS1307RTC.cpp:28:18: warning: Wire.h: No such file or directory
DS1307RTC.cpp: In constructor 'DS1307RTC::DS1307RTC()':
DS1307RTC.cpp:37: error: 'Wire' was not declared in this scope
DS1307RTC.cpp: In static member function 'static uint8_t DS1307RTC::detect()':
DS1307RTC.cpp:44: error: 'Wire' was not declared in this scope
DS1307RTC.cpp: In static member function 'static void DS1307RTC::read(tmElements_t&)':
DS1307RTC.cpp:81: error: 'Wire' was not declared in this scope
DS1307RTC.cpp: In static member function 'static void DS1307RTC::write(tmElements_t&)':
DS1307RTC.cpp:101: error: 'Wire' was not declared in this scope
DS1307RTC.cpp:112: error: 'Wire' was not declared in this scope
DS1307RTC.cpp: In static member function 'static void DS1307RTC::read(tmElements_t&)':
DS1307RTC.cpp:81: error: 'Wire' was not declared in this scope
DS1307RTC.cpp: In static member function 'static void DS1307RTC::write(tmElements_t&)':
DS1307RTC.cpp:101: error: 'Wire' was not declared in this scope
DS1307RTC.cpp:112: error: 'Wire' was not declared in this scope
Any ideas?
pbParticipantI agree, an in-built MQTT approach seems best, but difficult with the current firmware. It seems the current implementations of MQTT (e.g npanel.project.free.fr/wp/?p=607) for the enc28j60 use the UIPEthernet library. So I think for now use a serial bridge will be the path of least resistance, even if it is a bit more of a hack.
pbParticipantDouble check you have the expansion cable around the right way at both ends. I think I vaguely remember someone having the same issue caused by incorrect orientation of one end.
pbParticipantOr use a traditional ballcock inside the tank as well as the solenoid. Thus, both the solenoid and ballcock must be open for water to flow.
This doesn’t help the dry pump start case.
pbParticipantCan anyone point in me it the right direction for the amount of current a 12VDC coil typically uses? The power usage of a 24VAC coil is explained in Rays blog post about powering 24VAC coils with DC, but I can’t find much equivalent info for 12VDC coils. I am interested in this to determine the most efficient setup for me considering I am powering the system on a 12V battery and intend on having the coils energised for reasonably long periods because of the use of drippers in my system.
pbParticipantI have finally made some progress with my setup, now the solar panel and battery are installed. I was about to some pipework and solenoids to get started on the plumbing, but now I have a decision of using either 12VDC or 24VAC solenoids. With the 12VDC solenoids the OpenSprinkler would be running directly off 12V, with the 24VAC solenoids I would use a regulated 9V converter. Either is likely to work, but which would be better? Cable distances are modest (about 30m/90ft max) and I plan on using 1.0mm2 (18AWG) cable so wire losses will be minimal with about 1ohm return resistance.
A couple of points I am debating:
– Power usage. Since it is battery powered I want to minimise the energy used. 24VAC coils @ 9VDC will probably win here.
– Reliability. One of the reasons AC is traditionally used is it performance over long cable runs is much better than DC. 9VDC is a reasonably low voltage so becomes more susceptible to noise etc. However, over 30m this is likely to be a non-issue.
– Complexity. Not having a 12VDC->9VDC converter is one less thing to wire up.
– Longevity. 12VDC coils being energised with a 20+V pulse may shorten their life? Probably insignificant.
– Cost. The solenoids I am looking at are the the same cost with with either 12VDC or 24VAC coils so no real issue.
– Expandability. Running on 12VDC might allow a few other things (like lights) to be controlled. No plans for this, but you never know….Overall I think I am leaning towards the 12VDC option, but open to ideas.
pbParticipantAny update on when the design will be published? I am keen to review the design to check it will fit into my system before purchasing.
pbParticipantThanks for the clarification Ray. My plan is to use a solar/12V battery setup to power things, so I will likely need to find a 12->9V converter rather than risking overheating solenoids. No biggie, just another thing to obtain and wire up.
Are you planning on putting the hardware design up on GitHub at all?
pbParticipantSo does this mean all new orders will be the updated v2.3 hardware? If so, I think I can hear my credit card calling…
February 1, 2015 at 10:45 pm in reply to: No Voltage on stations when the station is turned on #35444
pbParticipantHow are you checking the voltage? If you are using a multimeter make sure it is set to AC rather than DC.
-
AuthorPosts