I got one of those AttinyShield and it is a useful tool, I must have gone through 100 of Attiny85 in the past nearly 4 years, still using the same board. Have fun with that.
@RalphBacon7 жыл бұрын
I certainly intend to cheetahkid, and I will post back my experiences, one way or the other. I'm sure it will be great. Nice to hear from you again.
@cheetahkid7 жыл бұрын
Thank and nice to hear from you too
@SpeccyMan7 жыл бұрын
The great thing about the Tiny85 is since it has both SPI and I2C you call always add more gpio with a port expander chip (MCP23017 for I2C or MCP23S17 for SPI) if you need them. Glad to see you bought one of those Tiny85 shields, it really is most useful and saves a lot of fiddling about with jumper wires and your Uno.
@RalphBacon7 жыл бұрын
I think it was you, Nick, who pointed me in its direction! I will be building it as soon as, I mean why put off until tomorrow what you can put off until next week! Er, hang on, that's not right! Regarding I2C and SPI these are only software implementations not hardware but I think it will be good enough. I want to get the pin extender working with I2C with it to give us a reasonable amount of GPIO pins. Thanks for posting Nick.
@Ed196017 жыл бұрын
I love the attiny and i have in fact hung an mcp23017 on it, works wonderwell. But I do it for the challenge coz pricewise it is foolish with an attiny85 costing abt a euro and a promini abt 1.60 euro. Speaking of the MCP23017... I also used it with the esp8266-01 that exposes only 4 pins, before the wemos board became available. The mcp23017 is a handy chip and easy to use
@JasonMasters7 жыл бұрын
Considering that if you slide the emitter along the edge, the place where the beam is emitted moves either closer to or further away from the emitter, it should be possible to mount your existing emitter/detector pair just as they are, and "fine tune" where they are positioned along the edge until the signal is maximised. That would remove the need for modifying the existing board. I'm wondering if rain could be detected during daylight hours by using a LDR (Light Dependent Resistor) to detect the sudden change in light level as a drop of water rolls past (over a glass window)? It might need some clever programming to prevent false positives from birds, clouds and similar light interference.
@RalphBacon7 жыл бұрын
Good ideas there Jason, I will certainly experiment to see what works best. Regarding an optical rain detector, as you already mention it's the false positives that would be the problem, I suspect, but might nevertheless work. I'll see what happens as I progress this project. Good to hear from you again!
@tomgeorge37267 жыл бұрын
Hi Ralph, a great video, excellent demostration of TOTAL INTERNAL REFLECTION.. Also the index of Refraction is frequency dependant, hence a prism producing a rainbow. So your infrared angles will be a little bit different to your laser angles. Tom...
@RalphBacon7 жыл бұрын
Hey Tom! Let's hope that 45-degree angle is still going to work with infrared then. Or perhaps I should just use a laser (not that green one, I have a tiny red one). Mmm. We shall see. Thanks for the heads-up.
@willofirony7 жыл бұрын
If you use your cellphone, in camera mode, you should see the traces (though much fainter than with your lightsaber) as you do with your laser. I suspect you will still find an escape point, just in a different point. Great vid BTW
@RalphBacon7 жыл бұрын
Brilliant idea, Michael, and I should have thought of it myself as I've demonstrated in the past how a phone's camera can detect IR LEDs, so this is an extension of that. I'm hopeful I will get this working soon... thanks for posting that great suggestion.
@willofirony7 жыл бұрын
You are probably who I got the idea from. With a good teacher, all he tells you , becomes your knowledge
@abedbug99537 жыл бұрын
Great Video Ralph, keep it coming
@RalphBacon7 жыл бұрын
Will do bedbug, thanks for touching base again, good to hear from you!
@rak3shpai7 жыл бұрын
I'd consider putting a transistor in series with the old rain sensor, and only turning it on when you need to take a reading. That should reduce the DC corrosion and extend life by several orders of magnitude, much like how sleeping a microcontroller extends battery life. Your optical approach is interesting too - learnt a new thing today :). I'm curious to see how it shapes up.
@RalphBacon7 жыл бұрын
Hello Rakesh, welcome! Yes, I'm curious how this will shape up too. It's got to be better than a corroded sensor (that still sort of works but tells me sometimes it's raining when it's not). Yes, switching the sensor off (eg at night) could have been an option. I should have put a sensor out there that was not wired up to see the effect of weather vs. weather plus DC current. I might just still do that too, so thanks for the suggestion.
@rak3shpai7 жыл бұрын
Thanks for responding. It'd be interesting to know if the old sensor's life can be extended. If all it takes is a transistor, a base resistor and a spare digital pin, with the firmware polling only say once a minute, to extend life to say 3 years instead of a few weeks, that'd be very interesting to know. I'm no expert, but the green colouration of the corrosion suggests a charge migration, which can be avoided if you don't keep it powered on all the time. The corrosion can simply be oxidation too, of course. The statue of liberty has a copper coating that has turned greenish due to corrosion, without the need for a DC current, so there's that. :)
@RalphBacon7 жыл бұрын
I think you're on the same track as me there, Rakesh. The green colouration is more than likely charge migration, I'm sure, as I have tinned all the copper strips on the PCB and even put clear varnish on the gaps between the strips. I'll deffo put out another sensor that is not wired up, and try to get the existing one then switched, probably just via a spare pin on the Arduino, that's enough for this (I already have an LDR wired in so it's easy to switch it off at night, for example) and poll every few seconds for a millisecond or two. Of course, if this all works then I don't need the IR Rain Sensor !!! (I'll do it anyway, perhaps even in parallel as an additional sensor). Thanks for your suggestions, greatly appreciated.
@tbddevelops7 жыл бұрын
It would be great to get an update regardless of your success. "I'll update you if and when I get it working". Sometimes, understanding the pitfalls is as useful as seeing a success!
@RalphBacon7 жыл бұрын
You know what, Terry? This video was #79. If I recorded all my "sub-optimal" projects I'd now be at #179! But seriously, I think you may be right in at least covering "what went wrong" so I will take your point and do exactly as you suggest. Let's hope there are not too many failure coming up though :) Thanks for a great suggestion.
@Roy_Tellason4 жыл бұрын
For soldering irons, I have tended to favor Ungar (since absorbed by Weller it appears), which has a heating element that screws into the handle with what resembles the base of a small light bulb. I currently mostly use 33W and 45W elements, mostly with a chisel tip, but then I don't do much with surface-mount parts. One of the things that's come in handy with the screw-on tips is a bit of anti-seize, also branded Ungar, although I expect that the anti-seize that you can get at auto parts stores would probably work as well. I like the look of the Dremel you show here, and maybe I'll have to get me one of those... I also have a little box that I plug the iron into, which has two switches, on-off and high-low, where the low setting puts a diode in series with it effectively giving you half the power for when you need less heat. Been using that for several decades now.
@RalphBacon4 жыл бұрын
I'm not familiar with Ungar, Roy, (although I've hankered after a Weller but ended up with a cheaper ATTEN, although I use some of the Weller bits that fit that iron). Good tip about using anti-seize liquid. Regarding a high/low switch, I built a soldering iron box when I was about 16. The weight of the iron hanging on the microswitch lever (which came through the case) put a diode in series with the iron. Sound familiar? I should have patented that idea except it was probably from Everyday Electronics magazine! Nothing new under the sun.
@Roy_Tellason4 жыл бұрын
I've seen that setup too, but I prefer the manual switch, where I can select lower power if that's what I need for what I'm working on. The stand is a separate item from the hi/lo box. :-)
@leorcid5 жыл бұрын
I was attempting to do the same, with the same components too. But found that the IR sensor responds erratically when I take it out to test, with the immense number of IR lit security cameras, it's no wonder. So I decided to use a modulated IR beam and a TSOP sensor. How far along are you with your project?
@RalphBacon5 жыл бұрын
I had to modulate the signal too, Arun, as even the sunlight swamped the sensor. Ultimately, however, I never got it to work reliably (or sensitive enough) in this project. Part of the problem is that the surface area is quite small. Pity. I reverted to the standard copper finger strips on a PCB board but managed to get over the corrosion problem in two ways: 1. Use a stainless steel sensor. Rarer than hen's teeth. I have one but not currently in use. 2. I changed the code to power the sensor module once every 30 seconds for up to 5 seconds (or thereabouts) take a reading and then remove the power. Power is from one of the Arduino pins as it only needs a milliamp or so. I let it settle for a second or two before taking a reading. It's still running now. The sensor PCB looks a bit weathered but other than that works 100% reliably. I keep meaning to put the stainless steel version of the sensor in place but then think "Why bother? It's working now".
@brucewoods93777 жыл бұрын
I have that Dremel and am very impressed by it
@RalphBacon7 жыл бұрын
Me too, Bruce. I realised part way through the video that it might be coming across as some sort of sponsored product advert (I wish!) but no, it was just a tool that I had bought which I found very good, as I do other Dremel product of which I have several. Nice to hear your thoughts on this so thanks for posting.
@SodAlmighty5 жыл бұрын
I have one also, and I agree.
@MrBobWareham7 жыл бұрын
Hi sorry to rain on your parade but I think the perspex will end up pitted in the weather and then the beam will escape so it will tell you it is raining all the time the car version is glass and bonded to the screen with optics to direct the beam. I will follow your project to see if it works how about the sunshine on the IR sensor will that cause problem as well All the best and love your channel Bob
@RalphBacon7 жыл бұрын
Maybe so, Bob, maybe so. I haven't actually put it outside yet (which I could do, just as-is, to see the effect of the weather). In the interim I have changed the way I have used the existing sensor. Instead of it being connected all the time, thus allowing a permanent 5v presence which corrodes the sensor (when wet) almost before my very eyes, I now switch it on just for a second or two every 30 seconds, take a reading and switch it off again. All controlled by the Nano which runs the entire Cat Run sensor system (Humidity, Temperature, Rain and Door Open/Close chime). As a control I put an identical sensor (unconnected) next to it to see the effect of weather generally on it. The results after several weeks (of awful wet UK weather!) is that the unconnected sensor looks brand new. The connected sensor shows no sign of corrosion (that awful blue/white oxide that you get on the negative terminals of AA batteries in toys). So all in all, as I knew I wanted to test this out, I sort of parked the acrylic sensor, with a view to picking it up again later in the year, but after your post I will put it on the Cat Run roof to see how it fares. To overcome the effect of sunshine I intend using a modulated 38Khz signal, but I've not actually built that for the reasons stated. Finally, I ordered a couple of weatherproof and heated sensors from Telecontrolli in Italy, but they seems to have gone under; my payment to them is now being dealt with as a dispute case with PayPal. Sigh. Anyway, long answer to a short post, but nice to hear from you, and, yes, keep tuned for future updates!
@MrBobWareham7 жыл бұрын
Hi, Ralph thanks for the reply have you looked at VL53LOX sensor it has a laser and receiver and you don't need optics so you could fit it under glass!
@RalphBacon7 жыл бұрын
This is interesting, Bob. I had a (very) brief look at lunchtime but want to investigate further. This device is £10 in the UK (the first web page Google offered) but I'll see how much it is elsewhere. But it does sound worthy of my attention, so thanks for giving me the heads up!
@MrBobWareham7 жыл бұрын
If you look at Ebay number 262942125051 it is only 8.74 and there are cheaper one to be had just type Time-of-Flight Laser Distance Sensor to see plenty or go to ST microsite for the data sheet www.st.com/content/st_com/en/search.html#q=VL53L0X -t=keywords-page=1 let me know how you get on as I think many people will be interested in the product for range detection! All the best Bob
@Ed196017 жыл бұрын
I do the same with my soilmoisture sensor, a milisecond reading every 2-6 hrs and then i have a transistor switch off the current to the sensor. have that working on an attiny, arduino and wemos
@amitaiasif50594 жыл бұрын
Hi Ralph, thanks a very nice video, I was looking for creating such an optical rain sensor for my self, and I wonder if you were able to complete this project in the end, and if so, can you please share your Arduino code? alo, it will help if you have the name of the receiver part you are showing in the video. many many thanks!!
@RalphBacon4 жыл бұрын
I regret I could not get this receiver to be reliable. It needed a bigger piece of perspex (I'm guessing) or more time and skill on my part. Ironically, my solution was to use the standard sensor (flat fingers of tinned copper) but only switched on once every 30 seconds for a couple of seconds - no more corrosion and it's still in use today (after some years).
@amitaiasif50594 жыл бұрын
@@RalphBaconok thanks, I didn't realize that the corossion on the common rain sensor was related to the time the sensor is on, it's interesting and maybe I don't need this kind of setup of optical sensor too, as the all idea came from being afraid it will get corossion... will update if I will be able to get this work eventually :)
@rayparry52347 жыл бұрын
Thanks for that Ralph, it was very informative as normal. Could I ask you what sort of camera you use and how do you get the video of your good self to be in the corner. I only ask this because I am into Model Railways and I am wanting to make some videos to submit to youtube. Thanks again
@RalphBacon7 жыл бұрын
Hi there Raymond, glad you liked the video. I use OBS (an open source video recording tool) that accepts a wide range of inputs, including a webcam that I record at a fairly low resolution and shrink to just that corner. It will take you a little while to get to grips with it but there is plenty of help on their forum. Good luck!
@RalphBacon7 жыл бұрын
BTW, don't confuse OBS with the older "Open Broadcast System" despite the similar acronym, the OBS is the newer product and well supported.
@rayparry52347 жыл бұрын
Thanks Ralph, I will look into it
@maxximumb5 жыл бұрын
Just what I'm looking for to let us know if it starts raining and the windows on out foster cat pens. Ralph where did you get the odd shaped perspex? Thanks for another great video.
@RalphBacon5 жыл бұрын
I had the odd-shaped perspex custom made at some ridiculous price, Lee - and the thing, is they never worked as well as the original solder fingers on a board - after I learned that the way to prevent corrosion on those was to only turn the rain sensor part of the circuit on (ie power it up) for a few seconds at a time, a few times a minute. Since then, no issues with the originals. Does this help or have I given you a Boris Johnson-type answer (ie an answer to a completely different question)?
@maxximumb5 жыл бұрын
@@RalphBacon A great answer thanks. I understand what you mean about the intermittent sampling from the exposed circuit board. If the power is only running for a second or so every minute, corrosion would be slowed down significantly. It's not like you'd need a much finer resolution than that. This solution is my backup now. After looking at a number of car windscreen rain detectors and looking online I'm pretty sure I can do the same with some glass. I found a glass company that sells samples of 12mm thick glass in 10 x 10 cm squares for £3-ish. I got one and will try it out as I have all the parts I need from salvaging numerous TV and Sky remotes. My plan is to use two or more pairs of IR Tx/Tx LEDs to get a good spread across the glass. If it works, then all I need to do is decide if I want to use radio or wifi to send a rain alert and 3D print an enclosure. Plan B will be to get a conventional rain detector module.
@RalphBacon5 жыл бұрын
I'm afraid there a *huge typo* in your comment, Lee. "If it works, I shall immediately tell Ralph and everyone how I did it and post full details, including prices, on line (or get Ralph to do same)" is what you meant to write, I'm sure. 😄
@maxximumb5 жыл бұрын
@@RalphBacon LOL oh yes i missed that. That's what I meant.
@BerndFelsche7 жыл бұрын
IIRC,, infra red is absorbed by acrylic/perspex. i.e. it's opaque.
@RalphBacon7 жыл бұрын
Hi there Bernd! I wonder if you're thinking of UV rays which are blocked by glass, for example? My experiments (so far) show that IR behaves just as you might expect in a clear block of acrylic, but the proof of the pudding will be in the eating. So stay tuned for a future update!
@graemepinnock7 жыл бұрын
Ralph S Bacon glass blocks/ reflects true IR but acrylic is less absorbent (the IR window on the front of most IR controlled devices is acrylic, as are the bodies of IR transmitters and receivers). I suspect most things that we think of as IR are in fact really Near IR. In real IR applications (I.e. FLIR cameras) glass is never used in the lens. IMHO, glass passes UV, which is why you can get sunburnt through a closed window.
@RalphBacon7 жыл бұрын
Reading up on this is eye opening. There are various 'grades' of Plexiglass, acrylic, Perspex, some of which are *deliberately designed* to reflect/absorb IR and/or UV. Who knew? Well, apart from you two guys. Luckily, my experiments indicate that IR is being successfully transmitted, so maybe it is, as you say, almost IR? Anyway, when I get this going (or fail to) I'll let everyone know! Thanks for the info Graeme (and Bernd too), there is more to this than meets the eye!
@sickvic39097 жыл бұрын
Damn it, fell asleep just as your gun lit, skeeered me
@RalphBacon7 жыл бұрын
Oh Vic, how could you fall asleep during one of my riveting videos? But at least you woke up at an interesting point (those lasers are really bright, no wonder they prosecute if you shine one at planes or motorists!). I hope the rest of the video was interesting enough to keep you awake...
@Ed196017 жыл бұрын
was looking for such a rainmeter the other day
@RalphBacon7 жыл бұрын
Now here's the thing Ed (and I'm pretty sure I've said this to others). I experimented with this route (lasers) because the existing sensor corroded before my very eyes, because it had a constant 5v DC supply across the sensor. However, in parallel with the laser experiments, I changed my sensor to only switch on for few seconds, do the reading and switch off again a few times a minute. And guess what? My sensor no longer corroded. Added to which I've now acquired a stainless steel sensor (looks just like the original one) and which will of course never corrode. So the laser solution is now in mothballs awaiting a further need... any ideas?
@Ed196017 жыл бұрын
I am very familiar with that possibility as i do it with my soil moisture sensors...... basically on for a few milisecs every 4 hrs. Sensors (just two rods) last for years. Wasnt sure if that would be practical for a rainsensor, as that has to be more on guard... but i will give it a try. Even if i switch it on for a few milisecs every 10 secs it should already make a difference
@RalphBacon7 жыл бұрын
Yup, I think I switch mine on every 15 or 20 seconds (something of that order anyway) just to take a reading. It might miss the very first spot or two of rain but better that than a corroded sensor that doesn't detect anything anyway! My wife has requested an enhancement to this project, to let her know when it has *stopped raining* which is simple enough to do with a simple heating element under the sensor and a bit of logic to detect the state change (wet -> dry) but it's all theory at the moment miuch to my wife's frustration!
@Ed196017 жыл бұрын
Though the sensor should react soon enough if it has stopped raining.. especially when its position is slightly slanted, a heating element is definitely a possibility. How about a servo with a wiper, cleaning your sensor of raindrops?. hm,, maybe just a funnel with an optical droplet counter, or 2 exposed wires at the base of the funnel should do well too
@RalphBacon7 жыл бұрын
When you've designed (and built) either of those two great project do let me know! Seriously, if only I had the time to do any of this! Good suggestions on both counts. The heating elements are cheap, waterproof, come in a huge variety of temperatures and operation from 12 volts (mainly). So that the route I want to take when I have a nanosecond or two spare...
@robertheal51377 жыл бұрын
Big chunks of plastic like that, are not cheap
@RalphBacon7 жыл бұрын
You're not wrong there, Robert. I wince at how much I had to pay to get this cut accurately. I know there are acrylic "kits" you can buy to make your own paperweights but they are not cheap either and there was no way I could create the necessary shape with a smooth finish. But there we are, let's hope I can find the time to actually implement it rather than acting as the aforesaid paperweight in my workshop!
@midhunsuresh58007 жыл бұрын
its an awesome video. the kind that i was looking out for. but sir you just wasted my 10mins by showing your new toys.
@RalphBacon7 жыл бұрын
Well, Midhun, I hope you don't consider those 10 minutes *truly wasted* as they gave some important information about the new Antex soldering iron bits and a pretty decent gas filled heat gun! And the laser beam demo reflected through plastic is pretty cool, right? But I still have not had the time to finish this project yet, one day, one day... Sigh. Thanks for posting!
@midhunsuresh58007 жыл бұрын
Yah...the reflection demo was pretty awesome.... I am also taking on a project like yours. Its not completed yet right...? let me suggest something...... Let go of the whole things IR and do some R&D on CAPACITIVE PROXIMITY SENSORS. I think this is the best sensor for the job. Cost is a bit higher than IR but whole lot better. NO CORROSION, CAN BE SEALED,HIGH SENSITIVITY,INDUSTRIAL SENSOR what more do you need.....waiting for your reply
@RalphBacon7 жыл бұрын
How interesting, Midhun, that you're suggesting something that I've been actively looking at. More than looking, I ordered a couple of sensors from a company in Italy but guess what? They seem to have abandoned ship so now that payment is in dispute with PayPal! Doh! But there are others out there (and with built in heater) so I will continue my investigations because as you say, they are waterproof and sensitive and, yes, more expensive but seem to be what automobile manufacturers are using these days too. I'll keep you and everyone informed as to how this project moves forward comparing capacitive sensors vs electrolytic (resistive) ones and everything in between!
@midhunsuresh58007 жыл бұрын
There is one company named DOLPHIN who produces these industrial sensors.I ordered mine couple of weeks ago from amazon.in. Its taking little time to get here because of the rural area in India where i live in. After ordering i found out there is another maker who sells much more compact one and cheep too.Anyway I'll inform you after some R&D.....(sir, about your reply "it's waterproof" .....NO IT'S NOT. we can MAKE IT waterproof since capacitance can travel through thin glass, plastic etc.)
@midhunsuresh58007 жыл бұрын
This is not the one i ordered but pls check it out www.amazon.com/3-wire-Capacitance-Proximity-Switch-Detector/dp/B0057M416A/ref=sr_1_2?ie=UTF8&qid=1497962325&sr=8-2&keywords=capacitive+proximity+sensor
@SodAlmighty5 жыл бұрын
"A hexagon.....one two three four five. Yeah." Um, what?
@RalphBacon5 жыл бұрын
Let me check again... one, two, four, five, SIX! Oh, hang on, one, two three, four, SIX! No, no, just a moment... one, two, three, four, FIVE! Drat, you got me! I never could count. Of course, if lived in the States the shape of a Pentagon would be more familiar to me. That's my excuse and I'm sticking to it!
@ismzaxxon7 жыл бұрын
dip the prism in some water to demonstrate
@RalphBacon7 жыл бұрын
Yup, that's my plan Terry, although if you could have seen my desk during my experiments you would think I was designing a swimming pool not a rain sensor! Demo of the finished product in the not too distant future...
@rasikaweerathunge7 жыл бұрын
Sir Can i get your email. Im trying to make a rain sensor using IR emitter and Detector. I need some advices.
@RalphBacon7 жыл бұрын
Hey Kanishka, if you have questions relating to what's been demonstrated and discussed in the video, then the best place for your questions is right here! that way, others get to see them and may contribute or at least want to know the answer. If the question is of a more general nature then the best place for such questions is at the Arduino Forum (forum.arduino.cc) where several kindly folk will help you out. You may even see me there!
@rasikaweerathunge7 жыл бұрын
Thanks for your reply sir. I already using that forum. But my problem not yet solved. Thats why i need to contact you sir. I need some instructions regarding the sensor. I can send you my arduino code.
@RalphBacon7 жыл бұрын
Post the sample of code (not the whole sketch) here with which you are having specific problems. As you may understand I don't have the time or resources to debug a whole sketch but I can help with a particular part of it, if you describe exactly what it is you having an issue.
@rasikaweerathunge7 жыл бұрын
I cant recognize the fault is with my sensor part or with the coding part ( I mean the logic). I will send you my code sir. I made this sensor using the principle of total internal reflection. My program has one analog input (A0). Its values varying (Small variations) like, Ex:- 221,225,220,226,220,229,227.....I need to select some set of analog reading values in a certain time (Ex:-0.5s) or certain number of values (Ex-10 number of analog reading values) and get the mean value of it. Then i need to check the different between those real time analog input values & the mean value with some Threshold value. Ex:- Mean value of analog reading(in 0.5s or 10 number) = M After that start to get analog readings, Variable values = X1, X2, X3, X4....... (Those are analog reading values) lets say one value is X, Threshold value = 5 ***** Section 1 ***** So 1st i need to check is, (|(M-X)|)
@rasikaweerathunge7 жыл бұрын
The main thing is the readings are not stable. So in this situation a cant compare those values with same threshold value.