Show motor temperature with S-LCD3 display

obelix662000

1 µW
Joined
Oct 13, 2015
Messages
4
I have MAC wheel with LM35 temperature sensor and S12SN controller with LCD3 display. Unfortunately S12SN does not have any input wire fortemperature sensors. Also I could not find a point at the controller's PCB which reads the temperature. Finally I did it with insertion of temperature data into communication packet between controller and LCD. For communication protocol please see my previous post.
Arduino MCU (Mini 328P 16Mhz) measures temperature with ADC, reads communication packet from S12S to LCD3, repack the packet with temperature data and sends it to LCD3 instead of original one.
Schematic is as follows:
Green wire of S12S to LCD3 is cut (Tx wire). Arduino is inserted in between with Rx and Tx pins.
Rx of arduino is connected to this green wire at the S12S side
Tx of arduino is connected to the wire at the LCD3 side
GND of arduino is connected to any black wire (ground)
Vcc of arduino is connected to any 5V red wire (do not connect to LCD's power supply! it has high voltage! 24-48V)
Output of temperature sensor is connected to A0 pin of arduino.

Do not forget to set parameter C8 to 1, which allows temperature reading.

Please find sketch file in the attachment (rename .txt to .ino)
 

Attachments

  • LCD3_S12N_temp_sensor.txt
    1.2 KB · Views: 851
  • arduino.jpg
    arduino.jpg
    34.8 KB · Views: 6,538
  • lcd3.jpg
    lcd3.jpg
    28.2 KB · Views: 6,536
Thanks for this, I was wondering about whether those controllers were capable of reading the motor temp. I will be getting a KT controller soon so I will try it myself. If you need higher accuracy you may want to consider an external voltage reference for the Arduino's ADC.
 
flangefrog said:
Thanks for this, I was wondering about whether those controllers were capable of reading the motor temp. I will be getting a KT controller soon so I will try it myself. If you need higher accuracy you may want to consider an external voltage reference for the Arduino's ADC.
Actually if sensor output does not exceed 1.1 v , arduino internal refference also can be used. I measured 5v power line and its stable enough even at high wattage.
 
obelix662000 said:
Finally I did it with insertion of temperature data into communication packet between controller and LCD.

Great MOD/hack!!!

I am starting develop OpenSource firmware for S series controllers of BMSBattery, please join the efforts and then we will be able to add advanced features not available on original controller: https://endless-sphere.com/forums/viewtopic.php?f=2&t=87870

With our firmware and more information about the schematic board we will be able to add features like external input for temperature sensor reading.

Even the S-LCD have the same microcontroller STM8S105 as the motor controller, so we should be able to hack both firmwares and change for our needs :) :)
 
flangefrog said:
Thanks for this, I was wondering about whether those controllers were capable of reading the motor temp. I will be getting a KT controller soon so I will try it myself. If you need higher accuracy you may want to consider an external voltage reference for the Arduino's ADC.

I think you'll find on the KT Kunteng Sinewave controllers, there is a white temperature sensor input wire already fitted into the Hall Sensor plug, which if you then connect to a KT LCD3 or LCD6 display will display the hub temperature .. :wink:
 
Johne-bike said:
I think you'll find on the KT Kunteng Sinewave controllers, there is a white temperature sensor input wire already fitted into the Hall Sensor plug, which if you then connect to a KT LCD3 or LCD6 display will display the hub temperature .. :wink:

Hi, is the S12S and the KT Kunteng Sinewave controller the same ? I bought a S12S controller from BMS Battery and i see this white wire in the hall sensor plug. I could not find any documentation to find out what to to with this wire.

I have a MAC hub motor with a NTC inside. Now i read your post and i am asking me whether i can conect the (white) wire from the motor tmperature sensor with the white wire from the hall sensor plug and get the motor temperature displayed ?

I am not familiar with this. I measured 5 V between the two white wires and about 20 kohm. I do not want to destroy something so i tried to put a 3 kohm resistor between the wires and measured 0,2 mA. But the motor temperature display shows still 15 degree. Do you think conecting the wires is safe ?

Thanks !
 
Try to read the resistor voltage after connect it. It may work in a similar way as throttle.

20k may be a bit high, I would try with 4.7k.
 
I tried with a 3k ohm resistor. I found only this one. I measured 0,7 V at the resistor.

Ambient temperature 17° , motor temp 15° , no reaction.

Maybe i have to say that i have not a professional multimeter, so the values may be not exact.
 
maultasche said:
I tried with a 3k ohm resistor. I found only this one. I measured 0,7 V at the resistor.

Ambient temperature 17° , motor temp 15° , no reaction.

Maybe i have to say that i have not a professional multimeter, so the values may be not exact.
Well, it seems to be working, like the throttle. If you measure the voltage output of the throttle should be something like that: 0V at one side, 5V at the other side and middle values.

I would say your S12 controller don't have that feature you are looking for, implemented on the firmware. The hardware may be ready but the firmware don't implement the feature. That's why I want to implement an OpenSource firmware so any user can use it and have this kind of features.

I didn't received my controller yet and I will need to look at the board to write a simplified schematic, etc. Can you help me please and take detailed pictures of the board so I can read the integrated ICs references and also see the circuit, etc?? Thanks.
 
