Forum Replies Created
-
AuthorPosts
-
RayKeymasterHeh, that’s a novel idea. I’ve thought about and heard suggestions on using OpenSprinkler/OSPi/OSBo for various other projects, such as Christmas light controller. But never thought about using it for sound system. I assume the sound system you are referring to runs on power line voltage. To reduce the complexity of wiring, I would actually suggest using RF remote power sockets instead of hard wiring. You can use OpenSprinkler coupled with an RF transmitter to wirelessly switch on/off power sockets. I’ve used this approach in several projects:
http://rayshobby.net/?p=3381
http://rayshobby.net/?p=7817
The nice thing is that a single RF transmitter can talk to several power sockets, so it’s pretty convenient.
RayKeymasterJust gave it a try on OSBo and it works surprisingly well. Very nice. I definitely think this will make OSPi and OSBo more user friendly. I am also thinking of how to get this work for the microcontroller-based OpenSprinkler. I know you have examples for Arduino with the standard Arduino Ethernet shield. The tricky part is that OpenSprinkler uses Microchip’s ENC28J60 and Jeelab’s Ethercard library. I checked yaler library for Arduino, seems it should be pretty simple to adapt to Ethercard library. I will probably shoot you an email offline to ask about some technical details. Thanks again for the excellent work!
RayKeymasterYou are right that there is unlikely to be any further upgrade to 1.x generation hardware — due to the limited program memory and RAM size of atmega328, any additional feature will be at the cost of removing an existing feature. So it’s gonna be very tricky to optimize everything.
The workaround you described is certainly an option. Another way is to modify the firmware source code to customize how the rain_delay status is applied. Specifically, in OpenSprinkler.cpp, find function:
void OpenSprinkler::apply_all_station_bits()
inside the function, check the following two lines:
if (status.enabled && (!status.rain_delayed) && !(options[OPTION_USE_RAINSENSOR].value && status.rain_sensed))
bitvalue = station_bits[MAX_EXT_BOARDS-bid];
this is where rain_delayed and rain_sensed status get applied on station control bits. If you know which stations you’d like to ignore rain delay for, you can modify the code and hard-code the station indices to allow them to bypass rain delay status. Then recompile and flash the program to the controller. This solution is not very elegant, but it does achieve what you need with minimal impact on program and RAM size.December 3, 2013 at 4:24 am in reply to: Push button power on and off (graceful) of Raspberry Pi. #25789
RayKeymasterThanks for sharing. I haven’t considered adding a soft power down button on OSPi. Personally I haven’t encountered a case where a hard power down causes SD card crash or something. I agree that adding soft power-down is an interesting feature to consider. It won’t help when there is a power break though.
RayKeymasterJust answered this in the other thread:
viewtopic.php?f=5&t=414
RayKeymasterBBB does have RTC, but it doesn’t have a built-in battery. So when designing OSBo, I included a DS1307 RTC with CR1220 battery. I am not familiar with the way you described: connecting the OUT/SQW pin on the RTC to the power button pin on the BBB. Would this trigger a periodic reset or something?
RayKeymasterForgot to mention: a batch of case tailored to OSBo has been ordered and it should be available around mid-December. The new case will have cutout for the Ethernet cable, and we can do a free exchange if you want.
RayKeymasterCool, thanks for sharing your work. I am traveling this week and will give it a try as soon as I can. Thanks.
RayKeymasterThe OSBo currently uses the same enclosure as OSPi, and so there is no special cutout for the Ethernet jack. Sorry about the confusion. Since it’s designed to mainly work with a WiFi USB dongle, I recommend getting an Edimax WiFi USB dongle. If you have to use an Ethernet cable, you can use a Dremel to enlarge the cutout.
RayKeymasterThe current DIY kit does not have built-in logging feature. It’s possible to use an external server, like a Raspberry Pi to log it though. For example, Samer’s OpenSprinkler mobile app provides a logging feature:
http://rayshobby.net/?p=6409
and there was an earlier work by Dave Gustavson that also enables logging:
http://rayshobby.net/?p=4821
RayKeymasterJust a quick note that firmware 2.0.2 is released, and the rain delay time is now written to EEPROM and preserved through power loss.
RayKeymaster192.168.x.x is your internal ip. In the app you need to provide your external IP. If you don’t know, just open a browser, and Google ‘what’s my ip’. Also, have you set up port forward on your router?
You don’t have to use dynamic dns, although it will certainly help if your ip changes frequently.
RayKeymasterThat’s a good suggestion. I was just thinking the other day that I am going to introduce the concept of ‘serial groups’ as a station attribute. There will be a globally serial group, a globally concurrent group, and a few additional custom groups. Basically stations within a serial group will be serialized, and stations in different groups are allowed to open concurrently. Every station in the globally concurrent group is allowed to run concurrently (i.e. they are treated as if each station is in a unique group). More intuitively, you can assign stations that are connected to the same water source to a serial group, so they will be serialized to preserve water pressure. If anyone uses opensprinkler for landscape lighting etc, those stations ca be assigned to the globally concurrent group to allow simultaneous running.
I am not sure when this will be in place. But I’ve thought about the algorithm and it shouldn’t be difficult to implement.
RayKeymasterAs KanyonKris mentioned, you can unplug the 3-wire cable (which provides +5V to RPi), and power RPi with a USB cable. The 8-pin cable has a ground wired, so as long as you leave the 8-pin in, the ground is shared.
RayKeymasterIf you are good at soldering and want to build one completely from scratch, go with 1.42u. Yes, you will be locked into 1.8.3 firmware, and there is no way to add SD card support due to the flash and RAM constraints. I wish Atmel could release an ATmega648 chip at some point, which would have solved this problem 🙂
If you are familiar with Python and want to tinker with the software, go with OSPi. It currently runs firmware 1.8.3 (Dan’s interval_program). There are also Rich’s sprinklers_pi program, and the Google Calendar based scheduling program.
If you want something that works out of the box without further assembly, go with OpenSprinkler 2.0s. It’s more expensive, because it’s more oriented towards the consumer market. But it’s still open-source, and give you plenty of space for hardware / software hacking.
If you want something in between fully assembled 2.0s and the DIY 1.42u, there is the DIY 2.1u that will become available in a few weeks. It’s not all through-hole though — about 60% assembled and the rest for you to solder.
RayKeymasterGlad to hear it’s working now. Thanks for the update.
RayKeymasterHi Felipe, it’s unlikely we will make an OSPi DIY kit. The OSPi circuit is relatively simple. It’s pretty easy to do a home-made PCB. For example, there is a recent post about it:
viewtopic.php?f=28&t=374
RayKeymasterNo, it does not damage the chip. Sorry for the confusion. It just means that the Ethernet controller will not work without the correct crystal.
In any case, even with the 32.768kHz crystal soldered on X1, it shouldn’t cause the controller to not go past the ‘Connect to Network’ screen. From your picture, everything looks fine and I can’t see any obvious issue (other than X1).
The fact that the LEDs on the Ethernet jack do not light up (assuming you have connected it to your router) is a strong indication that the Ethernet controller cannot initialize for some reason. One possible reason could be that some signal line is being pulled to ground. I suggest that you go through all the solder joints, and check if any solder joint is accidentally touching the ground plane around it (the grid area is the ground plane, it spans the entire PCB). When in doubt, use your soldering iron to melt the solder joint (i.e. reflow the solder joint) so that the joint will retract from the ground plane.
RayKeymasterHere are the steps I would suggest:
– Check if the green LED on the Ethernet jack is on.
– Go to options (press and hold the 3rd pushbutton while powering up the controller), and set DHCP to no (i.e. use static ip). Press and hold the 3rd pushbutton until the controller restarts, see if it can get past the ‘Connecting to Network’ screen.If the above two fail, that means the Ethernet controller has failed to start for some reason. You should carefully check the Ethernet controller, see if there are any bent or unsoldered pins. Also check if you’ve soldered the 25MHz crystal to the correct location.
If the above two succeed, it may have to do with the controller not able to get DHCP. Try static ip (make sure you set an ip that’s compatible with your router setings, and you set the correct gateway ip). Hope this helps.
RayKeymasterRFM12B is not included in the package and you have to purchase it separately. We used to carry them in store but they are now replaced by the simpler, cheaper and more common 433MHz and 315MHz RF transmitter / receiver. You can purchase RFM12B from a variety of places such as SparkFun, Modern Device etc. Note that only OpenSprinkler DIY 1.42u has PCB pads designed to fit RFM12B — the newer version of OpenSprinkler 2.0 does not have PCB pads for it (although it’s still possible to connect it manually to the SPI bus).
RayKeymasterSure, this can be implemented. The controller has several available GPIO pins to interface with temperature sensor. You do have to modify the source code to include temperature-based control though.
RayKeymasterWatering level is now named ‘Percentage of watering’ and it has always been stored in EEPROM.
Rain delay is not written to EEPROM yet but can definitely be changed to.
RayKeymasterSure, you can use any pair of Vcc / Gnd pins on the OSPi board. Those are designed for connection to external components. You should use Vcc (3.3V) and *not* VIN (5V), because Raspberry Pi’s GPIO pins in theory can only accept 3.3V input.
Note that Adafruit also has a tutorial on interfacing with these temperature / humidity sensors using Raspberry Pi:
http://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/
RayKeymasterCan you tell which version of Raspberry Pi do you have? Rev.1 (which does not have screw holes) and rev. 2 (which has screw holes) have slightly different pin names in Python, so you will need to change the pin name according.
On the other hand, the ospi_selftest program, which is written in C, should work in either case. So I would suggest running that first to see if your solenoids can turn on.
RayKeymasterSorry, I forgot about that. Will fix it next.
-
AuthorPosts