Forum Replies Created
-
AuthorPosts
-
RayKeymasterThere is an on-board relay on all current OpenSprinkler products (Arduino-based, Pi-based, Beagle-based). You can also find 24V AC relay on digikey or mouser.
RayKeymasterHardware design files are available on github.com/rayshobby. Here is the direct link to OSPi hardware design files:
https://github.com/rayshobby/opensprinkler/tree/master/OpenSprinkler%20Pi/hardware
RayKeymasterAh, sorry, I managed to forget about the USB permission issue.
One way to get around it is to run Arduino in sudo mode — open a command line window, go to the folder where Arduino 1.0.5 is installed (or alternatively, right click on the folder and select ‘Open Command Line Window Here’), then run ‘sudo ./arduino’.
Another way is to add the USB device’s VID/PID pair to /etc/udev/rules.d/60-rayshobby.rules Just copy one of the existing lines and change the VID/PID to 16c0 and 05dc. Then restart the virtual Linux.
RayKeymasterI’m certain that you have this information somewhere on the OpenSprinkler website but the information is a bit ‘dispersed’
You are absolutely right, I need to find a more organized way to present everything. One difficulty is that there are frequent changes and I am falling behind updating the website.
Looks like the wiki page has some detailed setup instructions by Nayr and Oarsman:
http://rayshobby.net/mediawiki/index.php?title=Set_Up_BBB
Feel free to modify the page to append additional instructions.April 29, 2014 at 11:16 pm in reply to: OpenSprinkler with Relays for Christmas Light control #25778
RayKeymasterYou can find 24VAC relays on Digikey, Mouser, or other electronic component distributors. For example, here is my search result on digikey:
http://www.digikey.com/product-search/en?FV=fff40010%2Cfff80367%2C120000a&k=relay&mnonly=0&newproducts=0&ColumnSort=1000011&page=1&stock=0&pbfree=0&rohs=0&quantity=1&ptm=0&fid=0&pageSize=25Also, note that all current versions of OpenSprinkler have a built-in relay (5V coil voltage, contact rating 120V / 2A and more recent version 240V / 3A). I would be cautious to use them to actually switch power-line devices, because the PCB traces are probably not thick enough to run a high amount of current at 110V. But they can perfectly switch low voltage (like 40V or below) devices.
RayKeymaster10 to 11 minutes a day is indeed out of the normal range, it’s likely a problem with the RTC or crystal. First, can you see if the RTC on your board is DS1337 (2×10 pins, relatively big), or is it DS1307 (2×4 pins, small)? We’ve received two reports of clock issues related to DS1337, and I suspect it’s that particular batch of chips that had problems. If you have DS1337, it’s likely to be affected too. If it’s DS1307, we haven’t received reports of clock issues, but it still might be the crystal that has a problem.
The NTP sync interval can be changed in software. Right now it’s set to sync every 24 hours, but can be changed to every hour or something. This does require re-compiling the firmware and flash the controller.
RayKeymasterOK, first you need to find out if you have OpenSprinkler 2.0 or 2.1, because they have different USB programmers:
On 2.0, the 24V AC terminal block is green colored, and the built-in programmer is USBtinyISP.
On 2.1, the 24V AC terminal block is orange colored. and the built-in programmer is a USBasp bootloader.If you have 2.0, make sure in VirtualBox under menu item Devices -> USB Devices, the USBtiny device is selected (so the host OS will pass it to the virtual OS). Then try to upload again.
If you have 2.1, follow the procedure below:
1) enter bootloading mode. to do so, unplug power, then press and hold the second pushbutton (B2) and plug in USB cable; release the button within 2 seconds after the USB cable is plugged in. the LCD screen should remain off, indicating the controller is now in bootloadering mode (and should show up as USBasp in the USB device list).
2) make sure in VirtualBox’s under menu item Devices -> USB Devices, the USBasp device is selected.
3) also in Arduino (inside virtual Linux), go to Tools – Programmer and select USBasp.
Now try to upload again.I apologize that the virtualbox image hasn’t been updated since the release of 2.0, that’s why you need to do the above additional steps for 2.1. Let me know if this works.
RayKeymasterUnless if you’ve changed the Python program to use port 80, keep in mind that it runs on port 8080 by default. So when putting the ip address in the app, remember you need to specify the port number, such as 192.168.x.x:8080.
RayKeymaster@frankie75: probably both are ok. The no-load voltage voltage is indeed a bit high (especially the 30.2VAC one you measured), but keep in mind that multimeters also vary in terms of accuracy. I’ve tested both Hunter and Rainbird transformers (which are probably the same model as you have), and they both work fine.
RayKeymasterThe power supply sounds ok. It’s not obvious to me what’s causing the problem. Two things I would suggestion: 1) take high resolution pictures of your board (under good daylight) of both the front and back of your PCB so I can check if there is any soldering issue; 2) when the problem happens, measure the voltage between VIN-GND and also VCC-GND and see if they are still approximately 5V and 3.3V.
RayKeymasterOpenSprinkler does not have a built-in USB-serial converter so the standard serial monitor will not work.
OpenSprinkler 1.x and 2.0 have a built-in USBtinyISP programmer. When plugging in the USB cable, it will present itself as a USBtinyISP device.
OpenSprinkler 2.1 has a USBasp bootloader and will present itself as a USBasp device in bootloading mode.To upload a program, you need to first open a program in Arduino. Your screenshots show that you haven’t opened any program (I can only see two # symbols). For further instructions, please check the ‘Upload and Modify Source Code’ section in the Firmware Update instructions. Here is the direct link:
http://rayshobby.net/?page_id=732#compile
RayKeymaster/home/pi/demo/gcalendar/ospi_gc.py:120: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(pin_sr_lat, GPIO.OUT)if you are using the pre-configured SD card image, it’s set to run Dan’s interval_program by default, which is written in Python. Since ospi_gc.py is also a Python program, if you run it without disabling interval_program first, you will get a GPIO conflict as the warning message you see. What you can do is to stop interval_program first. You can check the Wiki page here for instructions:
http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#Check_status.2C_start.2C_stop.2C_and_restart_ospi.py
RayKeymasterI know an OpenSprinkler user Mark B. is currently working on implementing the selective rain delay feature into OS firmware. Will post an update as soon as this is completed. Thanks!
RayKeymasterIf you are new to Arduino it will help to check some basic tutorial. For example, in Arduino software you can click on the ‘Upload’ button to flash a program onto the microcontroller. Have you tried to click the button?
RayKeymaster@sfbritskin: thanks for the suggestions.
1) one of the planned features in the new firmware I am working on is the concept of ‘serial groups’ — each station will be assigned a group index. There is a globally serial group (all stations by default belong to this group), a globally parallel group, and two or more custom groups. The idea is the controller will serialize all stations in one group, but stations in different groups are allowed to run in parallel (and any station in the globally parallel group can run in parallel). This should be a flexible enough to allow a complex mix of serial / parallel running patterns.2) Good suggestion. It should be possible to specify ‘sunrise time’ or ‘sunset time’ as the start time of a program. This will require the controller to check at least once per day the sunrise / sunset time, and it’s not hard to do so.
Thanks.
RayKeymasterThat’s a good question. Indeed 24V AC (COM) is not carried over the extension cable. That’s why on the expansion board the TVS is tied to ground, which is carried over the extension cable. This should still work because there is a TVS between COM and ground, so this is equivalent to have two TVS connected in series between a station wire and COM wire.
RayKeymasterDoes your switch require a power adapter? If so, make sure it’s powered. Since the controller can get an ip when connected directly to your router, I don’t see any obvious problem. The fact that the LED indicators do not light up when connected to the switch makes me feel perhaps your switch is not powered on.
RayKeymasterWhat type of 24V AC adapter do you have? Can you check the label and see its current rating? The recommended current rating is at least 400mA.
RayKeymasterIndeed the ‘prevent this page from showing alerts’ can cause confusion and if you checked it the browser will stop asking you for password. Glad you figured it out.
RayKeymasterDid you use the pre-configured SD card image? If so, there is a program called ‘select_program’ in the home folder that you can run to choose which program you want to set as default. You will need to run this in command line. If you didn’t use the pre-configured SD card image, you should check the instructions of each program to see how to uninstall it:
Dan’s interval_program: http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#An_alternate_method:
Rich’s sprinklers_pi program: https://github.com/rszimm/sprinklers_pi/wiki/Installation
RayKeymasterCool, very clever. Thanks for sharing!
April 16, 2014 at 12:58 pm in reply to: which software did you use to create the schematic and PCB #26485
RayKeymasterIndeed, it’s EagleCAD. Here is the direct link: http://www.cadsoftusa.com/
RayKeymaster@nayr: I had the same thought that an option can be provided to associate the relay to the master station. This should be useful in many situations. On the other hand, the master station only activates when there is another station scheduled to activate, so this puts some restrictions on the flexibility.
RayKeymasterOK, looks like it is indeed 2A. It’s true that connecting three stations in parallel would be the easiest, as no software change is needed. But I have never tried running a 2A device so I can’t say definitely it will work or not. If you decide to try this out, also note that OSBo has a on-board 2A fuse, which you either need to upgrade or solder a wire across it to bypass it.
The relay is connected to pin P9.16. Writing a high to this pin will activate the relay and low will deactivate the relay. Using the relay does require some software modifications. Probably the easiest is to conceptually assign the relay to a specific station (say station 1). Then you just need to go into the software and find where stations are activated and deactivated, then add a couple of lines of code to wirte HIGH or LOW to P9.16 if the station index matches the pre-assigned station.
RayKeymasterOK, glad to hear it’s fixed now. You can keep the extra LCD, no need to return it.
-
AuthorPosts