Raspberry Pi Analog Water Sensors ADC Tutorial

  Рет қаралды 109,409

rdagger68

rdagger68

Күн бұрын

Пікірлер: 153
@dustintravis8791
@dustintravis8791 6 жыл бұрын
That moment when you realize you're not quite ready to start your water monitoring project. Great detailed video, thank you.
@russelljazzbeck
@russelljazzbeck 4 жыл бұрын
This is very thorough. I have a lot to learn but your videos and website are so helpful. Thank you
@lucasi8455
@lucasi8455 5 жыл бұрын
This is just the most perfect explanation I have ever seen... Thank you so much for this effort
@mikewalker4062
@mikewalker4062 3 жыл бұрын
Hi. I know this is older but it’s a great video. Thank you
@cam_DA_Hawkdriver
@cam_DA_Hawkdriver 4 жыл бұрын
Another great video! The linear equation helps to explain the relationship of your results. Excellent work.
@k4kyd698
@k4kyd698 8 жыл бұрын
This is exactly what I have been looking for to setup a pressure gauge on my pool pump so I can check the pump pressure remotely via a web app. I am already using a Pi and two 1-wire temp probes to read the outside temp and pool temp now I just need to add the pressure sensor and I will be all set. Thanks for this videos its made that project move up the list :)
@rdagger
@rdagger 8 жыл бұрын
Thanks for the positive feedback. You can also measure water level with a pressure sensor if you can place it near a bottom drain (good for water tanks and above ground pools).
@balajitj
@balajitj 7 жыл бұрын
Thank you for taking the efforts to post the video! Really helps.
@sharmstr
@sharmstr 7 жыл бұрын
Appreciate the video. Its seems to be the information I need to monitor my coolant system on my cnc. The plan is to have a liquid level sensor along with 2 pressure sensors. The pressure sensors will sit on either side of filter which will allow me to monitor when the filter needs changing. I havent researched it yet, but I'm assuming instead of and LCD, I can use my 7" RPI touchscreen.
@rdagger
@rdagger 7 жыл бұрын
Sounds like a fun project. The touchscreen will work but you will need to program a GUI. For the liquid level sensor, you might want to check out eTape by Milone Technologies. I've been wanting to test their sensors, which purportedly give accurate level measurements.
@sharmstr
@sharmstr 7 жыл бұрын
Sounds like I'm on the right track then. I found the chemical resistant eTape sensor last week and I installed Kivy this morning. :) Thank you again for the videos!
@sharmstr
@sharmstr 7 жыл бұрын
I got it working with Kivy. Thanks again! instagram.com/p/BXI2RCmgMk4/?taken-by=sharmstr
@moinshaikh6684
@moinshaikh6684 3 жыл бұрын
Superb explanation!
@venkateshgovindaiah5826
@venkateshgovindaiah5826 4 жыл бұрын
Awesome!! tutorial. Just what I needed to get started.
@Shornski
@Shornski 4 жыл бұрын
Thanks for the awesome videos, perfect pace and detail. I have an analog temperature probe but it only has two wires. I can see resistance change with water temp but not sure how to wire it using adc without a signal wire.
@rdagger
@rdagger 4 жыл бұрын
Get a resistor and then you can use your sensor as one half of a voltage divider. As the sensor resistance changes the divider's output voltage will change which you can measure with an ADC.
@Shornski
@Shornski 4 жыл бұрын
@@rdagger Thank you so much, I'll have a go
@beegele8450
@beegele8450 4 жыл бұрын
I am new to this and trying to learn. I need to keep track of pressure on a filter so your build it perfect for my needs. The question I have is why not use channel 2 on the MCP 3002?
@rdagger
@rdagger 4 жыл бұрын
You can use any channel or all of them.
@richmondxxxx
@richmondxxxx 2 жыл бұрын
Hi, thanks for the video absolutely loved it. What can I do if I want a more precise readout on the LCD, closer to the master gauge
@rdagger
@rdagger 2 жыл бұрын
There are more precise pressure sensors but they tend to be expensive. You can also get an ADC with higher resolution such as the 24 bit ADS1220. Performing multiple samples and statistical clean up also helps. For the record, the margin of error for the analog pressure gauge used in the video is probably comparable to the sensor.
@itisno1
@itisno1 4 жыл бұрын
I'll model my code after yours to use with my mcp3008 to control an interface circuit which will control a 5vdc water pump contingent upon readings from a capacitive soil moisture sensor
@SuperAsmit
@SuperAsmit 4 жыл бұрын
Thank you sir..!! Absolutely loved it. Quick question, will multiple pressure sensors work?
@rdagger
@rdagger 4 жыл бұрын
Yes. The MCP3002 supports 2 sensors and the ADS1115 supports 4 sensors. There are other chips that support more.
@SuperAsmit
@SuperAsmit 4 жыл бұрын
rdagger68 Thanks a lot😊
@MLSkidmore
@MLSkidmore 2 ай бұрын
By chance you're monitoring this, did you use a reducing Hex Head Hose Bushing Adapter to fit your pressure transducer into the brass T?
@rdagger
@rdagger 2 ай бұрын
It looks like it was a 3/8 in. MIP x 1/4 in. FIP brass bushing fitting, but to be honest, I can't remember exactly-it was over 8 years ago.
@MLSkidmore
@MLSkidmore 2 ай бұрын
@@rdagger Thanks so much for responding. Between the T I found at Home Depot (1/4" Female NPT) and the reducing hex I found on Amazon (1/4 Inch NPT Male Thread to 1/8 Inch NPT Female Thread), I'm hoping the reducing head will fit my 1/8 inch MIP pressure transducer. I'll post my results over the weekend when I receive the reducing hex.
@Snickerswolf
@Snickerswolf 4 жыл бұрын
Awesome Video. It really helped me get started using the pressure transducer/sender. Any chance you could do another video showing the programming for the updated Adafruit Libraries and Python 3x? I have it working but I am not that great with programming and I can't figure out how to make my sensor more accurate the way you did with the line voltage equation.
@SzecskoSandor
@SzecskoSandor 6 жыл бұрын
Hi there rdagger68, I just watched your video about this pressure sensor (awesome results :) ) but I was just scratching my head why on earth you used those two other circuits. I use the MCP3008 to monitor my 12V backup battery state of charge or if it is being charged, and the PI's 5V (unregulated) rail voltage from the 3.3V (regulated) line used as ref. I used a voltage divider (which is only 2 resistors) per channel to reduce my "12V" to maximum 3.3V and and the "5V" to maximum 3.3V. If you put a 10k and a 2.7K resistors in series and you wish maximum 3.3V from the divider, it can handle up to 15.52Vs from the battery bank. Similarly for the 5V rail I used 10K and 9.1K resistors ending up with maximum measurable voltage of 6.92V on the 5V line. The S line of the pressure sensor could have gone to this exact voltage divider and using of some math after reading out the bits from the MCP3008. If you intend to build voltage dividers please avoid too little resistors (they pull lots of amps) and avoid shitty tolerance resistor bands. Regards, Sándor
@rdagger
@rdagger 6 жыл бұрын
Thanks for your feedback. Are you asking why I used a level shifter board instead of a voltage divider? If so it's a great question. The answer is mainly for convenience. Also you can buy a 5 pack of four channel level shifter boards for $1 on eBay. In low current applications, voltage dividers are often great solutions. However, voltage dividers can generate interference and performance issues with digital signals such as SPI and I2C (if used on the data lines). Therefore in these cases I usually use level shifters. Still your approach is perfectly valid and economical.
@YousefElarian
@YousefElarian 7 жыл бұрын
Really excellent explanation. Will try it soon. Thanks
@joshuabrand11
@joshuabrand11 4 жыл бұрын
Would this work with a Resistance Level Sender for a water tank? The type with the float on that changes resistance as the float moves up or down?
@rdagger
@rdagger 4 жыл бұрын
You could create a voltage divider using a resistor with the sensor. Then you'd be able to measure the voltage as the sensor changes resistance.
@modelrailwaytheeasyway9743
@modelrailwaytheeasyway9743 4 жыл бұрын
great video new to all this i have connected the ads1115 to a raspberry pi 4 using the i2c pins and connected to water sensor to a0. i am also using the adafruit single ended exsample to run the sensor. this works well to show all is ok but i want to use the code you are running. how easy would it be to set that up?
@modelrailwaytheeasyway9743
@modelrailwaytheeasyway9743 4 жыл бұрын
i have tried the code and it does not change the color of the led i have tried changing the channel setting as in the video but i can not get it to read any water detected. my sensor is on channel a0 and the ads is on chennel 00.48 on the i2c any idea what i am doing wrong?
@cristiantoma9386
@cristiantoma9386 Жыл бұрын
hi, Could you connect 4 pressure sensors at the same time? like monitoring 4 air bags suspension for a car. Thank you !
@rdagger
@rdagger Жыл бұрын
Yes, the ADS1115 has 4 channels so it could monitor 4 analog inputs.
@svenjooken3600
@svenjooken3600 3 жыл бұрын
hello, i want to monitor the waterlevel in my rainwater bassin, i want to do that with a pressure sensor, in your tutorial you stated that the psi sensing range must be lower than the 200 psi range u use, how much lower and where can i order one
@rdagger
@rdagger 3 жыл бұрын
I haven’t tried this approach but theoretically since pure water has a specific gravity of 1.000 at 39.2°F and every 27.71 inches of water height equals 1 psi, you could calculate water level using: P(psi) x 27.71 (inH2O/psi) = W (water level inH2O) Therefore a 5 psi sensor would accommodate a combined barrel height and elevation of about 11.5 feet. A 3 psi sensor would be adequate up to about 6.9 feet. Honeywell makes the ABP series of basic board mount pressure sensors that are available with I2C or SPI protocols in 3.3 or 5.0 Vdc. I haven’t tried them and they come in many variations so I suggest you contact Honeywell tech support for a recommendation. Alternatively, you could use ultrasonic or capacitive sensors.
@circlical
@circlical 4 жыл бұрын
Your video convinced me to take the plunge! Thanks! I wired a RaspberryPi up to the ADS1115. `i2cdetect -y 1` sees the unit on 0x48. I connected the moisture sensor to A1 on the ADS1115. When I issue `i2cget -y 1 0x48 1` I keep getting 0x85, whether or not the unit is in soil or otherwise. I must be missing a step? Possible to get a reading at the command line? Thank you!
@rdagger
@rdagger 4 жыл бұрын
You need a library to communicate with the chip such as the Adafruit one used in the video: github.com/adafruit/Adafruit_Python_ADS1x15 Otherwise you would have to send the correct bytes to configure and read the chip as specified in the ADS1115 datasheet.
@circlical
@circlical 4 жыл бұрын
@@rdagger Thanks for the response. I saw the bitflags, but got a bit stressed with all the warnings that the i2c commands spit out! I'm trying to do this outside of Python/C++, but suppose I could byte the bullet (hah!) and make a CLI command w/Python.
@simplehomelab
@simplehomelab 7 жыл бұрын
Very patient narration and very professionally made. Great job. Question: Can I add more than one Analog input onto a single ADS1115? If you have done this, please do share. Im planning to have a pH Sensor, Turbidity sensor, Pressure Sensor, Water flow sensor collect info and send to my Pi. This is for my swimming pool. Or am I better off simply connecting all of this to Arduino? But I havent seen an example of how to read Arduino from a Raspberry.
@rdagger
@rdagger 7 жыл бұрын
Yes the ADS1115 allows you to connect 4 analog devices to pins A0 - A3. Adafruit has a good example of how to read 4 inputs: github.com/adafruit/Adafruit_Python_ADS1x15/blob/master/examples/simpletest.py I'd go with the ADS1115 approach because it is simpler, less expensive and uses less power (assuming you need a Raspberry Pi too)
@simplehomelab
@simplehomelab 7 жыл бұрын
Thanks for responding. I already have a Raspberry Pi, but its almost 100+ft away from the pool equipments. So Im debating whether to buy another Pi or get a Arduino+wifi and use MQTT
@rdagger
@rdagger 7 жыл бұрын
I haven’t experimented with that long a distance. In theory, shielded CAT6 with a differential signaling approach might work, but there are a lot of factors that could cause problems. RS485 is a good solution for long cable runs. If you go with wi-fi, take a look at the ESP32 and Micropython. I plan on doing a video on the subject. I just did a video on setting up a wireless solar powered Raspberry Pi REST API: kzbin.info/www/bejne/Z4fbgWZujdGJe7M
@christianandersen7458
@christianandersen7458 6 жыл бұрын
Balaji Venkatesh so what did you go for and how did it turn out?
@tableaux302
@tableaux302 4 жыл бұрын
Hi, I have another question regarding the choice of ADC... say for the project I mentioned I wanted to be able to analyze the signal from the microphone to observe a certain peak. Are there any relevant attributes I should take into account when choosing my ADC or is MCP3002 an all around good option. My setup would be the same as yours but instead I would be connection a microphone to the analog input of the ADC.
@rdagger
@rdagger 4 жыл бұрын
Assuming you are measuring peak amplitude and you are going to use an electret microphone amplifier such as the Adafruit MAX4466 version, then it probably doesn’t matter. Although it depends on your timing and accuracy requirements. The MCP3002 is only 10 bit resolution. The ADS1115 is 15 bit resolution. The MCP3002 has a fast SPI interface. The ADS1115 has a slower I²C interface. I’d post your question to the Adafruit forum. Their engineers will be able to provide first hand advice: forums.adafruit.com/
@flickmew99
@flickmew99 3 жыл бұрын
Can you measure the sensor input voltage using multimeter? will it give the same voltage as what displayed in LCD?
@rdagger
@rdagger 3 жыл бұрын
I think you mean output voltage. Generally speaking, if the sensor outputs a voltage then you can measure this output voltage with a multimeter assuming that you provide an appropriate power supply to the sensor.
@flickmew99
@flickmew99 3 жыл бұрын
@@rdagger my bad, yeah output voltage. Sorry I'm newbie to electronic/electrical, so my question : is that any way we could get the sensor voltage value with multimeter? Just to compare the multimeter measurement vs the calibrated voltage (voltage from program's equation)
@rdagger
@rdagger 3 жыл бұрын
@@flickmew99 Yes. The sensor output voltage can be measured by setting you multimeter to DC voltage and placing the red probe on the sensor output pin and the black probe on ground.
@codersexpo1580
@codersexpo1580 6 ай бұрын
I know this video is older but I am having a hard time finding anything on how to wire up a simple Piezo electric sensor. I know I need a DAC and that's what got me here. However, I'm using a different component than what you identified. I have the 2PCS MCP3008-I/P Mcp3008 8-Channel 10-Bit ADC with SPI Interface for Raspberry Pi (off Amazon). Is hooking this up going to be different from what you have outlined here?? It is so hard to find a good book or tutorials to work with all the cool sensors and gadgets available. If other tutorials were as good as yours, it would be a one stop shop. I wish you were still doing these videos ;-( Any recommendations on a great book(s) or courses for learning all (or many) of the available sensors/hats/components/etc... Thank you so much for the awesome videos you have posted!
@rdagger
@rdagger 6 ай бұрын
The wiring should be the same. You’ll probably need to connect both AGND and DGND to ground and Vdd and Vref to 3.3V. You need an ADC (Analog-to-Digital Converter) instead of a DAC (Digital-to-Analog Converter). The MCP3008 is an ADC and should work depending on your required resolution. The video is 8 years old. Looking back at the write-up on my website, I did encounter some incompatibility when I tried to use the Adafruit MCP3008 driver with the MCP3002. That is why I used direct register manipulation instead of a driver. The code I used in the video might work with an MCP3008 or you could just use the latest Adafruit CircuitPython driver: github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/ I still make videos but they are more projects oriented as opposed to component tutorials. Still, I usually explain the wiring and coding for each component. I also lean toward MCUs like the ESP32, the Teensy, and the Raspberry Pi Pico over SBCs like the Raspberry Pi. I might make more tutorials in the future when I come across interesting components. Adafruit has many great tutorials: learn.adafruit.com/
@codersexpo1580
@codersexpo1580 6 ай бұрын
@@rdagger Oh boy this is all good info thanks for your response. I was actually debating on using Raspberry Pi Pico instead since my SBC is overkill. I'll also check out Adafruit. Best wishes! You should write a book on how to use every component because your information and style are second to none.
@JayakrishnanChathu
@JayakrishnanChathu 7 жыл бұрын
Nice Presentation, Very useful !
@tableaux302
@tableaux302 4 жыл бұрын
Hi rdagger, I was wondering if this could be used to convert inputs from a microphone? I don't have an exact setup at the moment but the idea is that the microphone would be used to detect an object and so past a certain threshold the mic would give us a 1 for example. Edit: I looked a bit into MEMS microphones that can output a digital signal so would we be able to use that as a direct input?
@rdagger
@rdagger 4 жыл бұрын
You can buy an inexpensive sound sensor that will output a digital or analog signal depending on sound intensity such as this one from SparkFun: www.sparkfun.com/products/12642 Adafruit has a good tutorial on measuring sound levels with a mic and an amp: learn.adafruit.com/adafruit-microphone-amplifier-breakout/overview
@josephboyk3269
@josephboyk3269 7 жыл бұрын
This video is excellent, However I want to verify for the pressure sensor I do not need the LCD. I am attempting to write code that has If/then or else statements based on the measured pressure.
@josephboyk3269
@josephboyk3269 7 жыл бұрын
@rdagger68
@muthumuthuhadini8114
@muthumuthuhadini8114 6 жыл бұрын
Well done buddy, very informative
@metachildhood
@metachildhood 4 жыл бұрын
Thankyou ,,, this is awesome tutorials. .
@kirillbobko4557
@kirillbobko4557 4 жыл бұрын
Great work and well explained. Did you have a chance to work with high temperature sensors (90C/210F)?
@rdagger
@rdagger 4 жыл бұрын
I work with thermistors which are probably the most common temperature sensor for home 3D printers.
@christianandersen7458
@christianandersen7458 6 жыл бұрын
On aliexpress the price for a mcp3008 is the same as for an arduino nano. Even less if you choose an attiny85 :-) I see that the ADS chip is a bit cheaper and offers 16bit A/DC, which would be superior to the 10bit of the arduino.
@adamcymerman7856
@adamcymerman7856 4 жыл бұрын
So I'm using an ADC1115 and I have it wired exactly as you do except Im using an capacitive soil moisture sensor. When I do i2cdetect -y 1 there are no values in any port. I installed the adc library exactly as you did. Is there something i'm missing?
@rdagger
@rdagger 4 жыл бұрын
Sounds like a wiring issue.
@adamcymerman7856
@adamcymerman7856 4 жыл бұрын
@@rdagger So I have VCC on the sensor and vdd on the ads1115 connected to 5v. gnd from both the vcc and ads1115 connected to ground. and aout on the sensor goes to a0 on the ads1115. Then the SCL and SDA pin on the ads1115 are wired identicle to yours.
@rdagger
@rdagger 4 жыл бұрын
@@adamcymerman7856 Do you have a level shifter between the ads1115 and the Pi?
@adamcymerman7856
@adamcymerman7856 4 жыл бұрын
rdagger68 I do not. Is it needed? You’re the first person I’ve seen use it
@rdagger
@rdagger 4 жыл бұрын
@Adam Cymerman It may not be needed, but I recommend you use one. See 11:23 in the video. Please make sure you use good quality wire, keep the length as short as possible and use an I2C compatible shifter such as the Adafruit one used in the video.
@StaticLowLife
@StaticLowLife 6 жыл бұрын
Could this be a way to go for measuring oil temp and pressure in an older car engine? So totally noob on this that I don't even own a pi yet
@rdagger
@rdagger 6 жыл бұрын
It is possible. Here's a good example: hackaday.io/project/1276-carmin On newer cars you could just connect into the OBD-II port and read all the car's diagnostic info.
@thomasknightt
@thomasknightt 8 жыл бұрын
I wanted to set up mulitple pressure pads and connect them to raspberry pi using the ADS115. Each pressure pad would turn on/off a specific music track and activate an LED light. Is it possible to hook up multiple ADS115s to the raspberry pi? Does it make more sense to get this interaction using multiple arduinos? I'm unexperienced with this technology and curious to your opinion. Thanks
@rdagger
@rdagger 8 жыл бұрын
You can connect up to 4 ADS1115's (see Figure 35 in datasheet) using the built-in I2C pins on the Pi. Are your pressure pads just on/off switches or do you need to vary the LED light depending on the amount of pressure exerted on the pads? If they are just on/off switches then you can connect them directly to the Pi without an ADC. The choice between a Pi and an Arduino depends on your project requirements. An Arduino Mega with 16 built-in ADC pins might be a better choice if you need to measure the amount of pressure on 16 pads. It really depends on the quantity and type of pressure pads.
@thomasknightt
@thomasknightt 8 жыл бұрын
Yes they would just be on/off switches but i want the switch to be activated on release. So when you step on the pad it turns it on and stays on until you step on again to turn it off.
@BoostedVr5
@BoostedVr5 6 жыл бұрын
Can i measure also with 4 pressure sensors and control relais with it?🤔🧐
@rdagger
@rdagger 6 жыл бұрын
Yes, the ADS1115 has 4 channels so you could connect 4 analog pressure sensors. There are several relay boards available for the Pi. You might also want to take a look at some of the new Honeywell pressure sensors. They come in I2C so they can be hooked up directly to the Pi. They also provide temperature compensation for more reliable readings.
@philwilkinson7228
@philwilkinson7228 7 жыл бұрын
Thanks. Great tutorial once again! I am really learning a lot about sensors, microcontrollers AND micropython from your tutorials! One question: your tutorial examples constantly poll the sensors with a While True loop. This must be quite a power drain. In your first example, you may only want to supply water when the moisture level hits a certain point. Can this be done by using a micropython interrupt (or something similar) when the ADC output hits a certain value? Will this make any difference to power consumption as the SPI is still running all the time anyway?
@rdagger
@rdagger 7 жыл бұрын
That’s a great question! The ADS1115 has 2 conversion modes (single-shot and continuous). In single shot mode the ADC performs a single conversion upon request. This can provide significant energy savings. There is an alert pin that can be triggered by the comparator when the ADC value hits a specified threshold. I have not tested this functionality. I’m not sure but I’m guessing you need to run the ADC1115 in continuous mode to use the alert pin. Therefore, you won’t necessarily derive any power savings. In my example code, the sleep method ensures the loop uses very little resources. Even an old Raspberry Pi A runs 7 million cycles per second. Polling a sensor every 2 seconds will not tax the CPU.
@noorkhokhar
@noorkhokhar 6 жыл бұрын
how to used Gas sensor mq-137(ammoina sensor with pi3) analog sensor.
@rdagger
@rdagger 6 жыл бұрын
I have not used this sensor but according to the datasheet it outputs varying resistance instead of voltage. You would add a resistor (RL) to act as a voltage divider and use the ADC to read this voltage (VRL). The datasheet provides the following formula to calculate the sensor resistance: Rs=(Vc/VRL-1)×RL. The datasheet figure 1 shows the logarithmic relationship between resistance and ppm.
@noorkhokhar
@noorkhokhar 6 жыл бұрын
can you provide me datasheet and also source code.
@rdagger
@rdagger 6 жыл бұрын
Here's a good sample with datasheet: tutorials-raspberrypi.com/configure-and-read-out-the-raspberry-pi-gas-sensor-mq-x/
@noorkhokhar
@noorkhokhar 6 жыл бұрын
it's too good but i think mq-137(Nh3) formula used this tutorial used mq-2 sensor.
@rdagger
@rdagger 6 жыл бұрын
Here's an Arduino example for your exact sensor: circuitdigest.com/microcontroller-projects/arduino-mq137-ammonia-sensor
@LarsSchretlen
@LarsSchretlen 4 жыл бұрын
Is there way to send a email with a text message that says you have water leak or something similar?
@rdagger
@rdagger 4 жыл бұрын
Yes, I made a tutorial on sending email from the Pi using SendGrid. www.rototron.info/raspberry-pi-sending-responding-to-emails/
@briwicklab
@briwicklab 6 жыл бұрын
already done it using raspi and rework it using arduino (temp and pH). I took time to think of em...why would i kill a bug with a bomb, if i could kill it with a sprayer. raspi is "almost there", u can't use it to do extreme processing such as machine learning and advance image processing, but still it's a "PC", but also it is too much CPU for temp, pH, PWM, etc. maybe they'll do sometin about raspi 4
@jamescullins2709
@jamescullins2709 6 жыл бұрын
Outstanding video!!
@chandrakanthsivaraman4099
@chandrakanthsivaraman4099 6 жыл бұрын
Can i use MCP3008 for this project.... Please reply it's urgent.........
@bobbycpr
@bobbycpr 6 жыл бұрын
I'm really enjoying all of your content. Thanks for the amazing work! Can you tell me which LCD screen you are using in this tutorial? I purchased one with only 2 pins for SDA and SCL and I'm having trouble figuring out how to integrate into your tutorial as I'm a beginner.
@rdagger
@rdagger 6 жыл бұрын
The display in the video is over 10 years old. I don't remember where I got it. Adafruit, SparkFun, AliExpress and eBay are great sources for basic HD44780 LCD displays. You have a display with an I²C interface. It is very easy to connect to the Raspberry Pi. I have a video dedicated to I²C LCD displays: kzbin.info/www/bejne/n2akZnSpebeFrbM
@bobbycpr
@bobbycpr 6 жыл бұрын
rdagger68 Thank you again
@olgertorres1712
@olgertorres1712 6 жыл бұрын
you are a master budy!
@trixiaannemorada4021
@trixiaannemorada4021 4 жыл бұрын
Hi can you help me? I'm having a hard time to the connections of my ec and ph sensor i'm using the mcp3008
@rdagger
@rdagger 4 жыл бұрын
What's the problem?
@Jasurf
@Jasurf 6 жыл бұрын
Are there Node-Red Nodes that will work with these sensors?
@rdagger
@rdagger 6 жыл бұрын
I haven't tried but I'm pretty sure Node-Red supports both the MCP3002 and the ADS1115.
@biyanakbar924
@biyanakbar924 6 жыл бұрын
I have a question...If I do not use bi directional in ADS1115, can it?
@rdagger
@rdagger 6 жыл бұрын
The I2C bus is bidirectional. The SDA line is used for both transmitting and receiving.
@fisco2243
@fisco2243 6 жыл бұрын
Thanks for this great tutorial. Could you share which pressure sensor you have used?
@rdagger
@rdagger 6 жыл бұрын
I don't see any markings on the pressure transducer other than 200 PSI. I bought it on eBay 4 years ago. I don’t recall the store. It cost about $25.
@MrJhardesty
@MrJhardesty 7 жыл бұрын
First, thanks for the tutorials. They have been very helpful. I have a pi 3. How are the pins different for the water sensing circuit.
@rdagger
@rdagger 7 жыл бұрын
The BCM GPIO pin numbers should be the same with regard to the pins used in this video.
@MrJhardesty
@MrJhardesty 7 жыл бұрын
I got it working. Sometimes I just need to go backwards and own the underlying theory and then move on from there. But the projects you have have been invaluable to my projects. I am setting up 21 temp humidity & water sensors in the clean rooms of my company. I also am setting up pressure and temp sensors for our cooling systems. Thanks Again!!!
@chandrakanthsivaraman4099
@chandrakanthsivaraman4099 6 жыл бұрын
Mr. Hardesty which ADC did you use???
@1SmokedTurkey1
@1SmokedTurkey1 7 жыл бұрын
Would the first code for a generic ADC work with the MCP3424? I can't seem to get it to work at all.
@rdagger
@rdagger 7 жыл бұрын
No that code is for an SPI interface. The MCP3424 is an I2C interface. Here's a python library for the MCP3424: pypi.python.org/pypi/MCP342x
@1SmokedTurkey1
@1SmokedTurkey1 7 жыл бұрын
THANK YOU for sharing that library. I'll see if I can get it to work, now. I've already ordered the MCP3008. Seems there are many tutorials on it, unlike the 3424.
@ishy2217
@ishy2217 5 жыл бұрын
good videos, very informative
@netdudeuk
@netdudeuk 8 жыл бұрын
Great video thanks.
@kurtaaroncabrera3261
@kurtaaroncabrera3261 7 жыл бұрын
hello sir you got any tutorial for turbidity sensors with raspberry pi? :|
@rdagger
@rdagger 7 жыл бұрын
Sorry I do not, but the turbidity sensors I have seen have analog outputs that function the same as the analog sensors in this video. They also have digital ones that act like a switch when a certain threshold is reached
@kurtaaroncabrera3261
@kurtaaroncabrera3261 7 жыл бұрын
thank you for the reply sir
@moinshaikh6684
@moinshaikh6684 3 жыл бұрын
Please make more videos.
@SaeedAhmed-ix8nm
@SaeedAhmed-ix8nm 7 жыл бұрын
I have a question How i can have output in print statement. the value of psi.
@rdagger
@rdagger 7 жыл бұрын
Change lcd.message to print.
@SaeedAhmed-ix8nm
@SaeedAhmed-ix8nm 7 жыл бұрын
i have a question when i use sudo i2cdetect -y 1 I have all the answer as -- -- -- -- -- -- -- . just dashes not as in your video you have 48 value. can you please help me what may be the problem.
@rdagger
@rdagger 7 жыл бұрын
Which Raspberry Pi are you using? Which model level shifter are you using with the ads1115?
@SaeedAhmed-ix8nm
@SaeedAhmed-ix8nm 7 жыл бұрын
Thanks for the answer bundle of thanks. I am using raspberry pi 3 model b. I am not using any model shifter and I have connected ADS1115 direct with the PSI sensor. Can i connect ADS1115 with ACS712 sensor? I will be very thankful for your answer.
@rdagger
@rdagger 7 жыл бұрын
If the ACS712 module is 5V then I recommend you use an I2C-safe level shifter like the one in the video.
@sivaranjani-qt5co
@sivaranjani-qt5co 7 жыл бұрын
Hai ,i am having an idea to convert a analog water meter to a digital water meter ,please give me some idea to do that
@rdagger
@rdagger 7 жыл бұрын
Does your meter have an analog output?
@sivaranjani-qt5co
@sivaranjani-qt5co 7 жыл бұрын
i have the analog instrument only it does not have any recording device
@rdagger
@rdagger 7 жыл бұрын
If your meter display has a spinning indicator, you might be able to use a non-contact reflective optical sensor like I used in my Motor Control and RPM Measurement Tutorial: kzbin.info/www/bejne/mKPCialvjZyMkMU If your meter display has a reading like a car odometer then you might be able to use a web cam to OCR the reading. It might be easier and more reliable to add a digital flow sensor inline to your meter.
@sivaranjani-qt5co
@sivaranjani-qt5co 7 жыл бұрын
thank you so much ,if I have any doubt I will reach you.
@EpicFandi
@EpicFandi 8 жыл бұрын
Great video, very informative! I'm currently trying to motivate myself to learn python and electronics to combine both with a raspberry Pi. :) Do you know a good website/video playlist/etc. to learn python? - I already know the basics in programming (C#, PHP, JavaScript,...)
@rdagger
@rdagger 8 жыл бұрын
EpicFandi sendex has some very good videos: Python 3 Basics Tutorial Series: kzbin.info/aero/PLQVvvaa0QuDe8XSftW-RAxdo6OmaeL85M
@EpicFandi
@EpicFandi 8 жыл бұрын
Oh great! Thank you for the fast response :)
@weschurch9344
@weschurch9344 7 жыл бұрын
Do you have an answer to this error? I have checked my code against your and seems ok. Traceback (most recent call last): File "/home/pi/Pressure Monitor.py", line 3, in lcd = Adafruit_CharLCD(rs=25, en=24, d4=23, d5=18,d6=15,d7=14, cols=16, lines=2) File "/usr/local/lib/python2.7/dist-packages/Adafruit_CharLCD/Adafruit_CharLCD.py", line 143, in __init__ gpio.setup(pin, GPIO.OUT) File "/usr/local/lib/python2.7/dist-packages/Adafruit_GPIO/GPIO.py", line 278, in setup pull_up_down=self._pud_mapping[pull_up_down]) TypeError: argument 1 must be string, not int
@rdagger
@rdagger 7 жыл бұрын
I don't see anything wrong with that line of code. Which Raspberry Pi are you using? Which version of Raspbian are you using?
@dickman1981
@dickman1981 5 жыл бұрын
Add a link @2:38! ;)
@rdagger
@rdagger 5 жыл бұрын
I put the link in the description.
@dickman1981
@dickman1981 5 жыл бұрын
@@rdagger ahhh. I wrote that when I came back to it after not being able to find it immediately.
@kaioid
@kaioid 6 жыл бұрын
if i am right its better and easy to do this project with arduino isn't it ? can anybody correct me if i am wrong ? cause i dont see why using a very strong device like raspberry instead of arduino
@rdagger
@rdagger 6 жыл бұрын
It depends on the scope of your project. If you just want a sensor and an LCD display than an Arduino would be a great choice. If you want network connectivity and remote configuration than a Pi would be a good choice. An ESP32 would also be an excellent choice because of the built-in ADC’s and Wi-Fi. The ESP32 also support MicroPython. I like the ability to wirelessly remote into devices once they are deployed for updates and maintenance.
@kaioid
@kaioid 6 жыл бұрын
i approve what you are saying. Thank you for your answer
@himchauhan1995
@himchauhan1995 3 жыл бұрын
website is not working!!!!!
@rdagger
@rdagger 3 жыл бұрын
Power outage. It will be back up in a few hours.
@weschurch9344
@weschurch9344 7 жыл бұрын
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 76.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 76.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 76.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 76.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 Hardware : BCM2835 Revision : a02082 Serial : 00000000f04f4c84 So basically it is a Raspberry PI 3 B ver 2
@rdagger
@rdagger 7 жыл бұрын
It should work. You can send me your code and I'll take a look.
@weschurch9344
@weschurch9344 7 жыл бұрын
Thanks for the help. Bit of a beginner with python and raspberry from time import sleep #from Adafruit_CharLCD import Adafruit_CharLCD #lcd = Adafruit_CharLCD(rs=25, en=24, d4=23, d5=18,d6=15,d7=14, cols=16, lines=2) import Adafruit_ADS1x15 adc = Adafruit_ADS1x15.ADS1115(address=0x48, busnum=1) # Gain = 2/3 for reading voltages from 0 to 6.144v. # See table 3 in ADS1115 datasheet GAIN = 2/3 # Main loop while 1: value =[0] # read ADC channel 0 value[0] = adc.read_adc(0, gain=GAIN) # ratio of 15 bit value to max volts determines volts volts = value[0] / 32767.0 * 6.144 # tests shows linear relationship between psi & voltage: psi = 50.0 * volts - 25.0 # bar conversion bar = psi * 0.0689475729 print("PSI = " +str(volts), "Bar = " +str(bar)) lcd.clear() lcd.message("0:).3f}V [{1}]".format(volts, value[0])) lcd.message(" {0:0.0f} psi {1:0.1f} bar".format(psi,bar)) sleep(4)
@rdagger
@rdagger 7 жыл бұрын
First your lcd.message statement has incorrect syntax. It should be: lcd.message("{0:0.3f}V [{1}]".format(volts, value[0])) However, that is not causing your problem. Looks like something is broken in the latest Raspbian release with respect to the Adafruit GPIO Python library. Please try manually installing it: cd ~ git clone github.com/adafruit/Adafruit_Python_GPIO.git cd Adafruit_Python_GPIO sudo python setup.py install Then reboot your Pi and try again.
@mosampandya6248
@mosampandya6248 6 жыл бұрын
Voice is too low
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Turn your Pico into a 400MHz 24 Channel Logic Analyser
25:26
Happy Little Diodes
Рет қаралды 66 М.
#112 Analog inputs for your Raspberry Pi 🥧Model 3B+ (easy)
25:27
Ralph S Bacon
Рет қаралды 45 М.
Water Your Garden with IoT - Soil Moisture Sensors
54:46
DroneBot Workshop
Рет қаралды 417 М.
Raspberry Pi Plant Watering (& Time Lapse)
23:41
ExplainingComputers
Рет қаралды 341 М.
rust runs on EVERYTHING (no operating system, just Rust)
18:10
Low Level
Рет қаралды 365 М.
#207 Why most Arduino Soil Moisture Sensors suck (incl. solution)
10:59
MEASURING WATER FLOW WITH ARDUINO #arduino #esp32 #waterpump
19:28
Mikael Abehsera
Рет қаралды 15 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН