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.

ADC current sensing using dsPIC microcontroller

Status
Not open for further replies.

vaia-riseng

Newbie level 6
Joined
Dec 28, 2011
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,374
Hi, I want to measure current in a motor using a dsPIC3of4011 using ADC. I am using a shunt resistor for the current sensing. Do I connect this directly to the ADC port of the microcontroller or do I need to add resistors or capacitors? Thank you very much!
 

From the shunt output, connect a 1k resistor to the ADC input pin and connect a 10nF capacitor from the ADC input pin to ground. You may want to connect a zener from the ADC input pin to ground to protect the dsPIC from damaged.

What is the shunt output? Is it large enough for the dsPIC to take reading properly. If not, you need to amplify the voltage output from the shunt.

Hope this helps.
Tahmid.
 
The current can go up to 0A - 5A. If this is the current, do I still need to amplify the voltage output? And I'm not very familiar with zener diodes so if you can suggest a particular zener diode, it would be a very big help. Thank you very much for your help! :)
 

What is the resistance of the shunt? That would enable you to know the output voltage to the dsPIC.

You can use a 4.7V zener. A common one is 1N4732.

Hope this helps.
Tahmid.
 
Thank you very much for your help and with the zener! Anyway, the resistance of the shunt is 1 Ohm. :)
 

That means that, with 5A current, output voltage is 5V. You should step this down, in case voltage rises and zener clamps it.

So, you can use a voltage divider to step down 5V to 3V. So, you can have a range of 0-3V for 0-5A. So, 1 volt corresponds to 1.67 A.

If you're going to be sampling very quickly, you might need to add a buffer so that the resistance of the voltage divider doesn't cause problems.

With 1ohm resistance and 5A current passing through, you have a power dissipation in the shunt of 1*1*5 = 5W. Make sure the shunt can handle this.

You must provide the zener as you run the risk of having >5V on the ADC input.

Are you using a 5V reference?

Hope this helps.
Tahmid.
 
Thank you very much! Yes, I am using 5V reference. So in essence, between the shunt output and ADC input, I need to put a:

1. Voltage divider that will step down the 5V to 3V
2. Buffer (I'm planning on using 74ls245 here)
3. The RC circuit you suggested before
4. And a zener diode for ADC input pin protection.

Okay, I will try this in hardware and update on the results. Again, thank you very much for your help! :)
 

You need an analog buffer, not a digital buffer.

You can use an op-amp configured as buffer (voltage follower).

Hope this helps.
Tahmid.
 
Okay, noted. Again, thank you very much for all your help. Can I also use an IC voltage follower, i.e. LM110 for this?
 

Yes, you can. It is the same as making a voltage follower out of an op-amp, but it is done for you. So, you can use it.

Hope this helps.
Tahmid.
 
@tahmid placing shunt in series will it cause some voltage drop in the supply voltage. i think this has to be put into consideration. i appreciate your suggestion suggestion.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top