Reed switch for Wifi rain gauge tip bucket

I have an old Rain gauge tip bucket (TX24U-IT) that I would like to retrofit using Arduino. My plan is to use a Wifi modular to send data to my Home Assistant server. I want to keep this low power run on a battery. I have 2 AAA lithium rechargeable batteries. I have been testing it out with a reed switch I randomly purchased. I now realize that there are many different types of reed switches and need help finding one that will work for my situation. My plan is to use light sleep and have an interrupt that will trigger a message to home assistant when the bucket tips. The reed switch I purchase did not have specs but my issues is that it is too sensitive and sends a tip message repeatedly if a magnet is anywhere near that bucket. I have tried to use a hardware bounce circuit similar to this article: hardware debounce, but it is still too sensitive. I would appreciate any help find a better reed switch for this project.

Oh, really. How many? I have SPST and one that is actually SPDT.
Perhaps the problem is with the magnet and possibly vibration from the wind.

1 Like

Suggest you will have more luck with a Hall effect sensor.

1 Like

By types I mean different AT (Ampere-turns) values. The lower the AT value the more sensitive it is. I just don't know what value AT I should be looking for.

I want this to run on a battery in lower power mode (light sleep). A hall effect sensor needs power all the time to run.

I'm using a SPST reed switch. The magnet is built into the tip bucket, it would be hard to remove or replace. Is there any way I can dampen the magnetic field?

Could you use a mechanical micro switch?

Only power the Hall effect when the controller powers up.

Are you confusing reed switches with reed relays? The relays contain reed switches and are activated by current through the coil. No magnet needed or wanted!

Thanks, I will look into the Hall effect sensor. I would need to figure out if it will effect my battery life. Is there any you would recommend for lower power consumption?

If the power consumption is an issue, a simple P channel MOSFET (10 cents) as seen in these examples can be used to switch power ON and OFF to a load.

I'm not a Wifi expert but one who was told me Wifi is not friendly to battery devices. Making and breaking a Wifi link every time the processor goes to sleep is problematic.

Might I suggest a bluetooth link to a nothe bluetooth with mains power, which can then maintain a Wifi link.

Debounce in software is easy. Something like:

if (switch = 1) then{
     delay 50 ms
    if (switch =1) then make a count
}
1 Like

And of course the example is pseudo code.

I'm using a simple reed switch the ones in a glass tube. When I look on line they have different AT values. I read a little bit about AT values and the lower the value the greater the sensitivity is. I'm just guessing I need one with a higher AT so it is less sensitive, but I don't know how to pick one.

Let me repeat the question, then. How does Ampere turns relate to any reed switch? Why even look at reed relay parameters?
Perhaps look into the orientation of the magnet and the physical outline of the magnet. Reed switches, including the steel wires coming out of the glass, need to be parallel with the magnetic field in order to close the switch. When the magnetic field is 90 degrees to the switch, the switch should open. There should be NO intermediate orientation of the magnet, except when moving.

Didn't it have a reed switch already? Like you said, they use less power than a hall effect sensor, and as this is a battery powered rain sensor, I would expect that's how it would work. My rain sensor has a reed switch, although it has a cable, not an RF transmitter.

So the original sensor has holders for 2 AAA 1.5V cells? If you replace those with AAA li-ion, you will get 7.4V (nominal). If you use a linear regulator to reduce that to 3.3V for the Arduino, half the battery capacity will be wasted by the regulator. If you use a DC-DC buck converter, that won't solve the problem either because they have a high quiescent current. Ideally, if you can modify the battery holder to have the 2 li-ion cells connected in parallel, that would be better. I think it does mean, however, that you need 2x over-discharge protection circuits.

I think I would see if I could find a li-po pack that fits into the space where the 2 AAA cells fit. Li-po cells are 3.7V and have a built-in over-discharge protection circuit.

The AAA lithium batteries are 1.5 volt. so no regulator. It is a little under powered but if I need to I can run it plugged in. My first issue is to get the reed switch issue fixed. Thanks

I broke the original reed switch while removing it from the board.

Amazon and eBay have lots.

I'm not familiar with reed switches so I looked it up on-line. For example this reed switch MKA14103 has the following specs MKA14103. The pull in AT =10-35 and the Drop out, AT min = 5. I looked up AT for reed switches and it says it means Ampere-turns. So I figured I did not have the correct reed switch for my application. That is why I'm looking for help. Are you saying AT does not apply for reed switches but do for reed relays? Are all reed switches the same? Do I need to looking at hardware and/or software debounce more to solve the issue? Sorry I don't know much about magnetic fields etc. I thought I could just replace the reed switch with a random one but it is now making contact when the tip bucket is idol. If I remove the magnet it goes back to the open state.

The reed switch and magnet are parallel. The the tip bucket does rotate a bit as it tips side to side.
Thanks for your help