I was thinking I could add a detail that if you remove the 6CT expander header pin for CT12 it would be possible to use 11 CT sensors and the analog input.
Hi @rupert - thanks for raising this too. Iāll update the TVS symbol, it was copied from the original and the one Iām using is bidirectional (Toshiba DF2B7AE,H3F) - Iām in the middle of updating all the manufacturers, part numbers, and distributor codes right now but wanted to push the change for the analog input quickly.
Itās placed there to protect the AC coupling cap, which is only rated to 10 V. Full disclosure, Iām not an expert in ESD protection and Iām going by rules of thumb and datasheet recommendations so please feel free to correct/suggest anything in this area.
TVS diodes on the other inputs would be a good move too but will need to be careful with the clamp voltage as they are direct inputs.
@Robert.Wall - itās a small overhead to do the zero crossing detection in software. Unfortunately the built in comparator is on the same pins as the ADC so I have to use an external one for the emonPi3 (it would be feasible with fewer CT inputs). Iāll do a comparison of the two methods - the space where the comparator is could be used for a time base better than the internal RC oscillator (0.15% as discussed) if that was a more productive use of board space and pins?
Hi @awjlogan - thanks for the reply. I will admit that Iām not an expert in ESD protection either. The use of a unidirectional TVS at the input did look a bit odd but the fact that itās bidirectional to protect the AC coupling cap explains a lot.
One point that perhaps needs to be considered is whether the OEM test house does ESD testing during certification? And if so what method is used?
Depending on the level of detail, I think ESD design can be quite complicated!
On another note, itās interesting that you mention the the CPU clock. I did notice that the emonPi3 CPU didnāt have a crystal, whereas previous models (e.g. emonTx4) used a crystal. However I donāt know the timing requirements needed for emonTx power measurements!
Thanks to all involved for the work being done on the eemonPi3.
The standard is IEC 61000-4-2, which defines a number of levels of increasing energy and power. Definitely one to get in touch with the certification house before the final production run!
timing requirements
For the basic energy monitoring system, it doesnāt have to be anything special. The assumption is that the mains frequency is consistent enough (obligated to be Ā±1% in the UK) to use - the firmware converts the report interval in seconds into a number of mains cycles and uses that to determine when to send a report. However, Rob and I have been discussing some more advanced (future) features where a more precise local time source would be useful. The ATSAMD has a better onboard oscillator than the AVR, but still no where near as good as a dedicated oscillator.
thanks to all
Youāre very welcome, and thank you your constructive feedback
I did a little internet trawl on ESD earlier, and found the following, which may be useful:
I was wondering what was the surge voltage* rating of the 6.3 WV / 10u input capacitors. The ones used in the emonTx4 are yageo CC0603KRX5R5BB106, and according to their data sheet
although they donāt have a surge voltage* spec, it seem that they are tested at 2.5 x Ur which I presume means 2.5 x 6.3 = 15.75V (bottom of page 17).
not sure if this is the correct term - it was used on big electrolytic can style capacitors!
Looking at the ATSAMD21J17A-M data sheet, Section 37.10 Injection Current gives the spec limits for the maximum current injection into / out of an I/O pin by voltages above Vdd or below GND, at both Vdd: 3V < Vdd ā¤ 3.6V and Vdd: Vddā¤3V.
Hi @rupert - Iāve added ESD protection to all the inputs and around the buttons. As the TVS diodes will breakdown at ~5V, we need to limit the current into the pins (1K1 is the calculated value, but 1K is fine and easier for BoM purposes); this is R7, R46, and R48 for the pulse and analog inputs. The buttons already have the series resistance in line. You can get the update on commit 763795a. Iāve also added you to the acknowledgements, thanks for your input on this.
@awjlogan
Thanks for the update, and thanks again for all the work everybody is putting in.
Itās all looking good! Good luck with powering it up when it arrives!