Forum Replies Created
-
AuthorPosts
-
RayKeymasterThat’s a good suggestion, will put the MOVs closer to the OpenSprinkler item.
RayKeymasterThis should be pretty easy to do. At the moment I am completely occupied by other tasks. Since the project is open-source, you can feel free to make modifications yourself.
RayKeymasterThat is correct. That number is relative to today’s date. For example, if a program started on Apr 9, repeating every 3 days, then when you check the program on Apr 10 it will say starting in 2 days, and on April 11 it will say starting 1 day and so on.
RayKeymasterYup, that makes sense. I agree it’s more intuitive to set the number of cycles directly rather than setting an end time (and it saves a byte too, since storing an end time requires a couple of byte more than number of cycles). So it’s on my todo list for the next software update. Thanks.
RayKeymasterNote that each program also has an ‘end time’. For example, if the program starts at 8am, repeats every 4 hours, and ends at 4pm, then it will execute exactly 3 times: 8am, noon, and 4pm. So by changing the start/end time you can control the number of cycles.
Of course one limitation of this is it doesn’t do irregular intervals. For example, if you want the program to start at 8am, 10am, and then 4pm, you have to use at least 2 programs.
RayKeymasterI just came back from vacation today and received your kit in the mail. Look, when I say ‘check the solder joints’, that’s exactly what I mean: check the solder joints! I flipped the PCB and immediately noticed that one pin of the LCD female header is not soldered at all (the 5th pin from the right). If you don’t believe me, here is a snapshot of your PCB before I did anything to it. After soldering that pin, and replacing the Ethernet jack (yours had a broken pin), everything is working fine now. I will send it back to you on Monday. The good thing is that your soldering quality is overall pretty good, unfortunately that one unsoldered pin took much of your and also my time.
RayKeymasterAnother useful resource is the RTC for RPi tutorial by adafruit:
http://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/overview
RayKeymasterA while back Dan in CA sent me some instructions on how to use RTC with RPi. I tried and they seem to work. I’m posting his instructions here, hope these help:
FYI
after a few different iterations, here are the settings I used to access the RTC:1. added following lines to /etc/modules (sudo nano /etc/modules)
i2c-bcm2708
rtc-ds1307
2. added following line to /etc/rc.local
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device3. Reboot
must be root or use sudo: hwclock -r to read clock.
set the hardware clock from the current system time: hwclock -w
set the system time from the hardware clock: hwclock -sFollowing up on the RTC stuff:
You must ‘sudo -s’ before you can set the RTC.
RayKeymasterSteve, are you referring to the changes in formware 1.8.3 (vs the previous version 1.8.2)? The changes are all documented in the GitHub commit messages, and README.txt. For example, the commit message of 1.8.3 says:
main changes are 1) added back support for concurrent running mode; 2) new ‘device_id’ option which allows modifying the last byte of the controller’s mac address.
RayKeymasterThe Mac address issue has been addressed in firmware 1.8.3. Specifically, the last byte is now set as an option value which can be changed by the user. Random Mac address is also possible and may be considered for the next version.
RayKeymasterSteve,
If you haven’t noticed it, you should check the OpenSprinkler Pi project: http://pi.opensprinkler.com. This may be what you are looking for.
Regarding your questions:
– The flash is mainly consumed by program code, scheduling algorithms, and a small amount of the Javascript code for serving webpages. The bulk of the Javascript has been moved to external files stored on rayshobby.net server (otherwise there is no way to fit everything in 32KB of flash memory space). The EEPROM is mainly consumed by program settings, program data, and controller settings.
– Server related functions are all in server.pde (pde is the Arduino extension, it is really a cpp file)
RayKeymasterIf you have to run in parallel mode (sequential is off), you can modify the following line:
in interval_program.pde, around line 191, change
if (curr_minute != last_minute) {
to
if (seq==0 || curr_minute != last_minute) {this forces the algorithm to check program match at all times, instead of once every minute. Again, this change is very experimental, so use it at your own discretion.
RayKeymasterThanks for the feedback. I am glad OpenSprinkler Pi has been useful for your project.
RayKeymasterJosh,
No problem. You made a good point, so I went on and modified the instructions to make it clear that VIN and VCC voltages are measured in DC. Thanks.
RayKeymasterThese voltages are too high. Something is wrong. Try to power the controller through USB (instead of transformer), and measure the VIN and VCC voltages again. Also, you can measure the resistance between VIN and GND, also VCC and GND, and see if there is any potential shorting.
RayKeymasterYou don’t need to change the fuse bits unless if you are using an MCU that’s purchased separately elsewhere.
Regarding the power consumption: you need to discount the power loss on the switching regulator (about 75% efficiency regardless of the output/input voltage ratio) and the 5V->3.3V linear regulator (effectively 3.3/5 = 66% efficiency). For example, if the input voltage is 12V and current draw is 0.1A, the switching regulator will lose about 12 * 0.1 * 25% = 0.3 Watt, and the linear regulator will lose 12 * 0.1 * 75% * 34% = 0.31Watt. So about 0.61 Watt is wasted just on the voltage conversion.
RayKeymasterI am out of the country. Will take a look at your board after I get back Saturday next week.
To answer some of your earlier questions:
– all MCUs we ship are pre-programmed with the correct fuse bits. I assume yours are correct, otherwise you won’t be able to upload a program. in any case, did you by any change change the fuse bits?
– the default fuse bits set the MCU to use internal 8MHz RC oscillator. ‘Internal’ means it’s not connected to any external oscillator pins.
– The Ethernet controller typically draws about 180-200mA current during operation, so the power consumption is roughly 3.3V * 0.2 = 0.66 watt. Your measurement of 1 Watt does seem a bit high. How did you measure the power consumption?
RayKeymasterLook, if you can upload a program, that means the MCU is alive: it has to be functional and respond to SPI in order to receive program data and send data back for verification. So I am pretty sure your mcu is alive. If you want to check this more explicitly, you can flash an Arduino program that toggle a digital pin and place an LED across that pin with ground to see if the LED is flashing. The easiest would be digital pins 16 and 17 (which are also analog pins A2 and A3), these two pins are accessible in the pin out area.
Regarding the Ethernet jack schematic: the one published online is for the previous version of 1.4u (which uses SparkFun Ethernet jack). The new 1.4u (Oct 2012 version) is using the same Ethernet jack as the SMT version 1.4s:
https://github.com/rayshobby/opensprinkler/raw/master/OpenSprinkler%20Controller/hardware/v1.4/smt/OpenSprinkler_v14_smt.png
If you take a look, it does show pin 4 and 5 as the center taps, which match the datasheet.You mentioned: ” I no longer get a short between R4 and I get 50 ohms as expected”, I am losing the context here: did you mention that you had a short before?
If you still can’t figure out the LCD problem, you are welcome to send the kit back to me so I can take a look. However, I am traveling out of the country today, and will be back Saturday next week.
RayKeymasterThere are a few other potential causes, for example:
– the LCD might be damaged, although this is very unlikely unless if you have reason to believe that it’s damaged by 24VAC
– the MCU’s reset line (pin 1) is for some reason held to ground, causing the MCU to remain in reset state (also very unlikely since you can program the MCU successfully).
RayKeymasterHmm, that’s very strange. For the LCD to display that message, it really just requires a running MCU and connections from the MCU to LCD. Some questions/suggestions:
– I assume you have hardware v1.4u, right?
– could you post the number of bytes written as reported by avrdude?
– check the connections from MCU pins to LCD, specifically the following (note the MCU pins are referring to the pin numbers on the body of the MCU, not the Arduino logic pin numbers):
(mcu pin to LCD pin):
2 -> E
3 -> RS
6 -> DB4
11 -> DB5
12 -> DB6
15 -> DB7
RayKeymasterJust to make sure we are on the same page: you said the LCD does not display any message, is that still the case after flashing the firmware the correct way? The fact that you can flash firmware means the MCU is up and running, and if so the LCD should display a ‘Connecting to the Network’ message, independent of whether the Ethernet controller is up running or not.
RayKeymasterThe binary size (32768) does not look right. It should be a few hundred bytes less than that. Note that if you are downloading 1.8.2.hex firmware as an individual file, you should use the ‘Raw’ file link in GitHub, not ‘Save File As’, or ‘Save Link As’. Here is the direct raw file link of firmware 1.8.2 for OpenSprinkler v1.4:
https://github.com/rayshobby/opensprinkler/raw/master/OpenSprinkler%20Controller/software/compiled/v1.4/firmware1.8.2.hex
RayKeymaster@elek: I don’t completely understand how the controller works. Do you have the brand name / model number, or a link to the manufacturer website?
RayKeymasterI agree. The cable is sufficient to carry power over a long distance (as long as you use thick enough wire), but the issue is in the signal quality, especially if the mcu is sending out serial clock at a high speed. You can feel free to give it a try, but I suspect that it won’t be very reliable. Instead of wiring the expansion board 100 feet away, is it possible to place the expansion board close to the main controller, and extend the wires to those valves?
RayKeymasterHi Steve,
Sorry that I didn’t notice this thread yesterday. Since the first version of OpenSprinkler,Ethernet Jack has been changed a couple times to reduce cost: initially Pulse J00-0061NL, then SparkFun’s Ethernet jack, and now Hanrun HR911105A. Unfortunately these jacks have very different pinouts, so it’s important to know exactly which part to use for each PCB. Particularly, the extension boards are sometimes using undocumented PCBs. If you need, I can send you the schematics, but in general I don’t provide part number or build instructions for undocumented PCBs.
The Dec 2011 PCB uses SparkFun’s Ethernet jack: https://www.sparkfun.com/products/8534
Hope this helps. -
AuthorPosts