Ok, this post is a bit late, as 1.3u has already started selling since Tuesday this week. Anyways, 1.3u is a minor revision since 1.2u. There are only a few changes (see Release Notes for details), so I didn’t make a release video. This post explains why these changes were made and some of the technical details.
- Added shift register OE (output enable) line
- TXD/RXD are now used as general I/O pins.
This change was made to free up the A2 and A3 analog pins, since there have been many requests to make more analog pins available in order to connect external sensors like temperature and humidity sensors. Because TXD and RXD are now used as general I/O pins, they can no longer be used for Serial communication. In fact, since they are not used to control the LCD, calling Serial.begin() or Serial.print will cause the LCD to display garbage. If you need Serial communication, you can use the SoftSerial library which can simulate Serial communication on any pins.
- Added coin battery holder.
Warning: this is a feature under development. It requires software support which is not available yet. The goal is to have a backup battery which allows the mcu to continue time keeping even when power is lost. Actually the easiest solution would be to just add a DS1307 Real-Time Clock (RTC). But my main hesitation is that DS1307 is quite pricy. Well, it’s not hugely expensive, but at $2 a piece (volume pricing), it is actually more expensive than the ATmega328 mcu. Isn’t that a bit silly? Anyways, the time keeping business can be well handled by the mcu itself. First, the mcu can run at a voltage as low as 1.8V, so when power is lost, it can continue running on a low-voltage battery; second, during power loss, the mcu will mostly be in sleep mode, using an external 32.768 kHz clock source, and occasionally waking up to update the time counter. This way, it can basically do whatever the RTC chip can do.
The only tricky part is detecting power loss (which is already possible with the Power Sense pinout), and turning off peripheral components such as the Ethernet controller to minimize power consumption during sleep mode. These require some further experiments, which have been put on my todo list.
This is mainly to address an issue with 74HC595 shift register that on powering up the output values are undefined. This can potentially lead to valves being randomly turned on for a short period of time before the mcu takes over and clears output values. It is not a huge issue, but quite annoying. It turns out that one simple solution is to add a control line to the 74HC595 OE (output enable) pin. This pin is active low, which means when set to low it enables output, and when set to high, it forces the output to be in high-impedance state, therefore the triacs will not turn on and the valves will remain closed.
In 1.3u, Arduino digital pin 3 is assigned to control OE, and a pullup resistor is used to pull the pin high by default. On start-up, before the mcu takes over, OE is high, disabling output; then when the mcu completes initialization, it sets OE to low, enabling output. That’s it. Simple solution.
Because of the added line, the extension board connector has been changed to 2×4 format (previously it was 2×3). If you own a previous version of OpenSprinkler and would like to use 1.3u extension board, you just need to solder a wire between the OE pin and Gnd , in order to enable output by default.
Another minor change is adding two resistors for the LEDs on the RJ45 Ethernet connector. In OpenSprinkler v1.1 and v1.0, the Ethernet connector did not have built-in LEDs. Then when I changed to use SparkFun’s RJ45 in v1.2, I forgot that it actually has built-in LEDs… So in this version the LEDs are wired in, which makes the circuit more complete 🙂
That’s all for OpenSprinkler v1.3u update. In case you are wondering about the frequent hardware changes, keep in mind that we are continually improving the design based on feedback and comments received from users. We run small batches (a couple hundred) for each version, that’s why we can have quick turn-around time in integrating new hardware features. At some point when the hardware becomes mature, we will make a surface mount version to improve the production throughput. Hopefully that point won’t be too far away!