arduino rain gauge


How to video I’m working on here is a my sensors rain gauge. This video formats can be a little bit different than how I normally do it. I’M gon na go through it at a higher level and the main reason for that is is I’m modifying an existing rain gauge there’s a couple different options you have, if you want to make this project yourself, just check out the link in the video description there’s. Some 3d print options just using a tipping bucket on the my sensor store, or you could even customize your own, like I’ve done here but anyway, I’m going to show you how to put it all together at a high level, and you can customize it or modify It for your needs, but first I’m, going to show you a quick demo. So here I just pulled it up on my impure home app here to show you some of these things so obviously shows the rain, and then, when I trigger it here notice, it is updating the millimeters per hour and then whoops don’t have data mine turned on Yet and then it shows me the total millimeters for the day, the Vera app shows a little bit more detail than the imperial home app next over. Here we have the range triggered sensor, so this is a customizable threshold that you can set, so you can set the time that looks for so the number of days or hours actually and then how much rain it needs to hit before it’s triggered.

So I can, I think I have it set up for two millimeters here and maybe three days but that’s just for this demo. You could set it, for you, know 20 millimeters over five days and then maybe use it to trigger irrigation or something like that. I’Ve also added a temperature and a humidity sensor, that’s with the dht22 and then a light sensor. That is the BH 1750 sensor. Before I go any farther. I just wanted to give a huge thank you to Jim or Bulldog Lowell on the my sensors forum. He is the creator, and inventor of this made all this possible. I just made the video I just want to do a how to, because I found it so cool and useful, so thank you so much Jim and also obviously Henrik for creating my sensors. So thanks thanks guys couldn’t done without you, so the reason I’m so excited about this sensor is because I’m going to use in combination with the irrigation controller. So I can determine how much rain I’ve had in the past five days and then I can alter my irrigation based on that rain data I’m. Also using the light sensor to control my blinds. So when it gets too hot or too much light, I can lower my blinds automatically and the temperature and humidity sensor I’m, using those to determine if I lower my blinds so it’s over a certain temperature and the light is bright enough, which I know is direct.

Sunlight then, I can lower the blinds on that side of the house and keep it cooler. The other cool thing about this rain gauge is: it will save your data every hour into memory. So if there’s a power outage, it will be able to restore all that rain data for the last five days once power is restored. Okay, so now let’s go ahead and take a look at how this device is set up. So here is the inside of my device here. This is the outside cover, it’s, just a tailor, it’s, actually a wireless rain gauge already. I found it didn’t work very well, but I I got it on sale, for I don’t remember exactly what it was, but it was is really cheap. So I was able to take apart the inside of their rain gauge and put into my sensors electronics. So, like I said, I just modified an existing rain gauge, but there is an option of 3d print currently as I’m filming this video it’s still in development and testing, but go ahead and check out the link in the video description for more info on that when It’S ready it’ll be posted to the my sensor site there’s. Also, a rain gauge tipping bucket posted on the my sensors store. So if you want to use that that should work fine as well and I’m, also going to show you how I calculated out the values, the rain value, so you can use basically any tipping bucket that you can find okay, so now I’m, just going to give A quick overview of how I wired everything up I’m, not going to go into a lot of detail on soldering and the wiring of everything.

I’Ve done that and a couple of my other videos which I’ll link to here in the video. If you need more instructions on how to do that, but it’s actually quite simple to wire and the wiring diagram is on the my sensors site link to that is in the video description. So instead I’m just gon na kind of show how I my thought. Process of putting this together and then you can figure out how you want to do yours when you customize yours or if you use the 3d printed model, you can obviously wire that in as well. So the first thing I have over here is the light sensor. If I could do this over again I’d, probably do it a little bit differently. You can see it’s starting to rust out a little bit. It’S got some dirt on it, so this has been on the side of my house for a little while now, and I think that this light sensor, I just put some clear, coating some polyurethane on it. I think it’s probably going to degrade over time. Probably a little faster than I expected, so if I could do it over again, I put a piece of clear plastic around it and find some way to to weather seal it, but these sensors are really cheap, so I guess when it does die, I’ll just be Able to replace it fairly easily and then one of the ways I can do that is, I made all of this kind of modular.

