Author Topic: Opensource alternatives to Plugaway (Wireless) / MeterPlug (Bluetooth)?  (Read 4773 times)

0 Members and 1 Guest are viewing this topic.

Offline RogerClarkTopic starter

  • Contributor
  • Posts: 27
  • Country: au
    • Roger Clark's blog
Hi,

I've currently attempting to build a project a bit like Plugaway (Wireless) and MeterPlug (Bluetooth), and thought it would be good to get some forum feedback on ideas etc

I've found an open source project called SEGPlug (https://github.com/lukeweston/SEGPlug ) designed by Luke Weston, which is similar to MeterPlug, except it uses a XBee etc not Bluetooth Low Energy.

I've found a few issues with the design, so I'm in the process of building it in a modular form, so that I can test each of the elements individually.

For my tests I'm using an RFM12B (433Mhz FM TX/RX) not an XBee (as I have some in the lab), but the plan is to replace this with a NordicSemi BLE module, probably an NRF8001 or similar.

I'm using an ATMega328p, but DIL not SM and I'm running it on 3.3v @16Mhz  Xtal (though I think I'll need to drop it to 8Mhz as this is beyond the spec for the controller when working at 3.3V).

Current detection is via a 0.01 Ohm 3W resistor (as I can source locally from Jaycar).  I think this would be OK for for countries using 220V type supplies, as dissipation at 13A would be (13 * 13 * 0.01 ) = 1.69W. However for world wide, it would need to use a lower value - probably 0.005 Ohm.

Perhaps someone can tell me Max current requirement for USA etc which use lower mains voltages.  i.e if I have a 3W 0.005 Ohm resistor, this would theoretically be able to operate up around 24.5A - Is this sufficient?

Unfortunately using the same resistor for both 110V and 220V reduces the current measuring resolution by 1/2. i.e the ADC is has 1024 values, so would give around 5W resolution on 220V for 0.01 Ohms but only about 10W resolution for 0.005A.

PSU

The SEGPlug uses a transformerless PSU, but this would now fail EU standby directives as its inefficient.
I'm currently testing using a switching PSU (USB charger), where I've connected Neutral to input to GND output  (YES. I know that the whole thing is now live, but this is normal for a transformerless style PSU, where direct current measurements are taken across a resistor.

Luke has suggested that its probably best to replace the transformerless supply with a high voltage Buck converter from Power Integrations e.g. LNK306 - so I've ordered 2 of these to test.

Power switching will be using a relay. I'm using a Panasonic 6V 10A relay that I salvaged from some other unit. Its driven by a FET (2N2007) from the ATMega328P. However 10A isn't going to be enough for all uses, so I'll need to increase this. I've already had to use 2 supply voltages, one for the ATMega and another for the relay. So it looks like the best solution is probably to have 12V for the relay, and then regulate down to 3.3 to run the ATMega.



I've not looked at the RF side as yet. I guess my best bet is to buy a BLE module e.g.  http://redbearlab.com/bleshield/  before integrating the NRF8001 directly into the first prototype PCB design.


Other options I've considered.

Use a separate power measurement IC (E.g. cirrus technology 5463  http://www.cirrus.com/en/products/cs5463.html ) - however this doesn't help the supply isolation issue, and I can't see any off the shelf code libraries for AVR to communicate with this device.

At the moment I plan to use the AVR code written for the Open Energy Monitor project.

Use hall effect current measurement. This may get around the PSU / isolation issue, but voltage still needs to be measured, however this may be able to be done via a linear opto-couple.

But I'm not sure if there is really any benefit to isolating the LT and HT sides of the device, as the whole lot is inside a box anyway.


Any comments, preferably constructive would be very helpful.

Thanks....
« Last Edit: June 02, 2013, 03:52:32 am by RogerClark »
 

Offline RogerClarkTopic starter

  • Contributor
  • Posts: 27
  • Country: au
    • Roger Clark's blog
Thanks @mob-chan,

I'd not seen the Texas CC1101 before.   But it looks like its more expensive than the RFM12b.

I'm only using the RFM12b at the moment as I have a few of them I bought for tests and evaluation.  Though I must admit, I find them a bit temperamental and sometimes fail to initialise etc.

The long term plan is to use Bluetooth 4, as newer phones and tablets can communicate directly with Bluetooth 4 (even Apple devices)

However it looks like I may have to use a certified/approved  Bluetooth module rather than an individual IC + discrete components.


I've now finished by prototype, but it looks like the current sensing opamp is picking up too much noise, as the microcontroller is reading much higher values of current than are really flowing to the load.

I think I'm going to need to rig up some sort of isolating transformer, as at the moment its impossible connect my scope to the circuit as its a transformerless PSU, so the whole lot is floating at mains potential :-(

The difficulty is that the circuit is designed to sense up to 10A of load (at 240V), and an isolating transformer that could handle that amount of current would cost $$$$ and I'm building this prototype on virtually zero budget.
Anyway, I'm sure I'll find a solution ;-)

Thanks

Roger
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Perhaps someone can tell me Max current requirement for USA etc which use lower mains voltages.

In the US you'll find 15 and 20 amp sockets on standard wall outlets.  Most of the Kill-a-watt type of things are designed for 15 amps max.

Offline darko31

  • Regular Contributor
  • *
  • Posts: 103
  • Country: cs
The advantages of current transformers or hall effect sensors are less noise than low value resistor and it's easier to measure the current. I mean, a 0.005 Ohm resistor, the leads alone would have that much of resistance. One more advantage, you wouldn't have problems measuring higher current.

I was also looking into making a custom power meter with data logging capability, current transformers are ideal choice for mine project since the size of the thing isn't that much of problem.

It's interesting to see an open hardware meters, the wireless capability would be awesome.

Good luck.
 

Offline RogerClarkTopic starter

  • Contributor
  • Posts: 27
  • Country: au
    • Roger Clark's blog
Thanks guys for the replies

Re RFM12b

Range seems ok, but I often have issues with unreliability of comms to the micro controller especially on initialisation.
I have evaluated the Nordic semi 2.4ghz nrf24xx, but the range is short and signals don't go through walls very well.

I've also tried ASK (AM) separate tx and Rx units, but interference is a problem and data rate is v slow.

I will get some Nordic 433mhz modules to try


Re:current measurement

Yes. Noise is a big issue, with my current prototype. In fact the current measurement doesn't work :-(


I'm going to try winding a very small toroidal transformer, with one or two windings on the primary, which will carry the 10A AC mains, and perhaps 50 turns on the secondary, to see if this is a practical or accurate way to measure current

I took apart commercial current sensing socket, (not current measuring) and it used this principal, but I don't think it required much accuracy, as its function was just to sense whether the attached device (load) was in standby or drawing its full power


I'll post again when I have some more results

Cheers

Roger

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf