Anelok: power-only fixture (1/3)
Anelok: boost converter (2/3)
Anelok: the power-assisted fixture (3/3)


From: Werner Almesberger Subject: Anelok: power-only fixture (1/3) Date: Mon, 10 Apr 2017 00:16:03 -0300
I'm having fun with fixtures these days. This one is a variant of the
programming fixture I've shown last week:


It only has pins for battery and USB power. By omitting all the
other contacts, most of the "floor" of the fixture can be left
open, giving access to the circuit there:


I used this to measure the performance of the boost converter. The
power supply circuit has changed considerably since the CR2032 days,
in part because we now have to operate with a much lower battery
voltage (and thus higher current), and also to avoid power drops
when handing over between USB and battery [1].

The results of the first round of testing will be in my next post.

The above picture also shows a new addition to the fixture: so far it
consisted of the frame that holds the PCB and that contains the holes
for the pogo pins, and a stand that goes below it, providing
clearance from the table and holding the connector.

There is now a third element: a clamp that snaps onto the frame and
presses down on the circuit:


It's admittedly not the prettiest piece of engineering but it does
the job so far. And if it breaks, it's easy to print a new one :-)

The design of the power-only fixture is here:
https://gitlab.com/anelok/mexp/blob/master/quick/quick-pwr.slvs


It also has its own design for the base, which adjusts size and
placement of the opening for the connector:
https://gitlab.com/anelok/mexp/blob/master/quick/quick-pwr-base.slvs


And this is the design for the clamp:
https://gitlab.com/anelok/mexp/blob/master/quick/quick-clamp.slvs


- Werner

[1] Section "The USB plug - a hidden killer" in
    
http://lists.en.qi-hardware.com/pipermail/discussion/2015-April/010843.html



From: Werner Almesberger Subject: Anelok: boost converter (2/3) Date: Mon, 10 Apr 2017 11:51:10 -0300
For measuring the performance of the boost converter, I set up a lab
power supply as "battery" and connected some instruments to it. The
parameters are:

- Vsrc: nominal voltage set at the power supply
- Vbat: actual voltage measured on the PCB (*)
- Ibat: measured battery current
- 3V3: voltage measured on the 3V3 rail (*)
- EN: voltage measured on the enable signal of the boost converter.
  This is generated by a power-on-reset chip that is also new, and
  that should solve the problem with handovers between battery and
  USB. (*)
- FB: measured feedback voltage. This is the output voltage of the
  boost converter, divided such that the result is exactly 0.5 V
  when the output voltage is at the desired level. (*)
- FBnom: nominal feedback voltage given the measured 3V3 voltage,
  using nominal values for the voltage divider. I.e., this tells us
  what we should see when measuring FB.

(*) Measured with an UT60G. My much more accurate Fluke 8845A was
    used to measure the current.

The first round of measurements was with the board #2, which has no
RF chip yet:

Vsrc	Vbat	Ibat	3V3	EN	FB	FBnom
(V)	(V)	(mA)	(V)	(V)	(V)	(V)
-------	-------	-------	-------	-------	-------	-------
1.550	1.51	22.04	3.23	1.40	0.64	0.50
1.500	1.46	22.92	3.24	1.34	0.61	0.50
1.400	1.34	25.00	3.23	1.24	-	0.50
1.300	1.24	27.47	3.23	1.14	-	0.50	
1.200	1.13	30.82	3.23	1.04	-	0.50
1.100	1.00	37.9	3.26	0.92	-	0.50
1.000	0.89	40.8	3.26	0.93 ?	-	0.50	system unstable

Since the MCUs are not yet programmed, they just run in reset loops.
This way, they consume a few mA, which is enough for this first round
of tests.

With the components used in this prototype, the "3V3" voltage should
be 3.233 V. We can see that the regulator does its job well, and the
system becomes unstable only when the real battery voltage reaches
0.9 V.

The regulator is specified for a minimum battery voltage of 0.9 V, so
I would have expected a little bit of margin. However, given that the
power supply is not a real battery and connected through about 1 m of
cables, there may very well be regulation problems that would not
occur with a real battery. So, no worry there this far.


But what is going on with FB ? We should see exactly 0.5 V there, not
something 28% higher. More confusingly, the 3V3 voltage is exactly
what we should get if FB is indeed 0.5 V. So what's going on ?

The answer is simple: if your circuit works but your measurements
don't make sense, suspect the measurements. When looking at FB with
an oscilloscope, I saw a fair amount of noise. It turns out that the
UT60G seems to favour the peaks of that noise, thus always reading
too high.


I then proceeded with board #1. I first got completely nonsensical
results, like this:

