Module v4.2 swapping R19 and R20

@stuart Hey Stuart, I am busy doing the R19R21 swap, I just wanted to know if there are points on the PCB I can use to test the resistor and thermistors are correctly soldered and have proper contact ?

Hi @rolfbartels

After swapping the two components, you can test the resistance between pin 5 on the sensor port (ground) and pin 3 on the ISP header.

This should give you a resistance around 47k ohms.

Then check pin 3 on ISP header to pin 2 on the sensor port - this should be about 47k when the temperature is 25 degrees C.

Awesome thanks Stuart

@stuart I am having issues here,

So I am trying to test, and I am not getting the results as indicated by you,
So pin 1 sensor to pin 3 ISP I am getting 82k and if I test working modules that JLCPCB built with the components the correct way around I get the same 82K. Also if I test directly on R20 the resistor I get 35K.

Pin 2 Sensor to Pin 3 ISP I am getting 35K but the temp is around 20deg and so that expected as I tested directly on the thermistor to confirm the results and tested a JLCPCB build module with R19 and R20 in their correct positions.

ISP is marked 1, then the pin to the right is 2 and the pin under 1 is 3. the only time I get 47K is if I use ISP 6

I would also like to confirm, even if I swap R19 and R20 I still need to use attiny841_V420_SWAPR19R20 code correct ?

You ONLY use this version of the code if you HAVE SWAPPED R19 and R20, for unaltered V4.20 boards, use the V420 version.

@rolfbartels if you are not getting any dead shorts, I would flash the code and ensure the web interface shows the correct temperature (or near to it). Put your finger on top of the thermistor and the temperature should go up.

Thanks, Stuart, so I gathered I had to use that code as I was getting neg temp values with std 4.20.

Appreciate the response

You will, by swapping those two parts the module changes from reading against negative (ground) to reading against + battery voltage, hence the swap in sign.

@stuart Hi Stuart, I have found another issue, so I have swapped R19 and R20 and programmed them with SWAPR19R20 code.
All seems to work perfectly except I am getting high module temps 45 deg where its actually like 30 deg. So when in bypass the module barely burn off power as they reach 65deg way sooner. If I set the Internal temperature BCoef to 9999 (max) thern my temp is only 3 deg higher than actual and while bypassing the temps get to 65deg and stop and start again at 55 deg, and I have confirmed this with my thermal camera

In the attached picture I have a v4.21 module in 0/0 and then v4.2 modules in 0/1-0/5.
Am I suppose to calibrate the temps somewhere ?

Why do you have minus 13 on module 0?

What thermistors are you using the standard ones?

The -13 I fixed it was a bad solder by JLCPCB on R21
The ones where I am getting 45deg instead of like 25-30deg are the r19r20 I swapped, and all my modules are reporting the same higher temps,
I am using the thermistor as per the original BOM which is this one taken from my JLCPCB order history
https://lcsc.com/product-detail/NTC-Thermistors_Murata-Electronics-NCP18WB473J03RB_C86142.html

Just for good measure, I took a thermistor from a v4.21 board which shows the correct temp and installed it onto a v4.2 board and get the same higher temps, seems to be a problem with the code on the v4.2 modules or the R19R20 has caused other issue, which I really hope not as I have 50 of these modules

Hey @Stuart, have you had a chance to look into or test this ?

Hi @rolfbartels

The setting on the modules page for “Internal temperature BCoef” should remain at 4150 - this is the temperature curve of the thermistor.

On my test board, if I measure RESISTANCE with the module DISCONNECTED…

  • between pin 5 on the sensor (ground) and pin 3 (SCK) on the ISP header I get approx. 68kohms
  • between pin 2 on the sensor (reference) and pin 3 (SCK) on the ISP header I get 39kohm (its about 20 degrees in the room).

If you take the second resistance measurement and also put your finger on top of the thermistor (now labelled R20) the reistance should DROP.

Do you get similar readings? The second resistance will vary depending on the room temperature (at 25 degrees C is should be 47k)

I’m not expecting the values on screen to be perfect after this change, but they should be better than you are seeing. The actual value of the temperature isn’t important, its ensuring that we can measure a high temperature and then limit the balance to keep it at a setpoint.

Hi @stuart

Here are tests I have done now I have tested 2 cell modules v4.2 ( produced by JLCPCB where I swapped R19R20 and added ATTINY ) and v4.21 produced by JLCPCB and I only added the ATTINY

  • between ping 5 on sensor (GND) and pin 3 (SCK) on the IPS header I get 80kohms on both
  • between pin 2 on the sensor (reference) and pin 3 (SCK) on the ISP header I get 35komhs on both it’s about 28deg. 47K @ 25deg and resistance dropping on increased heat so looks correct
  • I have removed the thermistors and tested and I get the same 35kohms.
  • I swapped R19 and R20 around back into the incorrect locations and flashed with v4.21 and I now get the correct temps but the thermistor is too far to pick up heat from the resistor bank,
  • I swapped R19 and R20 into their correct locations and the temperatures seem correct but when the module get warn the temp drops rather than increases still running v421, can we try code were we change to output to increase temp reading rather than reduce ?
  • I re-flash with v420 R19R20 and the temp now reads 48deg, 20deg more than it should. can we not add an offeset ? and subtract 20deg ? I am happy to test these code basses, I have a termal camera and so can ensure that we are getting the desired result.

Thanks again Stuart for your assistance.

This is exactly what the R19R20 version of the code does!

If you take a look in packet_processor.cpp file in visual studio code, and then find the code below.

Change the “1225” to a lower number and reflash to see the results. I’m not expecting you to get perfect temperature readings but they should be within a couple of degrees C.

#if (defined(DIYBMSMODULEVERSION) && (DIYBMSMODULEVERSION == 420 && defined(SWAPR19R20)))
    //R19 and R20 swapped on V4.2 board, invert the thermistor reading
    onboard_temperature = 1225 - value;

@stuart awesome thanks, like you said don’t need perfect temperature but we do need it to be in a region that’s workable for the bypass to still work shot again I’ll feedback once I have tested

@stuart
So I set that value to 1040 and the room temp matches up to the actual and then while in bypass mode it track a little higher, the v4.21 module on the thermal peaks 64-65 degrees, and the v4.2 R19R20 swap peaks 67deg, in my mind this is close enough to a working solution,

Thank you again for your valued support, we really appreciate it.

Hi @rolfbartels, looking at the code you can see that the prototype V4.3 used a value of 1000 (that prototype also had the swapped R19 problem:-( )

Glad its working.