Power Circuit Monitoring for Power Loss

@ritchierich

I have been making my own Zigbee module.

It is a DC powered Environment Sensor. At current state, it has battery backup and expansion port. I think this single module has all the ingredient that you need.

The battery backup allow the module still running in the event of power loss.

The module has digital input expnasion that can be wired with a relay, transistor, or in my case opto-isolator to sense the 5V input power.

Here is a demo how it work.

As a note, my dth abstract out the expansion pad as a child device. I have motion device handler that I can use to quickly show how it work. It will be easy to abstract out the digital input state to any capability.

The module is a Zigbee Router as well.

I hope this is useful information for anyone who is looking for a way to detect power loss in one module.

3 Likes

I know the topic might be a little old but I have been looking to monitor for power loss on a couple of circuits. I decided to use a Smart Things water leak sensor (GP-U999SJVLCAA) and a 5V relay (Wingoneer KY-019 for arduino). Less money than going the contact sensor route.

Project was really simple. Hook up 5V from a USB cable/Charger to the 5V plus trigger side of the relay and then connect the relay normally closed contacts to the external sensor points on the water leak sensor. This way the sensor reports dry when power is present and wet when power is lost.

All built for less than $35

5 Likes

There are a lot of solution out there. I am glad that there are a lot of creativity. I just thought that I mentioned some of unique advantage using my module for power monitoring. Here they are.

  1. With the module that I made, it has battery backup using Li-ON/LIPO battery that you should not need to replace perhaps for the lifetime of the sensor (assuming power outage is rare).

  2. You will get reading of Temperature, Humidity, Pressure and Light of the room where you install the sensor using a dedicated a sensor.

  3. The module still have one digital output and one digital input that you can use to control other devices. In this scope, you can use the digital output to control a relay to shutdown some of your device on UPS(uninterruptible power supply) to save power.

  4. You will get Zigbee Repeater which will improve your Zigbee mesh especially for your Xiaomi devices. The radio is an extended range Zigbee radio with additional dedicated amplifier. The vendor whom I purchased the sensor claim 1Km range (perhaps in the line of sight).

I tried to squeezed as much as juice possible to give us more value out more than just power monitoring. You get those additional advantage with pretty much the same or lower cost with my modules. I thought that I mentioned those points.

Thanks
Iman

1 Like

How much are your modules including shipping in US?

I request $28 per module shipped to US address. I use it to purchase the components to build the module.

Thanks
Iman

Thank you @greg.cole for posting your setup. I've had my power monitoring contact sensor sitting on my work bench since January. It kept falling to the bottom of my Todo list because it would take some soldering and heat shrinking to complete my initial setup (2 things I'm not very good at yet). That and @ritchierich gave me another method to see when power was out via a UPS NUT server.

Your pics made me realize I had all the equipment I needed and that I should have kept it simple and used a relay like @Navat604 recommended to me a long time ago. I grabbed my relay, small project box I had laying around and my USB paraphenalia. Had a complete project in less than 10 minutes and it works perfectly. Better yet, I have a little more space on my work bench now.

Thanks again for the inspiration.

4 Likes

I use these for on-site work or locations where a device is already installed and soldering/shrink tube installation is difficult.

It takes a bit of practice because the tubing becomes very flexible when the solder is at its melting point, but they do a nice job and all in all it's very simple. I get the wires in there, crimp the lead with pliers to hold them in place and hit it with the heat gun. A deflector on the heat gun in tight spaces works very well.

I find that the red are very useful to typical wiring we would find in our IoT devices, and the white for thin 22 gauge and finer wire work great.

Also available separately. If you're only dealing with 26-18 guage wire, you can buy the sizes individually.

If you don't have a heat gun, this has been a very good one. Just need to burn off the manufacturing oils the first few times you use it. It's been very reliable and heats fast. Also on for an incredible price of just $18.53 right now too!

