TSDZ2 - Temperature sensor LM35 issues

simfender

1 µW
Joined
Sep 7, 2021
Messages
2
Hi all,

I've converted my 2014 RockRider 520 with the Tongsheng TSDZ2, I've decided to make the necessary mods, thermal pads and temperature sensor, an LM35DZ, with VLCD5 OSF 20.1C.1.

Modified the controller to get the throttle input/gnd/+5v, I have the 6 pin version, so I had to solder on the pcb.

So, at the end just an issue, I cannot get the sensor working.

The VLCD5 displayed strange values about the temperature. Low values like 6/7. After a lot of tries I ended up opening everything back and soldering throttle and GND on PCB again, so, I do not know why, the first soldering seemed to be correctly made, but this operation made the sensor working... Very Nice! Not so fast honey... After some time of good temp reading, the system goes in E06 (Overtemperature) because the sensor reading on VLCD5 goes to its max: 99.9°. Rebooting does not help to get rid of it, it goes back to work again after some time with everything powered off.

So I tried to analyze something on bench with a scope and this is what I got:

  1. 5v output is actually 4.3v, not an issue for the LM35, but is this normal?
  2. Sensor connected to the scope only, with external power source is working correctly (25° room ~ 250mv on scope )
  3. Sensor output connected to the controller when everything is working good, scope displayed right values (25 degrees on VLCD5 ~ 250mv on scope).
  4. Sensor output connected to the controller when in E06, scope displayed right values (99.9° on VLCD5 ~ 4.3v on scope), for "right values" I mean that the scope read and the value on VLCD5 match.
  5. Sensor output disconnected from the controller, scope on output displayed right values (25° room ~ 250mv on scope) like it's an ADC input issue, indeed when output is connected again to the controller, point 4 situation.
  6. Swapped the sensor with another one of the same batch, same issue. Tried another sensor, the TMP35, no improvements.
  7. Tried also older versions of OSF, nothing changed.
  8. When sensor is working and the assist level is set to ECO, the temp value on the display are "unstable", I try to explain with an example: room temp of 25, 0.0°/12.0°/20.0° are displayed quickly before 25.0°. It's a strange behavior but not a problem. In TOUR/SPEED/TURBO the reading is stable. Just wanted to share.

So point 5/6 made me think it's unlike to be a faulty sensor (I've bought them from Amazon and I guess they could be the cheap/crap ones, but on scope they work good).

Could this be a firmware related issue? BAD controller? Do you guys have any suggestion? Plane B is to install a separate temp sensor, but I like to have the feature in the controller for the auto limiting... and I don't give up easily.

Here the wire connections on the pcb:
pcb.jpg
Here a good reading:
good.jpg
Here the E06 error with the bad reading:
e06.jpg
notgood.jpg
 
Maybe a bad solder joint, specially the white wire. Re-solder it and then clean it.
 
Because you say you measure 4.3V it could be a floating gnd. Search for another gnd point.
 
So I opened it again and as you suggested I re-soldered everything. It did not work, same issue, after some time, temp went to 99.9°/E06.. so hopeless I re-soldered again, and... it worked :confused:, now I have stable readings! In ECO mode still unstable values ( first post p.8 ):

[youtube]j735GF5VUaU[/youtube]

About the 4.3v it seems that the GND is ok. Still 4.3v if connected to another GND point.

This time I also installed another sensor, DS18B20, this one not connected to the controller obv but wired standalone to the outside. In the future if the LM35 fails I have a backup one already installed ( Using a micro with another display or/and a buzzer ). Just for the record:

[youtube]gbGbOLaf9Zg[/youtube]

Thank You.
 
Hi,

Did you find out a solution for this?
I'm having a tsdz2 36v coaster brake version with a 48v 17Ah 21700 battery and was told stock firmware doesnt support 48v. Went straight with v20.1c.1 and xh-18 and limited to 250w 10A.
The bike was dangerous. Could not brake because the pedals keept on spinning.
Now I'm on v20.1c.3-lcd3 and got most of it working since I hardware calibrated the Torque sensor to a value of 43-47, depending on pedal position and a 'Pedal torque ADC offset (no weight)' value set to 50. max is 210. In Cadence mode its still unbrakeable. Needs to change to 'power assist'-mode to "release" the pedals from spinning. 11:3 'Pedal cadence' seems to show the correct value. 0 when idle or brake. Got it up to max 97 I think when pedaling.
In menu 11:0 "Optional ADC value" it's constantly shows a value of ~124 when menu item 10:6 'Optional ADC channel' is set to '(0)not in use'.
Just installed a tested LM35dz and enable the temp sensor. The value from the LM35 is correct when disconnecting the Vout wire but shows ~2.5V when connected. LCD3 flashing high temp of ~108-111˚C.
Trying to find the schematics for the PCB to probe it.
 
Found out my Coaster brake controller had a pull up resistor of 5.147 kOhm next to the input thanks to a post from plpetrov.
removed it and everything is working as is should.
 
ptrj said:
Found out my Coaster brake controller had a pull up resistor of 5.147 kOhm next to the input thanks to a post from plpetrov.
removed it and everything is working as is should.
For the completeness of this topic, I thought it would be wise to include the links where this solution is described.

Post of ptjr:
https://endless-sphere.com/forums/viewtopic.php?f=30&t=110682&start=1150#p1695982

Post of plpetrov:
https://endless-sphere.com/forums/viewtopic.php?t=93818&start=6250#p1583768
 
I have installed an LM35DT which I think is the LM35 with a tab that makes it easy to screw to the motor. It all seems to be working ok, I've set it to show an error at +75C and cut-off at 85C.

The only weird thing is the temperature display (VLCD5) shows an increase until it gets to 62.4C (precisely everytime) then doesn't go any higher.

But

"Internally" the device must still be increasing in temperature as eventually, an error code will display or cut-off occur.

Any knowledgable folk out there got any idea why the temperature stops increasing at 62.4C?
 
Didcot said:
I have installed an LM35DT which I think is the LM35 with a tab that makes...

Any knowledgable folk out there got any idea why the temperature stops increasing at 62.4C?

{ crickets } That's disconcerting.

Okey dokie. EBike Noobster here.

I received my TSDZ2 today and I'm finishing up my cooling mods. This morning I went to buy the LM35 and... there's ZERO stock globally unless I want to buy 500 from Digikey at $15.00 per unit, or some of the [according to recent reviews] fake products offered for sale presently on Amazon.

It seems a little odd that Eco Cycles offered a "cooling mod" upgrade, but the upgrade description made no mention of a temperature sensor. Adding to the mystery is the fact that Eco Cycle's first post on Facebook shows a photo of their Temperature Sensor Assembly line "for use with OSF" -- But there's definitely no temperature sensor installed in my new OSF TSDZ2b.

I guess I'll go with plan B and install a temperature probe with a separate display so I can at least monitor temperature manually until this gets sorted out.

Has anybody recently, successfully, implemented OSF temperature sensing using an LM35 or any alternate device such as the TMP36?

Gotta wonder if anything other than the global LM35 supply has changed...
 
wm25burke said:
Didcot said:
Any knowledgable folk out there got any idea why the temperature stops increasing at 62.4C?

{ crickets } That's disconcerting.
The most likely reason (assuming this is a global problem with the FW) would be an issue with either the conversion "table" / code, or the display code, that "doesn't know" how to encode or display temperatures above that point. I don't know where they start "zero" at in the code's variable(s) or how many bits that temperature variable is, but it is most likley something where it runs out of bits and simply can't go any higher. It's also most likely in the display code only, because the system is still apparently detecting overtemperature and reacting to it; that wouldn't happen if the problem existed at the device-reading level of code.

As an example, let's say we store temperature as an 8-bit value, it can range from 00000000 to 11111111, and can have a total of 256 individual values. If each bit equals one tenth of a degree C, then from zero C you can have 25.6C maximum. If it assumes it will never be freezing (because the motor in operation, which is what you need to measure, will always be heating itself up), let's say it starts at "room temperature" or 25C. Then you can have a max of 50.6C. Let's assume it's 0.1C increments, ending at 62.4C, then the lowest displayable temperature (for 8 bits) would be 62.4 - 25.6 = 36.8C. I expect that's not the case, so....

I suspect it's more complicated than a simple short variable length, but I don't know what the actual code in the OSF (or OEM) firmware does, but if you're into coding you can look at the code on github and find out, and even change it if you like.


A secondary possibility is counterfeit LM35s--there's certainly enough other counterfeit parts out there (see a recent thread with a post regarding the digital output temperature sensors DS18B20).
https://endless-sphere.com/forums/viewtopic.php?f=7&t=117857

Regarding the LM35--it's a pretty simple analog active temperature sensor, that outputs a voltage for a specific temperature. According to TI's datasheet,
https://www.ti.com/lit/ds/symlink/lm35.pdf
that's 10mV per degree C, directly proportional to temperature. Assuming that's starting at 0C, it should be 0V. If so, at 1C, it should be 0.01v. At 10C, 0.1V. at 100C, 1V. At 62.4C, it should be 0.624v. So it's pretty straightforward to read, and thus unlikely to be a code problem reading it. (displaying the reading might be another matter as that's a different section of code).


But...since it's a straightforward readout, you can use a cheap multimeter to display the temperature from it. Just set it to 2VDC, and it'll display the temperature from zero to 199C (just ignore the decimal point on it's screen).

You can do the same thing wiht the TMP36, it has the same scaling. (the TMP37 uses 0.02V/C, so you have to do math in your head with the display or build a scaler to make it tenths instead).
 
Didcot said:
I have installed an LM35DT which I think is the LM35

Did you confirm the functionality of the LM35DT before you installed it? There are multiple vendors with reviews on Amazon that indicate fake / non functional knock-offs are being sold there.

Maybe try heating it directly with a source you know is > 62.4 and see what happens then.
 
I hadn't seen this topic yet.
The problem "62.4" has already been reported several times in the specific topic "TSDZ2 OSF for all displays".
Not so much for the temperature, there are few who install the sensor, but for the remaining percentage of the battery.
Any data with a value greater than 62.4 is limited to this value. It only happens with the mph/miles setting.
In fact, the maximum speed value that the display can receive is 99.9 with units in km / h. It is then converted into miles by the display firmware, so the maximum value becomes 62.4.

Among the possible solutions, one I have already done, will be in the next release.
 
My understanding is that the LM35DZ will not work correctly with OSF 0.21.4. If LM35DZ is used with OSF 0.21.4 the display will not show values above 62.4C because of problem with the code. Is this correct? I don’t have ability to flash code, so waiting for new release won’t help me...
 
I have installed TMP35GT9Z temperature sensor and it works very well with 0.20.1c-4 OSF. See my latest posts in Hardware Temperature Control TSDZ2 here… https://endless-sphere.com/forums/viewtopic.php?f=28&t=102046&start=250
 
TZDZ2 Air Cooling

I have completed the air-cooling for my TSDZ2B... I changed air intake to a simple foam filter screen with large opening at front side of motor housing. I intend to ride bike only on hard surfaces and only in dry weather. Filter screen from a dehumidifier. I retained the warm-air exit tube with 45 degree angle to create a venturi effect which improves air flow through the motor housing. I will leave in/out temperature sensors in place for initial testing when weather gets warm.
 

Attachments

  • IMG_5535.jpeg
    IMG_5535.jpeg
    1.7 MB · Views: 7
  • IMG_5552.jpeg
    IMG_5552.jpeg
    1.3 MB · Views: 7
  • IMG_5558.jpeg
    IMG_5558.jpeg
    2 MB · Views: 6
  • IMG_5556.jpeg
    IMG_5556.jpeg
    1.1 MB · Views: 7
Back
Top