Це відео не доступне.
Перепрошуємо.
TUTORIAL: How to / About the ADS1115 External 16 Bit ADC - Part 2
Вставка
- Опубліковано 16 сер 2024
- This video shows how to wire it up to ESP32... Also coding and testing.
For those who wish to support the channel, my Patreon account is here: / antony131186
I'm sure you've figured it out by now but Vcc means Voltage-Collector-Collector, which is the rail the transistor's collectors connect to. Vdd is Voltage-Drain-Drain, same thing but MOSFETS instead of transistors. You may also see Vss (source) and Vee (emitter). All that's important is the big V and the double letter - that is what indicates voltage input. V+ (and V- for inverted inputs) are also commonly used.
Thanks for the video. According to the datasheet unused inputs should be pulled to vdd not to ground. Also that module already has a pull down on the addr pin so your ground link was not required.
SKUD UD!!! you are an absolute madlad, you saved our 3 semester project, which also means our future, which also means our BIG MONEY. thank you so much i am for ever in your debt
I just found your channel, as a electronic engineer just wanted to give my 2 cents, we all know that breadboard is source of all the "EM noise". If you interested, instead using standAlone adc, you can use Differential ADC. As it will help you to reduce the noise. Kudos to you for video. Really appreciate
interestingly the ads1115 is effectively 15 bit i.e. 0-32768 not 64k. The reason is because the the ad1115 could read negative volts but to realise this would have to use the ads1115 in differential mode. oddly the ads1115 can read negative voltages (voltages below ov) but must not be below 0.3volts even on a 3.3/5 volt supply on the ads1115. so the ads1115 could be used to measure shunt voltages in the range of + - 300mV!
I agree with your comment about adafruit, they do offer great support for their products, the downside is we become lazy, and dependent on code we never learn to produce ourselves because we just add the library which is the most interesting and challenging part of the whole. The guy who wrote the library had to read the 53 page data sheet for the ads1115 and within that data sheet there is gems such as do not connect unused inputs to ground but leave them floating or tie to vdd and you become aware that the ads1115 used in the mode used in the video is a 15 bit adc. this does not detract from the quality of the ads1115 because if you were expecting to use it in 16 bit mode you would likly have to use it in differential mode which would limit you to two inputs, but then you would get a resolution of 32768 in the positive and negative direction and it would have common mode rejection.
I could go on singing the praises of this adc such as you could use A3 input as ground for A0,A1,A2. this adc is a gem.
You don't have to worry about blowing up the DAC using a voltage higher than the max +/- signal value. If it's powered off 3.3v, you will never have more than 3.3v out of the internal amp so the ADC will never see more than 3.3v. All that will happen is you will max out or zero out the adc counts, so you won't know what the true value is. Now, on the external pin, you absolutely should not apply more than the positive rail or ground. A pair of low forward drop protection diodes or a low offset / low noise / low thermal drift rail to rail amp is a good option, however you should be careful choosing this part and laying it out since it will take a good design to avoid introducing a relatively large amount of noise and error into an analog signal with this amount of resolution.
Thanks Mr kartwright from India
Thanks for the great explanation, I was having problem with the readings varying and after connecting the not used pins to GND and adding a small cap to the input pin, now I have 100% good reading
Vdd is voltage drain connection, it is equivalent to Vcc but for MOSFETs not BJT transistors
Awesome! Thank you for creating this two part video. It's good to mention that the ADS1115 can be used as a analog pin extension, though you apparently demonstrate it excellently.
Thank you...great video. I wouldn't be so fast to dismiss your DMM, they are usually quite accurate, it may be the voltage reference. Perhaps you could use another DMM to determine the cause. It would also relatively simple to calibrate your ADC to get the readings to align.
10.1.4 Unused Inputs and Outputs
Either float unused analog inputs, or tie the unused analog inputs to midsupply or VDD. Connecting unused
analog inputs to GND is possible, but may yield higher leakage currents than the previous options.
Excellent info !
Great job and agree 100% about supporting Adafruit 👍🏻
I agree. Cuz I suck at making libraries. Best I can do is take a few books and put on a shelf :P
The only issue is they don't make smaller ones. I was having a problem with the oled display library. It took a long time to compile, and then it took almost 30% of memory. I had to go to an outside source (github) to get one that basically streamlined the code and now only takes about 2-5% of memory.
Yes, it's very important that we support these guys. I'm a programmer myself. I don't write C++ libraries, but I've seen the code and I can see that a lot of work goes into them. Without people freely giving their time to create libraries for us to use, a lot of this functionality would be out of our reach. :-/
Low quality multimeter leads will have no influence on voltage readings.
That's because only a tiny amount of current flows through them while measuring volts.
And that's because a multimeter on voltage range has a huge impedance (ok, resistance), thus almost no current flows into the voltmeter, thus almost no voltage drop on the leads.
The quality of the leads becomes important when measuring current and resistance.
John Smith hey, you're right. These leads have a resistance of 300mohm which is negligible. :)
No, it's because of tiny current flowing through them.
Few episodes back, you put a 10k resistor in series with the adc. While it's resistance is quite big, it still had no noticeable influence on reading, because almost no current was going thru it, causing no voltage drop.
I=U/R, Ohm's Law.
Congratulations for the video, very didactic. Have you compared the voltage obtained on the ADC and the Voltmeter when you performed the measure with the Voltmeter? When you connect the Voltmeter its internal resistance is in parallel with the 10k resistance connected to the ground, so it could damage your measure if the Voltmeter resistance is small. Compare both measures when you include the Voltmeter, if the voltage measured on the ADC is reduced when the Voltmeter is used you can reduce the 10k resistor. Then, the Voltmeter internal resistance will have a lower influence on the measure. Further, if the Voltmeter ADC is lower than 16 bits it will have lower precision, so the results could not match. In addition, you could use a small parallel ceramic capacitor (100nF) with the ADC channel in order to reduce noise.
Another Great video tutorial. I have one of these boards and wasn't sure how to use it. I'll give it a try. Thanks,
Thanks!
no it's not "supposed" to be VCC, its VDD for a reason, it has to do with if the transistors used is NPN or PNP and if they are FET or MOSFETS...
Thanks for this, I have just discovered how useless the esp32 adc is.
yeah it's bs
Hello Antony,
Good job.Your explanation is really awesome
Thank you.
Thanks, I am such a newbie & this was the perfect video.
If I was using a CT clamp which pins would I connect up please.
TIA
Hey, I'm afraid I don't know anything about that CT clamp. Antony...
Well is a minus and plus adc the value will only go upto 15 bits which is 32767 values for +6.144 volts rest of the values are for the -negative voltage. I thought 16 bit is for 0 to 5 volts. Any way it is still great as Arduino is 10 bit for 0-5. and STM32 blue pill is 12bit and i think it is also 0-5 volts positive.
Very useful and clearly explained. Thanks.
So cool! Thanks for sharing, a great video tutorial :)
WOW! Loved the video! All I did to change the reading was to add the A0 and A2 then divide by 1000 to get a lovely voltage reading! Well done you. Now the QUESTION - how the heck do I set up and test the SCT-013-30??? Have you ever looked at one of these 30A ac transformers?
There's are excellent little ADCs. That SCT is a 3 pin analogue device so it will be easy. One pin will be +5/3.3v, one pin will be gnd. The other will be signal.
Antony Cartwright thanks - will look at the adafruit libs and see if I can work out the math as that’s the only issue I have left now. Great videos BTW, keep up the good work...
Wow!! Excellent explanation, Thanks for the video sir. But I am getting all the four values as "-1", what I have to do please suggest me
excellent video thanks for loading it!!!!
adafruit libraries are often incomplete. Their modules do not use all the capabilities of the chip soldered onto the board a good example is their RA8875 breakout board. They are not using the full capability of the chip and i had to write some of the chips data registers directly because their library did not include that function. other chip features were not available because they did not bring those pins of the chip out on to the breakout board. This is just one example. They do just enough to sell the product and many times do not include all functionality of the chip in their boards or libraries.
And they never give you a Keywords file in the library
@@stoptheirlies sometimes yes sometimes no but that is only the functionality they are using in the library. That doesn't mean the chip cant do more. And you can do more but you have to write the registers manually and not use the library for those functions.
Great tutorial - but just one question: Is it possible to use two ADS1115 boards on one arduino? If yes - how should it be connected? I want to monitor 8 analogue signals with one or two digital outputs if one (or more) analogue signals fails.
very good video !
Sir, when i upload this code LCD showing
ADC0: 0
ADCV: 0.0
Where is the problem sir?
CODING QUESTION
Thanks for a very interesting and informative video. I have ordered a couple of ADS1115s and I am looking forward to a lot of fun. Line 76 of your programme has me foxed. i have tried to get help with it on line without success, Could you you explain it for me. Particularly the ? as I cant tie down its meaning.
Hi, thanks for sharing this tutorial, it's very clear. I have a problem with my module that is the 12 bit version, the ADS1015ADC+PGA. I did the same steps you did in the video but on all channels I only get the full scale, even if I connect them to the GRN. Do you have any idea about it? How can I chek the ADC is working properly? Thks
Why my output didn’t come out same with the output in this video ?
great explanation, thank you
SAVED my day! THANKS!
If we choose GAIN TWO, that's means it applies to all ADC input? or we can be separately setting GAIN?
Thanks for awesome video
excellent,,,, awesome man... you beauty,,, thanks a lot
Thanks!
Great Video, Could this be done to read from more that 1 ADC?
great job. Thanks so much.
Hi Antony,
Have one of these and a further 2 more somewhere between China and home (if they ever get here).
They are excellent and cheap for 16bit resolution, however:-
One thing about your comparison with your meter and what the ADC reads, it is quite a lot of difference at 90mV.
Did you monitor the indicated voltage whilst measuring with the multi-meter, as the meter could have placed a tiny load on the circuit and lowered the value.
I also note from the datasheet that the input impedance of the 1115 becomes much lower as the gain is increased.
The reason I mention this is that the project I have in mind is required to read just a few mV with a resolution of 10's uV and obviously an inaccuracy of 90mV would make it useless for my project.
Would be interested if you could find what is causing the difference.
Nice to see your using the ESP32, I use the ESP-12E more and more rather than the Arduino Uno.
Thanks and keep it up.
Enjoy your vids.
Martin Ellis hi Martin, if we had time, we could work all this out. Coming to think of it, 90mv is quite a lot out actually. :/
Accuracy will affected by 3.3V voltage regulator on esp32 board ,these LDO voltage regulator are typically 5% class. to get accurate reading you have to measure 3.3V rail or vdd voltage using good multimeter and use this value in calculation in code.
Very good videos!
Perfect job.
im trying to use this to read the input from a potentiometer in real time, but ive noticed when i have all channels activated i only get like 12hz, im using a raspberry pi4 so it should be plenty powerful. Am i doing something wrong or is there no way to make it faster?
Can you do a video on using this with micro python please, that would be so helpful
100mV discrepancy is pretty big in the scheme of things. That's over 5% error. What are the accuracy claim specs on your meter?
I know this is late, but I have test with my precision Multimeter, the fault is of bread board. These cheap breadboard are very noisy
In my case, that's ABSOLUTELY UNACCEPTABLE. like it's useless if it's that inaccurate.
Thanks a lot for the information you given. It is very useful. My question is what wiring connection and code if i use two ADS1115 with one Arduino Uno. Please let me know. Thanks
Hey man, I tried this with an Uno and actually, the A5 and A4 are the I2C pins. However, you are supposed to connect it with the two unnamed pins on the top of the right header, above AREF. First one is SCL.
if i use 2 ads1115 on same microcontroller can i use them with different gains
For the comment about using A4 and A5 do you mean that instead i should use A4 to SCL, and A5 to SDA?
Otherwise great video
Great, thank you!
how to make it read a bipolar voltage signal?
Thanks Antony for the great tutorial. How do you configure the sampling rate? I can see that on every one sec iteration you get a single value where as when I read about the device it seems like it can sample 860 samples/sec.
you can´t with the oficial library, use this one lygte-info.dk/project/ADS1115Library%20UK.html , also 860 Sp will incrise the error.
@@tdomingues89 Not so perfect, still low SPS, better to use MCP3008.
@@kumarjha1729 realy ?
@@tdomingues89 yes sir. I tried MCP where I was getting much more samples even for 8 channels. But I am not getting any library for ADS1115 where I have around 500 samples Simultaneously for 4 channels (0-3.3V) range..Did you checked above mentioned library for 4 channels?
Thank you!
Video blurred in the last half, so for newbies this is very difficult to follow!
UA-cam reduces the quality depending on your connection. Go to settings, then choose high quality.
Hi, im using espduino and an ads1115 to collect ac voltage, however, whenever i connect the ac signal to the ads a0, all other analog inputs gets affected. Another is thing is that, whenever i plot the data into the serial plotter, i cannot see a negative voltage as well as a sine wave. The plot is just some random stuff instead of a sine wave. Please help
remember to outcomment your device, and ground wires, that you r not using. see 4:42 in the vid. hope it helps.
great video!
but im curious , i have project read voltage from solar cell , can ads1115 read more than 30v using voltage divider ??? thanks
The ads can do it, but you usually wouldn't need to! The ads is used when super high precision is needed. By all means though, you could use it. You'd have to look at the gain modes and choose a suitable voltage divider for whichever mode you choose. Most likely the 6v mode would be best. You could then use a 1:5 ratio or somewhere near that.
no
@@luisviera3902 Actually, yes. Like Antony said (correctly), a voltage divider is what you'd use to bring the registered voltage down to below a given resolution level in the ADS.
thank ou thank you thank you
thanks
Nice video. But sorry to say it is providing very low samples/sec. If I am using 1 channel, getting 7-8 samples/sec; for 2 Channels getting 3-4 samples/sec; and for 4 Channels getting 2-3 samples/sec. I have put delay(1000) commented. Can you show me how to get 860SPS using ADS1115 for all 4 channels used. If it is not providing, I can think however it is 16 bit, MCP3008 10 bit is far better than this ADS1115.
where is the coad ???
What happens if your voltage exceeds what you set for your gain?
Well it's a long topic, most of the ADC have internal reference voltage from which it compare. For egs if internal voltage is 3v and your ADC is 10bit(1024 counts), so 3/1023 will give you resolution, where 3v is max range. Suppose you want to read 1.5 volts then the reference number ADC will give is half of 1023.
Hope you getting the picture, you want to have maximum resolution where you can get maximum efficiency. That's why choosing voltage is important. If you exceeds voltage range it will more likely to destroyed your ADC and sometimes your microcontroller too...
I learning a lot from hour stuff . I want do a test without 4 li-on cells must i put the plus on A0...A3 and put all the ground together wie u arduin ? Dutch speaking bad english and 66 year old
Hi Jeff, thanks for your comment. For maximum accuracy, you'd connect the cathode to any A-pin and the anode to any other A-pin. You'll need 5v vcc (from what I rememeber). You'll need to program the chip to accept up to 4.2v also. You'd use differential mode in this configuration.
Can these ADCs take positive and negative values? I thought they were rated for plus/minus 6V input?
Nick Coton I believe it is +/- yes.
input voltage range is Vdd + 0.3 -- GND - 0.3
Ok, thanks for that.
1760 vs 1670 mV is not really spot on is it. You would not need 16 bits ADC for that.
Do you have to use sketch?
How to make DC volt meter using this method? Sir
Check out other videos on my channel. 🙂
Lot of videos in your channel sir please give me a specific link about DC volt meter using ESP 32 and ads1115
Sir please share link about DC volt meter.
@@0124akash Check "Arduino measure voltage".
@@AntonyCartwright not found
Antony. Why a voltage divider??
Hi, because it gives me a known voltage which I can test the ADS module with. If I have a 5v supply and I have 2 x 10k in series from VCC to GND, the voltage in between the two resistors will be 2.5v. Ofcourse, I can't test with 0v and I can't test with 5v. :-)
Hey, so I watched the previous video you made about the ads1115, and I have a question. I'm trying to measure a maximum of 4.5V with the esp8266, but the pins in the esp module are all 3.3V tolerant only. Would I still be able to measure more than 3.3V with this module?
No. Not without a voltage divider.
Bro share circuit diagram
11:52 When i can't get something to work!
CODING QUESTION
Why my output didn’t come out same with the outuput in this video