Vsrc	Vbat	Ibat	3V3	EN	FB	FBnom
(V)	(V)	(mA)	(V)	(V)	(V)	(V)
-------	-------	-------	-------	-------	-------	-------
1.550	1.52	15.92	1.64	1.33	0.52	0.25	voltage unstable

... but that was caused by the resistors in the voltage divider for
FB having incorrect values. I guess I must have picked the wrong
vials.

After fixing this, plus a number of small soldering issues, I got:

Vsrc	Vbat	Ibat	3V3	EN	FB	FBnom
(V)	(V)	(mA)	(V)	(V)	(V)	(V)
-------	-------	-------	-------	-------	-------	-------
1.50	1.45	21.39	3.10	1.38	0.53	0.48
1.40	1.34	23.4	3.12	1.29	0.53	0.48
1.30	1.24	25.9	3,13	1.20	0.53	0.48
1.20	1.12	29.1	3.14	1.10	0.53	0.49
1.10	1.00	34.4	3.16	1.00	0.53	0.49
1.00	0.89	39.5	3.19	0.91 ?	-	0.49	system unstable

This is a lot more reasonable. 3V3 is a bit on the low side, but
it's still well within the tolerance of the resistors I used. The now
a bit more correct-looking FB voltage also suggests that this board
has less noise.

The voltage at EN has to be at least 80% of the battery voltage in
order to turn on the boost converter. This is always the case, with
plenty of margin.


These are good results so far. The boost converter works as expected,
at least at moderate loads. The noise needs more looking into, since
it wouldn't be so great to have 3V3 bounce around by +/- 10%.

Coming next: yet another fixture variant.

- Werner


From: Werner Almesberger Subject: Anelok: the power-assisted fixture (3/3) Date: Mon, 10 Apr 2017 12:53:44 -0300
The regular programming fixture looks like this when all the signals
shown in 
http://downloads.qi-hardware.com/people/werner/anelok/tmp/mk3-quick/quick.pdf

are connected:


The two unpopulated holes are for supplying battery and USB power,
which are intended for production testing (or for the power-only
fixture) but are not used with the Ben as programmer.


In this configuration, 3V3 is provided by the memory card interface
of the Ben. This interface has a little flaw: there is a FET to
switch power to the memory card and there is a 10 uF buffer
capacitor. [1] Unfortunately, this capacitor is on the "outside", so
when supplying power to the memory card, the Ben has to charge the
capacitor, plus any capacitance on the card.

This causes a drop of the internal 3.3 V rail of the Ben, which has
only a bit more than 10 uF of buffer capacitors of its own. When
using this to supply the 3V3 rail of Anelok, which has a total of at
least 30.4 uF [2], the resulting massive voltage drop immediately
hangs the Ben.


This could probably be solved by not powering the internal 3.3 V rail
of Anelok directly, but feeding power to one of the regulators,
either USB (1.1 uF input capacitance) or battery (10 uF), instead.

However, in the case of USB, the resulting 3V3 rail would then be at
only about 3.0 V, which is okay for the MCUs, but borderline for the
OLED panel. And in the case of battery power, this would require the
whole circuit to be present and operational, which is something we
can't take for granted during development and testing.


Fortunately, there is another option: instead of taking power from
the Ben, we can use a lab power supply instead. This requires a
variant of the regular programming fixture, using the same plastic
parts, but wired like this:


For good measure I added a 22 uF capacitor on the power connector.

And this is what it all looks like in operation, complete with clamp
so that I don't have to push the PCB into the fixture and have my
hands free for typing:



With all this in place, I was finally able to reach the third MCU, of
the BTLE radio:

  root@BenNanoNote:~# ./nrf
  Cortex M0
  AP #1 ID 0x00000000 (???)
  AP #0 ID 0x04770021 (AHB-AP)
  HWID 0x0084 (QFAC)
  Flash 1024 bytes * 256 pages = 262144 bytes
  RAM 8192 bytes * 4 blocks = 32768 bytes
  UID 5b85d400-5bba8e43
  MAC 36:e4:e5:9d:97:f1 (random)

This is the last major component I had to verify. There are still a
few things missing, but the remaining bits are either known to work
(e.g., the OLED), or can be bypassed if they don't (e.g., the load
switch for display and card, which is hard to solder under the best
of circumstances, and I made it even harder by placing it too close
to the card header.)

- Werner

[1] Page 5 of 
http://en.qi-hardware.com/w/images/9/9c/Lb60_schematic.pdf

[2] 
http://downloads.qi-hardware.com/people/werner/anelok/tmp/power-tree-20170405.pdf