• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

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

rananna said:
How do you make the electrical connection to the button battery?
I can see that it is very thin.
In addition to brakes wire access, will there be enough room to tuck all the wires under the buttons once you solder the board?
Can there be a removable access port on the bottom to allow for easier replacement of the battery?
Battery connection will be by direct contact of thin wires - a little sponge can be placed inside the remote to make force against the battery so the contact with the wires will work -- this is how is working on my EBike current remote.

I did a new design, this time with more space for the wires. Also this design has a 8mm clearance between the handle bar and the base of the remote, so the most of the remote area can be on top of brake lever.

No button port for the battery - it is easier for now and I really hope the battery can handle 2 years. The remote will be open buy removing the 5x M2 screws on the back:

 
g4eml said:
The instructions for programming the wireless bootloader using Windows are lacking quite a few important steps. Anyone not experienced with Windows would waste a lot of time trying to get it to work.

I have just gone through the process and made the following notes which should help. Maybe someone with write access can update the instructions.

1. Download openocd for windows (current link is OK)
2. Unzip the file on your PC desktop.
3. Copy the resulting folder to a convenient place on your PC. For ease of access use C:/
4. Rename the folder openocd
5. Copy the Wireless Bootloader .hex file you have previously downloaded into c:/openocd/bin
6. In the Windows search box enter cmd to open a command prompt.
7. Enter cd C:/openocd/bin
8. Enter the following. (All in one line)

openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"

9. This will flash and verify the write. If you see ** Verified OK **, the flashing has been successful.



As an aside it might be easier if the above command was made available as a .bat file which would avoid typing errors.
Then the .bat file could be copied to the bin directory and executed with a double click removing the need to use the cmd prompt.

Colin.

Hello
Is anyone able to offer me any guidance on flashing the bootloader using ocd in Windows 10? When attempting this following the Github instructions as above, I get the following result:

C:\OpenOCD\bin>openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Error: open failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

I'm sure this means something to someone who reads this forum, but it is Greek to me. Any suggestions?
Thanks in advance
Ed
 
Jonesm32 said:
g4eml said:
The instructions for programming the wireless bootloader using Windows are lacking quite a few important steps. Anyone not experienced with Windows would waste a lot of time trying to get it to work.

I have just gone through the process and made the following notes which should help. Maybe someone with write access can update the instructions.

1. Download openocd for windows (current link is OK)
2. Unzip the file on your PC desktop.
3. Copy the resulting folder to a convenient place on your PC. For ease of access use C:/
4. Rename the folder openocd
5. Copy the Wireless Bootloader .hex file you have previously downloaded into c:/openocd/bin
6. In the Windows search box enter cmd to open a command prompt.
7. Enter cd C:/openocd/bin
8. Enter the following. (All in one line)

openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"

9. This will flash and verify the write. If you see ** Verified OK **, the flashing has been successful.



As an aside it might be easier if the above command was made available as a .bat file which would avoid typing errors.
Then the .bat file could be copied to the bin directory and executed with a double click removing the need to use the cmd prompt.

Colin.

Hello
Is anyone able to offer me any guidance on flashing the bootloader using ocd in Windows 10? When attempting this following the Github instructions as above, I get the following result:

C:\OpenOCD\bin>openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Error: open failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

I'm sure this means something to someone who reads this forum, but it is Greek to me. Any suggestions?
Thanks in advance
Ed

try running without the last two -c "yada" arguments - see if it's the board that's failing to init that's causing the error - or those commands...

If that works - you can telnet to 4444 and type the commands explicitly

program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify
exit

You could also try this process i posted recently - but if the problem is wiring or similar then you'll get the same error most likely.

https://github.com/OpenSourceEBike/...b/main/stlinkv2.md#easy-openocd-update-script
 
casainho said:
rananna said:
How do you make the electrical connection to the button battery?
I can see that it is very thin.
In addition to brakes wire access, will there be enough room to tuck all the wires under the buttons once you solder the board?
Can there be a removable access port on the bottom to allow for easier replacement of the battery?
Battery connection will be by direct contact of thin wires - a little sponge can be placed inside the remote to make force against the battery so the contact with the wires will work -- this is how is working on my EBike current remote.

I did a new design, this time with more space for the wires. Also this design has a 8mm clearance between the handle bar and the base of the remote, so the most of the remote area can be on top of brake lever.

