Issues with ControlEverything AD7999



  • Hi,

    I'll try here first :-) Let me know if the ControlEverything (now NCD) would be a better place.

    I'm trying to build a low power datalogger for my Solar System. There is currently two voltages I'd like to monitor:

    • Solar Panel output voltage (0-150V)
    • Battery bank voltage (0-70V, nominal 48V)

    I ordered both a Network+I2C shield and an AD7999 (4 port) from ControlEverything.

    Downloaded the python code and it runs OK, but I get non-zero values if I read with nothing connected (Vin(1) and GND tied together result in same). If I measure a 1.5V battery I get no different reading.

    Does anybody have experience with this sensor?

    TX!
    Bas



  • in AD7999 you can read the ADC value without defining the register location. in this video, it shows the working.
    https://www.youtube.com/watch?v=Si_y8ORjvlw&t=364s
    You can use the c lib with onion as well
    https://github.com/ControlEverythingCommunity/AD7999/blob/master/C/AD7999.c
    Thanks



  • Hi Anil,

    It's your video I saw that showed me what to expect (zero reading). I don't think I can compile on the Onion Omega without a lot of extra work.

    I also noticed that when I measure the 1.5V battery, ALL channels will jump up?

    Bas



  • You will need to put some delay in between channel read. it updates adc values in only one register for all channels. so you will need to add some delay in between channel read and channel setup.



  • @Anil-bhaskar said in Issues with ControlEverything AD7999:

    You will need to put some delay in between channel read. it updates adc values in only one register for all channels. so you will need to add some delay in between channel read and channel setup.

    Hi,

    I had already moved that up to 2 seconds since I noticed the Python code has 0.5s while the C code had 1s. It made no difference. I also don't think that explains the > 0 reading when there is nothing connected.

    Weirdly, the behaviour is not consistent. The unit has been powered for hours now, and testing a battery has no effect on the report values

    Bas



  • I put the whole code in a loop to let it run continuously. With nothing connected, the most common result I get is 16. Don't understand what the divide by 16 (2 bytes?) does. But big coincidence that is my most common reading?

    If I put 2x 1.5V cell on, the reading only goes up to 33 or so

    Bas


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.