Tinkla Relay

From Tinkla: Tinkering with Tesla
Revision as of 23:00, 2 May 2022 by BogGyver (talk | contribs) (Reflashing Firmware)

Do you like Tinkering with your Tesla? Do you like adding additional features to it without having to install old style switches to control them? Do you want to control additional lights or devices based on specific conditions of the car (charging, driving, turning left/right, gear forward/reverse, high beams on, blind spot monitoring signals, or specific button presses on the steering wheel)? Then Tinkla Relay is a must have Swiss Army Knife for Tesla Model S/X integrations (and very SOON Model 3/Y).

Tinkla Relay is a device that connects to your Tesla power and CAN and has 4 output relays that are turned on/off based on your settings configured via DIP switches. The maximum output for the relays is 12V and up to 3A total between all on channels at a time. This is enough to drive GPIO signals, trigger relays for larger consumers or turn on notification LEDs.

Talk: Feedback? Ideas? Comments?

What is in the box

  1. The Tinkla Relay board
  2. Dev harness that will allow you to connect to the OBD2 port
  3. 3A mini fuse
  4. Automotive grade hook and loop tape

Installing the Tinkla Relay

Tinkla Relay can be either installed using the provided harness directly into the OBD2 port or hardwired directly into the car power and CAN lines. To connect directly to Tinkla Relay you need a Molex 34791-0080 connector with the following wiring:

Tinkla Relay Wiring
Pin Use Connect to
1 CAN 1 Low Chassis CAN Low
2 CAN 1 High Chassis CAN High
3 Not Used
4 CAN 2 Low not used on Model S/X
5 CAN 2 High not used on Model S/X
6 Not Used
7 GND car ground
8 12V car accessory power or permanent power, depending on application

Flashing TinklaRelay Firmware

Sometimes there is a need to update your Tinkla Relay firmware to take advantage of new code releases. In order to do this, you will need access to either a Mac or a Linux computer and USB cable to connect from your computer to the micro-USB port on the Tinkla Relay.

In order to flash the latest code for Tinkla Relay, open a terminal window on your Mac or Linux machine and type the following commands:

1. Go to your home directory

cd ~

2. Download the latest firmware

curl -O https://tinkla.us/files/tinklaRelayFlasher.tar.gz

3. Decompress the archive

tar xvzf tinklaRelayFlasher.tar.gz

4. Remove the archive

rm tinklaRelayFlasher.tar.gz

5. Enter the folder containing the code

 cd tinklaRelayFlasher

6. Flash the code

./flash_tinkla_relay.sh

If you see an error related to the LIBUSB (***usb1.USBErrorNotFound: LIBUSB_ERROR_NOT_FOUND [-5]***) you will have to re-run the last command above until it works (on Macs especially).

Virtual Buttons

Tinkla Relay creates up to 4 virtual buttons in order to control the relay outputs. These virtual buttons are combinations of quick double presses on existing steering wheel controls. Depending on the configuration selected via the DIP Switches, these virtual buttons can act alone or in combination with other logic based on car state.

In the table below we show the connection between a virtual button and the corresponding steering wheel button. In order to switch the state of the relay for that corresponding button, the user will have to double-press that particular steering wheel button quickly with no more than 0.75 s between presses.

Tinkla Relay Virtual Buttons
Virtual Button Name Steering Wheel Button
Button 1 Menu Command
Button 2 Voice Command
Button 3 Right Wheel
Button 4 Left Wheel

DIP Switches

Switches 1-5 allows you to select one of the per-configured logic that triggers the 4 relays to turn on or off.

Switch 6 is an overall setting for all 4 relays and, if on, will keep the relays in their state even when car is off. If Switch 6 is off then all relays will be turned off when the car is off.

Switches 7 and 8 are for future use and should be always kept in the OFF position to avoid device malfunction.
Tinkla Relay Configurations
DIP Switches Relays
Sw1 Sw2 Sw3 Sw4 Sw5 Relay 1 Relay 2 Relay 3 Relay 4
OFF OFF OFF OFF OFF Button 1 Button 2 Button 3 Button 4
ON OFF OFF OFF OFF Button 1 + override when car in reverse Left turn signal Right turn signal Brake pressed
OFF ON OFF OFF OFF Button 1 + override when car in reverse Left turn signal when car in drive Right turn signal when car in drive Brake pressed when car in drive
ON ON OFF OFF OFF Button 1 + override when car in reverse Button 3 Button 4 Brake pressed
OFF OFF ON OFF OFF Button 1 + override when car in reverse Button 3 Button 4 Brake pressed when car in drive
ON OFF ON OFF OFF Button 1 + override when car in reverse High beams on Button 3 Button 4
OFF ON ON OFF OFF Button 1 + override when car in reverse High beams on when car in drive Button 3 Button 4
ON ON ON OFF OFF Button 1 + override when car in reverse Car in drive Car in reverse Button 4
OFF OFF OFF ON OFF Button 1 + override when car in reverse Button 2 Button 3 Button 4
ON OFF OFF ON OFF Button 1 + override when car in reverse Button 1 + left turn signal Button 1 + right turn signal Button 1 + car in drive
OFF ON OFF ON OFF Button 1 + override when car in reverse Button 2 + car in drive and left turn signal OR speed < 20 MPH and steering angle > 45 deg Button 2 + car in drive and right turn signal OR speed < 20 MPH and steering angle > 45 deg Button 4
ON ON OFF ON OFF Button 1 + override when car in reverse Button 2 + car in drive and left turn signal OR speed < 20 MPH and steering angle > 45 deg Button 2 + car in drive and right turn signal OR speed < 20 MPH and steering angle > 45 deg Button 3 + high beam
OFF OFF ON ON OFF Button 1 + override when car in reverse Button 2 + car in drive and left turn signal OR speed < 20 MPH and steering angle > 45 deg Button 2 + car in drive and right turn signal OR speed < 20 MPH and steering angle > 45 deg Button 3 + high beam when in drive
ON OFF ON ON OFF Button 1 + override when car in reverse Left side blind spot car present (*) Right side blind spot car present (*) Button 2 + high beam when in drive
OFF ON ON ON OFF Button 1 + override when car in reverse Left side blind spot car present (*) Right side blind spot car present (*) Button 2
ON ON ON ON OFF Button 1 + override when car in reverse Left side blind spot car present (*) Right side blind spot car present (*) Brake pressed when in drive
OFF OFF OFF OFF ON Button 1 + override when car in reverse Button 2 + high beam when in drive Brake pressed when in drive Car charging
ON OFF OFF OFF ON Button 1 + override when car in reverse Left side blind spot car present (*) Right side blind spot car present (*) Car charging
OFF ON OFF OFF ON Button 1 Left side blind spot car present (*) Right side blind spot car present (*) Button 2
ON ON OFF OFF ON Button 1 Left side blind spot car present (*) Right side blind spot car present (*) Brake pressed in drive
OFF OFF ON OFF ON Button 1 Button 2 + high beam when in drive Brake pressed in drive Car charging
ON OFF ON OFF ON Button 1 Left side blind spot car present (*) Right side blind spot car present (*) Car charging
(*) Requires the 12 sensor park assist option (6 front, 6 back) that was available from Tesla after October 2014.
If you see use for a different configuration and logic, please do not hesitate to reach out to me on Discord. If the setup has merit and can be used by others as well, i can add it to the code.

How to order Tinkla Relay