A Day in the Farm: From Arecanut Rows to PIC Microcontroller Programming

About 100 kilometres from my home in Bangalore is my small farm, where I grow arecanut, coconut and banana. It is a peaceful place, surrounded by tall coconut trees, neat rows of young arecanut plants, and the occasional shade from a broad banana leaf. It’s the kind of place where you can walk barefoot on the soft soil and forget the noise of the city. Below are some pictures of my farm.

Like most farms, mine depends on a borewell motor for irrigation. The motor is operated by an automatic starter, saving me from having to be there each time to switch it on. Recently, the starter began behaving a little oddly. The motor was not switching on exactly when I wanted it to, so the timing needed to be adjusted. Below is an image of the starter.

Instead of calling an electrician, curiosity got the better of me. I decided to open the box and see what was inside. When I removed the cover, I was greeted by a familiar sight from my early electronics days, a PIC 12F508 microcontroller. Seeing it instantly brought back memories of when I first learned to program microcontrollers.

I brought the unit back to my workspace, took out my old PICkit2 programmer and connected it to the chip. I read the existing program, studied how it was controlling the motor timing, and made the changes I needed. After reprogramming it, I closed the unit and took it back to the farm.

It worked perfectly. The motor now starts exactly when I want it to. There was something satisfying about standing there in the middle of my farm, hearing the motor kick in, knowing that a piece of my own code was running inside that small green box.

Most people see these units as sealed mysteries. But once you open them, you realise they are simple a transformer, a relay, some transistors and a microcontroller. With a bit of knowledge, you can customise them to your needs.

Now that the starter is working well, I am already thinking about future upgrades. Maybe one day I will add remote control, so I can switch on the motor from home in Bangalore. Until then, the crops will get their water on time, and I will have the quiet satisfaction of knowing that my farm’s heartbeat is partly my own work.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top