Nanode (EtherCard lib) + Emon on one device dont play nice

 Hello everyone,

I want to make an energy monitor with both the voltage and sensing electronics, and ethernet on the same device, so I used a Nanode 5 + AC non invasive 3.0.

I am using EtherCard library and Arduino IDE 1.0 but I'm experiencing the following problem:

When I comment out the emon calculations lines, and send a json static script to my server it works. When I want it to sense I and V, calculate power and send a static json string to the server it can only calculate the power values, and can's send the json string.

I suspected a shortage in RAM so I included some code to show how much ram is free: still 30% or more free... what could the problem be?

My code is here, please feel free to comment and push.