Programming Information

I need some information to allow me to program this AC voltage monitor.

Scanning with AnyI2C it looks like the address is 0x2A, but didn't get past that.

Tried to open the datasheet, but get an error that says the website has declined the request.

I know it takes time to get the examples written, but there must be something that was written for testing or an update to AnyI2C that would give a clue on how to use the new toys.

Thanks.

 

 

T

Hi,

What language/platform would you like the sample code for(Particle, Raspberry Pi, Python, Windows, etc)?  I assume Particle since it is a Particle interface board.

I will try to have that broken link corrected today.

Thank you,

Travis Elliott

C

I was able to get some working code for Particle, I sent a copy to Bhaskar to post if you desire.

Thanks

T

Great.  Glad to hear.  If you need anything else please let us know.

Jeff Roberts's picture

can I also get a copy of this ?

B

You can find it over here.

Voltage monit photon code

D

Hi,

Im looking for some example in python. I have 3 PEVMAC2C REV.A PR32-30 boards and want to use them with rapsberry Pi. Thanks in advance !!

B

Hi,

Please check out this code

https://github.com/bhaskar-anil429/voltage-monit_python/blob/master/voltage.py

i don't have the board to test this code but it should work, if you face any issue please let me know.

Thank You.

 

D

Thanks Bhaskar!,  the code work just fine. One more question: what should be the i2c command in order to get just one channel measure? I want to make a funtion like:

def getVoltage(address, channel):

/some commands and code/

return measureChannel

I really apreciate your help. regards! 

 

 

B

command1 = [0x6A, 0x05, 0x01, 0x02, 0x00, 0x00, 0x04]

in this command

0x6A -- is a header byte

0x05 -- command byte ( to read voltage)

0x01 -- start channel

0x02 -- end channel

0x00, 0x00, 0x00 -- rsrv

0x04 -- checksum

if you want read just the channel one 

command1 = [0x6A, 0x05, 0x01, 0x02, 0x00, 0x00, 0x03]

if you want to read just the channel two

command1 = [0x6A, 0x05, 0x02, 0x02, 0x00, 0x00, 0x05]

Thank You.