Open Energy Monitor

What are you developing?
User avatar
martinayotte
Posts: 1187
Joined: Mon Apr 27, 2015 1:45 pm

Re: Open Energy Monitor

Post by martinayotte » Sun Jul 26, 2015 10:18 pm

I was using Eagle since few years, but last year I've put it aside because my design was bigger than what it is allowed on free version of Eagle.
At that time, I've started learning Kicad, and as I became more use to it, I like it more than Eagle, especially the fact that footprints are detached from the symbols. I've use this site to convert some parts : http://kicad.jp/Eagle2Kicad/

User avatar
RogerClark
Posts: 6134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Open Energy Monitor

Post by RogerClark » Sun Jul 26, 2015 10:21 pm

Martin

I've dabbled a bit with Eagle but recently I downloaded KiCad to see if its any good.

However I've not really had time to do much more than install KiCad (especially as their servers seem to be offline some of the time "Bad Gateway" error seems to be a common occurance)

stuartw
Posts: 35
Joined: Mon Jun 01, 2015 8:57 am

Re: Open Energy Monitor

Post by stuartw » Mon Jul 27, 2015 3:21 am

RogerClark wrote:Ken,


I actually ordered some pre-designed boards from DirtyCheap PCBs last week, and they were dispatched a few days ago, so it will be interesting to see how long they take to get here.
I was about to recommend them when I read you were using them anyway, I have found them to be fantastic so far - never had a problem.
I even use them for smaller 'glue' type boards, as its just not worth the effort of doing it myself mostly..

The only time I would look anywhere else would be if I NEEDED fast turnaround, but thats pretty rare.. and there is always flywiring to bridge such gaps.

I use both Eagle and KiCad, personally I prefer KiCad, but eagle can make generating the output a touch easier until you are familiar.

User avatar
RogerClark
Posts: 6134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Open Energy Monitor

Post by RogerClark » Mon Jul 27, 2015 3:45 am

Thanks Stuart

I will preserve with Eagle for the moment, as there is a script to generate milling machine GCode from the Board file.
(I'm not sure if anyone has done the same thing for KiCad - not that this is a show stopper)

User avatar
RogerClark
Posts: 6134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Open Energy Monitor

Post by RogerClark » Wed Aug 05, 2015 9:58 pm

Just a quick update.

I have designed a PCB with a mini maple as a module, and the analog components, as well as the lcd display and the nrf905 tx/rx module, and also , just for good measure an esp8266-12!
I may not fit the esp8266, i only added it as i have space on the board and I may use the same pcb for multiple purposes.

The pcb is now with Dirty Cheap PCBs for manufacture, so I will know in a few weeks just how many mistakes i have made ;-)

With the NRF905, my hacky port of Zac Kemble's lib seems to partially work. However I currently have a strange bug where when i read the data packet, It looks like each byte is shifted 2 bits to the right.
At the moment, i dont know if this is an issue when the data is transferred to the tx for sending, or when its read out of the Rx unit.

I reads the SPI from inside an ISR, which may be the problem, however it looks like I will need to attach the logic analyser to miso to see just what data is being read from the device.

BTW. Zac's library, is really just a bunch of functions and not a class, but this probably makes the ISR stuff easier, as i know there are issues with ISRs calling class methods.

User avatar
RogerClark
Posts: 6134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Open Energy Monitor

Post by RogerClark » Thu Aug 06, 2015 10:36 pm

Well, I've fixed the bizarre data shifting issue.

The problem transpired to be the SPI speed of DIV2 was too fast for the NRF905.

Strangely, the code to setup various parameters in module e.g. transmission frequency was working fine, and i reliably had it frequency hopping, up in 100khz steps, exactly as expected.

However when it read back the transmit payload buffer , of 32 bytes, it was getting various strange corruptions at the end of each byte.

Changing the SPI speed to DIV4 seems to fix this, but looking in the spec, the max SPI speed is only 10MHz, so i may need to lower this even more, to be truly inside the spec for this device.
And as the payload is only 32 bytes, its really not really going to make a big difference to the overall throughput, as the RF data rate a little around 50 kbps.

I will however try using SPI DMA for these 32 byte buffer reads and writes, just because the STM32 has that facility now that Victor has added the DMA functions.

LevAn
Posts: 1
Joined: Sun Oct 11, 2015 2:36 pm

Re: Open Energy Monitor

Post by LevAn » Mon Oct 12, 2015 5:23 am

I am also working on the some kind of similar project. But i am facing problem in detecting the running status of electricity.
I am not able to understand how i could detect this. Is is possible using ADC?
I you people have any other idea then please share it with me.

User avatar
RogerClark
Posts: 6134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Open Energy Monitor

Post by RogerClark » Mon Oct 12, 2015 6:07 am

I am also working on the some kind of similar project. But i am facing problem in detecting the running status of electricity.
I am not able to understand how i could detect this. Is is possible using ADC?
I you people have any other idea then please share it with me.
The system uses 2 x ADC's.

One ADC samples the mains voltage (via a step down transformer - and some resistors and capacitors)
And the other ADC is connected to a current clamp (aka current transformer) - which is clamped around the mains Live (active) cable.

The Open Energy Monitor library (emonlib) does all the clever processing to detect the phase angle between the current and the voltage and current waveforms and outputs the voltage, current, power, and power factor.
Direction of power flow is show as negative or positive values (and is closely related to the power factor).

If you want a full explanation of how this works, you should post to the Open Energy Monitor forum.

All I can say is that it works really well with the STM32, and give excellent results in my testing.

User avatar
zoomx
Posts: 450
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Open Energy Monitor

Post by zoomx » Mon Oct 12, 2015 8:46 am

You can use also a simple little neon lamp and an LDR. But the method described by Roger is much clever!

ityogi
Posts: 4
Joined: Thu Jun 16, 2016 6:36 am
Location: India
Contact:

Re: Open Energy Monitor

Post by ityogi » Sat Jun 25, 2016 3:30 pm

I plugged in my OpenEnergyMonitor setup into the BPB STM32 today and it worked without any modifications. Great work, and thanks, @rogerclark!

Now the next challenge is to make it talk to EmonESP for WiFi data upload, and incorporate MQTT in the STM32 itself.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests