Arduino pump timer with GLCD

I’ve been making a timer for my garden watering system as I have bought a few cheap timers from Amazon / Ebay in the past but they were either rubbish or went faulty within a year so I decided to make my own. I used a 240×64 graphic LCD salvaged from an old & obsolete HP 9100C digital sender which I have had in my cupboard for around 14 years. It has a standard parallel interface so can be connected to an Arduino easily. The reason behind using such an over the top LCD for such a simple device was because around 13 years ago I intended to make a status monitor for my PC using LCDStudio software to drive it. The LCD was connected to the PC’s parallel port and housed in a project box containing the negative voltage generator (more on this later) and the backlight board. Anyway needless to say I got it to work; you can find some old photos of it in the project notes.

The completed water pump timer

Like many things I never got round to actually using the status monitor partly because the LCDStudio software was not being actively developed and such didn’t work on newer operating systems. Also my new PC didn’t have legacy parallel ports and I could not get it to work with a USB to parallel converter nor a PCI-E parallel card. So it got forgotten about until I decided to see if I could get that screen working on an Arduino. To cut a long story short, I did and made a few test circuits including a text adventure game, serial terminal and a graphic LCD clock. I got bored of that adventure game and had no need for a 40 pixel wide serial terminal nor did I need another clock so I modified the clock into a water pump timer. The LCD screen uses up almost all of the pins on an Arduino Uno / Nano so it wasn’t much use to me for anything else. Said clock code came from a demo for the T6963C library which needed major modification to work on modern versions of the Arduino IDE as it was still using the .pde file extensions.

So on to further details about how I went about making it…

I had a hard time finding my notes from 12-13 years ago about making the negative voltage generator, most were hand written and I had since lost them but I found that the LCDStudio site and forum is still going and my old forum post was still there. I found the schematic for the negative voltage generator circuit on my PC and copied the pinouts for the LCD module from my post on the forum. Here’s the schematic for the negative voltage generator and the parts list etc can be found in the project notes file further down this page.

Internal view of the timer case

I had built the circuit already onto a piece of large veroboard and luckily for me there was enough room to fit an Arduino nano board and a DS3231 RTC module which were duly installed and connected to the LCD module. I was surprised that the screen still worked as it must have got damp at one point as the veroboard smelt of damp and some corrosion on the metal parts. The LCD uses a CCFL backlight and I had also salvaged the original inverter board which originally needed a 24V supply but it worked on 12V albeit with a much decreased brightness. The pinout for the 6 pin connector was a mystery too but I soon figured out that only 3 pins are used; ground, enable and brightness. I tied the brightness pin to ground and the enable pin was connected to the Mega328P so that the backlight could be turned on and off through software. In my timer it comes on whenever the buttons are pressed and turns off automatically after 30 seconds to save power.

As for the rest of the timer it only needed a 5V relay module to power the pump and the whole lot fitting into a project box to make it complete. The pump itself is a 12V pump for safety reasons due to it being outdoors in water although the relay could turn a mains pump on and off if required.

Here’s the downloads – the version I used pumps water once daily but I’ve included the code that runs the pump for twice a day (on the hour then 8 hours later) for a selectable duration of up to 360 seconds. To keep the timer simple the pump will only run on the hour; precise timing is not required to water a garden. 🙂

Arduino and Atmel Studio code

Project notes and information

Hope this is of use to someone; I don’t expect anyone to build this as it’s more for my own information but if anyone does find it useful let me know in the comments.

One Reply to “Arduino pump timer with GLCD”

  1. I made a slight error in the code which caused the timer to reset the watering duration and time randomly. There was also random garbage on the LCD. This has now been fixed. I noticed after a power brownout and it corrupted the eeprom on the MCU. Hopefully this should not happen now.

    I also made changes to the circuit and changed the smoothing capacitor on the 5v rail to 1000uf from 220uf.

Comments are closed.