-1

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?

Yifan
  • 121
  • 1
  • 6
  • 2
    Sure will it be good enough. Your spec is not given, so I assumed +- 100 A to be fine. – Arsenal Oct 31 '18 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. – Yifan Oct 31 '18 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. – Spehro Pefhany Oct 31 '18 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? – Yifan Oct 31 '18 at 17:06
  • We don't know what you are planning to do with your "side channel analysis". You have to figure that out, then come back with the detailed specifications. – Elliot Alderson Oct 31 '18 at 17:16
  • This is going to sound like an ad, but if you're serious about this topic, I strongly recommend that you check out the wiki and the forum at https://newae.com/ and their line of "Chip Whisperer" products. Colin O'Flynn is a columnist for Circuit Cellar, and he has written extensively on the hardware and techniques used in this kind of analysis. After you've done that, then maybe you can come back here with more specific questions. – Dave Tweed Oct 31 '18 at 17:44
  • It sounds like you want to monitor power consumption of some digital device that has a wide range of operating modes, from active powered, to deep sleep. Is this correct? – Ale..chenski Oct 31 '18 at 18:00
  • Measuring ANYTHING to six significant figures is extremely difficult. – user57037 Oct 31 '18 at 18:01
  • @mkeith, OP clarifies that the task is to measure up to 1A with 1 uA "precision" (resolution I guess). This is 1:1,000,000 dynamic range, or a 20-bit ADC. I suspect the actual requirement is likely different, wide dynamic range with modest resolution. And timing (AC characteristics) needs to be specified. That's why I am asking OP for additional clarifications. – Ale..chenski Oct 31 '18 at 18:22
  • 1
    @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. – Yifan Oct 31 '18 at 18:29
  • @DaveTweed I have a chipwhisperer. Ultimately, I want to plug my device into the cw. I've emailed Colin O'Flynn a while back and posted in his forums but not no response :( – Yifan Oct 31 '18 at 18:31
  • @Ale..chenski, yes, 1uA with 1A full-scale is six significant digits. I am suggesting that doing this will be very difficult. Maybe a 20-bit ADC can do its part of the job, but only if the voltage is full-scale for the ADC. The shunt voltage will likely have to be amplified. So the shunt resistance must be steady to 1ppm, the amp gain must be steady to 1ppm or less, etc. Meanwhile offsets need to be dealt with, etc. – user57037 Oct 31 '18 at 21:15
  • @Yifan, if you are okay with oscilloscope resolution (7-8 bits), you don't need to measure 1A to the last 1 uV, all you need is a sort of auto-ranging ammeter. – Ale..chenski Oct 31 '18 at 23:32
  • Also, what kid of analysis is your "side channel analysis"? Also, power rails do not operate at 30-100MHz, proper bypass caps don't allow this...bandwidth of 100 MHz is absolutely unrealistic and unnecessary. – Ale..chenski Oct 31 '18 at 23:45
  • Assuming this is your application, it can be done with a cheap oscilloscope and a 10 Ohm resistor: https://jochen-hoenicke.de/crypto/trezor-power-analysis/ – MIL-SPEC Nov 01 '18 at 08:02
  • @Ale..chenski sorry, I mean't 30-100MHz as the device clock speed, so I don't expect resolution beyond that. – Yifan Nov 01 '18 at 15:39
  • @MIL-SPEC I'm afraid 10R doesn't work for me (I've tried, device won't power on). – Yifan Nov 01 '18 at 15:40
  • Okay, then this is all about sniffing and spying on "secure transactions" of bitcoins to retrieve a secure PIN from devices like TREZOR. That's why you want 1-uA 100MHz (cycle time) resolution on 100 mA supply of an encryption device. Shouldn't this kind of activity to be prohibited here? – Ale..chenski Nov 01 '18 at 16:37
  • This has nothing to do with TREZOR/bitcoins. I wasn't the one who brought it up. I am doing side channel analysis (DPA attack) on AES. – Yifan Nov 01 '18 at 16:59
  • So how close to full scale can you get with the built-in VGA? – W5VO Nov 01 '18 at 18:22
  • That's a good question and what I want to test this weekend. – Yifan Nov 01 '18 at 18:39

1 Answers1

1

Current sense resistors typically have very low resistance values such as 0.01 Ohms. Simply measure the voltage drop across the resistor to derive the current.

Here are some SMD current sense resistors: https://www.mouser.co.uk/Passive-Components/Resistors/Current-Sense-Resistors/_/N-7fjcf

MIL-SPEC
  • 1,088
  • 6
  • 18
  • 1
    No. If it were that simple the question would not have been asked. Such a low resistance value is unsuited to making high precision measurements of low currents. – Chris Stratton Oct 31 '18 at 18:57
  • Current sense resistors span several orders of magnitude depending on the current range needed. – user57037 Nov 01 '18 at 00:37
  • @ChrisStratton Plenty of simple questions get asked on EE... – MIL-SPEC Nov 01 '18 at 07:57
  • @MIL-SPEC I appreciate your answer but I mentioned in the second paragraph of my question that I know about shunt resistors and have tried it but was mainly concerned with the lack of resolution on my scope if I used it. Could you address that? – Yifan Nov 01 '18 at 15:43
  • Yes it looks like you will exceed the capabilities of your equipment. It would be wise to invest better kit - the payoff will be worth it, no? Also, are you aware that the vulnerability of the TREZOR was patched? – MIL-SPEC Nov 01 '18 at 15:50
  • Of course, I'll invest in better equipment if that's the only option. I haven't exhausted my options yet though. I'm not too concerned with the TREZOR. They're doing software AES which is much easier to analyze as well as fix. I'm looking at a hardware AES engine. – Yifan Nov 01 '18 at 15:55