No button port for the battery - it is easier for now and I really hope the battery can handle 2 years. The remote will be open buy removing the 5x M2 screws on the back:

Looks good - making me think I need a 3d printer! What side of the handlebar do you have your buttons - left or right? Looks like right? I have my buttons on the left - wonder what others do?
 
beemac said:
beemac said:
Hi @lasercat - looks good! I had a similar idea and designed a board in EasyCAD but never tested it - was planning to use PCBWay to get samples built -have you checked to see if they will do smaller quantities? I also started to copy the regulator from mspiders ESP32 project but got distracted with coding and didn't get it routed.

Couple of thoughts-

1. Why the connector for the motor cable connections? Means more parts and bits to solder - would through-holes for wires be easier and cheaper?
2. From experience soldering sub-boards onto pads is quite hit and miss - the pads for the nrf module. Mounting and soldering to pins would be easier and more secure - but at a slight cost increase - and perhaps height.

Here's my attempt - isn't routed and still uses the old tiny mosfet - and expects an external 5v regulator - but you can see what I mean about pins for mounting the nrf.

file.php

Also if you put the nrf the other way around - then you can saw off the USB connector to make the board even shorter! I've not done that yet - but I believe @casainho has.

Hi everyone!
So, basically I've designed mentioned by @lasercat board.
Let me justify my decisions :)
ad 1. The connector doesn't have to be mounted :) It is there just in case. I can make it DNP for early production.
ad 2. My experience with smd mounted modules is different, never had problem with this type of mounting. But as of your suggestion i will add wholes to mount NRF module also on the pins. End user will choose their way ;)
ad 3. (sawing off the USB) there is no need for barbarian move like this! Jk. I can shift the module on the board to better accommodate the space, but mounting this other way around could block antenna and would make it closer to the noisy dc-dc switching section. I will keep this way it is, i mean antenna extending beyond the outline of the designed board.

Cheers!
 
Frzoen said:
beemac said:
beemac said:
Hi @lasercat - looks good! I had a similar idea and designed a board in EasyCAD but never tested it - was planning to use PCBWay to get samples built -have you checked to see if they will do smaller quantities? I also started to copy the regulator from mspiders ESP32 project but got distracted with coding and didn't get it routed.

Couple of thoughts-

1. Why the connector for the motor cable connections? Means more parts and bits to solder - would through-holes for wires be easier and cheaper?
2. From experience soldering sub-boards onto pads is quite hit and miss - the pads for the nrf module. Mounting and soldering to pins would be easier and more secure - but at a slight cost increase - and perhaps height.

Here's my attempt - isn't routed and still uses the old tiny mosfet - and expects an external 5v regulator - but you can see what I mean about pins for mounting the nrf.

file.php

Also if you put the nrf the other way around - then you can saw off the USB connector to make the board even shorter! I've not done that yet - but I believe @casainho has.

Hi everyone!
So, basically I've designed mentioned by @lasercat board.
Let me justify my decisions :)
ad 1. The connector doesn't have to be mounted :) It is there just in case. I can make it DNP for early production.
ad 2. My experience with smd mounted modules is different, never had problem with this type of mounting. But as of your suggestion i will add wholes to mount NRF module also on the pins. End user will choose their way ;)
ad 3. (sawing off the USB) there is no need for barbarian move like this! Jk. I can shift the module on the board to better accommodate the space, but mounting this other way around could block antenna and would make it closer to the noisy dc-dc switching section. I will keep this way it is, i mean antenna extending beyond the outline of the designed board.

Cheers!

Hi :) ok great thanks very much for the explanations! You can see the 'sawn-off' board in casainho's post above but your rf reasoning makes sense to keep it your way around.

edit: great yes thanks pin holes would be perfect. It might be just me - but when I solder boards using pads I often find that they don't make good contact and need a lot of messing around to make sure some pads aren't relying on mechanical pressure for contact!

Is there space at the wire end to put holes we could use to secure the motor controller cable? Then we could just wrap the board in waterproof tape and not really need a case... would be like a 'bump in the wire' :)

Also could you consider putting additional wire holes for the wired buttons? Wouldn't add any cost really if people didn't want them connected - but makes it nice for those that do. You don't need to do anything for brakes but wire holes for onoff/up/down/enter and gnd would be great! :)

This is the schematic - the button pins are the same as for rananna's wireless remote.

Wired_remote_schematic%20v0.1.png
 
beemac said:
Frzoen said:
beemac said:
beemac said:
Hi @lasercat - looks good! I had a similar idea and designed a board in EasyCAD but never tested it - was planning to use PCBWay to get samples built -have you checked to see if they will do smaller quantities? I also started to copy the regulator from mspiders ESP32 project but got distracted with coding and didn't get it routed.

Couple of thoughts-

1. Why the connector for the motor cable connections? Means more parts and bits to solder - would through-holes for wires be easier and cheaper?
2. From experience soldering sub-boards onto pads is quite hit and miss - the pads for the nrf module. Mounting and soldering to pins would be easier and more secure - but at a slight cost increase - and perhaps height.

Here's my attempt - isn't routed and still uses the old tiny mosfet - and expects an external 5v regulator - but you can see what I mean about pins for mounting the nrf.

file.php

Also if you put the nrf the other way around - then you can saw off the USB connector to make the board even shorter! I've not done that yet - but I believe @casainho has.

Hi everyone!
So, basically I've designed mentioned by @lasercat board.
Let me justify my decisions :)
ad 1. The connector doesn't have to be mounted :) It is there just in case. I can make it DNP for early production.
ad 2. My experience with smd mounted modules is different, never had problem with this type of mounting. But as of your suggestion i will add wholes to mount NRF module also on the pins. End user will choose their way ;)
ad 3. (sawing off the USB) there is no need for barbarian move like this! Jk. I can shift the module on the board to better accommodate the space, but mounting this other way around could block antenna and would make it closer to the noisy dc-dc switching section. I will keep this way it is, i mean antenna extending beyond the outline of the designed board.

Cheers!

Hi :) ok great thanks very much for the explanations! You can see the 'sawn-off' board in casainho's post above but your rf reasoning makes sense to keep it your way around.

edit: great yes thanks pin holes would be perfect. It might be just me - but when I solder boards using pads I often find that they don't make good contact and need a lot of messing around to make sure some pads aren't relying on mechanical pressure for contact!

Is there space at the wire end to put holes we could use to secure the motor controller cable? Then we could just wrap the board in waterproof tape and not really need a case... would be like a 'bump in the wire' :)

Also could you consider putting additional wire holes for the wired buttons? Wouldn't add any cost really if people didn't want them connected - but makes it nice for those that do. You don't need to do anything for brakes but wire holes for onoff/up/down/enter and gnd would be great! :)

This is the schematic - the button pins are the same as for rananna's wireless remote.

Wired_remote_schematic%20v0.1.png

Oh i had another question - hope you don't mind - what is the regulator rated at? Is there any spare 5v current left to power a USB port or similar?
 
beemac said:
What side of the handlebar do you have your buttons - left or right? Looks like right? I have my buttons on the left - wonder what others do?
You are lucky as that design is for left side. I use the main gears / rear gears on the right side and the remote on the left side.
 
casainho said:
beemac said:
What side of the handlebar do you have your buttons - left or right? Looks like right? I have my buttons on the left - wonder what others do?
You are lucky as that design is for left side. I use the main gears / rear gears on the right side and the remote on the left side.

Ah ok great - yea i have same setup - looked like it was right mounted
 
beemac said:
beemac said:
Hi :) ok great thanks very much for the explanations! You can see the 'sawn-off' board in casainho's post above but your rf reasoning makes sense to keep it your way around.

edit: great yes thanks pin holes would be perfect. It might be just me - but when I solder boards using pads I often find that they don't make good contact and need a lot of messing around to make sure some pads aren't relying on mechanical pressure for contact!

Is there space at the wire end to put holes we could use to secure the motor controller cable? Then we could just wrap the board in waterproof tape and not really need a case... would be like a 'bump in the wire' :)

Also could you consider putting additional wire holes for the wired buttons? Wouldn't add any cost really if people didn't want them connected - but makes it nice for those that do. You don't need to do anything for brakes but wire holes for onoff/up/down/enter and gnd would be great! :)

This is the schematic - the button pins are the same as for rananna's wireless remote.

Wired_remote_schematic%20v0.1.png

Oh i had another question - hope you don't mind - what is the regulator rated at? Is there any spare 5v current left to power a USB port or similar?

I will add those holes to the design (again with 3D model of the connector - yea, i love to add connectors to everything :lol: )
It's rated for 500mA and up to 75V input. Depends on what You want to power with it.
Btw. i'm a newbie in space of TSDZ2. Is the TSDZ2_VIN pin only control signal or the supply pin for other devices? In other words, what power draw should i expect on TSDZ2_VIN pin?
To be honest I've copied the TSDZ2_VIN control circuit without giving it a second thought :confused:
 
Frzoen said:
beemac said:
beemac said:
Hi :) ok great thanks very much for the explanations! You can see the 'sawn-off' board in casainho's post above but your rf reasoning makes sense to keep it your way around.

edit: great yes thanks pin holes would be perfect. It might be just me - but when I solder boards using pads I often find that they don't make good contact and need a lot of messing around to make sure some pads aren't relying on mechanical pressure for contact!

Is there space at the wire end to put holes we could use to secure the motor controller cable? Then we could just wrap the board in waterproof tape and not really need a case... would be like a 'bump in the wire' :)

Also could you consider putting additional wire holes for the wired buttons? Wouldn't add any cost really if people didn't want them connected - but makes it nice for those that do. You don't need to do anything for brakes but wire holes for onoff/up/down/enter and gnd would be great! :)

This is the schematic - the button pins are the same as for rananna's wireless remote.

Wired_remote_schematic%20v0.1.png

Oh i had another question - hope you don't mind - what is the regulator rated at? Is there any spare 5v current left to power a USB port or similar?

I will add those holes to the design (again with 3D model of the connector - yea, i love to add connectors to everything :lol: )
It's rated for 500mA and up to 75V input. Depends on what You want to power with it.
Btw. i'm a newbie in space of TSDZ2. Is the TSDZ2_VIN pin only control signal or the supply pin for other devices? In other words, what power draw should i expect on TSDZ2_VIN pin?
To be honest I've copied the TSDZ2_VIN control circuit without giving it a second thought :confused:

Ok great thanks be good to have the standard board with wired buttons. Ok the connector is optional? If you don't have it you have wire holes? For those that don't love extra connectors so much :)

Ok 500mA isn't enough for USB so keep the regulator for the board only and not to power anything else.

The TSDZ2_VIN is just a switch signal as far as I can tell - there should be no significant load. I've not tested - but the wire gauge of the 8/6 way cable shows it can't be carrying any current to speak of... I hope :)
 
beemac said:
Frzoen said:
beemac said:
beemac said:
Hi :) ok great thanks very much for the explanations! You can see the 'sawn-off' board in casainho's post above but your rf reasoning makes sense to keep it your way around.

edit: great yes thanks pin holes would be perfect. It might be just me - but when I solder boards using pads I often find that they don't make good contact and need a lot of messing around to make sure some pads aren't relying on mechanical pressure for contact!

Is there space at the wire end to put holes we could use to secure the motor controller cable? Then we could just wrap the board in waterproof tape and not really need a case... would be like a 'bump in the wire' :)

Also could you consider putting additional wire holes for the wired buttons? Wouldn't add any cost really if people didn't want them connected - but makes it nice for those that do. You don't need to do anything for brakes but wire holes for onoff/up/down/enter and gnd would be great! :)

This is the schematic - the button pins are the same as for rananna's wireless remote.

Wired_remote_schematic%20v0.1.png

Oh i had another question - hope you don't mind - what is the regulator rated at? Is there any spare 5v current left to power a USB port or similar?

I will add those holes to the design (again with 3D model of the connector - yea, i love to add connectors to everything :lol: )
It's rated for 500mA and up to 75V input. Depends on what You want to power with it.
Btw. i'm a newbie in space of TSDZ2. Is the TSDZ2_VIN pin only control signal or the supply pin for other devices? In other words, what power draw should i expect on TSDZ2_VIN pin?
To be honest I've copied the TSDZ2_VIN control circuit without giving it a second thought :confused:

Ok great thanks be good to have the standard board with wired buttons. Ok the connector is optional? If you don't have it you have wire holes? For those that don't love extra connectors so much :)

Ok 500mA isn't enough for USB so keep the regulator for the board only and not to power anything else.

The TSDZ2_VIN is just a switch signal as far as I can tell - there should be no significant load. I've not tested - but the wire gauge of the 8/6 way cable shows it can't be carrying any current to speak of... I hope :)

If you have lots of electronics experience - we do see a leakage voltage through the mosfet circuit when off - under no load it's c.4.9v but drops to about 1v when a load is applied. It doesn't seem to affect functionality, but might cause battery to drain more when 'off' - but i also wonder if we're not doing something quite correctly!

