Hardware: LilyGo T‐CAN485 - dalathegreat/Battery-Emulator GitHub Wiki

Hardware basics

The LilyGo T-CAN485 is what the Battery-Emulator originally started development with. It is a very cheap microcontroller, that runs the entire project easily.

Purchase link

The hardware can be bought via sites like AliExpress

Hardware info

The hardware has more details on LilyGo's Github page https://github.com/Xinyuan-LilyGO/T-CAN485

Expanding the board

The board comes with 1x CAN channel, and 1x RS485 channel. Some integrations need more than 1 channel, in these cases the LilyGo can be extended with add-on CAN channels:

Example, LilyGo + MCP2515 board

Expanding the board with more IO pins

The SD card slot can be used to gain more pins. This can be useful on setups that need lots of inputs/outputs, for instance add-on CAN + contactor control and/or enable line inputs. To use the SD card slot, you will need a "SD Card breakout board"

By installing one of these breakout boards, you can then remap the src/devboard/hal/hw_lilygo.h file to suit your newfound pins

  • GPIO_NUM_2 corresponds to DAT0 (SD_MISO)
  • GPIO_NUM_13 corresponds to DAT3 (SD_CS)
  • GPIO_NUM_14 corresponds to CLK (SD_SCLK)
  • GPIO_NUM_15 corresponds to CMD (SD_MOSI)

Completed product:

Enhancements notes, things to know

The chip has the tendacy to run quite hot. Some people book good results by adding a RAM or Raspberry Pi heatsinks on the chip, reducint the heat. Above 80 degrees the BE screen turns yellow as a warning, and above 95 degrees damage is possible. Take this into consideration when building enclosures for it. If the situation is crifical (hot and direct sun), you can use a Peltier element with fan.

There are several enclosure designs that can be 3D printed, so it can be mounted on a DIN rail. https://www.thingiverse.com/thing:6788996

https://www.thingiverse.com/thing:7029497

The lilygo has an internal voltage regulator, and input is rated at 5-12 volts. Not all lillygos actually work on 5V. A higher input is needed often. Some report issues above 12 volts, other run boards fine at 14.4 volts. It is not yet determined what causes these variations.

It is recommended to use a PSU like DC1036P or Well DC-HALE36-WL (36W)