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.

Measure current using a microcontroller PIC

Status
Not open for further replies.

jaime

Member level 1
Joined
Jul 15, 2005
Messages
38
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,288
Location
Porto-Portugal
Activity points
1,608
how to measure current with a microcontroller

Hi

I would like to measure the current that went's in a dc motor (the motor that pull up the car window), so if the motor stops, the current will goes up and i can turn off the motor. How can i do it using a pic?

thanks
 

current measurement pic

Use PIC with ADC.
Connect a shunt resistor in series with your motor and measure voltage accross this resistor. If voltage (current) goes beyond certain level switch the current off.
DrWhoF
 

    jaime

    Points: 2
    Helpful Answer Positive Rating
pic measure current

shunt resistor is 0 ohm. So the voltage im this resistor is 0? can you explain me better??

thank you
 

pic current measure

No, you won't get anything out of 0 ohm!

I would suggest the serial resistor method, but it's not connected to directly to a PIC. It's connected to an op-amp, and the output of op-amp to PIC's ADC.

The resistor could be as low as 0.1 ohm.
 

    jaime

    Points: 2
    Helpful Answer Positive Rating
measuring ac current with microcontroller

could you please upload a simple schematic for OPAMP connection? thanks

Added after 3 minutes:

could you please upload a simple schematic for OPAMP connection? thanks
 

measuring current using a microcontroller

Hi

Use INA138 Current to voltage converter IC from TI - connect direxctly to pIC A/D input

Search TI site www.TI.com for data sheet and you can order samples for free

All the best

Bobi
 

measure current pic

Hello all.
I think for this application a hall sensor would be the best choice. It will also provide isolation from the motor enviroment to the microcessor environment (galvanic isolation).
La25-np may be what you need. Can measure up to 25A AC or DC with isolation of 2500V.
Find it at:
www.lemusa.com

Hope it helps.
S:
 

microcontroller current measurement

Well i got a lot of help. But in my country i think thr best is to use the fisrt solution with the ampop, because it's impossibel to buy the CI from texas or lemusa. For this i must order from web and it could get some time. And i think it's also the cheeper solution
 

measure voltage microcontroller

A shunt resistor is not 0 ohms. It's just a very low value resistor (to cause minimum voltage drop), that is probably designed to withstand higher wattage, and hence higher current. If currents are small, it's best to feed the feedback from the voltage drop across the shunt back to the uC's ADC.
For higher currents, a hall sensor is usually used.

Also, for your application, is there a need to measure the current? Why not just use a comparator?
 

pic current measurement

Well...

Its like in the modul that pull up the windows in car alarms.
We can stop the motor by time or we can measure the current in the motor and when the motor stops the current goes up. i want to measure the corrent when the motor is moving and when the motor stops. so i know when to stop the motor
 

measure current using microcontroller

when the motor stops and the current goes UP ? that sounds like the motor is in a "locked rotor" situation. ?

your current will go up by a LOT so you will definately notice the increase as compared to nominal current pull. so differentiating between window goes up current pull and window at max height should be obvious.

if all your circuit is doing is this function then you don't need a microcontroller - it would be unnecessary compilcation. have an op-amp trigger a relay instead, where the relay disconnect the power to the motor.

if you really insist on a microcontroller, or your circuit does many functions, then you will need an opto isolator because of the bouncing noise floor due to motor and microcontrollers sensitivity to noise.

your circuit could consist of differentially measuring voltage across sense resistor (low ohm, high wattage) goes into a comparator which goes into an opto.

goodluck!
Mr.Cool
 

measure current with pic

How about just use a limiting switch for the window. When the switch was touched/triggered then the motor will turn off.
 

how to measure current easily microcontroller

Just put a Switch ,where windows close
If the window is Closed the switch is Pressed...
Your pic just only need to check the Switch Status to Check if motor stopped or no.

Regards
Cortex
 

current measurement+microcontroller

Currents are not directly measurable. You cannot count the electrons going through the cross section of a wire. Hence, they are measured through indirect means. You can run the current through a resistor, ie a shunt, and find out how much voltage the resistor drops, then calculate the current through Ohm's Law. The problem here is that with larger currents, your resistor will burn out in no time. But for your application, this method should work fine.
Larger currents are measured by detecting the magnetic field the current produces. These are achieved by hall sensors.
And as Mr. Cool has suggested, a comparator would solve all problems. Don't even need a microcontroller, and definitely no need to measure currents.
 

microcontroller voltage measurement

ohmite (h**p:\\www.ohmite.com) has wide range selection for r shunt... try a 4 terminal r shunt!
 

measure ac current microcontroller

hi,

1 question: if i'm driving the coil using PWM, how can i measure the current?
 

Re: measure ac current microcontroller

can shunt resistor method work for 8-10A current?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top