Author Topic: How about developing a PlugMote? [solution]  (Read 15688 times)

Roger2016

  • NewMember
  • *
  • Posts: 17
  • Country: us
How about developing a PlugMote? [solution]
« on: October 26, 2016, 10:24:34 AM »
How about a Moteino version of this ancient X10 plug module?

http://www.smarthome.com/x10-am466-x10-3-pin-appliance-module.html?src=Froogle&gclid=Cj0KEQjwqMHABRDVl6_hqKGDyNIBEiQAN-O9hNWGF0XjACoRonq2G6obIkh2-GwdtaC5gwZ66SBtJbAaAjMh8P8HAQ

I've used X10 for decades, but I've always had reliability issues.  Especially recently with CFL & LED bulbs I suspect are adding noise to the power line.

It would be cool to have the ability to control & log data, have 2 way communication to verify the device actually turned on.  While you are at it add a current sensor to log the power draw.  Seems like a reconfigured SwitchMote would do the trick.  Keep the button to add local control.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: How about developing a PlugMote?
« Reply #1 on: October 26, 2016, 10:57:13 AM »
It would be cool to have the ability to control & log data, have 2 way communication to verify the device actually turned on.  While you are at it add a current sensor to log the power draw.  Seems like a reconfigured SwitchMote would do the trick.  Keep the button to add local control.
Not sure what you mean by "Reconfigured".
Switchmotes can already do all that, except the power draw logging. That's a whole different can of worms and it's a hard problem to do right and put in a tight neat package. Doing it the crude way with CTs for measuring current and a voltage transformer for Voltage means this won't fit inside a single product case. Doing it with a shunt and voltage dividers is more feasible but many will object to that for various reasons, not safe etc.
That's why I didn't try to overengineer the SwitchMote to attempt power monitoring since it was going to add a lot more complexity and cost, would not be so DIY friendly with all through hole parts.

I think a compromise would be to add a separate mote that just measures the power, a sort of inline plug. Many ways to approach this, all have their pros and cons.

Roger2016

  • NewMember
  • *
  • Posts: 17
  • Country: us
Re: How about developing a PlugMote?
« Reply #2 on: October 26, 2016, 11:04:41 AM »
I totally understand about the power measurement.

What I mean by reconfigured is a device like I linked above were it plugs into the wall and an appliance or light plugs into it as apposed to the switchmote which is mounted in the wall at the switch side.





Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: How about developing a PlugMote?
« Reply #3 on: October 26, 2016, 11:39:08 AM »
I see what you mean now, yes that would be cool.
Some kind of current sensor (current flowing sensor) should not be too hard to add in that case however it might not be very accurate.
The challenge with this type of device is finding an off the shelf case with the mains pins ready to plug or solder into a PCB.

An afterthought is that you can do this today in a different way:
Go to home depot and buy a standard 2 plug electrical box and plug socket with cover. Inside you can place a SwitchMote2x10A PSU including Moteino for wireless control. The input can be a standard cord to the supply plug. The output is wired/screwed to the two input plugs. Then you have 2 controllable plugs. Not super aesthetic but I guess you could mount this in the wall directly too.
And if you get a double size box, the face plate of the SwitchMote with 3 buttons and status LEDs could mount into that other slot. So that way you can control them locally also. Very doable :)
Would look like this, two buttons could control the plugs, the other would be general purpose:

« Last Edit: October 26, 2016, 11:45:50 AM by Felix »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: How about developing a PlugMote?
« Reply #4 on: October 26, 2016, 12:03:38 PM »
« Last Edit: October 26, 2016, 12:06:09 PM by WhiteHare »

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: How about developing a PlugMote?
« Reply #5 on: October 26, 2016, 12:23:08 PM »
Microchip do power sensors such as MCP3905, there's even a dev kit for it:
http://www.microchip.com/wwwproducts/en/MCP3905
Mark.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: How about developing a PlugMote?
« Reply #6 on: October 26, 2016, 01:29:36 PM »
Here's a mockup I've done with a SM2x10A and double plug:
And the video of putting this together in a post below.


Roger2016

  • NewMember
  • *
  • Posts: 17
  • Country: us
Re: How about developing a PlugMote?
« Reply #7 on: October 26, 2016, 01:45:58 PM »
Thanks All, 

I think for now I'll start with a DIY Similar to Felix's suggestion.  The Whitehare solution is so close, but too bad they don't have 5V out to power the Moteino.

