Skip to content

Latest commit

 

History

131 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome!

This is BCC's unofficial EVC Truck repository, where all of the files for instrumentation on the truck are stored.

Arduino truck dashboard

The most up-to-date sketch we're working on is labeled goated.ino. 🐐


The File Tree

  • data contains the data files of our test runs.
  • docs contains important documents or manuals.
  • imgs contains images that are displayed on this document.
  • libraries contains a couple of the library files used for the Arduino Mega. This is just for reference. Honestly, this might not even be necessary at this point.
  • parser contains the script used to extract information from the generated output file. This will no longer be in use as the main sketch now outputs a comma-delimited file.
  • sketches contains all of the Arduino sketches made.

Hardware Overview

  • The GPS uses the UART serial communication protocol, and the LCD uses I2C.
  • The proto shield is used to help with wire management.

Hardware overview

List

Hookup Guidelines

Connecting the GPS

Plug in the 5-wire connection to the GPS module and to the GPS port on the CAN-BUS Shield. The second and the third wire should be stripped and have male ends soldered onto them, which is shown in the image below:

Labeled image showing wires 1-5 on GPS module

The two wires should be connected to the appropriate pins:

GPS Module Proto Shield (or Mega)
Third (middle) wire Pin 14
Second wire Pin 15

Establishing the SD Card Connection

If the prototyping shield isn't being used, the following are the pins you'd connect on the CAN-BUS and the Mega:

CAN-BUS Mega
10 53
13 52
11 51
12 50

If the prototyping shield is being used, the following are the pins you'd connect with female-to-female jumper wires:

Proto Shield Proto Shield
10 53
13 52
11 51
12 50

Proto shield wires showing SD card hookup

Connecting the LCD

Reference this hookup guide in general. To hook up the LCD for I2C, see this part of the hookup guide. Here's the diagram. For some reason, the diagram doesn't include the connections for LCD GND and RAW, so we guessed those.

LCD Breadboard CAN-BUS
GND A27
RAW A15
SDA D30 (LV1 on the Logic Level Converter)
SCL D29 (LV2)
E16 to -2 (from top right)
D28 (LV) 3.3v
H28 (HV) 5v
-1 (top right) GND
E15 VIN
H30 (HV1) SDA
H29 (HV2) SCL
J27 to -27 (from the right)

Orient the Logic Level Converter as shown in the image below:

LCD hookup


Displaying Truck Metrics

Metric Working on Display? Data is From
Speed (mph) Y GPS
RPM N Motor controller
Battery temperature (C) Y BMS
Motor controller temperature (C) N Motor controller
Pack current Y BMS
Pack voltage Y BMS
Lowest cell voltage Y BMS
Lowest cell voltage ID Y BMS
Kilowatt-hour Y BMS
Trip (miles) Y GPS
Time - -
Latitude/Longitude - GPS
Altitude (meters) - GPS
Course (degrees) - GPS
MPGe - BMS
Power - BMS

LCD Layout

  • (17, 1) is the lowest cell voltage ID
  • (14, 2) is the lowest cell voltage
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
0 x x . x x M P H R P M : x x x x
1 B T : x x x C M C : x x x C # x x
2 x x x A x x x . x V x . x x x V
3 x x x . x K W H T R I P : x x x . x

LCD layout demo

