Reading data from Thun T13 torque sensor using an ESP32 Wroom microcontroller

shashankv

1 µW
Joined
Feb 21, 2023
Messages
2
Location
Munich
Hi,
For my EBike project I would like to read the speed and torque signal from the T13 Thun Torque sensor using a ESP32. Have attached the datasheet for this.
  • Problem is I'm getting 3.3 V at all the signal pins (speed and torque signals, pin 4 and 6 according to datasheet).
  • I have used an RPS to power up the torque sensor at 12V (according to datasheet power range is 8-15 V)

Here is the setup with an RPS set at 12V: RPS- positive to torque sensor positive power pin and GND of RPS to torque sensor GND and also to ESP32 GND. Then took the torque sensor signal and set it on the ESP32 ADC pin where I read the signal with analogRead. (tried with ESP32 pins 2, 4, 34, and 36. All have same result - > 0 with no change after giving torque)

Here is the weird reading I get on DMM with different conditions:
No torque on sensor : 3.3V
applying torque clockwise and anticlockwise : 3.3V
So no change in the voltage from signal with movement. I have no idea what the protocol would be after this test. Could it be a defect of the sensor or anything wrong from my side?
 

Attachments

  • Torque Speed Sensor(1).pdf
    303.6 KB · Views: 9
If the THUN is correctly powered, and physically mounted relative to the chainline correctly so that torque across the BB will cause a change in voltage in the sensor (AFAIK the THUN only measures the left crank's torque, unless this version is different than the very old one I have here), then you should get a default no torque reading of about half the voltage range allowable. Torque in the forward direction will read above that voltage, and in the backward direction (for a fixie vs a freewheeling chainline), below that voltage.

If the voltage never changes, and it's all powered and setup correctly, something is probably wrong with the sensor.

The cadence sensor in it should provide pulses on it's output pin(s) during crank rotation even if the sensor is not correclty setup relative to the chainline, as long as power to the sensor is correctly provided.

If there are never any pulses, and it's all powered and setup correctly, something is probably wrong with the sensor.


EDIT: I note in your other thread you state "So in case I need to have another solution, I thought of using cycle analyst v3 to fetch torque sensor values as it seems to work to get the data.", which implies the sensor is working as expected with the CA, but not independently with a multimeter or with your ESP32. My first guess in this case is that your power supply is not correcly powering the sensor, but the CA is. I'd investigate this first.

AFAIK the cadence pins use a 5v level signal, so if your ESP32 uses only 3.3v level signals it could be damaged by the THUN's output, and you might need to use 5v-3v3 buffer chip between them.

The torque sensor output shouldn't exceed a 3v3 input's range, AFAIK, so that should be ok.
 
Last edited:
Back
Top