Learn · Solar Tracker, Build it · First power-on and the resistor test
11.3 The resistor test
Prove that the charger stops charging below 0 °C and above 50 °C, with two fixed resistors in place of its thermistor (R4)
14 min · You need: A multimeter with a 10 A socket, A 47 kΩ and a 2.7 kΩ resistor, Two crocodile-clip leads, A certified USB-C phone charger and its cable
Step 1 of 12 Two layers, both proved
A lithium-ion cell must never charge below 0 °C, and charging it hot wears it fast. So the tracker has two independent layers (R4):
- The charger's own thermistor stops charging below 0 °C and above 50 °C. It's built into the charger chip, so it works even if the firmware crashes.
- The XIAO's thermistor stops it below 2.0 °C or above 45.0 °C, through the charger's CE pin.
You can't make the bench −10 °C, so you fool the charger instead: a fixed resistor in place of its thermistor reads as a fixed temperature.
Danger: Until both layers have passed, the tracker stays indoors, and charges only while you're with it.
Step 2 of 12 Why these two resistors
A thermistor like these, 10 kΩ at 25 °C with a B value of 3435, has more resistance as it gets colder:
| Resistance | Reads as | What should happen |
|---|---|---|
| 47 kΩ | about −10 °C | Charging stops |
| 28.7 kΩ | 0 °C | The charger's lower limit |
| 26.2 kΩ | 2 °C | The firmware's lower limit |
| 10 kΩ | 25 °C | Charging |
| 4.85 kΩ | 45 °C | The firmware's upper limit |
| 4.1 kΩ | 50 °C | The charger's upper limit |
| 2.7 kΩ | about 63 °C | Charging stops |
Both test values sit well outside the limits, so a resistor a few percent off its value still gives a clear answer.
Step 3 of 12 What you'll see
The plan for this lesson: the meter goes in the cell's lead, so it shows the current into the cell. Then, one at a time, a fixed resistor takes the thermistor's place on THERM. Step through what the charger reads each time, and what the meter shows.
Step 4 of 12 Put the meter in the cell's lead
To see charging stop, measure the current into the cell: the meter goes in series with it.
- Switch off, and take the cell out.
- Unsolder the holder's red lead from the protection board's B+. Lesson 10.2 left it a little long for this.
- Red meter lead in the 10 A socket, black in COM, dial on DC amps.
- Clip the red probe to B+, and the black to the holder's red lead.
- Put the cell back in, and tape the thermistors on.
The charger can charge at 1 A or more: too much for many meters' mA socket. The 10 A socket takes it.
Tools
- Multimeter, two crocodile-clip leads
Check before Worked
Step 5 of 12 A meter on amps is a short
On its amps socket, the meter is almost a plain wire. That's what you want in the cell's lead.
But touch its probes across the cell, or across any + and GND, and you short the cell through it. The wires can get hot in a second, and the cell can be damaged.
So while the red lead is in the 10 A socket:
- the probes stay clipped in the cell's lead, nowhere else;
- to measure volts, take the cell out first, then move the red lead back to V.
Danger: Never move a probe that's on the amps socket to another point while the cell is in.
Step 6 of 12 Charging, with the thermistor
Plug the certified phone charger into the wall, then its cable into the charger board's USB-C. Stay with it while it's plugged in, on a surface that can't burn.
The charger's PGOOD light comes on, then its CHG light. The meter shows the current flowing into the cell.
Below 0.05 A: if your cell read above 4.1 V in lesson 11.2, it's nearly full and takes little. Unplug the USB-C, switch on, and let the electronics run from the cell for several hours, then try again. A minus sign: the meter's probes are swapped.
Above 1.5 A is more than this board can charge at. Check the dial is on amps, not on a mA range.
It charges. Write the current down: it's what "charging" looks like on your meter.
Step 7 of 12 47 kΩ: as if it were −10 °C
- Unplug the USB-C from the charger board, and take the cell out.
- Unsolder thermistor 1's lead from the THERM pad, and tape its end.
- Clip the 47 kΩ resistor between THERM and GND.
- Put the cell back, plug the USB-C back in, and wait ten seconds.
Charging must stop: the meter should read 0.00 A. The CHG light may stay lit: in a temperature pause, the charger's CHG pin can still read "charging". Trust the meter, not the light.
A minus sign beyond 0.01 A means current is flowing out of the cell. Check the switch is off.
Charging hasn't stopped: this tracker doesn't go outside. Check the THERM jumper is cut, that the resistor joins THERM to GND, and that it's 47 kΩ. Then test again.
The charger stopped for "−10 °C". Unplug the USB-C.
Step 8 of 12 2.7 kΩ: as if it were 63 °C
With the USB-C unplugged, swap the 47 kΩ for the 2.7 kΩ, still between THERM and GND. Plug the USB-C back in, and wait ten seconds.
Charging must stop again: the meter should read 0.00 A.
A minus sign beyond 0.01 A means current is flowing out of the cell. Check the switch is off.
Charging hasn't stopped: this tracker doesn't go outside. Check the resistor is 2.7 kΩ, red, violet, red, and that it joins THERM to GND.
The charger stopped for "63 °C". Its layer works.
Step 9 of 12 Put everything back
- Unplug the USB-C, take the cell out, and take the 2.7 kΩ off.
- Solder thermistor 1 back onto THERM.
- Put the cell back, and plug the USB-C in: charging comes back, close to your first reading.
- Unplug the USB-C, and take the cell out.
- Unclip the meter, solder the holder's red lead back onto B+, in heat-shrink, and put the cell back.
Check before Worked
Step 10 of 12 The firmware's layer
The XIAO has a thermistor of its own, taped to the cell beside the charger's. It forms a voltage divider with a 47 kΩ resistor from 3.3 V, read on D2.
On each wake, the firmware turns that voltage into a temperature. Below 2.0 °C or above 45.0 °C it sets D6 high, which pulls the charger's CE pin high and stops charging. It allows charging again only 1.0 °C inside the limits: that's hysteresis.
This layer stops charging a little sooner than the charger's, and it tells you why, with a status code. It needs the firmware, so lesson 13.5 proves it with the same two resistors.
Step 11 of 12 The XIAO's thermistor divider
Cell in, switch on. Red lead in V, dial on DC volts. Measure from the XIAO's D2 pin to GND.
At 25 °C the thermistor is 10 kΩ, so D2 reads 3.3 × 10 ÷ (10 + 47), about 0.58 V. Colder rooms read a little more, warmer ones a little less.
Near 0 V: D2 or the thermistor is shorted to GND. The firmware would read no temperature, and never charge.
Near 3.3 V: the thermistor isn't connected, so the firmware would read no temperature, and never charge. Between 0.9 and 3 V: is the room below 12 °C? Check the top resistor is 47 kΩ, not 4.7 kΩ.
The firmware will have a temperature to work with. That's test point 7. Switch off.
Step 12 of 12 Check you've got it
In short
- A colder thermistor has more resistance. 47 kΩ in its place reads as about −10 °C, 2.7 kΩ as about 63 °C (10 kΩ, B 3435): charging must stop for both.
- Watch the current into the cell, with the meter in the cell's lead. The CHG light isn't proof: in a temperature pause it can stay lit.
- The firmware's own layer, at 2.0 and 45.0 °C, is proved the same way in lesson 13.5. The tracker goes outside only after both pass.