-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emonlib with ADS1115 #23
Comments
Hi, sounds like a great idea. I've not done this myself, just looked at the ADS1115, looks like a tidy package, I'm sure there will be plenty of support out there how to use this. I recomend you post on our forums, failing a good response maybe try the Adafruit forums . |
The issue here is that the library expects an Arduino pin in the It would be nice if emonlib supported analog inputs from the ADS1115 - |
Is there a reason why you are you using an external ADC such as the ADS1115 instead of the built-in Arduino ADC. Is it simply because the ADS1115 has a higher resolution of 16bits as compared to the 10bit/12bit ADC resolution of the Arduino? I have worked with the ADS1115 in the past. I wouldn't mind trying to figure something out that will help you. |
Hi Jonathan - it's because I was trying to use emonlib on an ESP8266. The ESP8266 does not have a useable native analog input. (it has one, but trying to rapidly sample it causes the wifi connection to break). |
For what it's worth, I did fork this library and successfully implemented a callback for reading the input that is also backward compatible with existing sketches. I don't know if the author will want to merge my change or not. |
Hi Guys/Girls, I did get it to work, by rewriting the emonlib library, but it was crontoversly to say at least. But it works perfectly, it still is measuring the current. Fahrvergnuugen, thanks for posting you file. I will try it out! Regards. |
I did a similar change to get the ADS1115 reading code into Emonlib, but
your solution is more elegant, I like it!
…On Mon, Apr 16, 2018 at 12:22 PM, SybrenV ***@***.***> wrote:
Hi Guys/Girls,
I did get it to work, by rewriting the emonlib library, but it was
crontoversly to say at least. But it works perfectly, it still is measuring
the current.
The reason I used the ADS1115 was indeed the ESP. I used the Nodemcu board
and could use the extra current sensors.
Fahrvergnuugen, thanks for posting you file. I will try it out!
Regards.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABwUCCR_4USsnU8KTkMD7B-o0-dexOySks5tpNNGgaJpZM4H7EbY>
.
|
@PaulWieland I tried that code but found some issues. It seems that it does not work with the correct amount of bits... is simply not working and when forcing it to ADC_BIT 15 all kind of overflows occure (negative power values). |
I would guess that you have issues with your ADS1115 code and not with emonlib or the fork I made. Try building a separate sketch that just uses the ADS1115 to sample known values. Get that working first and then apply that to the user defined pin reader callback. |
Hei @PaulWieland I'm using your code but it always return 0. Do I need to change anything on ads1115 example code? |
Thanks for the changes in updating the code for support of the ADS1115. I am currently working on an ESP32 version and this is quite useful (not able to test atm as I don't have the rest of the parts in yet). I'll give it a shot soon. In my build I'll be using 4 additional modules to be able to scan up to 16 circuits. Hope it all works flawlessly :P But we know in reality it'll kick and have a tantrum. Kori |
With
Are you able to use both, the Analog Pins of the ESP32 and as well as the ADS1115 Analog Pins with the current library by #PaulWieland ? |
I did it according to @PaulWieland's code.. |
Hello all!
I have a question for you,
I wanted to use the ADS1115 to read the analog value from my diy current clamp pcb(which worked perfectly with a Arduino nano).
Since i am a self taught programmer and i lack skill i cant figure out how I can implement the values I read with the ADS1115 into the emonlib library. Im using the Adafruit library (https://www.adafruit.com/product/1085).
Can maybe somebody point me in the right direction how to do this? I know the analogRead is located in Emonlin.ccp and i tried a lot of variation to load in the right number, but no luck...
Thanks in advance!
The text was updated successfully, but these errors were encountered: