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.

Reading AC current on a PIC.

Status
Not open for further replies.

rgc

Junior Member level 1
Joined
May 3, 2011
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,430
I have just bought an expensive pump that cannot run dry, but will eventually, so I want to design a microcontrolled circuit to shut off a relay and prevent that.
I believe that when it runs dry, it will spin a few times faster, draining a considerably larger ammount of current. If it were DC I would just put a resistor there, amplify the drop voltage and ADC that, but the pump works on AC and I have no idea how that would work.

Some questions:
- Is this the best way? Will this work at all? I mean, it would drain more current, wouldn't it?
- How the heck can I measure AD current on a PIC?
- I really don't know much of analog eletronics, therefore I don't venture there that much. Using a microcontroller here would be overkill? Can this be done easily without it?

Some info:
- I intend to use PIC12F683, which have a 4 channel 10-bit ADC, or it will be done by the central controller which is a PIC18F4550.
- The pump runs on 230V AC
 

Are you sure this is the case?
When it runs dry, it will have no load, it might draw less current?
 
  • Like
Reactions: rgc

    rgc

    Points: 2
    Helpful Answer Positive Rating
Are you sure this is the case?
When it runs dry, it will have no load, it might draw less current?

Hum, no, I'm sure of nothing here :smile:
You may be right, I does makes more sense, but either way, the current will change and by measuring it I'll be able to find out if it is running dry.

Edit: And if the current does change at a measurable level, I could also sense if the pipes got obstructed, it would be a prevent-all-damage circuit.

How would that circuit look like? How can I interface it with a PIC (or an ADC IC)?
 
Last edited:

You could have a sense resistor in the supply line, amplify and rectify the AC waveform, then measure the dc level with the Pic A/D?
 
  • Like
Reactions: rgc

    rgc

    Points: 2
    Helpful Answer Positive Rating
You could have a sense resistor in the supply line, amplify and rectify the AC waveform, then measure the dc level with the Pic A/D?

Microchip specifies that the impedance on the ADC pin must be lower than 2k, I dont know much about sense resistors, will it be able to generate a non-negletible voltage drop without surpassing that limit? I hate working with low power signals, all that filtering can get really expensive and laborious.

Also, and pardon my ignorance, must I amplify and rectify in that order? It seems easyer the other way around.
 

If you rectify and amplify, you would have to drop a higher voltage. If you amplify and rectify, you can amplify a 0.2V drop and then rectify. But if you rectify first, you would need a higher voltage. Eg. If you rectify with a bridge rectifier, you would need to drop higher than 2.4V (forward voltage of 4 diodes) and the rest would be the sense voltage. That would be a lot more power dissipated.

Hope this helps.
Tahmid.
 
  • Like
Reactions: rgc

    rgc

    Points: 2
    Helpful Answer Positive Rating
If you rectify and amplify, you would have to drop a higher voltage. If you amplify and rectify, you can amplify a 0.2V drop and then rectify. But if you rectify first, you would need a higher voltage. Eg. If you rectify with a bridge rectifier, you would need to drop higher than 2.4V (forward voltage of 4 diodes) and the rest would be the sense voltage. That would be a lot more power dissipated.

Hope this helps.
Tahmid.

Yeah, thank you, it does help! Now I get it.
How can I amplify AC voltage, it doesn't work like amplifying DC, does it? Will I be able to drop 0.2V without exceeding the 2k impedance limit?
Also, will solo software filtering do, or is there a chance that more complex hardware filtering will be made necessary?
 

Quite easily. If you want to measure a 10A current, required resistance R = (V/I) = (0.2/10) = 0.02 ohms. Then, you need to amplify this.

2k impedance is a lot. For sense resistors, the resistance is usually less than 1 ohm (for high current measurements).

You can also take a look at current transformers or hall-effect sensors.

Hope this helps.
Tahmid.
 
  • Like
Reactions: rgc

    rgc

    Points: 2
    Helpful Answer Positive Rating
Quite easily. If you want to measure a 10A current, required resistance R = (V/I) = (0.2/10) = 0.02 ohms. Then, you need to amplify this.

2k impedance is a lot. For sense resistors, the resistance is usually less than 1 ohm (for high current measurements).

You can also take a look at current transformers or hall-effect sensors.

Hope this helps.
Tahmid.

Hum, great! I have little knowledge about sense resistors.
What about aplifying? How could it be done? I've found some circuits but all with a huge impedance, which makes them unsuitable for ADC.
 

Utilizing an OPAMP for signal processing such as amplification is one option.

OPAMPs can be ideal solution when used in conjunction with an ADC, they typically have a very high input impedance and a very low output impedance.

OPAMP based voltage followers are often used with sensors with high output impedance when interfacing with an ADC.

OPAMP based circuits can also shift and scale sensor outputs to match the ADCs input requirements.

BigDog
 
  • Like
Reactions: rgc

    rgc

    Points: 2
    Helpful Answer Positive Rating
Is there any reason why not to use pressure sensor or -switch in pump output to detect dry run.
For smaller pressure levels use differential pressure sensing parallel with the pump (in /out pressure difference).
Add simple timer relay for start and dry run timing.

dry_run_protect.png
 
  • Like
Reactions: rgc

    rgc

    Points: 2
    Helpful Answer Positive Rating
Is there any reason why not to use pressure sensor...

I dismissed the idea after a quick look at pressure sensor prices, it seemed simpler and cheaper to work with the current. Do you think it's a mistake?

Utilizing an OPAMP for signal processing such as amplification is one option.

As it may already be clear, I'm an absolute ignorant in electronics ;-) so excuse the lame questions, but how do I use an OpAmp with AC? are there special OpAmps to amplify AC?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top