Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to detect Dry Run and Overload using PIC

Status
Not open for further replies.

Okada

Banned
Joined
Jun 16, 2016
Messages
1,159
Helped
129
Reputation
252
Reaction score
129
Trophy points
63
Activity points
0
How to detect Dry run and Overload of a Single Phase Submersible Pump.

220V AC 50 Hz rated pump

I need to use PIC Microcontroller to detect dry run and overload.
 

We really need to know the power rating of the pump (how many Watts or VA) and what is being pumped.

Overload can be detected by the pump drawing excessive current, the best method of doing that will depend on the power rating.

Dry running might be detectable by the pump drawing less current than normal but again that depends on the rating and type of motor. The other option is to sense the water using conduction, pressure or optical methods.

Brian.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
A coil of wire placed near the motor might detect how much power is going through it. You'll need to find the right spot by experimentation. Its signal will probably need amplifying.

Also do tests to find out how long is a pump cycle. Your microcontroller should detect this and keep time. If the pump runs too long, then it's a fault.

We had sump pumps in our basement. Soon after we moved in, I found out one pump didn't work at all, when the first storm filled the basement with 1/2 inch of water. Therefore you might want to detect pump non-operation when water is present.

One pumped water up an 8 foot tube to the outdoors. Each pumping cycle sent 2 gallons of water out the tube, then a gallon of water dropped back into the sump. A plumber installed a one-way ball valve. It was supposed to prevent water dropping back down the pipe. I think I remember one time the valve rusted shut. The pump would have run endlessly with a load, at normal current level. This is able to burn up the motor, similar to dry run. However these might draw different amounts of current. To detect this condition it's wise to monitor for On time versus Off time.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
I am using one C.T. with OpAmp and diode to measure the current drawn by the pump. Based on the motor current rating PIC will decide if over current is drawn or less current is drawn and based on it it will control the pump. Is this a good way of monitoring the pump ?

I will soon post the pump parameters. i will get the pump tomorrow.
 

C.T. is a perfect way to implement the detection sketched by betwixt. I doubt if you get sufficient information in the datasheet to decide if the intended dry-run detection works reliably. You better measure the current consumption in different operation points yourself.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
@betwixt

These are the ratings

HP KW A
0.75 0.55 6.2
1 0.75 7.5
2 1.5 13.6
1.5 1.1 10.5

All pumps are single Phase 230V AC 50 Hz submersible pumps with three connections.

All pumps are pumping water from borewells.
 

I can see the HP and KW matching each other but the 'A' seems higher than I would have expected unless that is the stalling current.

Nevertheless, those currents are ideal for measuring with a current transformer (C.T.). All you have to do is source a suitable transformer (suggest 15A or 20A type), run ONE of the power wires through it's hole (don't use both or they will cancel each other out). On the secondary of the transformer you connect a 'burden' resistor, the transformer data sheet will tell you which value to use. The you can either measure the resulting secondary AC voltage with the PIC or probably easier, you rectify the secondary voltage, filter it to DC then measure it with the ADC.

With the motor disconnected you should measure zero voltage, when running dry you should get a low reading, when pumping you get a mid-range reading and if it stalls you get a very high reading. Your software reads the voltage and decides which band of values the voltage lies in and reports it as you wish.

Brian.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
Using CT and an amplifier, although correct, is considered an old method. Simplify life by using AC712 hall sensor which is low cost, isolated and an integrated amplifier that gives an output 100mV/A. Connect this to the ADC of PIC and read the input. You will have to determine first, the peak voltage to get rms. Device an algorithm first to get the peak. Alternatively, the datasheet gives a peak detecting circuit (I don't recommend) with addition of one more op amp.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
I prefer betwixt's method because using AC712 an algorithm has to be implemented to get the peak value of current. My system uses 7 Segment display and a timer interrupt of 2 ms will be running constantly to update 7 Segment display which I think will affect the reading a peak value from a AC712.

@betwixt

I have a digital panel which controls pumps of different current ratings (different hp). It doesn't have a rotary switch to set the pump current. It uses Reneasas controller. What algorithm and circuit they have used to detect the current and do auto calibraton. All I know is it does auto calibration of the pump currents and work with different hp rated pumps.

Can I use this current transformer ?

https://www.mouser.in/ProductDetail...GAEpiMZZMvHq2mgYB5gN4QmKbJZMpCZ%2bfDTPa376ew=

My AC frequency is 50 Hz. The above sensor mentions 20 KHz to 200 KHz.

I will be using this OpAmp with the C.T.

https://www.mouser.in/ProductDetail...=sGAEpiMZZMsko7UDAsUSIch3u/kN0pq9WJtuIGgtOj0=

- - - Updated - - -

I think I can't use the above mentioned C.T. Its freq range is 20 KHz to 200 KHz. My mains freq is 50 Hz.

Should I use this instead ?

https://www.mouser.in/ProductDetail...=sGAEpiMZZMvHq2mgYB5gNzrDoVzYK7zIEPcm0e2cKpc=

Please provide links for cheaper suitable PCB mount type or wire leads type 20A 50 Hz C.T.
 
Last edited:

Economical 50 Hz current transformers are e.g. made by Talema, types like AC1010, AC1020.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
Yes FvM.

I found that.

https://in.rsdelivers.com/product/n...-mount-current-transformer-10001/5374520.aspx

I will be using AC1020.

For 100 Ohms Burden resistor it gives 0.1V/A
It will give approx 0.25V/A if 250 Ohms Burden Resistor is used.

I will use the attached circuit to get 5V for 20A. Is this circuit correct or should I use a OpAmp like OPA342NA to amplify the voltage obtained with a lower value burden resistor ?

I think using OpAmp will be better because the Output of the OpAmp can be interfaced with ADC of PIC.

https://www.mouser.in/ProductDetail...=sGAEpiMZZMtCHixnSjNA6Mrdwin7F8A2mwe07DyOrAU=

Can the output of just a resistor connected with C.T. be connected directly to the ADC pin of PIC ?

Should I use a circuit as shown. Circuit with diode and capacitor ? Or should I use OpAmp with a diode at its output and a load resistor.

Attached is the PIC circuit I have designed. It uses rotary switch for pump current selection. How can I remove the rotary switch and implement auto calibration of current ?

- - - Updated - - -

Edit:

Currently I have used PIC18F46K22 for the design. I want to implement auto calibration based on pump current. If I can't implement auto calibration method then I will port the code to 18F87K22 with a rotary switch for current selection.

Attached is the Proteus simulation.

RV1 pot can be varied. Pump rating is 180V-300V AC 50 Hz 1 Phase
For V < 185V Blue LED of RGB LED turns ON indicating Low voltage
For V between 185 and 260V Green LED of RGB LED turns ON indicating Normal Voltage.
For V > 260 V Red LED of RGB Led turns ON indicating Over voltage.

V / I Button is used to toggle the display to show Voltage or Current.

Voltage range is 0 to 300 V and current range is 0 to 30A

Jumper JP1 can be shorted to see the company name scrolling on the 7 Segment Display.

The system is designed for both domestic use and for farmers.

JP2 Jumper can be used to select domestic use or for farmers. If domestic use (JP2 shorted) then it enables the system to use 3 float switches for the overhead tank and a RGB led for level display. If used for farmers then JP2 can be left open and the user has to turn ON/OFF the pump manually using ON/OFF button (not yet coded). If JP2 is shorted (domestic use) then device will be in auto mode. Auto mode LED will turn ON. In auto mode the pump can be turned ON manually by pressing the ON/OFF button or the pump will turn ON automatically if water level is critical in overhead tank. In auto mode the pump cannot be turned OFF manually. It turns OFF automatically when overhead tank is full. In manual mode (agricultural use) the manual mode led will be ON (JP2 open).

JP3 is not yet coded.

JP4 is Jumper for selecting programming header or PIC connections.

RN2 is only for Proteus Simulation. It will not be present in real hardware.

In auto mode level switches can have 4 states. NO type float switches are used which close when water level rises.

When all float switches are open (water level critical) RED Led of RGB Led turns ON.
when SW1, SW2 and SW3 are closed (water level full) Green Led of RGB Led turns ON.
when SW1 is closed and SW2 and SW3 are open (water level low) Yellow Led of RGB Led turns ON (Red + Green = Yellow)
When SW1 and SW2 are closed and SW3 is open (water level medium) Blue Led of RGB Led turns ON.

When pump has to turn ON it checks the mains voltage. If mains voltage is normal then pump turns ON for 2 seconds and then current is measured. If current is not in the normal range (dry run or overload) then pump turns OFF. If current was low then Dry Run Led turns ON. If current was high then overload Led turns ON. Only after rectifying the error the pump turns ON again.

- - - Updated - - -

@betwixt

Please provide me a simple circuit for interfacing AC1020 C.T. with 5V PIC. I want to use the full range of AC1020 that is 20A. Please use diode to convert the AC to DC for ADC measurement.

- - - Updated - - -

I have designed this display. Where can I find such a 3-Digit RGB 7 Segment Display ? The attached file shows 1 digit 7 Segment display. It has 8 data lines and 3 (RGB) control lines.

We have to turn ON these cathodes to get the required colors

Red - R Cathode
Orange /Amber / Yellow - R and G Cathodes
Cyan - G and B cathodes
Blue - B Cathode
Violet / Purple - R and B Cathodes

I need somebody to manufacture such a 3 digit 7 segment display with 8 data lines and 3 * 3 = 9 control lines.

I need such a display to display data in different colors.

For example

If voltage is < 180 V I want to display the data in Blue color
If voltage is between 180 and 260 V I want to display data in Green color
If voltage is > 260 V I want to display data in Red color


I can't use this. This is not good.

https://www.adafruit.com/product/1399
 

Attachments

  • C.T. circuit.png
    C.T. circuit.png
    4.4 KB · Views: 155
  • C.T. circuit.png
    C.T. circuit.png
    4.7 KB · Views: 222
  • 1PSPC.PDF
    50.2 KB · Views: 92
  • Proteus Simulation.rar
    36.9 KB · Views: 85
  • 1 Digit RGB & Segment Display.png
    1 Digit RGB & Segment Display.png
    12.5 KB · Views: 198
Last edited:

Sounds pretty ritzy for a sump pump. Do you live in an area where mains voltage varies a great deal?

I built a mains AC monitor around a 3914 bargraph IC. I made it to read from 90 to 135 V. It always stays around 120-125 V. Mains voltage has never changed that much anywhere I've lived. In similar fashion you can build a 20 or 30 led bargraph, with different color led's as you desire. Add an audible alarm as well if you wish.

A 3-digit display is usually all the same color, constantly.
 

I can't use adafruit RGB 7 Segment Display because it lacks decimal point.

The same problem with this display.

https://www.usasyck.com/products/AD1221F2.html

I need a RGB LED display with either all a's shorted, all b's shorted ..... all dp's shorted and with 3 cathodes for RGB colors or like the adafruit display or AD12221F2 with separate a...dp pins. I can short the 3 a's...3 dp's on PCB. The display size should be small.
I must be able to use 1 value of 8x resistors for all the the 8 data lines to get all possible colors like Red, Green, Blue, Orange/Yellow/Amber, Cyan, Violet/Purple, White.

I am talking about Common Cathode RGB 7 Segment Display with decimal point.

If I place 0x3F on the data lines (a...f) and turn ON all the three Control Lines (RGB) then the display shoul be white color.
If I turn ON R/G/B control line the display should be in Red/Green/Blue.
If I turn ON R & B control lines the display will be in Violet/Purple
If I turn ON G & B control lines then display will be in Cyan
If I turn ON R & G control lines then display should be in Orange/Yellow/Amber.

If somebody find such a display please post the link here.


@BradTheRad

It is a submersible pump used in borewells.
 

Please provide link for full-color led/lcd hi-resolution display.

- - - Updated - - -

Edit:

Can I use this diode to get DC after Burden Resistor connected to AC1020 C.T. ?

Are there any better low Vf rectifier diodes ?

What about PMEG2005EB (500 mA Diode) ? I think this is better than Vishay's Diode.

PMEG2005EB Vf at 100 mA is 290 mV. AC1020 C.T. gives 20 mA for 20A input with 100 Ohms Burden.
 

Attachments

  • Vishay-MSS1P3U-M3_89A-datasheet.pdf
    84.8 KB · Views: 78
  • PMEG2010AEB.pdf
    107.9 KB · Views: 82
Last edited:

With AC1020, the most accurate passive design would be a full wave rectifier with the burden after the rectifier, utilizing the center tap and two schottky diodes. The filter circuit should be better designed to measure the average rectified value rather than peak current.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
@BradTheRad

Do you live in an area where mains voltage varies a great deal?

Yes, voltage varies between 180 and 300 V AC 50 Hz.

@FvM

Where is Center Tap in AC1020. I see three pins but is the center pin for Center Tap or Mechanical support or both ? Can I use PMEG2005EB diodes in full wave rectifier mode ?

Please see attached image. What should be the value of R1 and C1. I need to be able to measure 0-20A and I should get 0-5V DC for 0-20A.

This is the panel I am reverse engineering. It uses this microcontroller. I was not able to find the datasheet of it.

https://www.elnec.com/en/device/Renesas/R5F102A8A+(ISP)/

I have been provided attached images. I have not been provided with the panel yet. If it is a 5V MCU then the power regulator on the main board is 7805.
There is one 3mm Green LED to indicate power. There are 3 Vertically placed Red Leds (3mm) for Pump ON/OFF, Overload and Dry Run. I was not able to guess the purpose of the other 2 Red Leds placed horizontally.

Between the two blue Samwha electrolytic capacitors I see 4 diodes (probably 1N4007). The Relay board had a 6 pin white optocoupler. I guess it is a fairchild 4Nxx device. I don't know its purpose because there is no dual supply. Maybe the transformer is a 9V type. I don't know the relay voltage. Either it is a 5V relay which is powered from 7805 or it is a 9V or 12V relay with a 9V or 12V transformer.

I see another 4 to 5 diodes similar to 1N4007 on the main board but doesn't know its purpose. Near the big black 20A/30A terminal block there is a wire lead C.T.. There are 3 transistors near the 7 Segment displays for the 3 control lines of the display. There is one transistor next to the MCU module baord. I don't know its purpose. The relay board has one transistor driven by an optocoupler.

The small PCB with 4 pin header is the Renasas MCU board. The 4 pin header I assume is a programming header.

The relay uses quick connect contacts and the Phase wire goes into the COM terminal and comes out of the relay NO terminal. Spade connectors are used for the relay as current rating is more and PCB can't handle large currents.

I think the design is poor because I don't see a proper 1000uF or greater filter capacitor in the Power supply circuit.
 

Attachments

  • C.T. Circuit 2.png
    C.T. Circuit 2.png
    9.3 KB · Views: 235
  • Panel.rar
    4.5 MB · Views: 88
Last edited:

This is the only Panel I found which shows Auto Calibration and Manual Calibration of Pump Current.

https://www.youtube.com/watch?v=uMa8dOIXpfI

How does it work ? Is it measuring the pump current and based on that calculating dry run and overload currents and storing the three current values in eeprom for detecting the conditions ?
 

Regarding suggested full wave circuit. 5V output is in the upper range of AC1020 specification, a bridge rectifier circuit would be preferred in this case.

Yes, AC1020 has an electrical center tap, it's mentioned in data sheet note 2.

Averaged rectified output voltage is 0.9 * RMS value (exactly sqrt(8)/pi), the factor should be considered when calculating the shunt resistor.

You respectively get 139 ohms for 5V output @ 20A in center tap full wave and 278 ohms in bridge rectifier configuration. Choice of filter capacitor is a trade-off between residual 100 Hz ripple and response time. 100 to 200 ms time constant seems appropriate. A smaller capacitor can be used when adding a series resistor, review maximum source resistance in ADC specification.
 

@FvM

In bridge rectifier there will be 2 diode drops. How do you say it is better than full wave rectifier ? Please provide a circuit with the diode I have selected in the previous post.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top