That MCP3905 looks interesting Mark.  I'll have to read the data sheet,  I would like to add a load logging/metering device to my Bridgeport CNC Mill.  I'd like to measure & Log the RPM and load to see if the spindle slows at all when taking heavy cuts.  With CNC everything goes so wrong so fast, if you aren't data logging all you know is you trashed the tool, the part or usually both.  So Many projects!  and they quickly exceed my skill level.  I'm an "electronics wanna be" Never had a class.

Felix,  No doubt you can conjurer up a nice clean solution. 

I wonder if I coulden't just hack an X10 module to be controlled by a Moteino?

Thanks All, but I better get back to work and stop thinking about this stuff for a few hours.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: How about developing a PlugMote?
« Reply #8 on: October 26, 2016, 01:56:35 PM »
Felix,  No doubt you can conjurer up a nice clean solution. 

I wonder if I coulden't just hack an X10 module to be controlled by a Moteino?
I was thinking more of the ACS712 sensors, see this instructable for a suggested implementation: http://www.instructables.com/id/Simplified-Arduino-AC-Current-Measurement-Using-AC/?ALLSTEPS
Many others out there.
Oops this is for DC not AC :P
Here's TomWS's excellent AC 'honest' load monitor: https://lowpowerlab.com/forum/projects/wireless-four-channel-'honest'-rms-ac-power-monitor/



Even this type of compact CT sensor might work OK and it's non invasive: http://www.kr4.us/non-invasive-current-sensor-30a.html?gclid=CMWRoe6D-c8CFQyEaQodMTcAEg


In terms of X10 - no experience with that at all, if it offers a 5V and tap into it's relay control, then you may be able to do it.
« Last Edit: October 26, 2016, 02:05:20 PM by Felix »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: How about developing a PlugMote?
« Reply #9 on: October 26, 2016, 03:16:21 PM »
The Whitehare solution is so close, but too bad they don't have 5V out to power the Moteino.

A lot of people have complained about that.  If you read the buyer comments on Amazon, there's a way to modify it so that one of the outlets is always on.  Then you can plug-in a DC power source to that to run your Moteino.  It's functional, but I wouldn't call it streamlined.

You may also want to look at JoeLucid's foot warmer project.
« Last Edit: October 26, 2016, 03:29:09 PM by WhiteHare »

Roger2016

  • NewMember
  • *
  • Posts: 17
  • Country: us
Re: How about developing a PlugMote?
« Reply #10 on: October 26, 2016, 03:39:11 PM »
Of course, but that's just clunky!  They probably already have 5v internally already to run the switching.  Hate seeing products get so close, but not quite!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: How about developing a PlugMote?
« Reply #11 on: October 28, 2016, 10:43:08 PM »
Ok and here's my solution:


TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: How about developing a PlugMote? [solution]
« Reply #12 on: October 29, 2016, 09:05:21 AM »
ISTM that a SwitchMote with an ACS712 would do the trick.  The ACS712 can measure AC currents and provide 2.1KV electrical isolation (when fabbed correctly).  Zero current output is VCC/2 so you can measure AC current relative to the midpoint value.  I use the ACS712 in my DC (Dust Collector) Remotes posted somewhere on this forum...

Tom

Roger2016

  • NewMember
  • *
  • Posts: 17
  • Country: us
Re: How about developing a PlugMote? [solution]
« Reply #13 on: October 30, 2016, 07:58:53 PM »
Felix,

I'll be making a couple of these, but perhaps some day you can design a smaller version.  When you have nothing else better to do.

Thanks!

Tom,

That ACS712 looks nice!  Small and inexpensive.  Do you think this would work measuring current for a 2 HP 220 Volt motor on my CNC as a load indicator?

Thanks!

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: How about developing a PlugMote? [solution]
« Reply #14 on: October 30, 2016, 09:32:10 PM »
That ACS712 looks nice!  Small and inexpensive.  Do you think this would work measuring current for a 2 HP 220 Volt motor on my CNC as a load indicator?
Yes and no.  It depends on the accuracy you're looking for.  The ACS712 would easily handle 2HP 220V current range (6-7A), but the tricky thing will be calibrating 2HP induction motor current into %load (or whatever metric you're after).  If you're just looking for a qualitative measurement, then absolutely yes.  If you want to have a direct readout of 'load'... well, you might need to do some work to get this.   

Key is: the ACS712 WILL tell you, at any instant, how much current is flowing through it.  And that current can be easily monitored by an Arduino device as low voltage analog signal with sufficient isolation to be safe and reasonably accurate.  If you can turn that voltage vs time value into something useful, you've got what you want.

Tom