![]() |
Forum Index : Microcontroller and PC projects : Pressure Pump Controller
Author | Message | ||||
pkspot Newbie ![]() Joined: 11/02/2023 Location: AustraliaPosts: 4 |
Hi All, I am a newbe! Can someone please advise me how to add a JPG image to a posting? Many thanks Stuart |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Above the text entry field there are icons. Select the green one with the blue arrow in it. A popup lets you select the file. PicomiteVGA PETSCII ROBOTS |
||||
pkspot Newbie ![]() Joined: 11/02/2023 Location: AustraliaPosts: 4 |
The following post should have a JPG image as part of the post. I haven't added it as I don't know how to do it! So here is the post without the image. I will add it when I know how. Hi all, I am a newbie on this site and I am looking for some Arduino Programming assistance. I live on a rural property and have tank water with an electric pressure pump. Recently I had a burst washing machine hose and I came home to a flooded laundry and kitchen. Luckily, no permanent damage was done but I would like to prevent any future mishaps by limiting how long the pump runs before it is automatically switched off. I am trying to design a device to be placed between the AC power outlet and the pump. It operates as follows: As seen in my very rough block schematic, essentially, current from the AC supply flows through a HALL sensor then through the relay to the load. The relay is normally deenergized and uses the NC contacts. There is also a switch mode block power supply for the Arduino, 5V relay and LED. The pump is a domestic type pressure pump with a built in pressure cut off switch. I will be using the ATMEGA 328P, 32 pin surface mount controller and I would like to run it with the internal RC oscillator and no external crystal. The timing accuracy is not critical so the RC oscillator is adequate for this purpose. I will design a PCB and have it professionally made. In my rough schematic, I have neglected to put a transistor between the Arduino output and the relay as the as the Arduino has limited current sinking capability. This is noted and will be remedied in the finished design. I have also not designated the pins for the LED nor the relay drive. I am open to suggestions. The Hall current sensor is an ASC712 which has an output of half VCC for zero current flow and it is directly connected to the A0 pin of the processor. The sensor output has a reduction of the steady state, half VCC with an increase in current and has a sine wave superimposed on it. So the threshold can be done by detecting the negative peaks of the sine wave. I have a background in electronics but I have reached the extent of my knowledge and experience when it comes to the programming for this device. I have watched many YouTube videos on Arduino programming and I have two sketches that are close to my requirements. One is for button control and the other for timer control but I am having difficulty merging the two sketches and getting it working. I can supply these if required but it might be better to start with a clean slate. Many thanks Stuart |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
![]() see this ... gives you... ![]() hth Edited 2023-02-15 19:47 by CaptainBoing |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Hello pkspot. Welcome to thebackshed. I'm afraid that you won't find very much Arduino help here, though there are probably some shedders with experience. Most of the posting here is about microprocessors which run MMBasic: MaxiMite, Colour MaxiMite (CMM/CMM1), MX150 MicroMite (MM1), MX170 MicroMite (MM2), MX470 MicroMite Plus (MM+), �PIC32MZ MicroMite eXtreme (MMX), MMBasic for DOS, Pi-cromite (pi-based, no longer supported, may work for non-gpio uses), Armmite H7, Armmite L4, Armmite F4, Colour Maximite 2 (CMM2), Picomite, MMB4L (Linux--currently in Alpha), PicoMiteVGA, MMBasic for Windows (MMB4W)--currently in Beta, PicoMiteWeb. If you are willing to start over with a $4 Raspberry Pi Pico, you would find a lot of support here. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mark Regular Member ![]() Joined: 26/11/2022 Location: United StatesPosts: 85 |
Stuart, Welcome to the forum. You also need a clamping diode on the relay driver output. The back voltage from energizing or deenergizing the relay coil can damage the driver. Since this is a one-off, rather than using a custom PCB and a bare ATMega 238P you may want to use an Arduino Nano. I found qty 3 of the Chinese clone versions on Amazon for $18. But a Raspberry Pi Pico is even cheaper and it can be programmed in MMBasic (PicoMite) or MicroPython, both of which are easier for a new programmer. I do have Arduino programming experience and would be happy to comment on your sketches. I assume you want to turn on the LED when the pump has timed out and been shut off. How do you want to reset things (once the leak has been repaired)? The simplest approach would be to simply cycle the power to the microcontroller, or do you want a reset button? If you want a more obvious alarm than a LED, you could connect an mains powered alarm to the NO contacts on the same relay that shuts off the pump. Mark |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Here in North America, you can buy laundry hoses with a passive flow regulated check valve. The valve allows the normal lower flow rate to the washing machine to pass through. If the hose bursts, the high flow rate causes the device to close. Flood Safe / Burst Protection Hose Visit Vegipete's *Mite Library for cool programs. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
I didn't know those existed, Pete. I've found them in the UK too. Thanks. :) These are a double wall. If the inner leaks then water gets into the space between the inner and outer. Pressure in there closes the inlet. Neat idea. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Using a water flow sensor would be a lot easier than monitoring the current. I used to use the ones from Jaycar but found that they only lasted a couple of years. I currently use these: ![]() https://www.ebay.com.au/itm/304598403631 I have 4, monitoring house water, garden, stock and bore. Whatever you do, don't use it to measure the amount of water your wife uses in the shower. A plumbing leak would be the least of your worries. You can use Arlec remote switches for the AC control but they are a bit under sized for motor starts. (I do use one for the bore pump and it has lasted many years so far.) Jim VK7JH MMedit |
||||
pkspot Newbie ![]() Joined: 11/02/2023 Location: AustraliaPosts: 4 |
Hi CaptainBoing, Thanks for the method of attaching an image. I got link information to the image in the message box as you illustrated but as I didn't see an image, I assumed that I was doing something wrong. So, I'll try again. here it is: Cheers |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
What image format are you using? Note that when you insert the image into your text you don't see the image itself, just a link to where it's been copied to by the forum software. You don't see the image itself until you post your message. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
The link was a link to YOUR PC file system. You have to use the button with the up arrow and then a popup opens where you upload your image. Jim VK7JH MMedit |
||||
pkspot Newbie ![]() Joined: 11/02/2023 Location: AustraliaPosts: 4 |
Hi All, I have just discovered ChatGPT. It has written the C++ code for me from the written description that I have posted on this site......UNBELIVABLE!!!! Cheers Stuart |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Yes...ChatGPT can write programs. It won't be long before the sofware engineers have made themselves obsolete. But not yet... PicomiteVGA PETSCII ROBOTS |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
do not trust chatGPT unless you are already knowledgeable about a subject (and can correct it's work), it seems to simply make stuff up. After the initial flush of "wow this is great" I have become very disillusioned with it. we are safe from the robot take over for now. I caught it providing Z80 code that included gems such as LD DE,1000000 and CP B,B it also provided fake formats for some meteorological messages (after I convinced it that PILOT and TEMP are not binary formats) where in the standard it explicitly says the words "Pilot" and "TEMP" must not appear anywhere in the message - guess what it did... show me an example of the PILOT meteorological message as specified in FM32-V METAR KJFK 022051Z 08004KT 10SM FEW032 SCT035 BKN250 17/12 A2983 RMK AO2 SLP095 T01670122 smh |
||||
pd-- Senior Member ![]() Joined: 11/12/2020 Location: AustraliaPosts: 122 |
I would be inclined to just open up the pump controller and ad in a 555 to set a maximum run time before tripping a fault and shutting down the pump |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |