Solved how ac current can connect to ads1115?

thank you for the tips @RayLivingston i will not forget how you help me same with @PaulRB i really appreciate it.

TWO sensors??? What two sensors??

Im using voltage sensor "ZMPT101B" and current sensor "ACS712 " so that i use ads1115 to get the readings but the problem is lack of knowledge i already accurate my 2 sensors but i got problem in ads1115 when i try to combine the two sensors using ads1115
:frowning: and the slope

So you have an AC voltage sensor and an AC current sensor.

What is this "slope" you want to calculate? What does it represent?

float slope = (readings[1]-readings[0])/(readings[3]-readings[2]);

What is this array readings[]?

Have you forgotten what I said in reply #11? If you want our help you must tell everything, share schematics, code, links to components and photos. Otherwise we can only guess how to help you, and that is not fun for us.

First thing you need to do is forget about creating whatever application it is you're trying to create. Start with the ADS1115, write the code for that, and test the he11 out of it. Get it to where it gives you correct, accurate readings ALL the time, over the full range of input values. Then, and only then, add one of the other sensors, and get that sensor to where it gives you correct, accurate readings ALL the time, over its full range of input values. Then do the same for the other sensor. Once you have all THREE working perfectly stand-alone, then, and only then can you start combining them all into the final application. Trying to code and test the entire application in one go will never get you to a working system.

This will require a GOOD understanding of exactly how the ADS1115 and both sensors actually work, what their allowable inputs are, what their possible outputs are, and what are the correct configuration and settings for all three of them. Each one is fairly complex on its own, so just copying and pasting code from others is never going to get you where you want to go. YOU need to understand all three components in detail, which means spending a lot of time studying their datasheets until you fully understand them. Then, doing the same with the software for all three.

thank you for all you advise my ads is alreadworked need to supply 3.3 v not on vin then about the code is the acs712 and for ZMPT101B voltage sensor is i still reading the data sheet of this 2 sensor

@PaulRB thanks

@RayLivingston @RayLivingston @JohnLincoln
i make other forum for coding im still doing my best to configure what is my wrong still im reading the component of the 2 sensor i hope you can help me here giving some ideas i really appriciated

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.