Pegazus said:
Sure here are more details :
diagram.jpg
the diagram is incomplete and missing necessary connections for us to figure out what is happening.
according to that diagram, assuming that red is 5v and black is ground, you have the new external speed sensor wired directly and only to the throttle power and ground, and then to the throttle connector on the controller. there isnt' a throttle signal wire connected anywhere, and you say the throttle works, so that can't be the case.
it also does not show a signal wire from the external speed sensor, but you say you read speed from it, so it must also be connected somewhere.
if the two signal wires are in parallel as well, and go to the throttle input, then the speed sensor input woudln't have a connection, or else it would also have the throttle voltage input as well.
presumably the diagram does not show a signal wire from the motor speed sensor because it's not in use right now, but it would be helpful if you show where you used to connect it, exactly.
The problem might come from the controller.
is the controller what sends the speed signal to the eggrider?
if so, does it have a specific connector for a speed sensor input, or is it only using one of the motor hall signals inputs for this?
or does the eggrider have it's own speed signal input?
the eggrider connections do not appear to be shown on your diagram, it appears to strictly be controller connectors.
I spied the Tx wire from the controller to the display and bit 3 and bit 4 are empty when P2 is not equal to zero. It is consistent with the fact that I never had any speed display with the external or the internal speed sensor.
This is confusing.
do you mean instead "never had any speed display with the external or the internal speed sensor. when P2 was set to a nonzero value"?
if that's the case then maybe p2 is a parameter to disable speedometer readouts from external sensors, and only allow the internal motor halls to generate that signal. and if so, p2=0 simply means use a single pole speedo sensor, for just one magnet on the wheel? and p2=(anything above 0) means however many poles the motor halls see? either directly or via some conversion chart in the manual?
or do you instead literally mean "never had any speed display with the external or the internal speed sensor."
if that's the case, then that conflicts with your previous post that said "Even when P2 = 0 I'm still able to get the motor speed, what ever the speed sensor is, internal ou external ! Speed value has been check with my GPS " which implies by "even when" that regardless of the setting of P2, you do get a speed reading with either internal or external speed sensor, and "Speed value has been check with my GPS" implies that the reading is correct since it does not say that the speed was wrong in either case.
so again, you need to clarify exactly, step by step, what you are doing, what you are testing, and what your results are for each step as you do them.
without that, the bits and pieces of what you *are* telling us are confusing and appear to be conflicting with each other.
you also still need to answer the questions that have been asked previously.
There must be a way with hall sensor may be and others data to recompute the speed when the controller is configure not to use speed sensor.
i don't know exactly what you mean, but if you mean that it can use a motor hall sensor for speed sensing, it's possible. i don't know if it is designed to do it or not, but the motor hall produces exactly the same kind of signal as a hall sensor based speed sensor, except that with your geared freewheeling hubmotor, it only senses the motor speed, and not the wheel speed (whcih are the same as long as the wheel does not spin faster than the motor).
if the controller is not designed to use an external sensor or an in-hub non-phase hall sensor like the G310 has available, and is only designed to use a motor phase's hall sensor, then you would have to set the controller to sensorless mode, if it has one, and disconnect the hall sensors of the motor from the controller. then connect whichever other speed sensor you wish to use to one of those hall sensor signal lines on hte controller (whichever one is used to detect speed; may have to be determined experimentally).
If the controller does not have a sensorless mode, or you don't want to use it for whatever reason, but it only takes speed readings from the motor hall inputs, then you cannot use an external sensor with that controller, and would require a different one that does take speed readings from a separate input to do that.
If instead the eggrider has it's own speedo input, simply connect your sensor to that, and set it's internal settings for the right number of poles and correct wheel size, and it should then work. If it doesn't have it's own input, then it is getting it's info from the controller, and you'd have to do something like the above to make it work.
I only have speed indications on the display when P2=0 and indeed B3 and B4 alive at that condition.
I don't know what these parameter values mean, or which value you should have there.
but as long as you are using the external speed sensor, and if it only uses one magnet, you should use whatever parameter is for number of poles of speed sensor set to a value for a single pole.
if you are using the motor speed sensor, it has six poles, so the parameter must be set to whatever it should equal for that.
if it does not have the ability to change the number of poles of the speed sensor, then you would instead have to divide the wheel circumference by that number of poles, and input that new smaller wheel circumference, to get the right speed displayed.
a note here
https://endless-sphere.com/forums/viewtopic.php?p=1520165#p1520247
says
Set P2 = 1 on the lCD and the controller will use the external speed sensor input. Then the value of P1 will not be used and it can be anything.
so since you've tried setting p2=0 and p2=2, maybe instead try p2=1 for the new external sensor (or the one in the motor)?