# Current sensing for side channel analysis

I'm trying to design a power supply with a built in current sensor for a digital system. The purpose is for side channel analysis. In current sensing, I would like to detect both the AC and DC current. My understanding is that my choices are hall effect, fluxgate, and shunt resistors.

My main concern with hall effect sensors is the accuracy. Would it be good enough? Fluxgates seem to be too complicated for my use-case. A shunt resistor + voltage measurement seems to be my best bet however, how do I ensure that the supply going to the device being measured is still stable while connecting a shunt resistor? If I use an extremely small resistance with an amplifier, would that affect the accuracy? These are just some thoughts I had, I am open to any better solution.

EDIT: To address some of the comments below. Part of my question is that I do not know the exact specification for what I want (otherwise I can just go ahead and design it). My question is more general than "how do I current sense." I want to know the range of solutions I should be looking at if current sensing for the purpose of side channel analysis of a VLSI device. For example, a current transformer is obviously not going to work. Anything with large error at 0-1A current is also not optimal.

Most of the resources I can find on current sensing are either for motors (which assumes high voltage/current) or for battery fuel gauging (which assumes low resolution). It seems like my best bet is a shunt resistor + amplifier but I want feedback from people with more knowledge and experience than me.

EDIT 2: Assuming I go down the shunt resistor path, I don't know if any on the market solution will do what I want. I measured that my device consumes about 50mA and I estimate it might get up to 10x that during standard usage. Vdd is 1.1V and it can work down to about 0.9V before there's issues. That means my shunt resistor has to be < 0.5ohms. Ideally I want 0.1mA resolution so at 0.5R, it's 50uV. My ADC (on the chipwhisperer) has input 1Vpp and output 10-bit resolution so ~1mV resolution. Now the chipwhisperer also has a LNA with < 55.5dB gain so maybe this is good enough. Anything wrong with my reasoning?

• Sure will it be good enough. Your spec is not given, so I assumed +- 100 A to be fine. Oct 31, 2018 at 16:35
• It's a purely digital system and I'm measuring the dynamic power consumption of CMOS so it's 0-1A with a precision of ~1uA. Oct 31, 2018 at 16:55
• You need a bit better spec than that. I presume you want relatively high bandwidth for your cracking activities, but perhaps low frequency noise is not much of a problem. No way is a shunt resistor going to be stable at ppm levels for very long. Oct 31, 2018 at 17:01
• Yeah good point. That's why I asked this question is because I'm not exactly sure what I need... only what I want and what I know. Any suggestions? Oct 31, 2018 at 17:06
• @Ale..chenski yes, it's a 45nm device operating at 1.1V Vdd. I don't have exact specifications for the device which is why I can only give estimates on my required resolution but I may be being overly conservative. I don't need an ADC either, I can attach the output to my scope. The device typically runs at ~3-30MHz so probably need bandwidth of 100MHz. Oct 31, 2018 at 18:29