OpenSourceEBike.github.io

How to build the display

NOTE that this display only works for TSDZ2 motor with our OpenSource that you can download and see how to install, here.

Some of the following components can bought on online shops like Aliexpress, Ebay or at specialized electronics shops like www.mouser.com or www.farnell.com.

Componentes

You will need the following components:

Tools

You will need at least the following tools:

Step by step instructions

1 - Flash bootloader and firmware on the nrf52840 board - see the page:
1.1 - How to Flash the Wireless Bootloader on a Nordic Dongle
1.2 - How to update the firmware

In the steps 1.1 and 1.2 you flash the bootloader and then update the firmware, if all goes as expected, then the NRF52840 board is working.

2 - 3D print the enclosure:

3D printed enclosures, version for the OLED display 1.3 inches at left and 0.96 inches at right:

3 - Build your board

3.1 - Understand the circuit, see the schematic - display with I2C connection:

Display with SPI connection:

Schematic explanation

NRF52840 board pinout: Pinout

3.2 - Cut your nRF52840 board with a metal saw by hand so this way it will be smaller. Check it is ok on the enclosure, if not you can use a file tool to do the final adjustment - here a picture as example:

3.3 - Start soldering the components on a perfboard. Cut the perfboard in a way that is has almost the same area as the 3D printed box:

NOTE: always triple check the connections you did as it is easy for you to do a mistake. For instance, exchanging battery voltage pin with GND pin will most probably result in a burned NRF52840 and/or the DC-DC board.

The NRF52840 board were soldered to the perfboard (but still missing some connections).
The OLED display connections do not need that pins as they will be soldered on the inverse side directly to the pads of NRF52840 board:

Here we can see the perford on the other side and some pins already soldered:

Next step is to solder the DC-DC board. Only that three connections of DC-DC are used, the GND on one side and Vin and Vout on the other side - see next image.
Then also solder the TSDZ2 wires of VBattery and GND (do not forget to put the connector through the hole on the 3D printed enclosure). Connect to TSDZ2 with battery ON and check with a multimeter the input of DC-DC as also the output and it should be 5 volts. Move to next step only if you have the 5 volts, if not, you probably did something wrong.

Next solder the DC-DC output 5 volts to the VBUS of NRF52840. Connect to TSDZ2 with battery ON and check with a multimeter the input of DC-DC as also the output and it should be 5 volts. Then check the VDD OUT pin of NRF52840 board and it should be 3.3 volts. Move to next step only if you have the 3.3 volts, if not, you probably did something wrong.

Next solder the 4 wires for the OLED display. Connect again to the TSDZ2 with battery ON and you should see the display working, showing some text like “OS Display”. If the display is not working, check the voltage on the display pins, you need to have 3.3 volts between the VCC and GND pins. Move to next step only if the display is working.

Next you may want to unsolder the display to be easier for the next steps and solder it again as the last step.

Next solder the BTS4140 and BSP296 (or BSS123, which is smaller):

Next I soldered most of the wires, including the ones of the cable to connect on the TSDZ2 display connector. On next picture, the wires for the keypad are missing.
And I could use thinner wires, but I used the ones I had at hand:

After have everything soldered, you can finally solder the display. Everything should work now and if TSDZ2 motor is working correctly, the motor should initialize correctly after seconds seconds and you should see the main screen:

Next you need to close and make the display water prof. For that I use a large transparent tape and put it on top of the display in a way it will also cover the laterals. Then I put silicone on the lateral and then the cover part/top part/frame of the enclosure, that will squezze the silicone and the tape against the enclosure wall and that way make it water prof:

You will then need to also put silicone to cover very well the cables hole on the enclosure – the the white silicone on the next picture:

Next insert and tight the four screws and let the silicone cure for the next twelve or twenty four hours.

Congratulations, now you should have a nice display!
You can fix it to your handle bar using a rubber band (like the ones used by Garmin GPS mounts - you can buy them online).

Some pictures of my display: