News:

Let's find out together what makes a PIC Tick!

Main Menu

I thought I would share with you my PIC project

Started by JohnB, May 10, 2024, 09:53 AM

Previous topic - Next topic

JohnB

I have been building a Controller for my Outdoor Pool.  Its based on a PIC 18F27K42 and uses a Nextion HMI display.
The photos show the controller installed with the innards exposed, a temperature repeater display and some example screens. The system manages the circulation pump timings and pool heating schedules. It also monitors the pH and sterilisation properties of the pool. (This has still to be connected as I am trying to get hold of a suitable sampling chamber and probes).  Apologies for the quality of the photos but the pump room where it installed is cramped with poor lighting.

The cases are 3d Prints of designs I made using Solid Edge with many thanks to Tim Box for his help in printing. Also my thanks to @AlbertoFS for his matrix display library.

The main disappointment has been the quality of the Nextion display, the contrast is poor and there is no way to adjust the polarisation to suit the optimum viewing angle.
 
Its been my first PIC project for a long time as I have been spending much on my time in the Delphi world.

If there is interest, I will write the project up for the community.

JohnB

JonW

Nice work John
Like the look of the Display.  I may take a look at those as I want a fancy watering and vent controller for my greenhouse

John Drew

G'day all,
If interested in a watering controller have a look at: geoffg.net
Geoff describes a project using a Nano RPi W. The "W" indicates the WIFI version and they are available for less than AUS$10. The project was described in Silicon Chip of August 2023. The program is written in BASIC.

I built one up and control it with my phone. Much better than the commercial original controller that was provided by the installer.

With a few changes to my router I can control the watering when away.
I know it's not a Pic project but it should give you some ideas.
John

top204

Nicely done John.

I gave up on the nextion displays a few year ago.

They are slow, expensive, and not actually very good as a display.

For touch sensitivity, a good old ILI9xxx display works excellently, and adding sliders etc, is a relatively simple coding process using filled rectangles and lines. Dials are also relatively simple using circles and lines created as an angle and not as start stop X/Y positions.

charliecoutas

How are you heating the water John? Mains electricity or solar? I ask because heating large amounts of water is going to be expensive using mains.

Charlie

JohnB

Currently its heated by Gas.  The pool came with the house and it was in a poor state. We pondered removing it but it would have been very costly so we decided to retile and increase the area around it and use it for entertaining. Its been a great facility when the kids were young but if you did a cost/benefit analysis you would never install a pool in the UK.
JohnB

John Lawton

Is it easy anywhere?

My late brother in law had a small pool in Darwin, NT, Australia.
There you have to spend a fortune on pool maintenance with regular checks on the water and consequent dosing with chemicals, not to mention replacing pumps and filters etc. as required otherwise the pool goes a nasty green colour in the high temperatures and strong sunlight there.

Salt water pools there seem to be the way to go to stop a lot of that.

John

SeanG_65


Wimax


JohnB

@top204 In retrospect, it would have been better to have done something like you suggested,  The trouble with the Nextion is that you end up with intelligence in the display and the host controller and things can get very confusing if they loose sync. It might have been better to do all the functionality in the nextion but it is was it is and I am not going to start over again.
JohnB

top204

For a good display and to also bring your excellent Delphi programming skills into play John. You could use a serial bluetooth transceiver on the control board and a mobile phone for the interface.

For quite a while now, the Delphi suite has supported Windows, Crapple, and Android. So you could interface from the phone using your Delphi skills to make it look wonderful, and via the phone's built-in bluetooth transceiver. And a simple AT type serial interface on the control board will give all the control and feedback required.

I have a good AT type interface library that you could use, and I will put it on the forum ASAP.

JonW

Crapple hahaha

AT lib would be good to see Les

JohnB

I already have that part built into the PCB - I have added connections for an ESP8266 Wi-Fi module.  Not sure where I will take it yet, maybe host a web server on the ESP8266?  open to suggestions from members who have used this module before.  Chose Wi-Fi over blue tooth as I have wired Unifi Access points around the house and in the garden giving me very good Wi-Fi throughout.

I have dabbled with the Apple and Android development in Delphi but only looking at their examples.  I'm afraid I am an Apple user (sorry Les) for everything mobile so does that mean I have to jump through the Apple approval loops to be able to install on my phone?
JohnB