mongo

Well-known member
Joined
May 27, 2024
Threads
3
Messages
4,046
Reaction score
4,803
Location
SE Michigan
Vehicles
Cyberbeast
Country flag
Tesla lightbar communication is controlled by a pair of LIN messages sent at 10ms intervals.
Control:
ID: 0x0A
Length: 8 bytes
Data: six values 0-100, packed at 10 bits each

// Calculate LIN enhanced checksum (over PID + data)
typedef union {
uint8_t bytes[8]; // 8-byte array for direct access
struct {
uint16_t value0 : 10; // First 10-bit value
uint16_t value1 : 10; // Second 10-bit value
uint16_t value2 : 10; // Third 10-bit value
uint16_t value3 : 10; // Fourth 10-bit value
uint16_t value4 : 10; // Fifth 10-bit value
uint16_t value5 : 10; // Sixth 10-bit value
uint16_t padding : 4; // Fill remaining 4 bits to reach 64 bits
} __attribute__((packed)) values; // Packed to avoid padding
} __attribute__((packed)) lin_bar_command_t;
Status:
ID: 0x0B
Length: 5 bytes
Data: temperature, voltage, and other status
However, you can respond with zeros and the truck accepts it as proof of life.

Diagnostics:
ID: 0x3C 0x3D
Length: 8 bytes
Data: various propriety including software version
Truck will complain if these are ignored, but still allows the UI to function.

Here's an Amazon list of the parts needed to make your own 2 output controller:
https://www.amazon.com/hz/wishlist/ls/36PX96UY981FV?ref_=wl_share

One DCDC converter provides 5V to the ESP32 via the 5V pin (the listed module diode ORs it with the USB feed, others don't). The second is set for 15V to power the LIN transceiver.

If your micro is 3.3V (like the ESP32), you should remove the 5V pullup resistors (R4, R6) from the LIN transceiver board (but mine survived with them).

Parts handy for development and testing: https://www.amazon.com/hz/wishlist/ls/3N0GP3YZM3SFZ?ref_=wl_share

Using a second LIN transceiver, you can control the lightbar directly allowing custom patterns instead of just dimming levels.

Sponsored

 


mitch9

Well-known member
First Name
Mitch
Joined
Apr 19, 2021
Threads
1
Messages
65
Reaction score
101
Location
Boston, MA
Vehicles
2025 Dual Motor Cybertruck
Occupation
Engineer
Country flag
I bought a Dual Motor Cybertruck in August, have no lightbar (yet).

I’d be interested in wiring up Mongo’s circuit, and testing it (I have setup ESP32’s before). do you have a schematic to show all of the module connections? I’m assuming your using a laptop to the ESP32’s usb-c port to control it, or perhaps a web browser on a phone? Is it connected only to the 3 wires (Ground, +48V, and LIN bus) availble where the lightbar connects? finally, do you have a suggestion for a lightbar that’s available to control? most of what I see are simple on/off models, that don’t appear to have any access to their wiring to customize them… willing to disassemble/customize one as well.. thanks Mongo

Mitch
 
OP
OP
mongo

mongo

Well-known member
Joined
May 27, 2024
Threads
3
Messages
4,046
Reaction score
4,803
Location
SE Michigan
Vehicles
Cyberbeast
Country flag
I bought a Dual Motor Cybertruck in August, have no lightbar (yet).

I’d be interested in wiring up Mongo’s circuit, and testing it (I have setup ESP32’s before). do you have a schematic to show all of the module connections? I’m assuming your using a laptop to the ESP32’s usb-c port to control it, or perhaps a web browser on a phone? Is it connected only to the 3 wires (Ground, +48V, and LIN bus) availble where the lightbar connects? finally, do you have a suggestion for a lightbar that’s available to control? most of what I see are simple on/off models, that don’t appear to have any access to their wiring to customize them… willing to disassemble/customize one as well.. thanks Mongo

Mitch
The accessory list has a 24V-48V light bar that is cheap and handy. I used 6 of them along with three modules for my demo. (And 12V lights in strings of four).

It connects to the three roof connections. I like the lever connectors in the accessory list.

I added a control web page to the ESP32, but you can run outputs based on the LIN messages. USB-C for programming and diag interface.

IO is configurable based on your code.
48V feeds two DCDC
DCDC 1 set to 5V to ESP32
DCDC 2 set to 15V to LIN transceiver
ESP32 connections:
Tx/Rx to LIN (should remove R4&R6 and enable GPIO pull ups)
GPIO to the load switches (as many as you want/ have pins for)
Tesla Cybertruck DIY: Custom Light Control for Tesla Factory Offroad Lightbar and/ or Aftermarket Screenshot_20251028_200503_Firefox
 

Cybertruck Dude

Well-known member
First Name
Ed
Joined
Nov 29, 2023
Threads
0
Messages
155
Reaction score
148
Location
Illinois
Vehicles
Cybertruck
Occupation
OperatingEngineer
Country flag
Tesla lightbar communication is controlled by a pair of LIN messages sent at 10ms intervals.
Control:
ID: 0x0A
Length: 8 bytes
Data: six values 0-100, packed at 10 bits each



Status:
ID: 0x0B
Length: 5 bytes
Data: temperature, voltage, and other status
However, you can respond with zeros and the truck accepts it as proof of life.

Diagnostics:
ID: 0x3C 0x3D
Length: 8 bytes
Data: various propriety including software version
Truck will complain if these are ignored, but still allows the UI to function.

Here's an Amazon list of the parts needed to make your own 2 output controller:
https://www.amazon.com/hz/wishlist/ls/36PX96UY981FV?ref_=wl_share

One DCDC converter provides 5V to the ESP32 via the 5V pin (the listed module diode ORs it with the USB feed, others don't). The second is set for 15V to power the LIN transceiver.

If your micro is 3.3V (like the ESP32), you should remove the 5V pullup resistors (R4, R6) from the LIN transceiver board (but mine survived with them).

Parts handy for development and testing: https://www.amazon.com/hz/wishlist/ls/3N0GP3YZM3SFZ?ref_=wl_share

Using a second LIN transceiver, you can control the lightbar directly allowing custom patterns instead of just dimming levels.

Would this be possible as an update from Tesla with the stock lightbar, or is that just not mechanically possible? Just curious?
 
OP
OP
mongo

mongo

Well-known member
Joined
May 27, 2024
Threads
3
Messages
4,046
Reaction score
4,803
Location
SE Michigan
Vehicles
Cyberbeast
Country flag
Would this be possible as an update from Tesla with the stock lightbar, or is that just not mechanically possible? Just curious?
Would what be possible, individual control of the six segments? Yah, that what lightshow does.
Lightbar on right, aftermarket on left, pass-through control from the truck.
 

jjban

Well-known member
First Name
RYAN
Joined
Jan 24, 2024
Threads
4
Messages
56
Reaction score
46
Location
Orange CA
Vehicles
Model S Model X Cybertruck
Country flag
有可能实现对六个部分的单独控制吗?是的,灯光秀就是这么做的。
右侧是警示灯条,左侧是改装的,可通过卡车进行控制。

[/引用]
Tesla Cybertruck DIY: Custom Light Control for Tesla Factory Offroad Lightbar and/ or Aftermarket niubi-quentin
 


jjban

Well-known member
First Name
RYAN
Joined
Jan 24, 2024
Threads
4
Messages
56
Reaction score
46
Location
Orange CA
Vehicles
Model S Model X Cybertruck
Country flag
Could you write a step-by-step tutorial? Really like it.
 

mitch9

Well-known member
First Name
Mitch
Joined
Apr 19, 2021
Threads
1
Messages
65
Reaction score
101
Location
Boston, MA
Vehicles
2025 Dual Motor Cybertruck
Occupation
Engineer
Country flag
Is the aftermarket light bar on the left lightshow, one you custom built, with (6) of the $10 Amazon lights, or is that a commercialy available model you modified? If a standard aftermarket light bar, which one? Thanks :)
 
OP
OP
mongo

mongo

Well-known member
Joined
May 27, 2024
Threads
3
Messages
4,046
Reaction score
4,803
Location
SE Michigan
Vehicles
Cyberbeast
Country flag
Could you write a step-by-step tutorial? Really like it.
The hardware is really just post #7 (unless you make your own PCB).

The software does the magic, here's a copy of it. Readme is a little stale, I pulled out BLE serial due to having a web server.
Password.example.h needs to be renamed to password.h and filled in with your credentials.
Minimal comments .
 

Attachments

jahansolu

Well-known member
First Name
Jahan
Joined
Oct 17, 2024
Threads
33
Messages
267
Reaction score
737
Location
Vancouver
Vehicles
M3, Cybertruck
Country flag
Tesla lightbar communication is controlled by a pair of LIN messages sent at 10ms intervals.
Control:
ID: 0x0A
Length: 8 bytes
Data: six values 0-100, packed at 10 bits each



Status:
ID: 0x0B
Length: 5 bytes
Data: temperature, voltage, and other status
However, you can respond with zeros and the truck accepts it as proof of life.

Diagnostics:
ID: 0x3C 0x3D
Length: 8 bytes
Data: various propriety including software version
Truck will complain if these are ignored, but still allows the UI to function.

Here's an Amazon list of the parts needed to make your own 2 output controller:
https://www.amazon.com/hz/wishlist/ls/36PX96UY981FV?ref_=wl_share

One DCDC converter provides 5V to the ESP32 via the 5V pin (the listed module diode ORs it with the USB feed, others don't). The second is set for 15V to power the LIN transceiver.

If your micro is 3.3V (like the ESP32), you should remove the 5V pullup resistors (R4, R6) from the LIN transceiver board (but mine survived with them).

Parts handy for development and testing: https://www.amazon.com/hz/wishlist/ls/3N0GP3YZM3SFZ?ref_=wl_share

Using a second LIN transceiver, you can control the lightbar directly allowing custom patterns instead of just dimming levels.

THIS! Ty for your service.
 
OP
OP
mongo

mongo

Well-known member
Joined
May 27, 2024
Threads
3
Messages
4,046
Reaction score
4,803
Location
SE Michigan
Vehicles
Cyberbeast
Country flag
Is the aftermarket light bar on the left lightshow, one you custom built, with (6) of the $10 Amazon lights, or is that a commercialy available model you modified? If a standard aftermarket light bar, which one? Thanks :)
That is the amazing shelf bracket, zip ties, and 6 of the short lights from Amazon featured in post #5. Plus colored 12V lights wedged under.

@Mars Adventure Gear has 48V light bars that might work well, but I wasn't going for a permanent installation...
Tesla Cybertruck DIY: Custom Light Control for Tesla Factory Offroad Lightbar and/ or Aftermarket 20251028_201549
Sponsored

 
 








Top