Connecting to the Battery Management System (BMS) on Arduino

  • In the Arduino code, make sure the baud rates are the same as the BMS via CANSPEED_125.
  • In order to retrieve metrics from the BMS, the BMS must be set up with the appropriate parameters under a message identifier. Keep in mind certain parameters take up 2 bytes instead of 1. Within the Arduino code, if statements catch messages on the CAN bus protocol. By accessing the appropriate byte from the message identifier, we can retrieve the metric we need from the BMS.
    • Take a look at this if statement:
      if (message.id == 0x123) {
          int CDEC = 0; 
          for (int i = 0; i < 2; i++) { // (1)
              int MDATA = (message.data[i]); 
              CDEC = CDEC + (MDATA*(pow(256, 1-i)));
          }
          lcd.setCursor(0,1); 
          lcd.print("BT:");
          lcd.print(message.data[3],DEC); // (2)
          lcd.print("C");
          lcd.setCursor(17,1);
          lcd.print("#");
          lcd.print(message.data[2],DEC); // (3)
          lcd.setCursor(13,2);
          lcd.print((float)CDEC/10000,3); // (4)
          lcd.print("v");
      }
      • (1) Gets the low cell voltage by checking bytes 0 and 1.
      • (2) Displays the highest battery temperature.
      • (3) Displays the low cell voltage ID.
      • (4) Displays the low cell voltage from (1).
  • You'll see some for statements that iterate on the same initialization value. This is intentional. Apparently it gets rid of leading zeroes.
  • Check the editing-canbus-messages document under docs for more information.

CAN Addresses on the BMS

These can be modified on the BMS software.

0x03B Byte Metric
0 Pack current
1
2 Pack inst voltage
3
4
5
6
7
0x3CB Byte Metric
0 Pack DCL
1 Pack CCL
2
3 Simulated SOC
4 High temperature
5 Low temperature
6
7
0x6B0 Byte Metric
0
1 Pack SOC
2 Pack resistance
3
4 Pack open voltage
5
6 Pack amphouts
7
0x123 Byte Metric
0 Low cell voltage
1
2 Low cell voltage ID
3 High temperature (battery)
4
5
6
7

Exporting Data into an Excel File

When taking the .txt file and importing it into an Excel spreadsheet, the following columns correspond to the following data labels:

Column Data Label
A Timestamp
B kwh (Energy Used)
C Cumulative Energy
D MPGe
E Lat
F Long
G Trip
H Distance
I Date
J Time
K Course (deg)
L Speed (mph)
M Current (A)
N Pack voltage (V)
O Lowest Cell ID
P Lowest Cell Voltage
Q Battery Temperture

From the Summer 2024 Team: Need Help?

Maybe we remember or forgot something. We'll do our best to help. :)

From the Spring 2025 Team: Need Help?

Marek: msolowiej225@gmail.com Omer: 16omerkilic@gmail.com

Prof Roller updated access and privileges to give each of you "view" access to the BCC EV Truck Main Folder (and all its subfolders): https://drive.google.com/drive/folders/0B_5XGBhi8e8OR3Y3SXFwM1d3ODA?resourcekey=0-Csu1-YCIw7EOlhjci-3egQ&usp=drive_link

Prof Roller also gave each of you "edit" privileges to the BCC EVC 2025 sub-folder (including all lower level folders) : https://drive.google.com/drive/folders/1Ohkeznx8yyZKjxn91wp-65J9ssRKBGQn?usp=drive_link

Prof Roller created a sub-folder for the weekly logs: BCC EV Truck Main Folder>BCC EVC 2025>EVC Spring 2025>Logbooks Omer- please put your Arduino/Instrumentation logs here. We should start a log for the other work we are doing on the truck.


Summer 2025 Todo List

View our task list on Notion.

  • Reformat SD card to be CSV-ready (what column corresponds to what metric was documented)
    • Integrate with BMS data
  • Test accuracy of trip
    • Trip on the instrumentation seems to be off by 0.01-0.05 miles in the beginning. Our car's odometer ended at 4.7 miles. The Arduino ended at 4.84 miles. We left the instrumentation on standby, where it was on but it was left in the car for a period of time, reflecting standby on the test runs.
  • Build another instrumentation set
  • Rewire instrumentation hardware to be more robust
  • Write more helpful error messages (what canbus message isn't being delivered)
  • Check why Arduino seems to only display A & V when plugged into IDE
  • Create new output file every time Arduino is started (new trial)
  • Integrate CANbus with Motor Controller
  • Process more data from Motor Controller
  • Log power from grid during charging (power meter)
  • Seatbelt indicator

About

BCC's unofficial EVC Truck repository.

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages