I bought the weather rack and weather pi arduino and there is 3 plugs coming off the weather rack and on the weather pi arduino space for 2 plugs so how do I plug the third one in do I need to bought 2 weather pi arduino thank you William Leidig
We just read the spec and realize that we didn’t show a picture of where that third plug goes. It goes from the anemometer to the base of the wind vane. We will add that to the specification.
I have a WeatherRack and WeatherPiArduino with a DHT22. Everything works great except for a switch-bounce problem with the rain gauge. I wrote a diagnostic program and found that I get 3 to 5 RISING interrupts for each tip. I changed the interrupt to FALLING and got noise interrupts on clear days. A 10 microfarad capacitor, signal to ground, lowered this to 2 to 3 RISING interrupts per tip. I will try FALLING with the capacitor and larger capacitors. I have a 555 timer to setup as a Schmitt trigger if those ideas fail. My homebrew oscope was too noisy to see the signal clearly. A software solution doesn’t seem feasible because the interrupt routine would be large enough to block anemometer interrupts. Any ideas?
I will send you the UNO sketch and the diagram when I get it working. I plan to set up a CWOP reporting station.
I would add a software debounce. Could you tell how far apart the bounces were with your scope? You could time the multiple interrupts with software in the UNO to get the timingif your scope won’t give it to you.
I *suspect*, but don’t know, you might have a mounting problem on the Rain Gauge. Does it move around a lot? Is it pretty physically secure?
Software debounce is not practical because I have 3 interrupt routines: rain tipper, anemometer and a timer interrupt to collect the counts at programmed intervals. A software debounce might mask the other interrupts. I will write a sketch to plot the bounces, but school is back in session. I have tried the tipper in different mountings to no avail. There is no apparent bounce in the anemometer. After trying several capacitor values, the 10 uf capacitor is the most stable giving 2-3 interrupts on the rising signal. A Schmitt trigger appears to be the logical hardware solution. The other option is to correct the rainfall to match my graduated cylinder rain gauge in software, but that might not work in other installations.
While I definitely applaud the advantages of using hardware to debounce interrupts, you can use software to debounce multiple interrupts. The trick is not to delay a certain amount when you get an interrupt (which will debounce a single interrupt, but at the cost of tying up the processor), but rather keep track of the time of the interrupt and then ignore any other interrupts on the same for xxx number of milliseconds by comparing to a timer or the millis clock and only activating the interrupt if the debounce time has expired. Doing this for each interrupt will allow you to software debounce multiple interrupts.
It would be nice to use a Hall-effect switch for the rain gauge instead of mechanical contacts. No contact bounce and no corrosion either, given that the instrument is literally out in the weather.
John Marable – Look into Arduino’s Button class library. If it doesn’t work for you I’ve written my own Button class that debounces using a non-blocking routine in the manner SwitchDoc suggested. I’d be happy to share it with you.
-PW
I bought the weather rack and weather pi arduino and there is 3 plugs coming off the weather rack and on the weather pi arduino space for 2 plugs so how do I plug the third one in do I need to bought 2 weather pi arduino thank you William Leidig
Hi William,
We just read the spec and realize that we didn’t show a picture of where that third plug goes. It goes from the anemometer to the base of the wind vane. We will add that to the specification.
You do not need 2 WeatherPiArduinos, just one.
Best regards,
SDL
I have a WeatherRack and WeatherPiArduino with a DHT22. Everything works great except for a switch-bounce problem with the rain gauge. I wrote a diagnostic program and found that I get 3 to 5 RISING interrupts for each tip. I changed the interrupt to FALLING and got noise interrupts on clear days. A 10 microfarad capacitor, signal to ground, lowered this to 2 to 3 RISING interrupts per tip. I will try FALLING with the capacitor and larger capacitors. I have a 555 timer to setup as a Schmitt trigger if those ideas fail. My homebrew oscope was too noisy to see the signal clearly. A software solution doesn’t seem feasible because the interrupt routine would be large enough to block anemometer interrupts. Any ideas?
I will send you the UNO sketch and the diagram when I get it working. I plan to set up a CWOP reporting station.
I would add a software debounce. Could you tell how far apart the bounces were with your scope? You could time the multiple interrupts with software in the UNO to get the timingif your scope won’t give it to you.
I *suspect*, but don’t know, you might have a mounting problem on the Rain Gauge. Does it move around a lot? Is it pretty physically secure?
SDL
Great idea, by the way, about joining CWOP. I just did the same.
SDL
Software debounce is not practical because I have 3 interrupt routines: rain tipper, anemometer and a timer interrupt to collect the counts at programmed intervals. A software debounce might mask the other interrupts. I will write a sketch to plot the bounces, but school is back in session. I have tried the tipper in different mountings to no avail. There is no apparent bounce in the anemometer. After trying several capacitor values, the 10 uf capacitor is the most stable giving 2-3 interrupts on the rising signal. A Schmitt trigger appears to be the logical hardware solution. The other option is to correct the rainfall to match my graduated cylinder rain gauge in software, but that might not work in other installations.
Hi John,
While I definitely applaud the advantages of using hardware to debounce interrupts, you can use software to debounce multiple interrupts. The trick is not to delay a certain amount when you get an interrupt (which will debounce a single interrupt, but at the cost of tying up the processor), but rather keep track of the time of the interrupt and then ignore any other interrupts on the same for xxx number of milliseconds by comparing to a timer or the millis clock and only activating the interrupt if the debounce time has expired. Doing this for each interrupt will allow you to software debounce multiple interrupts.
SDL
I like your I2C mux and quad power boards. How about building a I2C 4 position relay board. No one in the US has a good I2C relay board.
It would be nice to use a Hall-effect switch for the rain gauge instead of mechanical contacts. No contact bounce and no corrosion either, given that the instrument is literally out in the weather.
John Marable – Look into Arduino’s Button class library. If it doesn’t work for you I’ve written my own Button class that debounces using a non-blocking routine in the manner SwitchDoc suggested. I’d be happy to share it with you.
-PW
Outstanding idea! The reed switch is in a tube, so there is really no corrosion problem. The comment about the contact bounce is well taken.
Best,
SDL