Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 9th August 2004, 12:27 AM   (permalink)
Default Using PIC microcontroller to measure high voltage andcurrent

how do I measure high voltage like 220V as well as the current running through it using PIC? I would like to build one with 2X16LCD as its display.
__________________
Learning is a life-long process...
GraveYard_Killer is offline  
Old 9th August 2004, 06:53 AM   (permalink)
Default Re: Using PIC microcontroller to measure high voltage andcur

Quote:
Originally Posted by GraveYard_Killer
how do I measure high voltage like 220V as well as the current running through it using PIC? I would like to build one with 2X16LCD as its display.
You simply convert any required readings to 0-5V DC (assuming you're using the 5V rail as a reference).

Reading 220V DC requires a simple resistive attenuator, if it's AC you'll need to rectify it in some way as well. To measure current you measure the voltage drop across a small resistor, you'll probably need to amplify this using an opamp. Again, for AC, you will need to rectify it.

To do both at once you will have to give it some careful thought, you need both readings to have the same 0V point.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 9th August 2004, 09:30 AM   (permalink)
Default

And the ADC, microcontroller, and LCD need to have to same ground unless a complicated isolation scheme, probably optical, is employed.

Problem is, the only thing available to use for a ground is going to be the high voltage neutral instead of an earth ground. This isn't entirely safe to touch and shouldn't contact earth ground, but it is possible to use if everything is insulated. It will be a more major issue if you want to interface it with another device or a computer.
Oznog is offline  
Old 9th August 2004, 10:17 AM   (permalink)
Default

To add a degree of safety to the pic you could always look for a current transformer, and use a small, normal transformer to bring the 220V into the pic's range...
Exo is offline  
Old 9th August 2004, 07:15 PM   (permalink)
Default

Take a look at www.allegromicro.com/

Kent
kentken is offline  
Old 9th August 2004, 09:36 PM   (permalink)
Default

Quote:
Originally Posted by Exo
To add a degree of safety to the pic you could always look for a current transformer, and use a small, normal transformer to bring the 220V into the pic's range...
I notice we all seem to be assuming this is an AC supply?, yet this has never been stated - it 'might' be a DC supply?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 10th August 2004, 12:52 PM   (permalink)
Default

yeah, im gonna use 220V AC. how will i make 220V AC scaled to 5V? do i have to use voltage divider principle?
__________________
Learning is a life-long process...
GraveYard_Killer is offline  
Old 10th August 2004, 12:54 PM   (permalink)
Default

A small transfo seams the safest option to me... It doesn't have to drive any load, so it can be a really small one.

rectify the output, put a fairly big cap on it, and keep in mind you then have a RMS value and you're off
Exo is offline  
Old 10th August 2004, 01:05 PM   (permalink)
Default

Quote:
Originally Posted by Exo
A small transfo seams the safest option to me... It doesn't have to drive any load, so it can be a really small one.

rectify the output, put a fairly big cap on it, and keep in mind you then have a RMS value and you're off
Actually you have a 'peak value', not an RMS one - but, as long as it's a sinewave, you can recalibrate to give an RMS value.

I think we still need to know more about what he's trying to do, so far the questions have been too vague for any thing other than general answers.

I'm 'presuming' he's wanting to measure power consumption, like an electric meter does?. If so, EPE did a project years ago using a 16C84 with an external A2D, using a hall-effect transducer to measure the current. The same sort of design could be done far easier now with the more modern PIC's.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 10th August 2004, 02:46 PM   (permalink)
Default

Nigel, did that use an inductive clamp ?

I'd be a little nervous about telling someone to just use a voltage divider on mains potential when they dont know what they are doing...

I couldn't quickly find a link to something (clamp based) that may have worked and decided it was better to stay away.
Being new here, I wasn't sure what the protocol was when death is a possibility

BTW, not meaning to imply that you have given any potentialy dangerous info.
BartSimpson is offline  
Old 10th August 2004, 02:59 PM   (permalink)
Default

Quote:
Originally Posted by BartSimpson
Nigel, did that use an inductive clamp ?
No, it was a complete potted device, you connected one side of the mains to it, and took the output from the other side - when I'm at home I'll try and find the original article. The finished device works really well, I actually built one 8)

Quote:
I'd be a little nervous about telling someone to just use a voltage divider on mains potential when they dont know what they are doing...
There was never any mention of mains until well down the thread, and that was only after asking!.

Quote:
I couldn't quickly find a link to something (clamp based) that may have worked and decided it was better to stay away.
Being new here, I wasn't sure what the protocol was when death is a possibility

BTW, not meaning to imply that you have given any potentialy dangerous info.
Almost anything has the potential to be dangerous, a soldering iron or a craft knife? - to give two simple and common examples. This is a serious forum for people interested in electronics, we shouldn't need to 'baby' members - although I often do give serious warnings about truely dangerous devices like microwave power supplies!.

While you can measure the current with a clamp device, you can't do the same for voltage - a simple potential divider is commonly used for this purpose, and as also suggested you could use a mains transformer to lower the voltage and measure that. But, again at that time, we didn't even know it was an AC supply.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 21st November 2008, 08:20 PM   (permalink)
Default

thanks for you all
i am working on graduation project and calculating power is a part of it .
i need to connect isolator to protect PIC from high voltage.
i have question about how to connect isolator to protect PIC from high voltage.
i used 4n26 IC but it doesn't work ...

i used a voltage divider to minimize voltage and shunt resistor to sense current
help please
mohdroos1 is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:32 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker