This unit has been being used for about 1 month and I made some changes to the unit to have a different hostname, etc. but nothing that would trigger issues like this. Now, the system was on a power strip that tripped while in use and was subjected to hard power reset. It was also updated using the web interface for both emonPi update and emonBase update.
Any idea where this issue would be coming from?
I was thinking of swapping the SD card from the working unit to the other one to see if it is a hardware or software issue. Would that be a good test?
You could try that, but I think that will most likely prove nothing. The firmware responsible for the measurements themselves is a sketch in the Atmel 328P that is the “emon” part of the emonPi, and that won’t be changed when you change the SD card.
Firstly, are you certain that it is not mains-borne or power supply interference? The first thing I would do is swap the 5 V USB power supply. The second would be to take the c.t. off its cable (leaving it plugged in) and then check. After that, I would start to think about whether the analogue inputs have been damaged. Although we’ve never (AFAIK) had a proven case of hardware damage, the fact that your power strip tripped might mean that the analogue input circuits of the 328 have suffered some damage. The question there is, what caused the trip and did those c.t’s see the fault current?
The first emonPI that works, it works well with all the same CT, power supply and reference power. I only swap the body of the emonPi. That tells me that the CTS, etc. are fine.
For the second emonPi that I modified, I actually did change the sketch in the Atmel 328P (changed the sampling rate to 500ms - I know it may not be recommended but it worked in the past for months on another unit so I figured it was OK) but I thought I reversed it by doing the update through the web interface. I will revert that first to check.
This changed sketch may be from an older version of the ino file so I was working on making my modification on the latest sketch but so far I could find the new ino sketch on the repository (only the compiled to v2.8.2). Do you know where I could find 2.8.2 ino source file?
Changing the SD card was a way of seeing if the issue would come from the software or the firmware modification (or other the hardware possibly).
It’s not an absolute certainty that you have damaged the hardware, but it does seem possible. If you’ve got access to an oscilloscope, it would be worth checking the power supply rails (especially the 3.3 V to the Atmel 328P processor, because it appears that the normal route for noise to get into the measurements (which is what you’re seeing) is via the power rail, which is also the ADC reference voltage.
The Atmel 328P is a multi-lead SMT package and I wouldn’t want to try to replace that without the correct rework workstation kit. So if it’s not one of the regulators, which are easier to replace, I think it would be worth enquiring at the shop to see if they will sell you just the front end PCB for your emonPi.
In that post, Glyn says: Apologies for confusion, the shop title “assembled PCB only” should have made clear that you were purchasing just the emonPi PCB. However the emonPi will work fine without the LCD,…