Johne-bike said:
flangefrog said:
Thanks for this, I was wondering about whether those controllers were capable of reading the motor temp. I will be getting a KT controller soon so I will try it myself. If you need higher accuracy you may want to consider an external voltage reference for the Arduino's ADC.

I think you'll find on the KT Kunteng Sinewave controllers, there is a white temperature sensor input wire already fitted into the Hall Sensor plug, which if you then connect to a KT LCD3 or LCD6 display will display the hub temperature .. :wink:
Has anyone been successful with getting the motor temperature to display on an LCD3/LCD8, without an arduino?

I'll be using a pswpower 6 fet sine wave controller with a Mac motor, and I'd like to monitor the motor temperature. The white pin on the hall connector is listed with 'signal of speed sensor' on the diagram. Can I use this pin for motor temperature instead, if I turn on the option in the LCD8? Or is this controller only going to show motor speed from this pin?
 
obelix662000 said:
Arduino is inserted in between Rx and Tx pins.

I found the same or similar Arduino but it comes with two of RX1 and two of XTO connections. It doesn't matter which ones need to use to connect controller and LCD?

Screenshot000.png
 
Jatem said:
Johne-bike said:
flangefrog said:
Thanks for this, I was wondering about whether those controllers were capable of reading the motor temp. I will be getting a KT controller soon so I will try it myself. If you need higher accuracy you may want to consider an external voltage reference for the Arduino's ADC.

I think you'll find on the KT Kunteng Sinewave controllers, there is a white temperature sensor input wire already fitted into the Hall Sensor plug, which if you then connect to a KT LCD3 or LCD6 display will display the hub temperature .. :wink:
Has anyone been successful with getting the motor temperature to display on an LCD3/LCD8, without an arduino?

I'll be using a pswpower 6 fet sine wave controller with a Mac motor, and I'd like to monitor the motor temperature. The white pin on the hall connector is listed with 'signal of speed sensor' on the diagram. Can I use this pin for motor temperature instead, if I turn on the option in the LCD8? Or is this controller only going to show motor speed from this pin?

I'm running a KT controller (12 fet 35a max) w/LCD 3 display and MAC 12t motor. I found when wiring mine up that if the white wire from the motor was wired up to the white wire from the controller, that I had a functional speedo - as long as the motor had power. Speedo would go to -0- when coasting. I ended up using an external speed sensor wired to the white controller wire for a full time speedo.

Point being, here, there is little doubt that the white wire is related to the speedo.

If it were not for that, I'd love to be able to monitor my motor temp!
 
If your KT Controller and LCD3 display is displaying speed when the motor is powered, but the speed goes to zero when the motor is coasting, then the KT Controller is reading your speed from the motor and it is not reading the speed from the white wire. If it was reading the speed from the white wire, the speed would also be displayed when coasting.

Check the setting of P2, if it is set to 0 then the KT controller reads the speed from the motor. If P2 is set to the a value from 1 to 6 then it reads speed from the white wire according to 1-6 pulses per revolution. So check what your P2 is currently set to.

It is worth noting that even with P2 set to read speed from a speed sensor, the display will still show the motor speed while the motor is powered and will only start to show speed from the speed sensor when the motor starts to coast.

Oli.
 
Oli.Hall said:
If your KT Controller and LCD3 display is displaying speed when the motor is powered, but the speed goes to zero when the motor is coasting, then the KT Controller is reading your speed from the motor and it is not reading the speed from the white wire. If it was reading the speed from the white wire, the speed would also be displayed when coasting.

Check the setting of P2, if it is set to 0 then the KT controller reads the speed from the motor. If P2 is set to the a value from 1 to 6 then it reads speed from the white wire according to 1-6 pulses per revolution. So check what your P2 is currently set to.

It is worth noting that even with P2 set to read speed from a speed sensor, the display will still show the motor speed while the motor is powered and will only start to show speed from the speed sensor when the motor starts to coast.

Oli.

You're aware that gear driven motors (like a MAC 12t) stop turning when coasting, correct? If the motor isn't turning, and you are not pedaling, where is the white wire (controller) going to get the speed signal? -Al
 
AHicks said:
You're aware that gear driven motors (like a MAC 12t) stop turning when coasting, correct? If the motor isn't turning, and you are not pedaling, where is the white wire (controller) going to get the speed signal? -Al

Geared hub motors with a separate speed wire most typically get that separate speed signal from a dedicated hall sensor that reacts to magnets mounted on the interior of the motor casing, such that it spins with the wheel and not with the motor. Same principle as an externally mounted speed sensor, but internal, and typically with more than one magnet

Edit: Upon re-reading (I have no business trying to be here before morning coffee :p ), I realized that I missed a substantial part of the prior conversation, and my response is a bit of a non-sequitur. Sorry about that; feel free to disregard.

If your controller / KT display only started to read speed after you plugged in the white wire, but is only behaving as if it's reading the speed from a motor hall wire (drops to zero when coasting), I have no idea what to make of that. I could've sworn the MAC has a separate speed sensor, but maybe I'm wrong and your motor's speed wire is just duplicating a motor hall output.
 
I tried today this code for my LCD4 display but it's not working. It can't even forward the communication, apparently the serial communication is not exactly the same like LCD3. This display does not have anywhere to show temperature, but it have C8 setting, so I expected that it will somehow appear, but unfortunately not.
 
Back
Top