Help for acs758

g6ejd

Senior Member
This device outputs a voltage that is proportional to current, so connect it to a ADC input on a PICAXE and use the command READADC command.

main:
readadc10 1,w1 ; read value into w1 using analogue input 1
debug ; transmit to computer
pause 200 ; short delay
goto main ; loop back to start

- See more at: http://www.picaxe.com/BASIC-Commands/Analogue-InputOutput/readadc10/#sthash.4MGi4va4.dpuf

That gives 10-bit resolution, for less resolution use READADC command




See more at: http://www.picaxe.com/BASIC-Commands/Analogue-InputOutput/readdac/#sthash.4cp508Cp.dpuf
 

premelec

Senior Member
Welcome to this forum... this part is bi-directional - so I think the 0 current point is offset from V- I haven't studied the detailed data sheet - you should... :)
 

ipetti

New Member
Is this correct?


Symbol ADCValue=W0
Symbol Result=w1

Symbol Offset=505 ' 505=0 Amps half supply
Symbol Steps=4887 ' 5v/1023 = 0.004887vDC
Symbol Sensitivity=40 ' Sensitivity is 40mv/A

do
READADC10 0,ADCValue
pause 100
Result=ADCValue-Offset*Steps/Sensitivity
Debug

loop
 

premelec

Senior Member
You are almost there - note that the sensitivity of the READADC depends on the reference voltage you choose - this can be an internal reference on some chips - see FVRSETUP and ADCCONFIG commands in manual 2 to get an idea of what is possible. Some calibration will likely be necessary in any application requiring high accuracy. You can also use V+ of the chip as the reference voltage with less sensitivity per step...
 
Last edited:
Top