Hi,
Thank you for your replies. I made the amendments to the sketch but unfortunately this does not work still. I think my first issue is the calibration issues and probably caused by the hardware -CT burden resistor.
The CT burden resistor on the Emontx sheild is 33ohms. I think like you said I need to replace this with a 120ohm resistor so it uses a larger range on the ADC.
I will change this resistor and re-run the sketch. Just so I calibrate these system correctly. If I leave the default vales in for now. Could you explain what these values should read when running Tally mode please? See below is the results of running Tally mode for 10secs. Min load is 0W and Max load set to 200W. Whilst running this sketch I used a 150W load.
20:02:15.458 → -------------------------------------
20:02:15.504 → Sketch ID: Mk2i_PV_Router_rev4.ino
20:02:15.551 → ADC mode: 125uS fixed timer
20:02:15.598 → Output mode: normal
20:02:15.598 → Auto-select?: yes
20:02:15.644 → Extra Features: TALLYMODE
20:02:15.644 → powerCal = 0.0610
20:02:15.690 → phaseCal = 1.00
20:02:15.690 → >>free RAM = 681
20:02:15.736 → capacityOfEnergyBucket_long = 2950819
20:02:15.782 → lowerEnergyThreshold_long = 1475409
20:02:15.829 → upperEnergyThreshold_long = 1475409
20:02:15.875 → minCycleCountsBetweenActivations = 0
20:02:15.921 → >>free RAM = 671
20:02:15.921 → ----
20:02:15.921 →
20:02:15.921 → Tallymode setup:
20:02:15.968 → Time to run (secs)? 10
20:02:19.009 → Min value (Watts)? 0
20:02:21.400 → Max value (Watts)? 200
20:02:26.492 → Recording will start in 3 seconds …
20:02:39.550 → Results for this run:
20:02:39.550 → 0, ← min value of tally range (W)
20:02:39.596 → 200, ← max value of tally range (W)
20:02:39.643 → 2.00, ← step value between tallies (W)
20:02:39.691 → 100, ← No. of tallies
20:02:39.691 → 10, ← duration (secs)
20:02:39.738 → 500, ← no of values tallied
20:02:39.786 → 80, ← loops per mains cycle (av)
20:02:39.786 → ***
20:02:39.786 → >200W, 0
20:02:39.834 → 199W, 0
20:02:39.834 → 197W, 0
20:02:39.834 → 195W, 0
20:02:39.834 → 193W, 0
20:02:39.834 → 191W, 0
20:02:39.881 → 189W, 0
20:02:39.881 → 187W, 0
20:02:39.881 → 185W, 0
20:02:39.881 → 183W, 0
20:02:39.881 → 181W, 0
20:02:39.928 → 179W, 0
20:02:39.928 → 177W, 0
20:02:39.928 → 175W, 0
20:02:39.928 → 173W, 0
20:02:39.928 → 171W, 0
20:02:39.982 → 169W, 0
20:02:39.982 → 167W, 0
20:02:39.982 → 165W, 0
20:02:39.982 → 163W, 0
20:02:39.982 → 161W, 0
20:02:39.982 → 159W, 0
20:02:40.039 → 157W, 0
20:02:40.039 → 155W, 0
20:02:40.039 → 153W, 0
20:02:40.039 → 151W, 0
20:02:40.039 → 149W, 0
20:02:40.039 → 147W, 0
20:02:40.100 → 145W, 0
20:02:40.100 → 143W, 0
20:02:40.100 → 141W, 0
20:02:40.100 → 139W, 0
20:02:40.100 → 137W, 0
20:02:40.100 → 135W, 0
20:02:40.154 → 133W, 0
20:02:40.154 → 131W, 0
20:02:40.154 → 129W, 0
20:02:40.154 → 127W, 0
20:02:40.154 → 125W, 0
20:02:40.154 → 123W, 0
20:02:40.194 → 121W, 0
20:02:40.194 → 119W, 0
20:02:40.194 → 117W, 0
20:02:40.194 → 115W, 0
20:02:40.265 → 113W, 0
20:02:40.265 → 111W, 0
20:02:40.265 → 109W, 0
20:02:40.265 → 107W, 0
20:02:40.265 → 105W, 0
20:02:40.265 → 103W, 0
20:02:40.265 → 101W, 0
20:02:40.265 → 99W, 0
20:02:40.311 → 97W, 0
20:02:40.311 → 95W, 0
20:02:40.311 → 93W, 0
20:02:40.311 → 91W, 0
20:02:40.311 → 89W, 0
20:02:40.384 → 87W, 0
20:02:40.384 → 85W, 0
20:02:40.384 → 83W, 0
20:02:40.384 → 81W, 0
20:02:40.384 → 79W, 0
20:02:40.384 → 77W, 0
20:02:40.384 → 75W, 0
20:02:40.384 → 73W, 0
20:02:40.384 → 71W, 0
20:02:40.424 → 69W, 0
20:02:40.424 → 67W, 0
20:02:40.424 → 65W, 0
20:02:40.424 → 63W, 0
20:02:40.424 → 61W, 0
20:02:40.491 → 59W, 0
20:02:40.491 → 57W, 0
20:02:40.491 → 55W, 0
20:02:40.491 → 53W, 0
20:02:40.491 → 51W, 0
20:02:40.491 → 49W, 0
20:02:40.491 → 47W, 0
20:02:40.491 → 45W, 0
20:02:40.528 → 43W, 0
20:02:40.528 → 41W, 0
20:02:40.528 → 39W, 0
20:02:40.528 → 37W, 0
20:02:40.602 → 35W, 0
20:02:40.602 → 33W, 0
20:02:40.602 → 31W, 0
20:02:40.602 → 29W, 0
20:02:40.602 → 27W, 0
20:02:40.602 → 25W, 498
20:02:40.602 → 23W, 2
20:02:40.602 → 21W, 0
20:02:40.602 → 19W, 0
20:02:40.643 → 17W, 0
20:02:40.643 → 15W, 0
20:02:40.643 → 13W, 0
20:02:40.643 → 11W, 0
20:02:40.643 → 9W, 0
20:02:40.712 → 7W, 0
20:02:40.712 → 5W, 0
20:02:40.712 → 3W, 0
20:02:40.712 → 1W, 0
20:02:40.712 → <0W, 0
Does this mean my sketch reads this as a 25W load and the ADC value is 498?
Thanks for your help
Cheers
Gareth