1968neil
Senior Member
Hi Folks,
This is driving me mad, can anyone tell me where im going wrong ?
I cant get an accurate reading across the whole range.
I am using an 18m2+ with The Current sensor on B.3 ADC input.
I think i have the maths right ?
All im trying to do is measure the current of a dc source from 10ma to 20 amps the output of the module(ebay version on PCB with header) and display on an AXE133 the display is fine and displays ok.
What i cant get my head round is if i drawer 270ma i get a reading of 3 and a 3.7amp gives me 37 on the lcd.
Has to be the maths ?
Any help greatly received.
Neil
This is driving me mad, can anyone tell me where im going wrong ?
I cant get an accurate reading across the whole range.
I am using an 18m2+ with The Current sensor on B.3 ADC input.
I think i have the maths right ?
All im trying to do is measure the current of a dc source from 10ma to 20 amps the output of the module(ebay version on PCB with header) and display on an AXE133 the display is fine and displays ok.
What i cant get my head round is if i drawer 270ma i get a reading of 3 and a 3.7amp gives me 37 on the lcd.
Has to be the maths ?
Any help greatly received.
Neil
Code:
Symbol ACS712=B.3
Symbol LCD=B.5
Symbol Baud=N2400
Pause 2000 ' Pause 2 secs to initialise LCD
serout LCD,Baud,(254,1) ' Clear LCD before starting Main Program
pause 1000 ' Pause 1 sec
Main:
b0 = b0 MAX 127
READADC ACS712,b0
b1=b0-127*196/100
'Pause 800
serout LCD,Baud,(254,130,#b1)
Debug
Goto Main