TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

beemac said:
beemac said:
Thanks for the bootloader - unfortunately during electrical testing again i'm having issues with mosfets... As before it's the 4140 that I just can't get to switch off. These are a new batch - bought from Farnell. When pin 1 is grounded - all is good, 54v 'full on'. But once I remove the gnd to pin 1 and leave it floating - i get 14-15v. I don't know what it is with me and these bloody mosfets! :)

Ok... so looks like my new multimeter is garbage. With my usual one I still get 4.7v through the 4140 when 'off' - but at least that's consistent with the last circuits I made.

I've had a google about and can find others who see similar - what appears to be a leakage voltage through a mosfet when testing with a meter and no load. I'll try putting a load on it and see if that fixes.

Either way I'll give the fw a go now...

Sorry about the picture quality!

DSC_2917.JPG
Thanks for the picture.

I think you can wire it as final and connect to the TSDZ2 motor. I think there is no risk to damage anything, I think or the TSDZ2 motor controller will be power up or not, and you will see that feedback on the mobile app and you can also measure with the multimeter.
 
casainho said:
[Please share pictures of your board, if possible.
You would not want a picture of my configuration as
I did not bother to make a final board suitable for mounting on the ebike.
My board is for prototype only, as I cannot ride the ebike outside in winter here in canada. I used a solderless prototype board for the dongle with the soldered transistors connected to that board by pins.only.
Also, I expect the final enclosure will dictate the final board layout, so I am waiting for that to be completed.
 
rananna said:
beemac said:
- unfortunately during electrical testing again i'm having issues with mosfets... As before it's the 4140 that I just can't get to switch off. These are a new batch - bought from Farnell. When pin 1 is grounded - all is good, 54v 'full on'. But once I remove the gnd to pin 1 and leave it floating - i get 14-15v. I don't know what it is with me and these bloody mosfets! :)

I am seeing the very same phenomenon with the 4140. The voltage is not zero in off mode. Although it is not high enough to turn on the motor, does anyone know if this will this adversely affect the tsdz2 controller?

Good to know it's not just me!

Do you still see a voltage when the motor is attached? I'm hoping it's just a measurement oddity that will go once there is a load.
 
rananna said:
casainho said:
The remote, can you work on it? it needs at least to turn on/off the motor, and now that you see it working on the mobile app, you replicate it on the remote. And it also needs a good visual feedback on the RGB LED.
Yes, I can do this. However, I would like to use ANT only to reduce power requirements and avoid the need for another bluetooth profile in the remote.
I can easily use page 16 for communication of all the power states.
And for visual feedback, the R led can signal not ready, Y led for waiting to get ready and G led for motor ready.
My question to you is how best to send the power on/off command by ANT without using bluetooth and the 255 signal.
Yes, I go with ANT as it is working currently. I think you would like to use it also for brakes, right?

And I am thinking there is a good amount of shared code between the remote the the TSDZ2 wireless board, like the pin control, PWM for LEDs that you did, so, I wish to join both sources and have a common folder with common code, just like on the displays firmware. Because I think I should first make the wireless board firmware to work as expected for change assist level and power on/off, then move to the mobile app, then to the remote and finally to the GPS display.
 
casainho said:
beemac said:
Either way I'll give the fw a go now...

Sorry about the picture quality!

DSC_2917.JPG
Thanks for the picture.

I think you can wire it as final and connect to the TSDZ2 motor. I think there is no risk to damage anything, I think or the TSDZ2 motor controller will be power up or not, and you will see that feedback on the mobile app and you can also measure with the multimeter.

Ok all working! :) Motor turns on/off from the app - well I see the output switch from 4.7v to 54v on a meter. But I've yet to connect a load.

Luckily my spare motor turned up today - so I have a complete motor/controller here that I can use to test this more.

But first - it's time for lunch...
 
casainho said:
And I am thinking there is a good amount of shared code between the remote the the TSDZ2 wireless board, like the pin control, PWM for LEDs that you did, so, I wish to join both sources and have a common folder with common code, just like on the displays firmware.

Does this mean ultimately that the code for physical buttons will get merged into the wireless controller code? That would be my ideal use case - since I've got cables running up to the handlebars anyway, adding the complexity of another nrf52840 to do the buttons doesn't makes sense for me..
 
beemac said:
Good to know it's not just me!
Do you still see a voltage when the motor is attached? I'm hoping it's just a measurement oddity that will go once there is a load.
I just checked under load and the switch works well.
With the switch on, the output voltage from my (fully charged) battery no load = 51.6v
Switched off, the voltage= 0.41v
All is well.
 
