I’m using a PICAXE 28X1 and reading ADC current thru a load. I’m also using PWM to vary current thru the load (see att 1). The PIC reads current using a 0.05 ohm shunt going to an op-amp (gain 10). I think I’m getting some kind of interference between PWM and ADC reading. The PWM interface is in att 2. When I disconnect fet power, load power and op-amp power, I get the following ADC readings for current (should be 0):
duty=49 current=1
duty=49 current=1
…
duty=49 current=4
…
duty=49 current=1
duty=49 current=0
duty=49 current=5
duty=49 current=1
…
duty=49 current=1
duty=49 current=13
duty=49 current=1
…
duty=49 current=1
duty=49 current=1
duty=49 current=21
duty=49 current=1
duty=49 current=1
…
duty=49 current=1
duty=49 current=0
duty=49 current=6
duty=49 current=1
…
duty=49 current=1
duty=49 current=1
duty=49 current=13
duty=49 current=1
…
duty=49 current=1
duty=49 current=1
duty=49 current=20
duty=49 current=1
I’m getting nasty spicks. When I disconnect the PWM pin, I consistently get:
duty=49 current=1
Stumped. Any ideas?
duty=49 current=1
duty=49 current=1
…
duty=49 current=4
…
duty=49 current=1
duty=49 current=0
duty=49 current=5
duty=49 current=1
…
duty=49 current=1
duty=49 current=13
duty=49 current=1
…
duty=49 current=1
duty=49 current=1
duty=49 current=21
duty=49 current=1
duty=49 current=1
…
duty=49 current=1
duty=49 current=0
duty=49 current=6
duty=49 current=1
…
duty=49 current=1
duty=49 current=1
duty=49 current=13
duty=49 current=1
…
duty=49 current=1
duty=49 current=1
duty=49 current=20
duty=49 current=1
I’m getting nasty spicks. When I disconnect the PWM pin, I consistently get:
duty=49 current=1
Stumped. Any ideas?
Attachments
-
28.2 KB Views: 45
-
18.6 KB Views: 50