If you will so, I soldered these wires and ran them through the bottom of the rain gauge and then on my PCB board here I put in my header connectors here, so I can just pull out these wires if I want to without having to desolder anything. So you can see I’ve got two sets here. Some of these are, I guess, male and female, so I could never accidentally reverse the cables in the wrong slots. It’S totally up to you. If you want to do that I’m just prone to doing that, I’ve noticed so I decided to reverse them and then down here I have my dht22, so that goes along here. I found that there’s a little bit of water dripping past. So I put in just this is an old milk plastic milk jug here that I just put as a shield to hopefully keep some of that water out, and then I also hot glued the sensor being careful not to cover it, but just to go around it And then I put this little strip of plastic it’s, just more milk drug here around it, try and shield it. I had this originally mounted into a bull and I found it was a little bit too low. So now I’ve raised it up with some some brackets to get it up off and get somewhere air flow in there, because I think it was playing with the humidity and temperature sensing results.

Okay, moving on, we have our tipping bucket, so that came included with my sensor, so there’s just a little magnetic contacts which year and when I, when it goes back and forth, it’ll just toggle it. So I just wired that into my Arduino here with additional header pins here, so I could just connect it, and these are my DuPont cables and then my Arduino Pro Mini here is also connected in with header connector strips. So I can remove that if I ever need to so it’s fairly modular, if anything ever goes wrong, it’s easy to replace. I have my standard, my sensors radio here, which also can be removed, and then I just soldered on my longer antenna. I went into a couple my other videos into more detail on this, but long story short. It really helps improve my communications with my devices so that’s pretty much it. Obviously I have my three volt 3.3 volt power for my radio, and everything else is just connected into five volts now, I’m, just gon na do a quick walk through the code here and highlight some things that you may want to change. The first thing is, is the node ID, so you can set a custom node ID here at my keys, I’ve done 24 that’s, just what my marine gauge note is going to be, or you can just set it to all caps auto and it will assign one For you, if you want to change the name or version you would do that here dwell time is the amount of time it’s gon na in milliseconds it’s, going to pause the program before it sends another radio transmission.

So this just allows for smoother. Communication gives that capacitor some time to recharge on your radio. Next, we have debug DT or DHT on Lux on and use daily. So these are all options here that you can either comment out with these two forts lashes or uncomment by deleting them, and then this means that this part of the code will run so. Debug is obviously debugging. So you need to have this plugged into your computer via the serial monitor and then it would show you different debug values that are programmed to get programmed in throughout the code. Next, we have DHT on so if you’re gon na use the DHT temperature humidity sensor, you’d want to uncomment this. If you’re not going to go ahead and just add the two slashes same for the luck sensor, if you want to use it uncomment it. If not then commented this used daily, so there’s five variables that are sent to your controller, so each of those contains a daily value of rain. So if you have used daily uncommented so right here, it’s commented it’s gon na send each individual day value. So each value will be separate if you comment this out: it’s gon na be a cumulative value, so it’s gon na combined day one when it calculates day two and day three day four day, five so ultimately day. Five will then have the total amount of rain you’ve had in the past five days, whereas if you had used daily, it would just show how much rain there was on that day.

Next, we have calibrate factor, so this is going to be what you’ll calculate out for your rain gauge and then plug it in here. This is how all the tipping bucket values are calculated. So if you, if it was one millimeter per tip, then you would just put in a 100 next. We have the DHT luxe delay here so that’s programmed in if you’re going to use the DHT of the luck. Sensors that’ll just tell how much delay you want to have before it sends the next value, so this is in millisecond. So right now we have 300 milliseconds, which would be five minutes. So if you want to increase the amount of time that these are sent, you’d make it a larger number, and if you want to decrease the amount of time so send it in shorter intervals, you could make it a smaller number. I would caution you if you have a lot of sensors don’t, make it too small, because it could interfere with other radio communications, all right and then a little further down. I want to show you the rain window and the rain sensors threshold, so these will be overwritten by variable 1 and variable 2 in the once equipment to a motion sensor. That was that sensor that you saw flashing in the intro of the video, so the rain window is going to be the number of hours that is used to calculate this this value and then the rain sensor threshold is going to be what it’s tripped at in Hundredths of a millimeter, so as soon as you plug this device in and it syncs with your gateway or with your controller, rather it will pull those values from variable.