For applications where waterproofing, space, and resistance isn't an issue, these easy to use crimp connections are nice too.

1 Like

Thanks for the links. Yes, I have a heat gun and I actually have a few of the self seal connectors (the ones you posted look a lot better though). The problem is the very tight space and angles needed to fit everytrhing in the zwave enclosure. I also had to fit a resistor and a transistor and that's the main reason I never got to it.
see this post:

The relay in the project box was a LOT easier and quicker. One day I might go back to the method above...but I'm in no rush :wink:

Those are awesome! I've never seen such a thing. Definitely going to pick some up.

Another tip in the wiring department, Wago connectors.

They are so much easier than wire nuts. Just be careful you don't pinch your finger when you close them.

1 Like

Yeah, the relay used here is a very good way to go. Unless you already had a spare contact sensor, I would lower the cost further with a Xiaomi door window sensor. They're very easy to solder wires to- There it is again, MORE SOLDERING! :weary:

The best technique for joining wires together with hand soldering or soldering to components that shouldn't get too hot, it to tin the wires with solder. That way, it's a quick 1-2 second touch of the solding iron and they're joined.

A note about this video: It's text book. In practice, I don't use a heat sink, I don't apply flux (I use rosin core solder that already includes the flux), and I move faster than what is shown in the video.

Keep your solding iron tip clean with either a damp sponge or a soft coiled tip cleaner, and use a chisle tip.

Those are great for bench testing. I'll have to order some. Do you find they're easy enough to open for re-use?

They're actually certified for in-wall use too. That's the beauty of them, they are 100% reusable. Open and close them as many times as you want. I've basically abandoned wire nuts. They even sell a version that is 2x2 to splice a hot and neutral to another hot and neutral in just one connector.

I had one 4 gang switch box where the original electrician had piggy backed one to the next. So, take out one switch was a PITA. So, I took one of the 5 port connectors and 4 pigtails of wire and had it all neatened out in about 10 mins. Connecting 5 romex wires with a wire nut is impossible!

1 Like

Those are brilliant!
I’ve I used loads of them behind wall switches etc.

2 Likes

I have been looking for a project box that could plug directly into an outlet and simply hang there with no wires. Today, this thread inspired me to look again. I found something that might work, and I have ordered a few to see if I can squeeze in a 120VAC to 5VDC USB power supply (e.g. an iPhone charger, or similar. I'd like to subdivide the enclosure into a 120VAC side and a low voltage DC side to power microcontrollers.

Here's what I found... if anyone knows of anything similar, please share. A few models are available in white...all are available in black.

2 Likes

Please post pictures once you receive them. That website doesn't include any of the inside which is unfortunate.

I just ordered a bunch of these 3 things:

Charger


Adapter

Box

I like the 90 degree angle of the wall charger. That will allow me to velcro the housing to it very easily. I'll let you know how it goes when I get the stuff tomorrow. You might not need the adapter...

2 Likes

Please, keep us updated on if that works!

I've been "making" Hubduino power supplies recently by buying those cheap, cheap phone chargers they sell at the gas station. They come apart very easily so you can desolder the USB port and solder wire directly to them. On the 120v side, the power is just soldered to the two prongs so very easy to desolder them. Much cheaper then buying a 120VAC to 5VDC converter on Amazon.

Just don't power it on and touch it... PLEASE!!

2 Likes

Sound advice..... I presume.... :smile:

1 Like

That's creepy, I just bought those EXACT same boxes 2 days ago. Not similar ones, that exact same listing. Great minds shop alike too I guess. LOL

1 Like

I bought the project boxes and the wall chargers as well.
I didn't realize these boxes came in white too....I never looked because I bought them a while back for the garage where color didn't matter...but now that I see them, I must swap to them because they would look a lot better when used inside. I went ahead and bought the usb plugs too because now I would need a white charger to compliment the white box. Wasn't planning on spending money on any of this but I know this will definitely help the WAF.

2 Likes