Go Down

Topic: Current to voltage conversion (Read 7342 times) previous topic - next topic

prth0901

Hi, I am currently working on my degree project. the main aim of the project is current to voltage conversion and programming of Aurdino uno. I am very new to this field. Can any body suggest me where to start.

jackrae

Working on a degree and asking basic questions ?

Use a resistor to simply convert current to voltage.  Equations based on OHM's law gives the relationship.  The major problems are loss of voltage in the burden resistor and that there may be circuit problems due to the resistor, and hence the voltage, being electrically tied to VCC, GND or some point in between.

Alternatively use a Hall type sensor which provides full electrical isolation for the measuring circuit and utilises the magnetic field produced by the current flow as a measure of the current.

cmiyc


the main aim of the project is current to voltage conversion

You might have to explain that one a little better.  Or at least start by providing an explanation of what "current" and "voltage" mean to you.  From your question, it doesn't seem like you have a good understanding of these fundamental concepts.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

prth0901

Hi Again,

Thanks for ur kindness. I do Know how to do it practically but i want to write this as programme in adrino uno. I am very new to this programming thing.

howiem

It sounds like you already know how to measure a current practically (ie. by putting a known resistor inline, and then measuring the voltage drop across it), so all you have to do is use the arduino to measure the voltage drop instead of using a voltmeter. The Arduino is equipped with ADC pins that act like simple voltmeters.

Here's a way to think it through - it's a very crude way of doing things, just for the principle:

The ADC pins can only measure voltages between 0 and 5 volts (assuming a 5 volt supply), so decide what the absolute biggest current you need to measure will be, and choose a shunt resistor that will give you a 5 volt drop at that current. Put the shunt resistor in line with the load, on the ground side. Connect the load side of the shunt resistor to one of the ADC pins (say, A1), then within your Arduino program you can use

myReading = analogRead(A1);

to read the voltage across the shunt resistor. The variable "myReading" will contain a value from 0 to 1023, proportional to the voltage read -- 1023 represents 5v, 512 represents 2.5v, etc. So, divide the reading by 204.8 to get the voltage, and then use Ohm's law to work out what current must be flowing.

Look at some of the example programs to see how to do maths on the Arduino.

Note that this way of doing things is very crude and introduces an impractically big voltage drop in the circuit powering your load - in practice, one would choose an extremely low value shunt resistor, such that the voltage drop across it would be measured in milli- or micro-volts, then use an amplifier circuit (op-amp etc) to scale that up to the 5 volts the Arduino can measure.

Hope this helps - and that someone'll step in if I've got anything badly wrong :)

Far-seeker


The ADC pins can only measure voltages between 0 and 5 volts (assuming a 5 volt supply),


Actually, that's not quite correct.  There is an internal 1.1 VDC that can be used (if so it will measure between 0 and 1.1 VDC), and an analog reference pin which can be used to feed in an arbitrary maximum reference voltage as well (just be sure not to go above the maximum voltage and current ratings listed in the ATMega datasheets).

howiem



The ADC pins can only measure voltages between 0 and 5 volts (assuming a 5 volt supply),


Actually, that's not quite correct.  There is an internal 1.1 VDC that can be used (if so it will measure between 0 and 1.1 VDC), and an analog reference pin which can be used to feed in an arbitrary maximum reference voltage as well (just be sure not to go above the maximum voltage and current ratings listed in the ATMega datasheets).


Ahh - thanks for the correction :)

I wonder what the lowest practical reference voltage you can use would be. Could you use a voltage divider to give the Arduino a 20mV reference voltage and still get sensible, linear, readings out of its ADC? I'd imagine noise would be an issue, the smaller the range of voltages you try to measure, but it'd be interesting to know where the useful limit is.

retrolefty




The ADC pins can only measure voltages between 0 and 5 volts (assuming a 5 volt supply),


Actually, that's not quite correct.  There is an internal 1.1 VDC that can be used (if so it will measure between 0 and 1.1 VDC), and an analog reference pin which can be used to feed in an arbitrary maximum reference voltage as well (just be sure not to go above the maximum voltage and current ratings listed in the ATMega datasheets).


Ahh - thanks for the correction :)

I wonder what the lowest practical reference voltage you can use would be. Could you use a voltage divider to give the Arduino a 20mV reference voltage and still get sensible, linear, readings out of its ADC? I'd imagine noise would be an issue, the smaller the range of voltages you try to measure, but it'd be interesting to know where the useful limit is.


I believe the lowest value is around 1.0vdc, but check with the datasheet for sure.

Go Up