There are previous posts in the thread that describe the voltage leak in more detail. Any thoughts you have would be good to hear!
 
beemac said:
beemac said:
Frzoen said:
beemac said:
Oh i had another question - hope you don't mind - what is the regulator rated at? Is there any spare 5v current left to power a USB port or similar?

I will add those holes to the design (again with 3D model of the connector - yea, i love to add connectors to everything :lol: )
It's rated for 500mA and up to 75V input. Depends on what You want to power with it.
Btw. i'm a newbie in space of TSDZ2. Is the TSDZ2_VIN pin only control signal or the supply pin for other devices? In other words, what power draw should i expect on TSDZ2_VIN pin?
To be honest I've copied the TSDZ2_VIN control circuit without giving it a second thought :confused:

Ok great thanks be good to have the standard board with wired buttons. Ok the connector is optional? If you don't have it you have wire holes? For those that don't love extra connectors so much :)

Ok 500mA isn't enough for USB so keep the regulator for the board only and not to power anything else.

The TSDZ2_VIN is just a switch signal as far as I can tell - there should be no significant load. I've not tested - but the wire gauge of the 8/6 way cable shows it can't be carrying any current to speak of... I hope :)

If you have lots of electronics experience - we do see a leakage voltage through the mosfet circuit when off - under no load it's c.4.9v but drops to about 1v when a load is applied. It doesn't seem to affect functionality, but might cause battery to drain more when 'off' - but i also wonder if we're not doing something quite correctly!

There are previous posts in the thread that describe the voltage leak in more detail. Any thoughts you have would be good to hear!

oh i think i've just contradicted myself - if tsdz2_vin is a switch voltage - then as long as the 'leakage' voltage isn't higher than the threshold there's no problem...
 
beemac said:
beemac said:
Frzoen said:
I will add those holes to the design (again with 3D model of the connector - yea, i love to add connectors to everything :lol: )
It's rated for 500mA and up to 75V input. Depends on what You want to power with it.
Btw. i'm a newbie in space of TSDZ2. Is the TSDZ2_VIN pin only control signal or the supply pin for other devices? In other words, what power draw should i expect on TSDZ2_VIN pin?
To be honest I've copied the TSDZ2_VIN control circuit without giving it a second thought :confused:

Ok great thanks be good to have the standard board with wired buttons. Ok the connector is optional? If you don't have it you have wire holes? For those that don't love extra connectors so much :)

Ok 500mA isn't enough for USB so keep the regulator for the board only and not to power anything else.

The TSDZ2_VIN is just a switch signal as far as I can tell - there should be no significant load. I've not tested - but the wire gauge of the 8/6 way cable shows it can't be carrying any current to speak of... I hope :)

If you have lots of electronics experience - we do see a leakage voltage through the mosfet circuit when off - under no load it's c.4.9v but drops to about 1v when a load is applied. It doesn't seem to affect functionality, but might cause battery to drain more when 'off' - but i also wonder if we're not doing something quite correctly!

There are previous posts in the thread that describe the voltage leak in more detail. Any thoughts you have would be good to hear!

Yes, connectors are optional but the holes will stay 8)
If the TSDZ2_VIN is just signal pin then there is no need to use BTS4140N as power switch with current limiting. I would use something like SSM6K361NU from Toshiba with additional PTC fuse for safety. They can be directly controlled with STM32 so i suppose that NRF will handle them too (I will dig into datasheet of NRF).

What amperage You're interested in? :D I can manage to fit in there 1A or 2.5A dc-dc converter without huge bump in price (maybe even lowering it?). But for higher amperage i will have to do test board for myself. I've done few designs with dc-dc converter that I've used in here, so I'm confident about it.

For the leakage voltage I'm pretty sure that this is caused by not having pullup resistor on BTS4140N gate and also not limitng the zero gate current from BSP89. Problem should be solved by adding two resistors like this:

Mind that in this example I've reused the BTS4140N symbol for the BSP89 :oops:
And also that this circuit by adding pullup resistor to the gate of the BTS4140N will default into ON state.
I'll check datasheets deeper tomorrow :)
 
Frzoen said:
beemac said:
beemac said:
Frzoen said:
I will add those holes to the design (again with 3D model of the connector - yea, i love to add connectors to everything :lol: )
It's rated for 500mA and up to 75V input. Depends on what You want to power with it.
Btw. i'm a newbie in space of TSDZ2. Is the TSDZ2_VIN pin only control signal or the supply pin for other devices? In other words, what power draw should i expect on TSDZ2_VIN pin?
To be honest I've copied the TSDZ2_VIN control circuit without giving it a second thought :confused:

