I want to measure 0-3A current for my power supply (which will be monitored by diff op-amp and will be giving output to arduino ADC)so I took 0.01ohm resistor then
@3A (max current) there will be voltage drop of 30mV which should be 5V (1024 - max output of ADC) (for arduino which has 10 bit ADC)
So I will need a gain of 167 from the op-amp. (gain = 5V / 30mV = 166.66)
Are my calculations right? Is this the way to calculate the gain ?
If yes then can I use LM741 which has max gain of 200 ?
Voltage will be within 0 - 15V.
Please reply soon guys need to make few circuit based on constant current.
Thank You.
I have done a project using an
ATMEGA328 volt/current logger (see link below), and I have some do's and don'ts suggestion:
1. The top-half of your ADC is going to be your more accurate half. The top quartile (ADC reading >=1023/4) will be near or better than 0.5% accuracy, and the bottom quartile will be heading toward 5% error and approach infinity as you move lower.
So - you want accuracy, spread the reading in ranges rather than measuring 0-3A with one setup. My project does +- 0.2V +2.5V +-5V +15V and +30V (approx) so I can get to the best range.
(see link below) I use a
0.1ohm shunt so I am not dealing with too small a voltage so as to
lessen the impact of noise.
2. You must not rely on USB power since they vary too much from machine to machine. In fact – I made sure my FT232 board’s V5 is NOT connected to my “DinoMeter” board. (That's what I called my project) The swing between different USB ports just kills your accuracy.
3. Good compensation will do more than good OpAmp. I use tables of compensation factors to deal with linearity and accuracy. In practical term, my strategy is to use the
ADC reading as index into a table of pre-measured voltage, and interpolated within for finer results. So, linearity is of no concern and actual “opamp multiplier” is of no concern making life a lot easier.
3a. For best results, make sure each ADC has it own set of tables; and for each multiplier setting for that ADC, it has its own table. With my learning project, I have 5 multiplier settings and 4 channels (ADC) = 20 tables, so I had to do some trade-offs. I have 1:1 (1 compensation factor for each ADC reading each ADC) until 250 and 1:5 from 251 to 1023 (1 reading for 5 ADC count and interpolate within) with 16 bit per entry. I also build a volt-sweeper so I can collect compensation data automatically.
I achieved +-2% easily when ADC>30 and I use a lowly 2902 Quard OpAmp. I merely use the worst case figures. In fact, with my setup most ADC readings achieve better that 1% and in the 0.5% range, but I use the worst case to be conservative.
4. If you do view the video of my learning project... My big mistake was to lazy out and not use bipolar power supply. It would have given me better results for negative. I learned a lot from doing that project.
A close up look at ADC accuracyhttps://www.eevblog.com/forum/microcontrollers/atmega328-adc-accuracy-graph/An Implmentation of ATMega328 volt logger (a learning project)https://www.eevblog.com/forum/microcontrollers/an-implementation-of-atmega328-volt-logger-the-dinometer-a-learning-project/msg316233/#msg316233Good luck, you should find it a fund thing to do.
Rick