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....