Ok great thanks be good to have the standard board with wired buttons. Ok the connector is optional? If you don't have it you have wire holes? For those that don't love extra connectors so much :)

Ok 500mA isn't enough for USB so keep the regulator for the board only and not to power anything else.

The TSDZ2_VIN is just a switch signal as far as I can tell - there should be no significant load. I've not tested - but the wire gauge of the 8/6 way cable shows it can't be carrying any current to speak of... I hope :)

If you have lots of electronics experience - we do see a leakage voltage through the mosfet circuit when off - under no load it's c.4.9v but drops to about 1v when a load is applied. It doesn't seem to affect functionality, but might cause battery to drain more when 'off' - but i also wonder if we're not doing something quite correctly!

There are previous posts in the thread that describe the voltage leak in more detail. Any thoughts you have would be good to hear!

Yes, connectors are optional but the holes will stay 8)
If the TSDZ2_VIN is just signal pin then there is no need to use BTS4140N as power switch with current limiting. I would use something like SSM6K361NU from Toshiba with additional PTC fuse for safety. They can be directly controlled with STM32 so i suppose that NRF will handle them too (I will dig into datasheet of NRF).

What amperage You're interested in? :D I can manage to fit in there 1A or 2.5A dc-dc converter without huge bump in price (maybe even lowering it?). But for higher amperage i will have to do test board for myself. I've done few designs with dc-dc converter that I've used in here, so I'm confident about it.

For the leakage voltage I'm pretty sure that this is caused by not having pullup resistor on BTS4140N gate and also not limitng the zero gate current from BSP89. Problem should be solved by adding two resistors like this:

Mind that in this example I've reused the BTS4140N symbol for the BSP89 :oops:
And also that this circuit by adding pullup resistor to the gate of the BTS4140N will default into ON state.
I'll check datasheets deeper tomorrow :)

Morning! Ok great, thinking more unless anyone else shouts and wants greater amperage in the regulator probably makes sense to leave it small - as larger means less efficient unless the current is actually being used - and more heat!

Interesting information on the mosfet circuit thanks for your thoughts - Do you think the leakage voltage is going to cause a problem? The basic circuit works and switches the motor on/off ok. I think there will only be appetite to make any changes if we're solving a problem that definitely needs to be solved - anyone else have any thoughts?
 
beemac said:
Interesting information on the mosfet circuit thanks for your thoughts - Do you think the leakage voltage is going to cause a problem? The basic circuit works and switches the motor on/off ok. I think there will only be appetite to make any changes if we're solving a problem that definitely needs to be solved - anyone else have an thoughts?
I am using on my ebike and current schematic and components are working without any issues at all.
 
casainho said:
rananna said:
How do you make the electrical connection to the button battery?
I can see that it is very thin.
In addition to brakes wire access, will there be enough room to tuck all the wires under the buttons once you solder the board?
Can there be a removable access port on the bottom to allow for easier replacement of the battery?
Battery connection will be by direct contact of thin wires - a little sponge can be placed inside the remote to make force against the battery so the contact with the wires will work -- this is how is working on my EBike current remote.

I did a new design, this time with more space for the wires. Also this design has a 8mm clearance between the handle bar and the base of the remote, so the most of the remote area can be on top of brake lever.

No button port for the battery - it is easier for now and I really hope the battery can handle 2 years. The remote will be open buy removing the 5x M2 screws on the back:

What type of plastic did you use for printing?
 
beemac said:
Jonesm32 said:
g4eml said:
The instructions for programming the wireless bootloader using Windows are lacking quite a few important steps. Anyone not experienced with Windows would waste a lot of time trying to get it to work.

I have just gone through the process and made the following notes which should help. Maybe someone with write access can update the instructions.

1. Download openocd for windows (current link is OK)
2. Unzip the file on your PC desktop.
3. Copy the resulting folder to a convenient place on your PC. For ease of access use C:/
4. Rename the folder openocd
5. Copy the Wireless Bootloader .hex file you have previously downloaded into c:/openocd/bin
6. In the Windows search box enter cmd to open a command prompt.
7. Enter cd C:/openocd/bin
8. Enter the following. (All in one line)

openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"

9. This will flash and verify the write. If you see ** Verified OK **, the flashing has been successful.



As an aside it might be easier if the above command was made available as a .bat file which would avoid typing errors.
Then the .bat file could be copied to the bin directory and executed with a double click removing the need to use the cmd prompt.

Colin.

Hello
Is anyone able to offer me any guidance on flashing the bootloader using ocd in Windows 10? When attempting this following the Github instructions as above, I get the following result:

C:\OpenOCD\bin>openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Error: open failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

I'm sure this means something to someone who reads this forum, but it is Greek to me. Any suggestions?
Thanks in advance
Ed

try running without the last two -c "yada" arguments - see if it's the board that's failing to init that's causing the error - or those commands...

If that works - you can telnet to 4444 and type the commands explicitly

program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify
exit

You could also try this process i posted recently - but if the problem is wiring or similar then you'll get the same error most likely.

https://github.com/OpenSourceEBike/...b/main/stlinkv2.md#easy-openocd-update-script
After checking wiring etc, I thought I would try with a 5v power supply rather than the 3.3v shown on the schematic, and success, verified OK!
Thanks for the reply.
Ed
 
rananna said:
What type of plastic did you use for printing?
Cheap PLA of black color.

I have the lower part ready and next I will focus on the top part, mainly to include the new area with the hole for the RGB LED.

Not so good print quality this time, thanks to the support configurations I did change:




 
casainho said:
rananna said:
What type of plastic did you use for printing?
Cheap PLA of black color.

I have the lower part ready and next I will focus on the top part, mainly to include the new area with the hole for the RGB LED.

Not so good print quality this time, thanks to the support configurations I did change:




Could you please clarify what you mean by problems with "support configurations" causing poor printing?
 
rananna said:
Could you please clarify what you mean by problems with "support configurations" causing poor printing?
I printed with the same orientation as seen on the picture and so there was support added automatically - I use Cura software and I did change the support configuration, maybe that was the reason why it has not so good quality.
 
Hi, i've come back! :D

I've just finished to build the TSDZ2 wireless board, but i cannot enter in DFU mode to update the firmware (first time update), i've just flashed the bootloader (**Verified OK**) and connected the controller to TSDZ2.

I've followed the guide on opensourceebike.github.com: press RESET button for several seconds while POWER ON, is it right? No led blinks, nothing happens.

Thanks for any help!
 
Filippods said:
Hi, i've come back! :D

I've just finished to build the TSDZ2 wireless board, but i cannot enter in DFU mode to update the firmware (first time update), i've just flashed the bootloader (**Verified OK**) and connected the controller to TSDZ2.

I've followed the guide on opensourceebike.github.com: press RESET button for several seconds while POWER ON, is it right? No led blinks, nothing happens.

Thanks for any help!
nothing visible with the leds happen.
Please run nordic connect and see if TSDZ2_DFU shows up in bluetooth.
That would indicate it is ready for a firmware update.
 
rananna said:
Filippods said:
Hi, i've come back! :D

I've just finished to build the TSDZ2 wireless board, but i cannot enter in DFU mode to update the firmware (first time update), i've just flashed the bootloader (**Verified OK**) and connected the controller to TSDZ2.

I've followed the guide on opensourceebike.github.com: press RESET button for several seconds while POWER ON, is it right? No led blinks, nothing happens.

Thanks for any help!
nothing visible with the leds happen.
Please run nordic connect and see if TSDZ2_DFU shows up in bluetooth.
That would indicate it is ready for a firmware update.

On nordic connect i cannot see TSDZ_DFU
 
Filippods said:
rananna said:
Filippods said:
Hi, i've come back! :D

I've just finished to build the TSDZ2 wireless board, but i cannot enter in DFU mode to update the firmware (first time update), i've just flashed the bootloader (**Verified OK**) and connected the controller to TSDZ2.

I've followed the guide on opensourceebike.github.com: press RESET button for several seconds while POWER ON, is it right? No led blinks, nothing happens.

Thanks for any help!
nothing visible with the leds happen.
Please run nordic connect and see if TSDZ2_DFU shows up in bluetooth.
That would indicate it is ready for a firmware update.

On nordic connect i cannot see TSDZ_DFU

I was holding the wrong button, now i've flashed the firmware, but i can't find the controller through bluetooth.

[youtube]https://youtu.be/Ozaa8GxgxYg[/youtube]
 
Back
Top