current measurement over time

Thread Starter

abc14

Joined Oct 15, 2017
123
OK and what coupling for your CH1 vertical input are you using? Since the trace looks to be right on the baseline my guess is you are AC coupling the input, should that be the case all you will see is any AC noise riding on the DC level from the shunt and not the DC shunt voltage.

Ron

Yes the coupling on channel 1 is AC, the system is powered using 3 alkaline batteries D-Cell. I have changed the coupling to DC and got following results..


1582564237724.png
 

Reloadron

Joined Jan 15, 2015
7,501
Three alkaline batteries will give you about 4.5 volts maximum. The pulses we now see are what the spikes on your previous post were. I am guessing you are using probe tip in the high side of your 1 Ohm shunt and scope ground or probe ground on the low side of the shunt? I would expect higher amplitude but they look like PWM pulses to me.

Ron
 

Thread Starter

abc14

Joined Oct 15, 2017
123
Three alkaline batteries will give you about 4.5 volts maximum. The pulses we now see are what the spikes on your previous post were. I am guessing you are using probe tip in the high side of your 1 Ohm shunt and scope ground or probe ground on the low side of the shunt? I would expect higher amplitude but they look like PWM pulses to me.

Ron

Yes the prob tip is on 1 ohm shunt side and prob ground is the side which is connected to ground side of shunt
 

Thread Starter

abc14

Joined Oct 15, 2017
123
Three alkaline batteries will give you about 4.5 volts maximum. The pulses we now see are what the spikes on your previous post were. I am guessing you are using probe tip in the high side of your 1 Ohm shunt and scope ground or probe ground on the low side of the shunt? I would expect higher amplitude but they look like PWM pulses to me.

Ron
Also I have followed your suggestion and got the analog readings using ADS1115 and got much better results. Both analog read and voltage conversions are attached.
 

Attachments

Thread Starter

abc14

Joined Oct 15, 2017
123
Three alkaline batteries will give you about 4.5 volts maximum. The pulses we now see are what the spikes on your previous post were. I am guessing you are using probe tip in the high side of your 1 Ohm shunt and scope ground or probe ground on the low side of the shunt? I would expect higher amplitude but they look like PWM pulses to me.

Ron
I have solved the lower amplitude mystery, my scope prob was set to x10 setting.. Now I am getting amplitudes close to what I am seeing on analogRead.

1582569082380.png
 

Reloadron

Joined Jan 15, 2015
7,501
X10 huh? I forgot to ask about that. :) Anytime there is a motor involved there will be noise. I think it's a rule. Keep in mind your shunt is not quite a precision shunt and for a handful of 10 Ohm resistors and open wiring all in all things don't look all that bad. The improved resolution of the A/D helps.

Ron
 

Thread Starter

abc14

Joined Oct 15, 2017
123
X10 huh? I forgot to ask about that. :) Anytime there is a motor involved there will be noise. I think it's a rule. Keep in mind your shunt is not quite a precision shunt and for a handful of 10 Ohm resistors and open wiring all in all things don't look all that bad. The improved resolution of the A/D helps.

Ron
I have replaced the 10x 10ohms resistors in parallels with 1 ohm 1W resistor.


Yes improved resolution has helped. Although not sure how to connect it in differential mode to get negative readings as well.

One side of shunt going to 1 Input and other going to second Input ?
 

Reloadron

Joined Jan 15, 2015
7,501
I have replaced the 10x 10ohms resistors in parallels with 1 ohm 1W resistor.


Yes improved resolution has helped. Although not sure how to connect it in differential mode to get negative readings as well.

One side of shunt going to 1 Input and other going to second Input ?
Yes, you measure directly across the shunt with a high side positive and a low side negative. Rather than me explain this and give you a code sample I suggest you just read this link. Most of it is a rehash for you about the third page you will find what you are looking for. Yes, pretty much A0 and A1 become a Pos and Neg input for one diff channel and A2 and A3 another so yes, we lose two analog channels. Now I am not sure about measuring a neg value with respect to ground but would guess it would involve how the chip is powered as to VSS & VDD. I have never done it.

Ron
 
Top