One variable: two: if your controller has that option, so I use the Vera which it does so. These immediately get overwritten, but if you don’t have that option, then you can manually program it in here alright. So that should be all you need to know to modify the code. Obviously, if you have any special circumstances – and you know what you’re doing you can go in and do whatever you want with the code but hopefully that’ll be all you need to do if you’re just working with the basic setup. Ok, so now I want to show you how to calculate your rain gauge tipping bucket value. You can use this if you’re using a customer engage with the different volume. Then then, some of the others were using here so first off I’m, just going to show you my notes, I used because I’m not the best at math, and I thought it might help other people if they kind of see my notes and how I work through This, if you’re at all like me so first off credit, goes to wikiHow dot com Builder rain, gauge that’s, where I got this information. So if you want to read up more on it, you can check it out there. So, basically, you need to figure out what one tip equals in cubic millimeters, so here’s kind of the formula that I use to work all this out. Okay, so first we want to find the water volume divided by the surface area, which is in cubic centimeters times.

10 and that’s going to be your rate of rain in millimeters. So then we can take that and divide it by the number of tips that our bucket tipped as we’re putting that water in so I used one of those 500 millimeter measuring cups used for cooking, and I just dumped that in my rain gauge and counted the Number of tips after I figured out the volume here so to figure out the volume I needed to figure out what the the surface area was. So I actually went into Sketchup Google Sketchup, which i think is bought bought out so now, it’s, not Google anymore, but it’s a free program. So then, I just calculated out my volume or my measurements and kind of drew, drew what it would look like here and then in the entity info. It tells me exactly what that is in squared millimeters. So then the basically just divide that by a hundred and then you get square centimeters, so it’s 93 square centimeters here I just put it into Sketchup, because mine has a weird shape, but if yours is a little bit easier to calculate there’s plenty of resources online. For calculating the volume of a shape, then what I do is I take 500 milliliters and divide it by 93 square centimeters times 10, and then I get my millimeters of rain. Okay. So then I’ll take my my measuring cup full of 500 milliliters of water I’ll dump it in my rain gauge and count those tips so it’s the number of times my rain gauge tips for all of that 500 milliliters of water.

So I did multiple times just because it was interesting how it varied over time, and then I ended up tightening my screws a little bit to get me closer to the point 6 range, so it was about 89 tips after I tightened up my screw to change The tip volume, so I guess the tip point in my rain gauge so then I just took 253 points 89 and then that got me to 0.6 zero. So then, I would just put that right there in Arduino code now, if you’re, using a very like media of a couple, more steps that you need to do in order to get this to work. So, first you need to upload some device files so that device can actually load into your barrel. So to do that you go to apps, then you go to develop apps by the way I’m on UI 5. Still so it’s going to be slightly different if you’re on UI 7. So after I go to develop apps I’m going to go to loop files here and then I’m gon na choose file. So what you’re looking for are the JSON files and the XML files here? So find these on github, along with the Arduino code, so you’ll download these to your desktop or downloads, wherever on your local computer and then you’ll just click on each one of these hit open and then it’ll put it in this next the choose file. Then you select all three of them: I’ve done all this so I’m, not going to actually do it, but when you select it all three you’ll just hit restart loop after upload and go, and that will need to enable you to create a device.

Now your device still won’t be created until you actually upload your code to your rain gauge and plug in power and then hit include in the my sensors plugin. Just like you would do with any other sensor. But this will just enable it to work with your vra. Okay, now I’m on my devices, tab I’ve already added it into my vera, and I am going to set my rained triggered device. So this will just allow me to have basically what looks like a motion sensor and then it will trigger based on the amount of rain. I have so I showed you this at the very beginning, but this is how you would set up your thresholds so once you’ve already added it, you’ll click on the wrench. Once again, this is UI 5. Then you go to the Advanced tab, scroll all the way down and then variable one in variable two. So this is where you would set the time and the amount of rain it’s it takes for this device to be triggered. So once you’ve set those how you want them to just hit the X scroll, all the way up hit the Save button and that will sink down once an hour. Okay, so that’s pretty much it. If you have any questions or comments, please use the my sensors forum there’s lots of helpful people there that will be able to provide any assistance. If you get stuck thanks.


arduino rain gauge Video








arduino rain gauge news








arduino rain gauge Social






See the world through the eyes of this camera-equipped, snake-like robot.
safe image.php?d=AQB2kdm3zOD71KQX&w=720&h=720& content%2Fuploads%2F2019%2F09%2FUntitled 2 3 - arduino rain gauge

This 3D-printed prosthesis uses computer vision to adjust its grip depending on the object.
safe image.php?d=AQD dQbotzfS6mLl&w=720&h=720&url=fbstaging%3A%2F%2Fgraph.facebook - arduino rain gauge




Originally posted 2015-12-10 00:20:18.

(Visited 341 times, 1 visits today)

About The Author

You might be interested in


Your email address will not be published. Required fields are marked *