OpenSprinkler Forums OpenSprinkler Unified Firmware Problems updating 2.1 DIY

  • This topic has 3 replies, 2 voices, and was last updated 5 years ago by Ray.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41496

    CuriousG
    Participant

    So it’s been a while since I updated my firmware. Since it’s getting warmer out there, I thought I’d update to the newest firmware. I bought the DIY kit and unfortunately it’s susceptible to bootloader limitations.

    Ok fine so I have to now purchase a external programmer. I figure I could use this for some future project. No problem.

    So I look at the directions posted here: https://opensprinkler.freshdesk.com/support/solutions/articles/5000668400-updating-opensprinkler-2-1-to-firmware-2-1-6-and-beyond-

    After taking apart my OpenSprinkler and removing the LCD, I look for the ISP header and it’s not in the same place in the picture. Not a problem. I see it between the two biggest chips labeled ISP. Cool. So now I need a 2×3 header. Found a 2×9 that I had to desolder from some USB board then cut it so that it would be a 2×3.

    After soldering in the header I started to install AVRDude onto Windows 10. I find out upon plugging in the programmer that it needs driver for USBASP. So now I had to hunt down the driver which didn’t take that long after reading one of Ray’s blog post about easily installing the USB driver here: https://opensprinkler.com/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/

    So now I thought I was ready to program. I stick the adapter into the programmer and attempt to plug it into the header. Epic fail. The adapter is too wide to fit between the chips where the header is located. So now I’ll need to have another adapter to lengthen it to make it fit or I’ll have to shave off part of the adapter. At this point the mosquitoes were out and I wasn’t about to sit around fiddling with it some more in the open garage waiting to get Zika.

    Anyway, at what point will I have to keep making accommodations just to simply program this thing?

    edit:
    So I was able to extend the length of the header through jumper cables and a couple of old sound card cables. I was finally able to get it to see the the programmer using the command line with a brief green light. When it came down to programming I don’t think it sees the chip properly. This is an ATMEGA644A-PU. I guess I should be asking does the OpenSprinkler support the 2.1U DIY version for firmware 2.16?

    edit2:
    So I find out that the ATMEGA644A is actually ATMEGA644 or at least the signatures are the same so the directions I have for the DIY doesn’t apply when using the command with avrdude -c usbasp -p m644p

    In my case I should be using avrdude -c usbasp -p m644
    Of course this gives me:
    avrdude: warning: cannot set sck period. please check for usbasp firmware update.
    avrdude: error: program enable: target doesn’t answer. 1
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override this check.

    I also find out the current WinAVR program is running avrdude 5.01. So I find a link to the most recent version of avrdude which is 6.2. I update the binary and config file.

    I double checked my header and connection through the jumper cables to make sure I didn’t mismatch. It appears you won’t even get the red LED if it isn’t wired right. This is taking way more effort than it should to reprogram the firmware. Frustrating to say the least.

    #41526

    Ray
    Keymaster

    Before you proceed:
    1) Consider if you need the new features in firmware 2.1.6, which are support for remote stations and flow sensor. If you don’t need these features, there is no need to go through the trouble to use an external programmer. You can still update to firmware 2.1.5 through the USB port on OS 2.1.

    We have a number of OS 2.1 customers who want to upgrade to firmware 2.1.6 simply because it’s the newest firmware. The fact is, if you don’t need remote stations and flow sensor, it’s perfectly fine staying with 2.1.5.

    2) Since you have the DIY version, it’s assume that you have the hardware and software skills required. I understand it’s a pain to install USBasp driver for Windows 10, but at the time OS 2.1 was designed, it was way before Windows 10 came out. How could we predict what’s going to happen in the future?

    3) You are right that since the microcontroller is ATmega644 (not the -P version) you should use -p m644 parameter when using avrdude. I am not sure why you are getting an initialization failed error. Perhaps you can post a picture about the pin header and programmer plug so I can check visually if anything is wrong.

    #41562

    CuriousG
    Participant

    You’re right I don’t need those features. I have since updated to 2.1.5. Moving forward the firmware will be universal so any new added features or bug fixes I may want I’ll run into the same problems again.

    I also installed avrdude onto Windows 7 just to make sure Windows 10 didn’t come into play.

    Here’s a picture of the programmer, adapter and Opensprinkler.

    #41595

    Ray
    Keymaster

    I think the problem most likely has to do with the 6 wires from the adapter to the ISP pins on the board. Make sure the side with a stripe on the adapter cable matches the white stripe (next to the ISP pins) on the circuit board, and the ordering of wires exactly matches the ordering as if you were plugging in the adapter into the pin headers.

    Perhaps a more reliable way is to stack and solder another 2×3 male headers on top of the existing 2×3 header, that way the pins will stick out enough so you should be able to plug in the adapter.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Problems updating 2.1 DIY