Skip to content

ESP32 Treadmill FTMS Devboard 1.0.1

Zingo Andersen edited this page Apr 21, 2022 · 5 revisions

Specs

  • Supports WT32-SC01, TTGO T-display and TTGO T4 Esp32 devboards with screens
  • All pins from devboards are availible on a debug list
  • Has 6 buttons 4 in joystic conf and a OK and Back button
  • Support REED + 6 Treadmill controll signals this are connected to a GPIO extender chip AW9523
  • Most pins can be routed to the ESP32 devboards also via DIP switches
  • Can be powered 5-12V via Cable or 5V via USB-C or via USB on ESP dev module
  • Was supposed to have level shifters 3.3V <-> 5V but this was broken and are disabled, (Sorry / Zingo)

Schematics

https://oshwlab.com/zingo_1902/esp32_ttgo_display

ESP32_TTGO_FTMS setup

Power

Red dipswitches controll Power in from top left corner (e.g. if you not power it via the ESP dev boards)

All this is along left side of the board:

Power IN (Upper left side)

In the top right corner there is 2 holes marked "J10" and a conector maked "DC1" on any of this you can add 5-12V a diod bridge is used so you do not need to care about + or Ground, the board is designed to even accept 12V AC but this has never been tested. Or you can connect a cable the USB-C connecter "USB1" only power will be used and no serial/debugging is possible on this connector, sorry.

RED-3Dipswitch (Upper/mid left side)

  • 1 - Default ON: USB-C power connected
  • 2 - Default OFF: Cable in is 5V (bypass 5-12v -> 5V converted) (Not recomended)
  • 3 - Default ON: Cable in is 5-12V (5-12v -> 5V converter will be used)

ON/OFF (Mid/lower left side)

This switch can be used to power ON/OFF the board or turn of power from this cables if you connect a USB cable to the devboard itself for avoiding different power sources.

RED-2Dipswitch (Lower left side)

  • 1 - Default ON: 5-12v -> 5V converter is used
  • 2 - Default ON: 5v -> 3.3V converter is used

2 RED-LED (Bottom left corner)

  • 5V is available
  • 3.3V is available

ESP32 Devboards

In the top right corner add your used dev board, WT32-SC01 is prefered, but TTGO T-Display and TTGO T4 should work. (T4 is not yet tested)

TTGO T4 extra info

TTGO T4 can be placed in 2 direction or one connector can be used as debug. In the middle of the upper side of the devboard there are holes to connect the T4 I2C pins, but they could be connecto to any of the other SDA/SCL pins on the bord (there are some in the lower right corner), T4 don't have pin 26 used for REED connected so this need to be patched with a cable or reading REED via the AW9523 chip.

ESP32 debug pins

On the right (upper half) of the devboard there is a set of holes almost all pins from all boards are routed to it so it can be used to access or connect pins not available elsewhere. Printed pin number match ESP32 pins and all ESP32-DEV boards have different pins routed out, you need to check if the used board has the pins you want to access/patch.

WARNING: Take care if you use a WT32-SC01 or TTGO T-Display that the USB cable will overlap some pins so take care if you add something in the pins as you might want to debug via USB later.

Incline chip

A GY521 module (using a MPU6050 chip) is usually used via the I2c bus. There a 2 ways suported out of the box to connect it, direct connection or via a I2C-2-ETH bridge.

  • Direct connect (Lower right corner) you can add some sort of cable direct to your module (or actuallt place it on the board directly but this is probably not that usefull as the board will probably not be placed so it tilts with the treadmill)

  • I2C-2-ETH bridge (Upper Mid-Right side, the QWIICBus logo) to Extend the range for the i2c bus 2 x SparkFun_QwiicBus_Endpoint can be used with a ETH cable inbetween. https://learn.sparkfun.com/tutorials/sparkfun-qwiicbus-hookup-guide/all If you used this solder the 5 bottom ponts (GND, 3V3, SDA, SCL and EN) and on the left side GND and VCC1 (only left side VCC1 is connected on the devboard, sorry), On the SparkFun_QwiicBus_Endpoint you place on the debboard cut the 0-1 jumper, this will route 5V to the other side and mak it more stable. On the other SparkFun_QwiicBus_Endpoint you just need to soilder the button GND, 3V3, SDA, SCL directly your GY521/MPU6050 module, and keep the 0-1 jumper intact. WARNING: Only cut one 0-1 jumber and it should be on the devboard side. Now you can connect them with a standard Ethernet cable.

Treadmill connection

Black RJ45 and BLUE-8 Dipswitch (Upper left corner)

The initial intension was to use this as a connector to the treadmill, the RJ45 pins are routed to the debuglist "J1" below it and into the Blue DIP-switch, the idea was that on the other side of all but GND they should be connected to a level shifter to 3.3V and a debug led but this was broken and only GND can be "open:ed" with the DIP-switch. I have connected level shifters outside the board and connected them to "J1" so I still can use the RJ45, but do whatever suits your build best :)

(Numbers from DIP-Switch numbers)

  • 1 REED
  • 2 Start button on treadmill
  • 3 Speed down button on treadmill
  • 4 Incline down button on treadmill
  • 5 Incline up button on treadmill
  • 6 Speed up button on treadmill
  • 7 Stop button on treadmill
  • 8 Ground (If used DIP should be ON to connect to board ground)

8 debug "holes" (Left:ish lower corner, below BLUE-6 Dipswitch marked SW2)

The ide was that this is the 3.3V side of the level shifter, but as they are removed it's just the output pins where you need to connect your stuff after level shifting to 3.3V. I have used 2 premade levelshifter board (something like https://www.digikey.se/sv/products/detail/sparkfun-electronics/BOB-12009/5673795 ) and connected this pins to Low side of the boards and the "J1" pins mentions before to the High side, but you could connect the high-side to you REED and other signal directly, there is no advantage by using "J1" and the RJ45.

  • REED
  • Start button on treadmill
  • Speed down button on treadmill
  • Incline down button on treadmill
  • Incline up button on treadmill
  • Speed up button on treadmill
  • Stop button on treadmill
  • Ground

All of this are connected to the I2C GPIO Extender AW9523 chip and it recomended to use it to controll the Treadmill. As of this writing only REED is needed to go to the ESP32 devbords but it's also connect to the AW9523 so maybe it can also use it. This is electrically controlled by the BLUE-6 Dipswitch SW2 in the next section.

BLUE-6 Dipswitch (Left:ish lower corner, marked SW2)

This can be used to route the pins the the ESP32 devboards. WARNING: As not all pins are routed the the different boards, check the used board. Also since there is not enough pins on the devboards not all are routed.

NOTE: All pins are alos routed to the I2C GPIO Extender AW9523 chip so it's prefered to use it as the code on the devboard can stay the same.

  • 1 - Default ON: REED - ESP32 pin 26
  • 2 - Default OFF: Speed down button on treadmill - ESP32 pin 32
  • 3 - Default OFF: Incline down button on treadmill - ESP32 pin 2
  • 4 - Default OFF: Incline up button on treadmill - ESP32 pin 27
  • 5 - Default OFF: Speed up button on treadmill - ESP32 pin 4
  • 6 - Default OFF: Speed up button on treadmill - ESP32 pin 17

All but REED uses the I2C GPIO Extender AW9523 chip from software, so no need to connect any of them.

I2C GPIO Extender AW9523 chip (Bottom middle area)

This GPIO extender can be used to get more GPIO pins it's connected to the ESP32 devboards via I2C and to GPIO pins. Around the chip there a debug "holes" to access all GPIO pins, all but P0_6, P0_7 and P1_7 are allready connected to Treadmill or buttons.

BLUE-2 Dipswitch (Left:ish lower area, marked SW3)

  • 1 - Default ON: AW9523 interupt pin - ESP32 pin 25 (not enabled in SW yet)
  • 2 - Default OFF: AW9523 RSTN pin - ESP32 pin 33

Buttons

The board have 6 buttons they are connected to the AW9523 chip and can be connected to some ESP32 devboards

BLUE-6 Dipswitch (Mid-left:ish lower area, marked SW4)

Not tested double check on ESP32 side if you can use this. All are connected to the AW9523 chip use it instead to read the buttons.

  • 1 - Default OFF: BACK - ESP32 pin 15
  • 2 - Default OFF: OK - ESP32 pin 13
  • 3 - Default OFF: RIGHT - ESP32 pin 39
  • 4 - Default OFF: DOWN - ESP32 pin 36
  • 5 - Default OFF: LEFT - ESP32 pin 38
  • 6 - Default OFF: UP - ESP32 pin 37