Ready to deploy design #4

August 8, 2024 · View on GitHub

Read this document from start to end before building anything. Ensure you understand everything. This setup has not been tested at the system level. If you try, please, let me know.

Hardware features

  • Bluetooth Low Energy
  • Powered through rechargeable batteries or external power source (but not both)
  • Built-in battery monitor
  • Analog clutch paddles (potentiometers) x2.
  • Shift paddles (x2)
  • "ALT" buttons (x2)
  • Relative rotary encoders (with push button): x3
  • Up to 10 additional push buttons

Button mapping

  • Bite point calibration: rotary #1 clockwise and counter-clockwise (while holding one and only one clutch paddle).
  • Next clutch function: Left shift paddle and START.
  • ALT buttons mode: Right shift paddle and START.
  • Recalibrate clutch paddles: Left shift paddle, Right shift paddle and START.
  • Power on: rotary #1 clockwise or counter-clockwise.

Needed parts

Common:

ItemQuantityNotes
Bare bone rotary encoder3With built-in push button
Roller lever2For shift paddles (maybe they are included with your wheel's case)
Linear potentiometer 10 K-ohms or higher2For clutch paddles (maybe they are included with your wheel's case)
Push buttonsup to 10General purpose inputs (up to you)
Analog multiplexer274HC4051N (mandatory)
Standard perfboard sized 24x10 holes1
Unexpected Maker's TinyPico Devkit board1With male pins already soldered
Pin header (female)20For a DevKit board with male pins already soldered
Pin header (male or female up to you)39For external wiring
External Antenna with U.FL connector1Only required if TinyPico V3 with U.FL is chosen
Wires with Dupond plug in one end2Male or female matching your pin headers (for the battery or the external power source)

Battery-operated:

ItemQuantityNotes
LiPo Battery 4.2V (max)1Must fit TinyPico's specification. Capacity and size up to you
Both male and female GX16 (5 pins) connectors1 male and 1 femaleFor the charging port
Micro-USB/USB-C spiral cable long enough1For charging. Must match your TinyPico USB connector.
Battery connector1Depends on your battery

External power source:

ItemQuantityNotes
External connector1Depends on your external power source

Other parts (quantity unknown):

  • Thin wire.
  • Wire with Dupond terminals (for external wiring). A kit for protoboards will do the job. ¿Male or female? the opposite to pin headers.
  • Welding tin.

Other notes:

  • The GX16 connector may be replaced by any other kind. The GX16 features a knot that prevents accidental unplug. The 5 pins flavor allows to build a fully capable USB port, not just a charging port, if you want.

Pin-out plan for the TinyPico DevKit board

GPIOInputOutputUsageNotes
25OKOKLeft pot
26OKOKRight pot
27OKOKMultiplexer selector 1
15OKOKMultiplexer selector 2outputs PWM signal at boot
14OKOKMultiplexer selector 3outputs PWM signal at boot
4OKOK"start" button
23OKOKROT3_B
19OKOKROT3_A
18OKOKROT2_B
5OKOKROT2_Aoutputs PWM signal at boot
22OKOKROT1_B
21OKOKROT1_A
32OKOKMultiplexer input 1
33OKOKMultiplexer input 2

Circuit layout

Open the circuit layout using DIY Layout Creator.

Setup #3 circuit layout

This layout includes the following subsystems (read for an in-depth explanation):

Notes and build tips:

  • The packaging of the analog multiplexers will show a small circle next to pin #1, which is tagged as A4 here.

External wiring

  • Each input has an assigned number in the circuit layout. Certain inputs have a particular function, so attach them properly.
  • The POTn_GND and POTn_VCC terminals of each potentiometer are interchangeable. If the clutch (or axis) goes to 100% when idle, swap those terminals. If you don't have the chance to swap those terminals, the companion app has the ability to swap axis polarity by user request.
  • Push buttons:
    • There are three ALL_SW_COM pins. They are intended for the left, center and right sides of the steering wheel, but you may use any of them.
    • Wire ALL_SW_COM to just one terminal of each push button in a chain.
    • Wire the other terminal of each push button to one of the light-blue pins.
    • Bare bone rotary encoders: their built-in push button must be wired like any other push button, being SW and SW COM the involved terminals.
  • In a battery-operated setup:
    • Solder the battery connector to the standalone wires with Dupond plugs in the other end.
    • Battery(+) is the positive pole of the battery.
    • Battery(-) is the negative pole of the battery.
    • Attach Battery(+) and Battery(-) properly. Take care not to swap those terminals.
    • Battery charge port:
      • Cut the USB cable near the Micro-USB/USB-C end, but leave enough length to reach the GX16 plug.
      • Make sure matching GX16 pins in both male and female connectors are soldered to the same wire (same color).
      • Red and black wires are mandatory. Others are optional.
  • In an externally powered setup:
    • Solder the external connector to the standalone wires with Dupond plugs in the other end.
    • Leave Battery(+) unwired (obviously).
    • EXTERNAL_5V is the positive terminal of the external power source. Any DC source from +5V to +7V is suitable.
    • EXTERNAL_GND is the negative (or ground) terminal of the external power source.
    • Leave EXTERNAL_3V3 unwired, unless you have a 3.3 volts externally regulated power source (very uncommon). In such a case, leave EXTERNAL_5V unwired.
    • You may use the USB plug as an external power source, instead. But, in such a case, leave EXTERNAL_3V3, EXTERNAL_5V and EXTERNAL_GND unwired.
  • Rotary encoder #1 is mandatory.

Firmware upload

At Arduino IDE, configure the board manager for "TinyPICO".

You should calibrate your battery first. See the Battery calibration procedure.

  1. Plug the USB cable to the Devkit board and upload the sketch with Arduino IDE.
  2. Open the serial monitor (Arduino IDE).
  3. Reset.
  4. Check there are no error messages.