rananna said:
beemac said:
Good to know it's not just me!
Do you still see a voltage when the motor is attached? I'm hoping it's just a measurement oddity that will go once there is a load.
I just checked under load and the switch works well.
With the switch on, the output voltage from my (fully charged) battery no load = 51.6v
Switched off, the voltage= 0.41v
All is well.

Ah nice one that's great news, i'm in the process of wiring a higo cable to my board - then i can do a similar test.

So all along - my circuits were fine.... even with the tiny mosfet. Ah well, that's what testing is for! :)
 
@casainho,

What firmware needs to be loaded on the motor?
I have 860c firmware 1.0.0.
In the Android app I see the pwr icon going to yellow when power on. It is not going green when ready.
I am concerned this is not happening because of possible firmware mismatch on the motor
 
casainho said:
. I think you would like to use it also for brakes, right?
Yes, I believe the remote will be fast enough to manage the brake signal using ANT.
I will also implement the code to check this in the remote
 
beemac said:
casainho said:
And I am thinking there is a good amount of shared code between the remote the the TSDZ2 wireless board, like the pin control, PWM for LEDs that you did, so, I wish to join both sources and have a common folder with common code, just like on the displays firmware.
Does this mean ultimately that the code for physical buttons will get merged into the wireless controller code? That would be my ideal use case - since I've got cables running up to the handlebars anyway, adding the complexity of another nrf52840 to do the buttons doesn't makes sense for me..
With the button and RGB LED on the wireless board, it will be possible to work stand alone, with any phone, remote or such. The button to long press for power on/off and button click to cycle over assist levels.

rananna said:
@casainho,

What firmware needs to be loaded on the motor?
I have 860c firmware 1.0.0.
In the Android app I see the pwr icon going to yellow when power on. It is not going green when ready.
I am concerned this is not happening because of possible firmware mismatch on the motor
V1.1.0. The icon should turn green when the motor is ready, will take maybe like 8 seconds like on the displays. If it does not turn green, connect again your display to make sure everything it working. If it does not turn green, then check the UART TX/RX pins as you my inverted them????
 
rananna said:
@casainho,

What firmware needs to be loaded on the motor?
I have 860c firmware 1.0.0.
In the Android app I see the pwr icon going to yellow when power on. It is not going green when ready.
I am concerned this is not happening because of possible firmware mismatch on the motor

I have 1.1 - but took a while for it to go green. Was yellow for a minute or so- then went green. edit: Actually less than a minute - mine goes green about 10 secs after motor on...
 
beemac said:
rananna said:
I just checked under load and the switch works well.
With the switch on, the output voltage from my (fully charged) battery no load = 51.6v
Switched off, the voltage= 0.41v
All is well.

Ah nice one that's great news, i'm in the process of wiring a higo cable to my board - then i can do a similar test.

Mine goes to about 1.1v when off and connected to the motor controller.

Oh I could have saved so many mosfets! :)
 
casainho said:
I think you can wire it as final and connect to the TSDZ2 motor. I think there is no risk to damage anything, I think or the TSDZ2 motor controller will be power up or not, and you will see that feedback on the mobile app and you can also measure with the multimeter.

Almost ready to actually try it on the bike - weather-permitting i'll give it a go tomorrow.

Found a case to put it in - but will need wrapping in self-amalg to make it waterproof-ish. Have put passthrough for brake, 5v, throttle (don't use the throttle but connected it anyway).

image0 (1).jpeg
 
I am finishing the circuit on the Kicad, and I used the BSP296 as seen on the beemac picture.

Can you guys tell me which wires you had to connect to flash the bootloader????
 
beemac said:
Almost ready to actually try it on the bike - weather-permitting i'll give it a go tomorrow.

Found a case to put it in - but will need wrapping in self-amalg to make it waterproof-ish. Have put passthrough for brake, 5v, throttle (don't use the throttle but connected it anyway).

image0 (1).jpeg
Nice to see!!

What are that 3 resistors for?? I am not using any resistors, only the 2 mosfets, DC-DC board and the NRF52840 board.
 
casainho said:
beemac said:
Almost ready to actually try it on the bike - weather-permitting i'll give it a go tomorrow.

Found a case to put it in - but will need wrapping in self-amalg to make it waterproof-ish. Have put passthrough for brake, 5v, throttle (don't use the throttle but connected it anyway).

image0 (1).jpeg
Nice to see!!

What are that 3 resistors for?? I am not using any resistors, only the 2 mosfets, DC-DC board and the NRF52840 board.

Yea - looking forward to testing it.

Are you running the nrf at 3.3v? If so, you don't need them I think.

On the schematic - they are between the nrf52840 and tx/rx. The 2k (i used 2x1k in series) is to bring pin logic level down to 3.3v to match the motor controller - not sure what the 100r is for...
 
casainho said:
I am finishing the circuit on the Kicad, and I used the BSP296 as seen on the beemac picture.

Can you guys tell me which wires you had to connect to flash the bootloader????

I've connected GND, VBUS and the SWDIO, SWDCLK pins on the neck. Then I don't connect a battery when flashing - same as for the motor controller always power it from the st-link adapter.
 
beemac said:
Are you running the nrf at 3.3v? If so, you don't need them I think.

On the schematic - they are between the nrf52840 and tx/rx. The 2k is to bring pin logic level down to 3.3v to match the motor controller - not sure what the 100r is for...
Yes, the NRF52840 runs at 3.3V. The motor controller has already some resistors on TX and RX lines, so that resistor are not needed. I am running without resistors and works as expected.

beemac said:
casainho said:
I am finishing the circuit on the Kicad, and I used the BSP296 as seen on the beemac picture.

Can you guys tell me which wires you had to connect to flash the bootloader????
I've connected GND, VBUS and the SWDIO, SWDCLK pins on the neck. Then I don't connect a battery when flashing - same as for the motor controller always power it from the st-link adapter.
Good to know as I am used to wire also the RESET, which is only available from the back side of the board...

Did you flash the bootloader with the cheap STLinkV2 clone?

And had you the DC-DC connected already to the VBUS line even if you did not connected the battery while flashing?
 
casainho said:
beemac said:
Are you running the nrf at 3.3v? If so, you don't need them I think.

On the schematic - they are between the nrf52840 and tx/rx. The 2k is to bring pin logic level down to 3.3v to match the motor controller - not sure what the 100r is for...
Yes, the NRF52840 runs at 3.3V. The motor controller has already some resistors on TX and RX lines, so that resistor are not needed. I am running without resistors and works as expected.

beemac said:
casainho said:
I am finishing the circuit on the Kicad, and I used the BSP296 as seen on the beemac picture.

Can you guys tell me which wires you had to connect to flash the bootloader????
I've connected GND, VBUS and the SWDIO, SWDCLK pins on the neck. Then I don't connect a battery when flashing - same as for the motor controller always power it from the st-link adapter.
Good to know as I am used to wire also the RESET, which is only available from the back side of the board...

Did you flash the bootloader with the cheap STLinkV2 clone?

And had you the DC-DC connected already to the VBUS line even if you did not connected the battery while flashing?

I only thought it worked at 3.3 logic levels on the pins if you powered it with 3.3v... Don't quote me on that though!

Yes flashed with a cheap st-link clone. https://www.amazon.co.uk/dp/B07QBLNDPM/ref=pe_3187911_185740111_TE_item

edit: Cheap though it may be - it happily takes the official firmware update from STM's site.

I connect VBUS, GND on the nrf to the 5V, GND pins on the stlink adapter. No other power is applied to the circuit.
 
beemac said:
I connect VBUS, GND on the nrf to the 5V, GND pins on the stlink adapter. No other power is applied to the circuit.
But you flashed the bootloader before wiring the board or when it was wired?
 
casainho said:
beemac said:
I connect VBUS, GND on the nrf to the 5V, GND pins on the stlink adapter. No other power is applied to the circuit.
But you flashed the bootloader before wiring the board or when it was wired?

Oh I see - yes when it was all wired up - so the dc-converter attached but not supplying any power.

Board also has the smd fuse (hard to see on the reverse) - both the stlink and the dc converter 5v both go through that fuse before hitting the nrf.
 
Here is the updated schematic based on our prototypes (please test that schematic as possible, like removing any resistors).



I did a commit with this schematic update but later I need to start thinking on the final documentation.


beemac said:
casainho said:
beemac said:
I connect VBUS, GND on the nrf to the 5V, GND pins on the stlink adapter. No other power is applied to the circuit.
But you flashed the bootloader before wiring the board or when it was wired?

Oh I see - yes when it was all wired up - so the dc-converter attached but not supplying any power.

Board also has the smd fuse (hard to see on the reverse) - both the stlink and the dc converter 5v both go through that fuse before hitting the nrf.
I wanted to know if that DC-DC would for some reason pull down / make not working the VBUS voltage from the STLinkV2. Now it is clear to me so we can write that later on the final documentation.
 
Back
Top